/* REC site. Black, white and greys; all color comes from the footage.
   One typeface, Switzer, set either very large and tight or very small.
   Everything sits on one 12-column grid. */

@font-face { font-family: Switzer; src: url(/fonts/switzer.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --fg: #f1f1ee;                       /* 17:1 on bg */
  --soft: #c9c9c5;                     /* long reading text, 12:1 */
  --mid: #9b9b96;                      /* small secondary text, 7:1 */
  --line: rgb(255 255 255 / .16);
  --sans: Switzer, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: clamp(18px, 3.2vw, 56px);
  --gap: clamp(12px, 1.6vw, 28px);
  --s1: 12px; --s2: 24px; --s3: clamp(32px, 4vw, 56px); --s4: clamp(96px, 12vw, 200px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.wrap { padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 9; }
.skip:focus { top: 16px; }

/* Type scale: one confident headline size per level, then small precise text. */
h1, h2 { font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 5.6vw, 6rem); letter-spacing: -0.05em; line-height: 0.95; }
h2 { font-size: clamp(2rem, 3.6vw, 3.75rem); letter-spacing: -0.04em; line-height: 1; }
.mid { font-size: clamp(1.125rem, 1.5vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.3; }
.body { font-size: clamp(1.0625rem, 1.35vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.35; color: var(--soft); max-width: 24em; text-wrap: balance; }
.tiny { font-size: 0.8125rem; line-height: 1.45; color: var(--mid); }

/* Header and footer */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo img { height: 22px; width: auto; }
.bar nav, .foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 0.8125rem; }
.bar nav a, .foot a { padding-block: 13px; color: var(--mid); transition: color 150ms var(--ease); }
.bar nav a:last-child { color: var(--fg); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin-top: var(--s4); padding-block: var(--s2) var(--s3); font-size: 0.8125rem; color: var(--mid); }

/* Footage: sharp-edged frames on black. */
.clip { background: #000; overflow: hidden; }
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; }
figcaption { margin-top: var(--s1); }
.badge { display: block; width: fit-content; border-radius: 8px; transition: scale 150ms ease-out; }
.badge:active { scale: 0.96; }
.section { margin-top: var(--s4); }

/* Hero: the footage on the right, the title and the download bottom left. */
.hero { row-gap: var(--s3); padding-bottom: var(--s3); }
.hero .screen { width: min(100%, 48dvh); }
.hero .clip { aspect-ratio: 4 / 5; }
.hero .copy { display: grid; gap: var(--s3); }

/* Profiles: one large moving frame, three small stills. */
.looks { row-gap: var(--s3); }
.looks .clip { aspect-ratio: 3 / 4; }
.text { display: grid; gap: var(--s2); align-content: start; }
.text .body + .body { margin-top: calc(var(--s1) - var(--s2)); }
.looks .stills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

/* Tape */
.tape .still { position: relative; aspect-ratio: 5 / 2; }
.tape .still::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 50%, rgb(0 0 0 / 0) 55%, rgb(10 10 10 / .7)); }
.tape .grid { row-gap: var(--s3); margin-top: var(--s3); align-items: end; }
.tape .pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.tape .pairs .clip { aspect-ratio: 3 / 4; }
.lines { display: grid; gap: 0.3em; font-size: clamp(1.0625rem, 1.35vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.35; color: var(--soft); }

/* Devices */
.app { row-gap: var(--s3); align-items: end; }
.app .pad, .app .phone { box-shadow: 0 0 0 1px var(--line); }
.app .pad { grid-column: 1 / 9; border-radius: 2.4% / 1.8%; overflow: hidden; }
.app .phone { grid-column: 9 / -1; aspect-ratio: 590 / 1278; border-radius: 13% / 6%; }

/* Close: the support line is the last large type on the page. */
.close { display: grid; gap: var(--s3); }
.close h2 { font-size: clamp(2.25rem, 5.4vw, 5.5rem); letter-spacing: -0.05em; line-height: 0.98; max-width: 14em; }
.close h2 a { text-decoration: underline; text-decoration-thickness: 0.04em; text-underline-offset: 0.1em; }

/* Reading pages: privacy, blog, 404 */
.page { padding-top: var(--s3); }
.page h1 { font-size: clamp(2.75rem, 9vw, 8rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.95; text-wrap: balance; overflow-wrap: break-word; }
.page .tiny { margin-top: var(--s2); }
.page .mid { margin-top: var(--s3); max-width: 24em; }
.prose, .policy { margin-top: var(--s3); max-width: 40rem; color: var(--soft); font-size: 1.0625rem; line-height: 1.6; }
.policy section + section { margin-top: 36px; }
.policy h2, .prose h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--fg); }
.policy p, .prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose img { margin-top: 12px; }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; font-size: 1rem; font-weight: 600; color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.2em; list-style: revert; }
.prose a, .policy a, .page p > a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font: 0.875em ui-monospace, Menlo, monospace; color: var(--fg); overflow-wrap: anywhere; }
.prose pre { padding: 16px; overflow-x: auto; box-shadow: 0 0 0 1px var(--line); }
.prose blockquote { margin-inline: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.posts { margin-top: var(--s3); }
.posts a { display: grid; gap: 6px; padding-block: 22px; border-top: 1px solid var(--line); }
.posts h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.posts p, .posts time { font-size: 0.8125rem; color: var(--mid); }

@media (min-width: 760px) {

  .looks { align-items: end; }
  .looks .loop { grid-column: 1 / 7; grid-row: 1 / 3; justify-self: start; width: min(100%, 64dvh); }
  .looks .text { grid-column: 8 / -1; grid-row: 1; align-self: start; }
  .looks .stills { grid-column: 8 / -1; grid-row: 2; }

  .tape .still { aspect-ratio: 3 / 1; }
  .tape .text { grid-column: 1 / 7; align-self: end; }
  .tape .pairs { grid-column: 8 / -1; }

  .app .text { grid-column: 1 / 7; }
  .app .pad { grid-column: 1 / 8; justify-self: end; width: min(100%, 60dvh); }
  .app .phone { grid-column: 8 / -1; justify-self: start; width: min(100%, 31dvh); }
}

@media (min-width: 900px) {
  .hero { align-items: end; }
  .hero .copy { grid-column: 1 / 7; grid-row: 1; }
  .hero .screen { grid-column: 7 / -1; grid-row: 1; justify-self: end; width: min(100%, calc((100dvh - 64px - var(--s3)) * 0.75)); }
  .hero .clip { aspect-ratio: 3 / 4; }
}
@media (min-width: 900px) and (min-aspect-ratio: 1 / 1) {
  .hero { min-height: calc(100dvh - 64px); }
}

@media (hover: hover) {
  .bar nav a:hover, .foot a:hover { color: var(--fg); }
}
