:root {
  --bg: #191919;
  --surface: #242424;
  --ink: #ffffff;
  --muted: #b4b4b4;
  --dark-ink: #111111;
  --accent: #0c7866;
  --accent-ink: #ffffff;
  --field-1: #d71e1e;
  --field-2: #1e4bd7;
  --field-3: #0c7866;
  --field-4: #ffe927;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);

  --m: clamp(16px, 3vw, 40px);
  --gap: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif; font-size: var(--step-body); line-height: 1.5;
  font-variation-settings: 'wdth' 100; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--field-4); color: var(--dark-ink); }
:focus-visible { outline: 3px solid var(--field-4); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #fff; color: #111; padding: 10px 14px; }
.skip:focus { left: 8px; }

/* display face: Archivo at its narrowest, heaviest */
.hero-h, .h-big, .spec-word, .verb-w, .close-h, .blocks span, .sheet-h, .h-sec, .req-h, .faq h3 {
  font-stretch: 62%; font-variation-settings: 'wdth' 62; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 0.86;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  font: 500 var(--step-small)/1 'Archivo', sans-serif; text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: var(--step-body); }
.btn-ink { background: var(--dark-ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-dark { background: var(--dark-ink); color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #0a6355; }
.btn-ghost { background: #fff; color: #111; }

/* ---------- bar: takes the colour of the chapter under it ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px var(--m); background: var(--bar-bg, var(--field-1)); color: var(--bar-ink, #fff);
  transition: background-color .3s, color .3s;
}
.wordmark { font-weight: 800; font-size: 1.125rem; text-decoration: none; letter-spacing: -0.01em; font-variation-settings: 'wdth' 75; }
.bar-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.bar-links a:not(.btn) { text-decoration: none; font-size: var(--step-small); font-weight: 500; }
.bar-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.bar[data-ink="light"] .btn-ink { background: #fff; color: #111; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; background: var(--field-1); padding: 0 var(--m);
  display: grid; grid-template-rows: 1fr auto; overflow: hidden;
}
.hero-h { padding-top: 15svh; font-size: clamp(5.5rem, 20vw, 21rem); line-height: .82; letter-spacing: -0.02em; position: relative; z-index: 2; }
.hero-h span { display: block; }
.hero-h .l1 { color: #fff; }
.hero-h .l2 { color: var(--dark-ink); }
.hero-pic {
  position: absolute; margin: 0; right: 4vw; bottom: 9svh; width: min(34vw, 520px); z-index: 1;
  transform: rotate(4deg); clip-path: polygon(0 4%, 100% 0, 96% 100%, 3% 96%);
}
.hero-pic img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: 30% 50%; }
.hero-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 0 9svh; max-width: 30rem; position: relative; z-index: 2; }
.hero-sub { font-size: var(--step-lead); line-height: 1.35; color: #fff; }

/* ---------- showcase ---------- */
.showcase { background: var(--bg); padding: var(--gap) var(--m) 0; height: clamp(640px, 100svh, 980px); overflow: hidden; }
.show-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.h-sec { grid-column: 1 / 6; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); line-height: .9; }
.show-p { grid-column: 7 / 13; max-width: 36rem; }
.specimens { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12vh; }
.spec-cap { font-size: var(--step-body); color: var(--ink); margin-bottom: 12px; }
.spec-word { font-size: clamp(7rem, 19vw, 22rem); line-height: .8; letter-spacing: -0.03em; white-space: nowrap; }
.spec:nth-child(2) .spec-word { color: var(--field-4); }

/* ---------- try (the live thing) ---------- */
.try { background: var(--field-4); color: var(--dark-ink); padding: var(--gap) var(--m); }
.try-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.h-big { font-size: var(--step-head); }
.try .h-big { grid-column: 1 / 8; font-size: clamp(3.5rem, 2rem + 8vw, 10rem); }
.try-p { grid-column: 8 / 13; font-size: var(--step-lead); line-height: 1.35; }
.try-form { display: flex; flex-wrap: wrap; gap: 24px; align-items: end; margin-top: 56px; }
.field { display: grid; gap: 8px; font-size: var(--step-small); font-weight: 500; }
.field em { font-style: normal; font-weight: 400; }
.field input {
  font: 400 var(--step-body) 'Archivo', sans-serif; min-height: 52px; padding: 0 16px; border: 2px solid currentColor;
  border-radius: 0; background: #fff; color: #111; width: 100%;
}
.field-url { flex: 1 1 360px; }
.field-url input { min-height: 72px; font-size: var(--step-lead); font-weight: 600; }
.formats { border: 0; padding: 0; margin: 0; display: flex; gap: 0; }
.formats legend { font-size: var(--step-small); font-weight: 500; margin-bottom: 8px; padding: 0; }
.formats label { position: relative; }
.formats input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.formats label { min-height: 52px; display: inline-flex; align-items: center; padding: 0 18px; background: rgba(17,17,17,.08); font-weight: 500; cursor: pointer; transition: background-color .18s; }
.formats label:hover { background: rgba(17,17,17,.16); }
.formats label:has(input:checked) { background: var(--dark-ink); color: #fff; }
.formats label:has(input:focus-visible) { outline: 3px solid var(--field-2); outline-offset: 2px; }

.board { margin-top: 48px; overflow-x: auto; scrollbar-width: thin; }
.board-track { position: relative; display: grid; grid-template-columns: 3fr 4fr 7fr 4fr 2fr; gap: 6px; min-width: 760px; padding-top: 14px; }
.playhead { position: absolute; top: 0; height: 14px; left: 0; width: 4px; background: var(--field-1); z-index: 3; animation: play 20s linear infinite; }
@keyframes play { from { left: 0; } to { left: calc(100% - 4px); } }
.shot { margin: 0; display: grid; gap: 10px; align-content: start; }
.shot figcaption { font-size: var(--step-small); font-weight: 500; }
.frame {
  aspect-ratio: 16 / 9; background: var(--dark-ink); color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 12px; overflow: hidden; transition: aspect-ratio .4s var(--ease), background-color .3s;
}
.board[data-format="vertical"] .frame { aspect-ratio: 9 / 16; }
.board[data-format="square"] .frame { aspect-ratio: 1; }
.s2 .frame { background: var(--field-2); }
.s3 .frame { background: #fff; color: #111; }
.s4 .frame { background: var(--field-1); }
.s5 .frame { background: var(--field-3); }
.f-big { font-size: clamp(.9rem, 1.6vw, 1.5rem); line-height: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; font-variation-settings: 'wdth' 62; text-transform: uppercase; overflow-wrap: anywhere; }
.f-mid { font-size: clamp(.95rem, 1.4vw, 1.35rem); line-height: 1; font-weight: 800; font-variation-settings: 'wdth' 70; }
.frame-ui { gap: 10px; }
.ui-bar { display: block; height: 10px; width: 60%; background: var(--field-2); }
.ui-cta { align-self: flex-start; background: var(--accent); color: #fff; font-size: .8rem; padding: 4px 10px; }
.frame-end span { font-size: .875rem; margin-top: 8px; }
.shot.on .frame { outline: 4px solid var(--dark-ink); outline-offset: 3px; }

.req { margin-top: 72px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px 24px; align-items: end; }
.req-h { grid-column: 1 / -1; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.req .field:nth-of-type(1) { grid-column: 1 / 4; }
.req .field:nth-of-type(2) { grid-column: 4 / 7; }
.req .field-note { grid-column: 7 / 13; }
.req .btn { grid-column: 1 / 5; }
.req-msg { grid-column: 5 / 13; font-weight: 600; min-height: 1.5em; align-self: center; }
.hp { position: absolute; left: -9999px; }

/* ---------- how: one verb at a time ---------- */
.verb { display: grid; grid-template-columns: 7fr 5fr; height: 86svh; min-height: 560px; background: var(--bg); overflow: hidden; }
.verb:nth-child(even) { grid-template-columns: 5fr 7fr; }
.verb:nth-child(even) .verb-text { order: -1; }
.verb:nth-child(2) { background: var(--surface); }
.verb-text { display: flex; flex-direction: column; justify-content: space-between; padding: 64px var(--m) 48px; gap: 32px; }
.verb-w { font-size: clamp(6rem, 17vw, 17rem); color: var(--field-4); padding-top: .06em; }
.verb:nth-child(2) .verb-w, .verb:nth-child(4) .verb-w { color: #fff; }
.verb-s { max-width: 30rem; font-size: var(--step-lead); line-height: 1.35; }
.verb-pic { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.verb:nth-child(3) .verb-pic { object-position: 50% 30%; }

/* ---------- sheets ---------- */
.sheets { padding-top: var(--gap); background: var(--bg); }
.sheets-h { padding: 0 var(--m) 48px; }
.sheet {
  height: 76svh; min-height: 520px; display: grid; overflow: hidden;
  grid-template-columns: repeat(12, 1fr); grid-template-rows: 72px minmax(0, 1fr); column-gap: 24px; padding: 0 var(--m);
}
.sheet:nth-of-type(1) { --i: 0; background: var(--field-2); }
.sheet:nth-of-type(2) { --i: 1; background: var(--field-3); }
.sheet:nth-of-type(3) { --i: 2; background: var(--field-1); }
.sheet:nth-of-type(4) { --i: 3; background: var(--field-4); color: var(--dark-ink); }
.sheet-h { grid-column: 1 / 7; align-self: center; font-size: clamp(1.75rem, 1rem + 2.4vw, 3rem); }
.sheet-p { grid-column: 1 / 6; grid-row: 2; align-self: end; padding-bottom: 48px; font-size: var(--step-lead); line-height: 1.35; max-width: 30rem; }
.sheet-pic { grid-column: 7 / 13; grid-row: 2; width: 100%; height: 100%; min-height: 0; object-fit: cover; margin-right: calc(var(--m) * -1); }
.sheet:nth-of-type(2) .sheet-pic { object-position: 50% 35%; }
.copy-card { background: #fff; color: #111; padding: 40px; display: grid; align-content: center; gap: 8px; }
.cc-net { font-weight: 700; margin-top: 16px; }
.cc-net:first-child { margin-top: 0; }
.cc-txt { font-size: var(--step-lead); line-height: 1.35; }

/* ---------- faq ---------- */
.faq-head { min-height: 40svh; background: var(--field-3); display: flex; align-items: flex-end; padding: 0 var(--m) 40px; position: relative; z-index: 1; }
.faq-head .h-big { font-size: clamp(4rem, 2rem + 9vw, 11rem); }
.band { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 56px var(--m); background: var(--bg); }
.band[data-field="surface"] { background: var(--surface); }
.band h3 { grid-column: 1 / 6; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: .95; }
.band p { grid-column: 7 / 13; max-width: 36rem; }

/* ---------- close ---------- */
.close { min-height: 92svh; background: #fff; color: var(--dark-ink); padding: 14svh var(--m) 40px; display: grid; grid-template-rows: 1fr auto; }
.close-h { font-size: clamp(5rem, 2rem + 15vw, 18rem); line-height: .86; letter-spacing: -0.02em; }
.close-foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.close-foot p { grid-column: 1 / 6; font-size: var(--step-lead); line-height: 1.35; }
.close-foot .btn { grid-column: 10 / 13; }

/* ---------- footer ---------- */
.foot { background: var(--bg); padding: 160px var(--m) 32px; }
.blocks { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 200px; }
.blocks span {
  flex: 1; height: var(--h); background: var(--c); color: var(--i, #fff); display: flex; align-items: flex-end; justify-content: center;
  font-size: clamp(2.5rem, 9vw, 9rem); line-height: .8; padding-bottom: 6px; overflow: hidden;
}
.foot-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: 56px; }
.foot-cols nav { grid-column: 1 / 9; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.foot-cols nav a, .foot-contact a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact { grid-column: 9 / 13; }
.credits { margin-top: 40px; font-size: var(--step-small); color: var(--ink); max-width: 70rem; }
.credits a { color: var(--ink); }
.foot-last { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; font-size: var(--step-small); }

.mbar { display: none; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.hero-pic img { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-3%); } }
.hero-h span { animation: rise .9s var(--ease) both; }
.hero-h .l2 { animation-delay: .09s; }
.hero-pic { animation: drop .9s .2s var(--ease) both; }
.hero-foot { animation: rise .9s .28s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } }
@keyframes drop { from { opacity: 0; transform: rotate(10deg) translateY(40px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
  .bar-links a:not(.btn):not([href="/login"]) { display: none; }
  .show-top, .try-head, .band, .close-foot, .foot-cols, .req { grid-template-columns: 1fr; }
  .h-sec, .show-p, .try .h-big, .try-p, .band h3, .band p, .close-foot p, .close-foot .btn, .foot-cols nav, .foot-contact,
  .req .field:nth-of-type(n), .req .field-note, .req .btn, .req-msg, .req-h { grid-column: 1 / -1; }
  .show-p { margin-top: 16px; }
  .specimens { grid-template-columns: 1fr; gap: 0; margin-top: 48px; }
  .showcase { height: auto; padding-bottom: 0; }
  .spec { height: 38svh; overflow: hidden; padding-top: 16px; }
  .spec-word { font-size: 40vw; }
  .spec:nth-child(2) { background: var(--field-4); color: var(--dark-ink); margin: 0 calc(var(--m) * -1); padding: 16px var(--m) 0; }
  .spec:nth-child(2) .spec-word { color: var(--dark-ink); }
  .spec:nth-child(2) .spec-cap { color: var(--dark-ink); }
  .sheet { grid-template-columns: 1fr; grid-template-rows: 64px auto auto; height: auto; min-height: 0; padding-bottom: 32px; }
  .verb, .verb:nth-child(even) { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .verb:nth-child(even) .verb-text { order: 0; }
  .verb-pic { aspect-ratio: 4/3; height: auto; }
  .verb-text { padding: 48px var(--m) 32px; }
  .board { overflow: visible; }
  .board-track { min-width: 0; grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .shot.s3 { grid-column: 1 / -1; }
  .playhead { display: none; }
  .sheet-h { grid-column: 1; font-size: 1.375rem; }
  .sheet-pic { grid-column: 1; grid-row: 2; aspect-ratio: 4/3; height: auto; margin: 0; }
  .sheet-p { grid-column: 1; grid-row: 3; padding: 20px 0 0; font-size: var(--step-body); }
  .copy-card { aspect-ratio: auto; padding: 24px; }
  .band { padding: 32px var(--m); gap: 12px; }
  .faq-head { min-height: 30svh; }
  .close { min-height: 80svh; }
  .close-foot { gap: 20px; }
  .close-foot .btn { width: 100%; }
  .blocks { height: 22svh; min-height: 140px; }
  .blocks span { font-size: 11vw; }
  .foot-cols nav { display: grid; grid-template-columns: 1fr 1fr; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; inset: auto 0 0 0; z-index: 30;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--bg);
  }
  .mbar .btn { min-height: 48px; }
}
@media (max-width: 600px) {
  .hero-h { font-size: 27vw; padding-top: 16svh; }
  .hero { display: flex; flex-direction: column; }
  .hero-pic { position: relative; right: auto; bottom: auto; width: 64vw; margin: 28px -6vw 0 auto; }
  .hero-foot { padding-bottom: 40px; max-width: 86%; }
  .hero-sub { font-size: var(--step-body); }
  .verb-w { font-size: 30vw; }

  .try .h-big { font-size: 22vw; }
  .try-form { gap: 16px; }
  .formats { width: 100%; }
  .formats label { flex: 1; justify-content: center; padding: 0 8px; }
}
