/* The landing page: a drafting sheet, after Luci Studio's blueprint home
   (kido-luci/luci-studio-frontend, HomePage.astro and home/): cream paper with
   a fine grid, hairline rules, numbered section heads in mono, large display
   headings. Its two accents are the mascot cubes' blue and orange
   (mobile/packages/features/today/.../cubes/cube_drawing.dart). Light only,
   while the app's screens are not settled (docs/project-brief.md §3).
   Every page of the site uses this sheet: the landing, the documents, the
   share pages and the not-found page. */
@font-face {
  font-family: "Space Grotesk";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/SpaceGrotesk-500-latin.1b1a8131.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: "Space Grotesk";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/SpaceGrotesk-500-vietnamese.d5eb999d.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;
}
@font-face {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/SpaceGrotesk-700-latin.35f8aec5.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: "Space Grotesk";
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/SpaceGrotesk-700-vietnamese.96a6d0a7.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;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-500-latin.01d28544.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: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/IBMPlexMono-500-vietnamese.781633d9.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 {
  color-scheme: light;
  --paper: #f4f2ec;
  --ink: #1b065e;
  --muted: color-mix(in srgb, var(--ink) 66%, transparent);
  --faint: color-mix(in srgb, var(--ink) 44%, transparent);
  --hair: rgba(27, 6, 94, 0.16);
  --line: rgba(27, 6, 94, 0.05);
  --line2: rgba(27, 6, 94, 0.08);
  --card: #ebe8df;
  /* The cubes' faces fill; their lips carry text, which needs the contrast. */
  --blue: #2e6dea;
  --blue-ink: #134ec3;
  --orange: #fd7f0f;
  --orange-ink: #c75a00;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body.landing {
  margin: 0;
  color: var(--ink);
  font: 500 16px/1.55 var(--display);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  /* The drafting grid: fine 36 px, major 180 px. */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line2) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px, 180px 180px, 180px 180px;
}

.mono { font-family: var(--mono); font-weight: 500; }

.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 5vw, 48px);
  padding-right: clamp(16px, 5vw, 48px);
}

a { color: inherit; }

/* ── nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hair);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.nav-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

/* The app's icon, the two cubes, rounded as on a home screen. */
.logo { display: block; flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--ink); }

.langs { display: flex; gap: 4px; font-size: 12px; letter-spacing: 0.12em; }

.langs a {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.langs a:hover { color: var(--ink); }

.langs a[aria-current] { border-color: var(--ink); color: var(--ink); }

/* ── hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
}

.sq { width: 7px; height: 7px; background: var(--orange); flex-shrink: 0; }

.hero-title {
  margin: 0;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero-title em, .h2 em { font-style: normal; color: var(--blue); }

.dim {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.dim > span:nth-child(2), .measure > span:nth-child(3) { white-space: nowrap; }

.tick { width: 1px; height: 9px; background: var(--faint); flex-shrink: 0; }

.dim-rule { flex: 1; height: 1px; min-width: 16px; background: var(--faint); }

.tagline {
  max-width: 560px;
  margin: 22px 0 30px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
}

.u { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--blue); }
.u-o { border-bottom-color: var(--orange); }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

/* The download block: the code to scan from a computer beside the App
   Store's line; on a phone, where there is nothing to scan, the line alone. */
.get {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 470px;
  padding: 18px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--blue);
}

.qr {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  padding: 4px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
}

.qr-code { display: block; width: 100%; height: 100%; }

.qr img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 7px;
}

.get-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }

.get-label { margin: 0; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-ink); }

.get-hint { margin: -4px 0 4px; font-size: 14px; line-height: 1.45; color: var(--muted); }

.badge, .badge img { display: block; width: 150px; height: auto; }

/* Not a link until the App Store's is set. */
.badge-soon { opacity: 0.55; }

.get-later { margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.btn {
  padding: 13px 24px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* A screenshot on the sheet: a figure label above, a dimension line below. */
.hero-fig { display: flex; flex-direction: column; align-items: center; margin: 0; }

.fig {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.phone {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 34px;
  background: var(--card);
  box-shadow: 10px 10px 0 var(--blue);
  line-height: 0;
}

.phone img { display: block; width: 100%; height: auto; }

.measure {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 22px 0 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* The hero's stage: the Home screen in front, a game behind it peeking out
   to the right, the games' stickers around them like drafting callouts, and
   the cubes standing on the dimension line beside the phone, never over it. */
.stage { position: relative; align-items: flex-end; padding-right: 64px; }

.stage > .fig { width: 290px; text-align: center; }

.phones { position: relative; width: 100%; max-width: 290px; }

.phones .float { position: relative; z-index: 2; max-width: none; }

.phones .phone-back {
  position: absolute;
  z-index: 1;
  top: 56px;
  left: calc(100% - 200px);
  width: 240px;
  max-width: none;
  transform: rotate(8deg);
  box-shadow: 10px 10px 0 var(--orange);
}

.stk { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; }

.stk img { display: block; width: 80px; height: auto; filter: drop-shadow(4px 5px 0 rgba(27, 6, 94, 0.18)); animation: bob 4s ease-in-out infinite; }

.stk i {
  padding: 3px 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

/* The leader line, from the sticker toward the phone. */
.stk::after { content: ""; position: absolute; top: 40px; width: 32px; border-top: 1px dashed var(--faint); }

.stk-tl, .stk-bl { right: calc(100% + 36px); }
.stk-tl::after, .stk-bl::after { left: calc(100% + 2px); }
.stk-tr, .stk-br { left: calc(100% + 18px); }
.stk-tr::after, .stk-br::after { right: calc(100% + 2px); width: 14px; }
.stk-tl { top: 64px; }
.stk-tr { top: 0; }
.stk-tr img { animation-delay: -1s; }
.stk-bl { top: 330px; }
.stk-bl img { animation-delay: -2s; }
.stk-br { top: 410px; }
.stk-br img { animation-delay: -3s; }

.stand { position: relative; align-self: stretch; }

.stand .measure { max-width: none; }

.stand .measure > span:nth-child(2) { flex: 2.8 1 0; }

.stand .cubes { position: absolute; left: -38px; bottom: 0; width: 200px; height: auto; }

/* ── the cubes, Home's mascot: the blue calm, the orange bouncy ── */
.cubes { display: block; overflow: visible; }

.cb-blue { transform-origin: 66px 136px; animation: cb-blue 5s ease-in-out infinite; }
.cb-tie { transform-origin: 66px 108px; animation: cb-tie 5s ease-in-out infinite; }
.cb-shadow-blue { transform-origin: 66px 142px; animation: cb-shadow-blue 5s ease-in-out infinite; }
/* In the hero the orange cube hops twice and rests; the closing band's
   hops on. */
.cb-orange { transform-origin: 165px 136px; animation: cb-hop-twice 8s ease-in-out infinite; }
.cb-cap { transform-origin: 165px 60px; animation: cb-cap-twice 8s ease-in-out infinite; }
.cb-shadow-orange { transform-origin: 164px 142px; animation: cb-shadow-twice 8s ease-in-out infinite; }
.cubes-end .cb-orange { animation: cb-hop 1.8s ease-in-out infinite; }
.cubes-end .cb-cap { animation: cb-cap 1.8s ease-in-out infinite; }
.cubes-end .cb-shadow-orange { animation: cb-shadow 1.8s ease-in-out infinite; }

.band { overflow: hidden; padding: 10px 0; background: var(--blue); }

.band-track { display: flex; width: max-content; animation: band 40s linear infinite; }

.band-seq {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}

/* The separators: small squares in the cubes' colours, alternating. */
.sep { flex-shrink: 0; width: 8px; height: 8px; border: 1.5px solid #fff; border-radius: 2px; background: var(--blue); }

.sep:nth-child(4n) { background: var(--orange); }

/* ── sections ── */
.section { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(24px, 4vw, 40px); }

.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 3vw, 34px); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

.sec-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-ink); white-space: nowrap; }

.rule { flex: 1; height: 1px; background: var(--hair); }

.sec-count { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.h2 { margin: 0 0 clamp(26px, 4vw, 44px); font-size: clamp(2.2rem, 6vw, 3.75rem); line-height: 1; }

.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }

.row {
  display: grid;
  grid-template-columns: 44px 52px clamp(240px, 27vw, 340px) minmax(0, 1fr) 190px;
  align-items: center;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 0.25s ease, background 0.25s ease;
}

.row:hover { padding-left: 10px; background: color-mix(in srgb, var(--blue) 5%, transparent); }

.num { font-size: 13px; color: var(--blue-ink); }
.is-orange .num { color: var(--orange-ink); }

.row-icon { display: block; width: 52px; height: 52px; }

.row-title { margin: 0; font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.15; }

.row-body { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

.row-tag { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* ── the games wall: one card a game, one topic a column ── */
.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

.wall-col { display: flex; flex-direction: column; gap: 28px; }

.wall-head {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-ink);
}

.card { margin: 0; }

.card-art {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 7px 7px 0 var(--blue);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card.is-orange .card-art { box-shadow: 7px 7px 0 var(--orange); }

.card:hover .card-art { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 10px 10px 0 var(--ink); }

.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.card figcaption { display: flex; flex-direction: column; gap: 2px; padding: 16px 4px 0; }

.card-topic { display: none; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

.card-name { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.2; }

.wall-more { margin: 32px 0 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ── inside the app: screen and words, the second row mirrored ── */
.inside-row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: "phone ." "phone text" "phone legend" "phone .";
  column-gap: clamp(32px, 6vw, 88px);
  padding: 40px 0;
  border-top: 1px solid var(--hair);
}

.inside-1 {
  grid-template-columns: 7fr 5fr;
  grid-template-areas: ". phone" "text phone" "legend phone" ". phone";
}

.inside-text { grid-area: text; }

.inside-title { margin: 6px 0 12px; font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.1; }

.inside-body { max-width: 480px; margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

.inside-phone { grid-area: phone; position: relative; justify-self: center; width: 100%; max-width: 300px; container-type: inline-size; }

.inside-phone .phone { max-width: none; }

.inside-1 .inside-phone .phone { box-shadow: 10px 10px 0 var(--orange); }

/* A numbered pin: an ink circle, over the screen and in the legend. */
.pin {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  line-height: 1;
}

/* On the screen, a pin sits in the margin beside the phone, level with what
   it marks, and a leader line runs into the screen up to it (--x, its share
   of the screen's width), so nothing of the screenshot is covered. A pin is
   on the right unless it says otherwise. */
.inside-phone .pin { position: absolute; z-index: 1; left: calc(100% + 12px); transform: translateY(-50%); }

.inside-phone .pin::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: calc(12px + (1 - var(--x)) * 100cqw);
  border-top: 1.5px solid var(--ink);
}

/* Journey: the next day's badge (from the left), the coins a day pays, a
   new mode. */
.inside-0 .pin-1 { --x: 0.065; top: 29.8%; left: auto; right: calc(100% + 12px); }
.inside-0 .pin-1::before { right: auto; left: 100%; width: calc(12px + var(--x) * 100cqw); }
.inside-0 .pin-2 { --x: 0.49; top: 57.1%; }
.inside-0 .pin-3 { --x: 0.408; top: 37.5%; }
/* Progress: the day streak, the last three weeks, level and XP. */
.inside-1 .pin-1 { --x: 0.515; top: 18.6%; }
.inside-1 .pin-2 { --x: 0.323; top: 30.5%; }
.inside-1 .pin-3 { --x: 0.374; top: 62.7%; }

.legend { grid-area: legend; display: flex; flex-direction: column; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }

.legend li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.35; }

.legend-rule { flex: 1 1 0; min-width: 24px; border-top: 1px dashed var(--faint); }

/* The phone on the left: the rule leads out to the left. */
.inside-0 .legend-rule { flex: 0 0 48px; order: -1; }

/* ── no big promises: a spec note, then tiles ── */
.note {
  position: relative;
  max-width: calc(100% * 8 / 12);
  padding: 40px clamp(20px, 3vw, 36px) 32px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
}

.note-tag {
  position: absolute;
  top: -1.5px;
  left: -1.5px;
  padding: 4px 10px;
  border-radius: 6px 0 6px 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.statement { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }

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

.tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  box-shadow: 7px 7px 0 var(--blue);
}

.tile:nth-child(2) { box-shadow: 7px 7px 0 var(--orange); }

.tile-icon { display: block; width: 64px; height: 64px; }

.tile-fig { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.02em; }

.tile:nth-child(2) .tile-fig { color: var(--blue); }

.tile-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.tile dd { display: flex; flex-direction: column; gap: 3px; margin: 0; }

.tile-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }

.tile-sub { font-size: 14px; color: var(--muted); }

/* ── the end: an ink band, as the studio's closing call ── */
.end {
  margin-top: clamp(56px, 8vw, 96px);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--paper);
}

.end-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.end-title { margin: 0; font-size: clamp(2.2rem, 7vw, 5rem); line-height: 1; color: var(--paper); }

.end-sub { max-width: 560px; margin: 18px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: color-mix(in srgb, var(--paper) 78%, transparent); }

.end .stores { margin-top: 32px; }

.end .get { border-color: var(--paper); background: transparent; box-shadow: 7px 7px 0 var(--orange); }

.end .qr { border-color: var(--paper); }

.end .get-label { color: var(--paper); }

.end .get-hint { color: color-mix(in srgb, var(--paper) 78%, transparent); }

.end .get-later { color: rgba(255, 255, 255, 0.6); }

.end .status { color: var(--paper); }

.end .btn-solid { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.end .btn-solid:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.end .btn-ghost { border-color: var(--paper); color: var(--paper); }
.end .btn-ghost:hover { background: var(--paper); color: var(--ink); }

.end-cubes { display: flex; flex-direction: column; align-items: center; width: 240px; }

.end-cubes .cubes { width: 240px; height: auto; }

.end-cubes .measure { max-width: none; margin-top: -6px; color: rgba(255, 255, 255, 0.72); }

.end-cubes .tick { background: rgba(255, 255, 255, 0.6); }

.end-cubes .dim-rule { height: 0; border-top: 1px dashed rgba(255, 255, 255, 0.6); background: none; }

.foot {
  padding-top: 32px;
  padding-bottom: 28px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.foot footer, .foot p { margin: 0; }

.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 24px; align-items: start; }

.foot-brand { display: flex; flex-direction: column; gap: 6px; }

.foot-icon { display: block; width: 24px; height: 24px; margin-bottom: 4px; border: 1px solid var(--ink); border-radius: 6px; }

.foot-links { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }

.foot-langs { display: flex; gap: 4px; }

.foot-langs a { padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; }

.foot-langs a[aria-current] { border-color: var(--ink); }

.foot-rule { max-width: none; margin: 24px 0 0; }

.foot a { color: var(--ink); }

/* ── documents: the policy and the terms on the same sheet ── */
.doc-head { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(24px, 3vw, 32px); border-bottom: 1px solid var(--hair); }

.doc-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.doc-head .subtitle { margin: 18px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* Numbered sections, as the landing's rows: 01, 02, … in mono beside a rule. */
.doc { max-width: 760px; padding-bottom: clamp(56px, 8vw, 96px); counter-reset: sec; }

.doc h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 48px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 76px;
}

.doc h2::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  flex-shrink: 0;
  width: 32px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--blue-ink);
}

.doc p, .doc li { margin: 12px 0 0; font-size: 16px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 82%, transparent); }

.doc p, .doc ul { padding-left: 46px; }

.doc ul { margin: 0; padding-left: 66px; }

.doc li::marker { color: var(--blue); }

.doc a { color: var(--blue-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* The policy's contents: a ruled index in mono. */
.doc .contents {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.doc .contents strong { color: var(--ink); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; }

.doc .contents a { color: inherit; font-weight: 500; white-space: nowrap; }

.doc .contents a:hover { color: var(--blue-ink); }

.document .foot, .share .foot { border-top: 1px solid var(--hair); }

/* ── share pages and the not-found page: one column on the same sheet ── */
.share { padding-top: clamp(32px, 6vw, 64px); }

.share-col { max-width: 560px; margin: 0 auto; padding-bottom: clamp(48px, 7vw, 80px); }

.share-card {
  padding: clamp(22px, 4vw, 32px);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  box-shadow: 7px 7px 0 var(--blue);
}

.share .mark { display: block; width: 64px; height: 64px; }

.share .cubes { width: 160px; height: auto; }

.share h1 {
  margin: 18px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.share .subtitle { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.share .line { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

.share .code {
  margin: 18px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 9vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.share .copy {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share .small { margin: 14px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

.share .hint {
  display: flex;
  gap: 10px;
  margin: 24px 0 16px;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  font-size: 14px;
  line-height: 1.45;
}

.share .hint > span:first-child { color: var(--blue-ink); }

.share .open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  margin-top: 24px;
  font-size: 14px;
  box-shadow: 5px 5px 0 var(--orange);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 90ms ease, box-shadow 90ms ease;
}

.share .hint:not([hidden]) + .open { margin-top: 0; }

.share .open:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--orange); }

.share .disc { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }

.share .fallback { margin: 14px 0 0; font-size: 14px; }

.share .fallback a { color: var(--blue-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.share .stores { margin-top: 40px; scroll-margin-top: 76px; }

.share .stores .small { margin: 0 0 14px; }

.share .get { max-width: none; }

.share .hint[hidden], .share .fallback[hidden], .share .copy[hidden] { display: none; }

@media (max-width: 600px) {
  .qr, .get-label, .get-hint { display: none; }
  .get { max-width: none; }
  .doc p, .doc ul { padding-left: 0; }
  .doc ul { padding-left: 20px; }
}

/* ── motion: the page breathes, each thing to its own beat ── */
.float { animation: float 6s ease-in-out infinite; }

.hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.hero-copy > :nth-child(5) { animation-delay: 0.24s; }

/* Cards, rows and tiles rise into view where the browser has view
   timelines; elsewhere they are simply there. */
@supports (animation-timeline: view()) {
  .card, .inside-row, .tile {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}

@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes band { to { transform: translateX(-50%); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* The blue cube, over 5 s: a breath from its base, then a small hop, and the
   bow tie swings after landing. */
@keyframes cb-blue {
  0%, 60%, 76%, 100% { transform: none; }
  30% { transform: scaleY(0.98); }
  68% { transform: translateY(-4px); }
}
@keyframes cb-tie {
  0%, 76%, 96%, 100% { transform: none; }
  82% { transform: rotate(4deg); }
  88% { transform: rotate(-3deg); }
  92% { transform: rotate(1deg); }
}
@keyframes cb-shadow-blue { 0%, 60%, 76%, 100% { transform: none; } 68% { transform: scale(0.9); } }

/* The orange cube's hop: 14 px up, a squash on landing, the cap swinging
   and settling within 0.3 s. Twice in 8 s, then rest; or every 1.8 s. */
@keyframes cb-hop-twice {
  0%, 9.5%, 19%, 100% { transform: none; }
  3.75%, 13.25% { transform: translateY(-14px); }
  7.5%, 17% { transform: scale(1.04, 0.96); }
}
@keyframes cb-cap-twice {
  0%, 7.5%, 11.25%, 17%, 20.75%, 100% { transform: none; }
  8.5%, 18% { transform: rotate(6deg); }
  9.75%, 19.25% { transform: rotate(-3deg); }
}
@keyframes cb-shadow-twice {
  0%, 7.5%, 17%, 100% { transform: none; }
  3.75%, 13.25% { transform: scale(0.75); }
}
@keyframes cb-hop {
  0%, 75%, 100% { transform: none; }
  35% { transform: translateY(-14px); }
  62% { transform: scale(1.04, 0.96); }
}
@keyframes cb-cap {
  0%, 62%, 79%, 100% { transform: none; }
  67% { transform: rotate(6deg); }
  73% { transform: rotate(-3deg); }
}
@keyframes cb-shadow { 0%, 62%, 100% { transform: none; } 35% { transform: scale(0.75); } }

@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
}

/* The hero stacks below the width where the stickers and the cubes fit
   beside the phone. */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .stage { align-items: center; padding-right: 0; }
  .stage > .fig { width: auto; }
  .phones { max-width: 236px; }
  .phones .phone-back { top: 40px; left: auto; right: -30px; width: 180px; transform: rotate(6deg); }
  .stk:not(.stk-tl), .stk i, .stk::after { display: none; }
  .stk-tl { top: 96px; right: calc(100% + 10px); }
  .stk-tl img { width: 52px; }
  .stand { display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
  .stand .cubes { position: static; width: 140px; }
  /* The line passes under the cubes' feet, its label clear of them. */
  .stand .measure { max-width: none; margin-top: -8px; }
  .stand .measure > span:nth-child(2) { flex: 7 1 0; }
}

@media (max-width: 900px) {
  .phone, .measure { max-width: 260px; }
  .row { grid-template-columns: 34px 40px 1fr; row-gap: 6px; }
  .row-icon { width: 40px; height: 40px; }
  .row-body, .row-tag { grid-column: 3; text-align: left; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .wall-col { display: contents; }
  .wall-head { display: none; }
  .card-topic { display: block; }
  .card figcaption { padding-top: 12px; }
  .inside-row, .inside-1 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "text" "phone" "legend";
  }
  .inside-phone { max-width: 260px; margin-top: 28px; }
  .legend-rule { display: none; }
  .note { max-width: none; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tile { flex-direction: row; align-items: center; gap: 16px; padding: 16px 18px; }
  .tile-icon, .tile-badge { width: 56px; height: 56px; }
  .tile-badge { font-size: 1.25rem; }
  .tile-fig { min-width: 44px; }
  .end-row { grid-template-columns: minmax(0, 1fr); }
  .end-cubes { justify-self: center; width: 160px; }
  .end-cubes .cubes { width: 160px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 480px) {
  .dim > span:nth-child(2) { white-space: normal; }
  .sec-count { display: none; }
}

/* ── Studio intro (static/intro.js) ──
   The Luci Studio sting that plays over the landing once per tab session. The
   script adds the overlay; none of this shows without it. The face is its own
   family, so it never replaces the landing's fixed 500 and 700 faces. */
@font-face {
  font-family: "Luci Wordmark";
  font-weight: 300 700;
  font-display: block;
  src: url("/static/fonts/SpaceGrotesk-Variable-latin.06408904.woff2") format("woff2");
}

.intro {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
  contain: strict;
  /* if the script ever stalls, the cover goes by itself */
  animation: intro-safety 0.3s linear 12s forwards;
}
@keyframes intro-safety { to { opacity: 0; visibility: hidden; } }
.intro.is-leaving { opacity: 0; transition: opacity 0.2s linear; }

.intro, .intro * {
  box-sizing: content-box;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  font-weight: normal;
  margin: 0;
  padding: 0;
}

/* Two halves of one opaque sheet of paper (the source's lit paper and its
   vignette), each showing its side of a frame-wide gradient. They overlap by
   a pixel, and part at the end to uncover the landing. */
.intro-half {
  position: absolute;
  top: 0;
  bottom: 0;
  background-image:
    radial-gradient(ellipse 75% 70% at 50% 50%, rgba(16, 26, 41, 0) 55%, rgba(16, 26, 41, 0.08) 100%),
    linear-gradient(135deg, #f3f2ec 0%, #efeee8 50%, #eae9e2 100%);
  background-repeat: no-repeat;
  background-size: 200% 100%;
  will-change: transform;
}
.intro-half.is-left { left: 0; width: calc(50% + 1px); background-position: left top; }
.intro-half.is-right { right: 0; width: 50%; background-position: right top; }

/* The landing's own clock-driven motion waits for the reveal. The script runs
   before these elements are parsed, so they start paused and play from their
   start. */
html.intro-playing :is(.pulse, .stk img, .float, .band-track, .hero-copy > *,
  .cb-blue, .cb-tie, .cb-shadow-blue, .cb-orange, .cb-cap, .cb-shadow-orange) { animation-play-state: paused; }
