/* Loy Studio. One family, Bricolage Grotesque (variable: weight, width, optical size), self-hosted. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --paper: #ECEBE7;      /* the light table */
  --paper-2: #E0DED8;    /* sunken: the strip's track, hover */
  --paper-3: #F6F5F2;    /* raised: the input */
  --ink: #221E2B;        /* violet-black, from the film's dusk */
  --ink-2: #5E5967;
  --line: #C9C5BD;
  --flag: #D9442F;       /* onion skin, the frame before: what is wrong */
  --take: #1D9C90;       /* onion skin, the frame after: the new take */
  --wrap: 1180px;
  --gutter: 24px;
  --gap: 96px;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "kern";
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 0.9em; }
:focus-visible { outline: 2px solid var(--take); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* the top */
.top { display: flex; align-items: baseline; justify-content: space-between; padding-top: 22px; padding-bottom: 8px; }
.mark { font-weight: 600; font-stretch: 90%; font-size: 1.25rem; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 22px; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; }

/* the hero: the headline, the words beside it, then the film with its deck */
.hero { padding-top: 56px; display: grid; grid-template-columns: 7fr 5fr; column-gap: 48px; row-gap: 40px; align-items: start; }
.hero > * { min-width: 0; }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: 0.98;
  font-stretch: 92%;
  letter-spacing: -0.025em;
}
.hero-side { padding-top: 0.6rem; }
.lede { font-size: 1.15rem; line-height: 1.5; max-width: 40ch; }
.status { margin-top: 18px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; max-width: 40ch; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 10px 16px; border-radius: 7px; font-weight: 500; font-size: 1rem; line-height: 1.2; border: 0; cursor: pointer;
  font-family: inherit;
}
.button:hover { background: #352F42; }

.film { grid-column: 1 / -1; margin: 8px 0 0; }
.screen { position: relative; background: var(--ink); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; object-fit: cover; }

/* the deck under the film: play, the strip of real frames as the scrub bar, the clock, sound */
.deck { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; margin-top: 10px; }
.deck > * { min-width: 0; }
.tbtn {
  font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 12px; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.tbtn:hover { background: var(--paper-2); border-color: var(--ink-2); }
.tbtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.strip {
  position: relative; display: block; background: var(--paper-2); border-radius: 6px; padding: 3px;
  cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none;
}
.frames { display: flex; gap: 2px; }
.fr {
  flex: 1 1 0; aspect-ratio: 16 / 9; border-radius: 3px; background-image: url(media/hero-strip.jpg);
  background-size: 1200% 100%; background-repeat: no-repeat; transition: opacity 0.25s;
}
.fr.ahead { opacity: 0.45; }
.head { position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; margin-left: -1px; background: var(--flag); pointer-events: none; }
.head::before { content: ""; position: absolute; top: -3px; left: -4px; width: 10px; height: 6px; background: var(--flag); border-radius: 2px 2px 0 0; }
.clock { font-variant-numeric: tabular-nums; font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.clock .dim { opacity: 0.6; }
.clock .frame { margin-left: 12px; }
.film figcaption { margin-top: 14px; color: var(--ink-2); font-size: 0.95rem; max-width: 78ch; }
.film figcaption strong { color: var(--ink); font-weight: 500; }

/* sections */
.loop, .tools, .waitlist { padding-top: var(--gap); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.25rem); line-height: 1.12; letter-spacing: -0.02em; }
.intro { margin-top: 14px; color: var(--ink-2); max-width: 62ch; font-size: 1.05rem; }

/* a cel: a real capture in a frame, numbered when it is one of a sequence */
.cel { position: relative; margin: 0; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cel img, .cel video { width: 100%; height: auto; }
.cel figcaption { padding: 10px 12px; background: var(--paper-3); color: var(--ink-2); font-size: 0.9rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.clip-toggle { font: inherit; font-size: 0.85rem; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.15em; white-space: nowrap; }

/* the loop: three frames in a row, a sequence, so they are numbered */
.takes { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: none; }
.takes .cel img, .takes .cel video { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.takes h3 { font-size: 1.25rem; margin-top: 16px; display: flex; gap: 12px; align-items: baseline; }
.takes h3 .n { font-variant-numeric: tabular-nums; color: var(--flag); font-weight: 600; font-size: 0.95rem; letter-spacing: 0; }
.takes p { margin-top: 8px; color: var(--ink-2); max-width: 40ch; }
.measured { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 64ch; }

/* the tools: words on the left, the real capture on the right */
.tool { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: start; margin-top: 56px; }
.tool:first-of-type { margin-top: 40px; }
.tool h3 { font-size: 1.4rem; }
.tool-text p { margin-top: 12px; color: var(--ink-2); max-width: 44ch; }
.tool-text { position: sticky; top: 24px; }
.tool-media .second { margin-top: 16px; }

/* the waitlist */
.waitlist { padding-bottom: 24px; }
.waitlist > p { margin-top: 14px; max-width: 56ch; color: var(--ink-2); }
.join { margin-top: 28px; max-width: 560px; }
.join label { display: block; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 6px; }
.join .row { display: flex; gap: 10px; }
.join input[type="email"] {
  flex: 1 1 auto; min-width: 0; font: inherit; color: var(--ink); background: var(--paper-3);
  border: 1px solid var(--ink-2); border-radius: 7px; padding: 10px 12px;
}
.join input[type="email"]:focus { border-color: var(--ink); outline: 2px solid var(--take); outline-offset: 2px; }
.join .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join .note { margin-top: 12px; min-height: 1.5em; color: var(--ink-2); max-width: 48ch; }
.join .note.ok { color: var(--take); }
.join .note.err { color: var(--flag); }
.join.done .row, .join.done label { display: none; }

.foot { display: flex; justify-content: space-between; gap: 20px; padding-top: 48px; padding-bottom: 48px; margin-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.9rem; }

/* the phone */
@media (max-width: 860px) {
  :root { --gap: 72px; --gutter: 20px; }
  .top { padding-top: 18px; }
  .nav { gap: 16px; font-size: 0.9rem; }
  .hero { padding-top: 36px; grid-template-columns: 1fr; row-gap: 24px; }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 3.2rem); }
  .lede { font-size: 1.05rem; }
  .film { margin-top: 4px; }
  .screen { border-radius: 8px; }
  .deck { grid-template-columns: auto 1fr auto; grid-template-areas: "strip strip strip" "play clock sound"; }
  .strip { grid-area: strip; }
  #hero-play { grid-area: play; }
  .clock { grid-area: clock; text-align: center; }
  #hero-sound { grid-area: sound; }
  .fr:nth-child(even) { display: none; }
  .takes { grid-template-columns: 1fr; gap: 32px; }
  .takes p { max-width: none; }
  .tool { grid-template-columns: 1fr; gap: 16px; margin-top: 44px; }
  .tool-text { position: static; }
  .tool-text p { max-width: none; }
  .join .row { flex-direction: column; }
  .foot { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
  .clock .frame { display: none; }
}

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