/* rawr's website. Every loop and labeled still sits on a pure white plate,
   so the page ground stays #fff wherever media sits. */

:root {
  --ink: #1d1d1f;
  --body: #424245;
  --quiet: #6e6e73;
  --rule: #e8e8ed;
  --panel: #f5f5f7;
  --link: #b25b00;
  --ground: #141417;   /* the app's own, rgb(20, 20, 23) */
  --amber: #eea43a;
  --content: 1320px;
  --gutter: 24px;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); }

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 700;
  margin: 0;
}

kbd {
  font-family: inherit;
  font-size: .82em;
  font-weight: 600;
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 7px;
  border: 1px solid #d2d2d7;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fafafa;
  color: var(--ink);
  line-height: 1.35;
  text-align: center;
}

/* Hero */

.hero {
  padding: 104px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero .icon { width: 176px; }

.hero h1 {
  font-size: clamp(64px, 11vw, 104px);
  line-height: 1;
  letter-spacing: -.035em;
  margin: 28px 0 14px;
}

.tag {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--quiet);
  margin: 0;
}

.intro {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--body);
  max-width: 690px;
  margin: 28px 0 0;
  text-wrap: pretty;
}

/* Dark hero: the app's own ground at the top, the window overlapping the
   white below it. Take dark-hero off <body> for the all-white hero. */

.shot { display: none; }

body.dark-hero {
  --shot: min(1200px, calc(100vw - 2 * var(--gutter)));
  /* How much of the window hangs over the white: 43% of its height. */
  --below: calc(var(--shot) * .263);
}

body.dark-hero .hero {
  padding-top: 96px;
  color: #f5f5f7;
  background: linear-gradient(to bottom, var(--ground) calc(100% - var(--below)), #fff 0);
}

body.dark-hero .hero .icon { width: 148px; }
body.dark-hero .tag { color: var(--amber); }
body.dark-hero .intro { color: #a1a1a6; }

body.dark-hero .shot {
  display: block;
  width: var(--shot);
  margin-top: 64px;
}

body.dark-hero .shot img {
  width: 100%;
  /* The plates' shadow: σ 20 pt cast 19 pt down, at the window's scale. */
  filter: drop-shadow(0 calc(var(--shot) * .0104) calc(var(--shot) * .0219) rgba(0, 0, 0, .6));
}

/* What it opens: each maker or kind over its file extensions */

.formats {
  list-style: none;
  margin: 44px auto 0;
  padding: 0 var(--gutter);
  max-width: var(--content);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 34px;
}

.formats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  white-space: nowrap;
}

.formats span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--quiet);
}

/* Speed: measured numbers under the loop */

.stats {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  max-width: 700px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 44px;
}

.stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 190px;
}

.stats b {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}

.stats span {
  font-size: 14px;
  line-height: 1.35;
  color: var(--quiet);
}

.sec > p.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--quiet);
  max-width: 560px;
  margin-top: 28px;
}

/* Sections */

.sec {
  padding: 130px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sec h2, .beta h2 {
  font-size: clamp(36px, 5.2vw, 56px);
  letter-spacing: -.025em;
  line-height: 1.05;
}

.sec > p {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--body);
  max-width: 690px;
  margin: 20px 0 0;
  text-wrap: pretty;
}

.media {
  width: 100%;
  max-width: var(--content);
  margin-top: 52px;
}

.media.single { max-width: 1200px; }
.media.screen { max-width: 1120px; }
/* Its labels a little smaller than the paragraph's type */
.media.keys { max-width: 720px; }
.media.solo { max-width: 760px; }

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.captions {
  font-size: 14px;
  color: var(--quiet);
  margin-top: 14px;
}

.duo {
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
  padding-bottom: 24px;
}

/* Windows side by side, hung from their title bars */
.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  padding-bottom: 24px;
}

a.zoom { display: block; cursor: zoom-in; }

/* A window whose still has its corners and edge already (build.py's
   WINDOWS): the plates' shadow, σ 20 pt cast 19 pt down, at the scale a
   third of the content shows an 820 pt window at. */
.window img { filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }

.sheet img {
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 24px 48px -12px rgba(0, 0, 0, .35);
}

.screen video {
  border-radius: 16px;
  background: #6b6b6b;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 30px 60px -20px rgba(0, 0, 0, .35);
}

video.loop { width: 100%; }

/* Features: a group's name beside its items, a hairline between groups */

.features {
  width: 100%;
  max-width: 1200px;
  margin-top: 52px;
  text-align: left;
}

.group {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px 40px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}

.group:last-child { border-bottom: 1px solid var(--rule); }

.group h3 {
  font-size: 24px;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.group dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}

.group dt {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.group dd {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--quiet);
  text-wrap: pretty;
}

.group kbd { font-size: .8em; padding: 0 5px; }

/* Beta */

.beta {
  margin: 150px auto 0;
  max-width: var(--content);
  width: calc(100% - 2 * var(--gutter));
  background: var(--panel);
  border-radius: 32px;
  padding: 88px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.beta h2 { margin-top: 22px; }

.beta p {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--body);
  margin: 16px 0 34px;
  line-height: 1.5;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border-radius: 980px;
  padding: 14px 26px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { background: #000; }

.foot {
  padding: 48px var(--gutter) 56px;
  font-size: 12px;
  color: var(--quiet);
  text-align: center;
}

/* Full size, over the page */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s ease;
  overflow: auto;
  overscroll-behavior: contain;
}

.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }

.lightbox img {
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  width: auto;
  height: auto;
}

.lightbox.ready.larger img { cursor: zoom-in; }

.lightbox.actual { display: block; }

.lightbox.actual img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}

.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lb-close:hover { background: rgba(0, 0, 0, .1); }

html.lb-lock { overflow: hidden; }

/* Narrow windows */

@media (max-width: 1080px) {
  .group { grid-template-columns: minmax(0, 1fr); }
  .group dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sec { padding-top: 96px; }
  .beta { margin-top: 110px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .hero, body.dark-hero .hero { padding-top: 64px; }
  .hero .icon, body.dark-hero .hero .icon { width: 128px; }
  body.dark-hero .shot { margin-top: 48px; }
  .formats { gap: 16px 24px; }
  .sec { padding-top: 80px; }
  .media, .features { margin-top: 36px; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .trio { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .captions { font-size: 13px; }
  .group { padding: 28px 0; }
  .group dl { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .beta { border-radius: 24px; padding: 64px var(--gutter); }
  .beta p br { display: none; }
  .beta .btn { font-size: 15px; padding: 13px 20px; }
  .screen video { border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lightbox { transition: none; }
}
