/* Kalimo website. Colours are the app's brand tokens (docs/brand.md): the start page follows the
   visitor's clock like the shelf (DayTheme), help and legal pages use the grown-ups' daylight paper. */

@font-face { font-family: "Baloo 2"; src: url(/fonts/baloo2.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/fonts/literata.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --story: "Literata", Georgia, serif;
  --ui: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --amber: #F2A541;      /* lanternAmber: the primary action at every time of day */
  --nightInk: #1C1A36;
  --teal: #6FB3A4;       /* mossTeal: anything a child can tap */
  /* Evening (the default until the clock is read) */
  --ground: #1C1A36; --card: #2E2752; --raised: #3B3266; --ink: #F6E7C8; --accent: #F2A541;
  --muted: rgba(246, 231, 200, .72); --line: rgba(246, 231, 200, .18);
  --sky: #13132f; --skyMid: #1a183d; --skyLow: #231a42;
  --reading: #1C1A36; --readingInk: #F6E7C8;
  color-scheme: dark;
}
html[data-time="morning"] {
  --ground: #FBE7D6; --card: #FFF6EE; --raised: #F6D7BF; --ink: #3A2747; --accent: #B4533D;
  --muted: rgba(58, 39, 71, .74); --line: rgba(58, 39, 71, .14);
  --sky: #cd94b7; --skyMid: #fcbb91; --skyLow: #f7c98e;
  --reading: #FFF6EE; --readingInk: #3A2747;
  color-scheme: light;
}
html[data-time="day"] {
  --ground: #E9F5F2; --card: #FFFFFF; --raised: #D3EBE5; --ink: #1F3A44; --accent: #2F7566;
  --muted: rgba(31, 58, 68, .74); --line: rgba(31, 58, 68, .14);
  --sky: #7dc9eb; --skyMid: #93d8f5; --skyLow: #b9e2c9;
  --reading: #FFFFFF; --readingInk: #1F3A44;
  color-scheme: light;
}
html[data-zone="paper"] {
  --ground: #FFF5E6; --card: #FFFFFF; --raised: #F6E7C8; --ink: #2A2445; --accent: #B4533D;
  --muted: rgba(42, 36, 69, .74); --line: rgba(42, 36, 69, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--ui); font-size: 17px; line-height: 1.6; transition: background-color .6s, color .6s; }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.eyebrow { font-weight: 800; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--muted); max-width: 60ch; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- Header and footer ---------- */
.top { position: absolute; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px; max-width: 1160px; margin-inline: auto; }
html[data-zone="paper"] .top { position: static; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; }
.logo img { border-radius: 9px; }
.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 11px; border-radius: 99px; }
.top nav a:hover { background: var(--line); }
.top nav a.lang { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); }
.flag { width: 22px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); display: block; flex: none; }
.foot { background: var(--card); margin-top: 0; padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footIn { max-width: 1120px; margin-inline: auto; padding-inline: 20px; display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; }
.footBrand { display: flex; flex-direction: column; gap: 6px; }
.footBrand p { color: var(--muted); font-size: 15px; }
.footLinks { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: start; }
.footLinks a { color: var(--ink); font-weight: 700; font-size: 15px; }
.footSmall { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.footSmall a { color: inherit; }

/* ---------- App Store badge ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.badge { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 11px; padding: 7px 16px 7px 12px; text-decoration: none; }
.badge.official { background: none; border: 0; padding: 0; }
.badge svg { width: 22px; height: 26px; fill: #fff; }
.badge span { display: flex; flex-direction: column; line-height: 1.05; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; }
.badge small { font-size: 11px; }
.badge strong { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.badge.soon { opacity: .9; }
.soonNote { font-size: 13.5px; font-weight: 800; color: var(--accent); }

/* ---------- Hero: the shelf's painted world ---------- */
.hero { position: relative; overflow: hidden; height: clamp(440px, 64vh, 580px); isolation: isolate; }
.backdrop { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky) 0%, var(--skyMid) 60%, var(--skyLow) 100%); transition: background .8s; }
.stage { position: absolute; }
.set { position: absolute; inset: 0; transition: opacity 1s ease; opacity: 0; }
html[data-time="morning"] .set[data-set="morning"], html[data-time="day"] .set[data-set="day"], html[data-time="evening"] .set[data-set="evening"] { opacity: 1; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.hero.wide .stage { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32%); mask-image: linear-gradient(90deg, transparent 0, #000 32%); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.moth { position: absolute; left: 31%; top: 49%; width: 16%; aspect-ratio: 960 / 769; animation: hover 4.2s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(242, 165, 65, .55)); }
.moth img { position: absolute; inset: 0; width: 100%; height: 100%; }
.moth .wl, .moth .wr { transform-origin: 50% 55%; }
.moth .wl { animation: flapL .9s ease-in-out infinite; }
.moth .wr { animation: flapR .9s ease-in-out infinite; }
@keyframes flapL { 50% { transform: perspective(600px) rotateY(52deg); } }
@keyframes flapR { 50% { transform: perspective(600px) rotateY(-52deg); } }
@keyframes hover { 50% { translate: 0 -5%; } }
.heroCopy { position: absolute; z-index: 5; left: max(20px, calc((100% - 1120px) / 2 + 20px)); top: 54%; transform: translateY(-50%); width: min(44%, 520px); display: flex; flex-direction: column; gap: 14px; }
.heroCopy h1 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; line-height: 1.04; }
.heroCopy p { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 40ch; }
.heroCopy .heroMeta { font-size: 13.5px; font-weight: 800; }
.hero .top { color: var(--ink); }

/* ---------- Film ---------- */
.film { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; padding-block: 72px 24px; }
.filmText { display: flex; flex-direction: column; gap: 12px; max-width: 46ch; }
.filmText p { color: var(--muted); font-size: 18px; }
.phone { position: relative; width: 280px; max-width: 100%; aspect-ratio: 9 / 19.5; border-radius: 44px; padding: 10px; background: #0d0c1c; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08), 0 30px 60px rgba(10, 8, 30, .35); }
/* Absolutely placed: WebKit leaves height: 100% unresolved inside an aspect-ratio box, which showed an empty phone on iOS. */
.phone.phone > * { position: absolute; inset: 10px; width: auto; height: auto; border-radius: 34px; overflow: hidden; display: block; object-fit: cover; background-color: var(--nightInk); }
.phone.small { width: 190px; border-radius: 32px; padding: 7px; }
.phone.phone.small > * { inset: 7px; border-radius: 25px; }
/* Video and images keep their own size when only inset is set, so they get it spelled out. */
.phone.phone > video, .phone.phone > img { width: calc(100% - 20px); height: calc(100% - 20px); }
.phone.phone.small > video, .phone.phone.small > img { width: calc(100% - 14px); height: calc(100% - 14px); }
.reel { position: relative; }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: reel 16s infinite; }
.reel img:nth-child(2) { animation-delay: 4s; }
.reel img:nth-child(3) { animation-delay: 8s; }
.reel img:nth-child(4) { animation-delay: 12s; }
@keyframes reel { 0% { opacity: 0; transform: scale(1.02); } 4% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; transform: scale(1.12); } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.block { display: flex; flex-direction: column; gap: 28px; padding-block: 72px 0; }
.head { display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.step { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; min-width: 0; }
.stepText { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.stepText p { color: var(--muted); font-size: 16px; max-width: 34ch; }
.stepNo { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--nightInk); font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.screen { background-size: cover; background-position: center; position: relative; }
.screen .ask { position: absolute; left: 10px; right: 10px; top: 18px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px; color: #F6E7C8; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.screen.tiles { background: #1C1A36; display: flex; flex-direction: column; padding: 44px 9px 9px; }
.tileGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tileGrid figure { margin: 0; border-radius: 10px; overflow: hidden; position: relative; aspect-ratio: 1; }
.tileGrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tileGrid figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; font-weight: 800; color: #F6E7C8; padding: 12px 6px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.tapDot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid var(--teal); opacity: 0; }

/* The three steps play on a 7 s loop each, one after the other, so the row tells the story in order. */
.screen .go { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; font: 800 13px var(--ui); background: var(--amber); color: #1C1A36; border-radius: 99px; padding: 6px 20px; }
.s1 .field { position: absolute; left: 12px; right: 12px; bottom: 58px; height: 38px; border-radius: 12px; background: rgba(28, 26, 54, .78); border: 2px solid #F2A541; display: flex; align-items: center; padding: 0 12px; font: 700 19px var(--story); color: #F6E7C8; }
/* No inline styles anywhere: the site's Content-Security-Policy blocks style attributes. */
.s1 { background-image: url(/img/welcome.webp); }
.s1 .typed span { opacity: 0; animation: type 7s infinite; animation-delay: .9s; }
.s1 .typed span:nth-child(2) { animation-delay: 1.18s; }
.s1 .typed span:nth-child(3) { animation-delay: 1.46s; }
.s1 .typed span:nth-child(4) { animation-delay: 1.74s; }
.s1 .typed span:nth-child(5) { animation-delay: 2.02s; }
.s1 .caret { width: 2px; height: 20px; background: #F2A541; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.s1 .tapDot { left: 50%; top: calc(100% - 29px); animation: tap 7s infinite; animation-delay: 2.6s; }
.s1 .go { animation: press 7s infinite; animation-delay: 2.6s; }
@keyframes type { 0% { opacity: 0; } 4%, 88% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes tap { 0% { opacity: 0; transform: scale(1.8); } 6% { opacity: 1; transform: scale(1); } 12% { opacity: 0; transform: scale(.7); } 100% { opacity: 0; } }
@keyframes press { 0%, 100% { scale: 1; } 7% { scale: .9; } 13% { scale: 1.06; } 18% { scale: 1; } }
.s2 .tileGrid figure { transition: none; }
.s2 .pick { animation: pick 7s infinite; animation-delay: 2.33s; }
.s2 .tapDot { left: 27%; top: 38%; animation: tap 7s infinite; animation-delay: 2.33s; }
.s2 .go { opacity: .45; animation: ready 7s infinite; animation-delay: 2.33s; }
@keyframes pick { 0% { box-shadow: none; scale: 1; } 6% { scale: .92; } 12% { scale: 1.04; box-shadow: 0 0 0 3px #F2A541; } 18%, 80% { scale: 1; box-shadow: 0 0 0 3px #F2A541; } 88%, 100% { box-shadow: none; } }
@keyframes ready { 0% { opacity: .45; } 12%, 80% { opacity: 1; } 88%, 100% { opacity: .45; } }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* Times of day */
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.timeCard { background: var(--card); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.timeCard img { width: 100%; aspect-ratio: 720 / 492; object-fit: cover; display: block; }
.timeCard div { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.timeCard p { color: var(--muted); font-size: 16px; }

/* Wonder: the sample book to turn and tap */
.wonder { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 56px; align-items: center; }
.bookFrame { width: 100%; max-width: 420px; justify-self: center; }
.wonderList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.wonderList li { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--teal); padding-left: 16px; }
.wonderList p { color: var(--muted); font-size: 16px; }

/* The book (also the mini copy in step 3). Sizes follow its own width. */
.book { position: relative; aspect-ratio: 2 / 3; width: 100%; container-type: inline-size; border-radius: 6px 14px 14px 6px; overflow: hidden; background: #1C1A36; box-shadow: 0 24px 50px rgba(10, 8, 30, .35), inset 3px 0 0 rgba(0, 0, 0, .25); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.book.mini { aspect-ratio: auto; border-radius: 25px; box-shadow: none; cursor: default; }
.book .under, .book .front { position: absolute; inset: 0; }
.book .flap, .book .shade { position: absolute; inset: 0; display: none; pointer-events: none; }
.book .flap i { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #fbf1dc 0%, #efdcb6 70%, #cdb68a 100%); }
.book .shade i { position: absolute; top: 0; bottom: 0; width: 45%; background: linear-gradient(90deg, rgba(10, 8, 30, .45), rgba(10, 8, 30, 0)); }
.pg { position: absolute; inset: 0; }
.pg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.pg.cover h4 { position: absolute; left: 6%; right: 6%; top: 5%; margin: 0; text-align: center; font: 800 8.4cqw/1.05 var(--display); color: #F6E7C8; text-shadow: 0 2px 14px rgba(0, 0, 0, .75); }
.pg.text { background: #1C1A36; color: #F6E7C8; padding: 11% 10% 12%; display: flex; flex-direction: column; justify-content: center; }
.pg.text p { font: 400 4.25cqw/1.62 var(--story); margin: 0; }
.pg.text .drop { float: left; font: 700 13cqw/.82 var(--story); color: #F2A541; margin: 1.4cqw 2cqw 0 0; }
.pg.text .num { position: absolute; bottom: 4.5%; left: 0; right: 0; text-align: center; font: 700 3.2cqw var(--ui); color: rgba(246, 231, 200, .45); }
.pg .plate, .pg .cut { opacity: 0; }
.pg .glow { position: absolute; width: 60cqw; height: 60cqw; margin: -30cqw 0 0 -30cqw; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 140, .75), rgba(242, 165, 65, .25) 35%, rgba(242, 165, 65, 0) 65%); mix-blend-mode: screen; opacity: 0; pointer-events: none; }
.pg .ping { position: absolute; width: 12cqw; height: 12cqw; margin: -6cqw 0 0 -6cqw; border-radius: 50%; border: .9cqw solid var(--teal); animation: ping 2s ease-out infinite; pointer-events: none; }
.book.mini .pg .ping { opacity: 0; animation: none; }
.book.mini .pg.tapping .ping { animation: tap 1.2s forwards; }
.pg.played .ping { display: none; }
.turn { position: absolute; z-index: 3; bottom: 2.5%; width: 11cqw; height: 11cqw; border-radius: 50%; border: 0; background: rgba(28, 26, 54, .55); color: #F6E7C8; font: 800 7cqw/1 var(--ui); cursor: pointer; display: grid; place-items: center; padding: 0 0 .8cqw; opacity: .8; }
.turn.prev { left: 2.5%; }
.turn.next { right: 2.5%; }
.turn:hover { opacity: 1; }
.book[data-kind="cover"] .turn.prev { display: none; }

/* Trust */
.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 36px; align-items: start; }
.names { background: var(--card); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.names p { color: var(--muted); }
.swap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 22px; margin-bottom: 6px; }
.swap code { font-size: 17px; background: var(--raised); padding: 5px 10px; border-radius: 9px; }
.swap .arrow { color: var(--accent); font-weight: 800; }
.swap .real { font-family: var(--story); color: var(--accent); font-weight: 600; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.promises li { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid var(--line); padding-top: 12px; }
.promises h3 { font-size: 18px; }
.promises p { color: var(--muted); font-size: 15.5px; }

/* FAQ */
.faq, .group { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.qa { background: var(--card); border-radius: 16px; padding: 0 20px; }
.qa summary { cursor: pointer; font-weight: 800; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; color: var(--accent); }
.qa[open] summary::after { content: "–"; }
.qa p { padding-bottom: 18px; color: var(--muted); }
.more { font-weight: 800; }

/* End */
.end { position: relative; margin-top: 88px; min-height: 420px; display: flex; align-items: center; overflow: hidden; background: #1C1A36; color: #F6E7C8; }
.endScene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.end::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(28, 26, 54, .92) 0%, rgba(28, 26, 54, .55) 45%, transparent 75%); }
.end .moth { z-index: 2; left: auto; right: 22%; top: 30%; width: 150px; }
.end .moth.sleepy .wl, .end .moth.sleepy .wr { animation-duration: 2.4s; }
.endCopy { position: relative; z-index: 3; width: 100%; display: flex; flex-direction: column; gap: 14px; padding-block: 56px; }
.endCopy h2, .endCopy p { max-width: 24ch; }
.endCopy p { color: rgba(246, 231, 200, .8); max-width: 40ch; }
.end .soonNote { color: #F2A541; }

/* ---------- Paper pages: help and legal ---------- */
.paper { padding-block: 24px 80px; }
.doc.withToc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; border-left: 2px solid var(--line); padding-left: 14px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 72ch; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.prose h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; }
.prose h2 { font-size: 26px; margin-top: 26px; scroll-margin-top: 20px; }
.prose h3 { font-size: 19px; margin-top: 12px; font-family: var(--ui); font-weight: 800; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }
.prose code { font-size: .9em; background: var(--raised); padding: 1px 6px; border-radius: 5px; }
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 620px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--raised); }
.prose tr:last-child td { border-bottom: 0; }
mark.open { background: #FBE0A6; color: #6a3b00; border-radius: 4px; padding: 0 3px; }
.draft { background: #FBE0A6; color: #6a3b00; font-weight: 800; border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 7px 15px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 15px; }
.group { margin-top: 14px; }
.group h2 { margin-top: 12px; }
.contact { background: var(--card); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.contact h2 { margin: 0; }
.mail { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mail a { font-size: 22px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.copy, .button { font: 800 15px var(--ui); background: var(--amber); color: var(--nightInk); border: 0; border-radius: 99px; padding: 9px 18px; cursor: pointer; text-decoration: none; display: inline-block; }

/* 404 */
.lost { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding-block: 120px 60px; }
.lost .moth { position: relative; left: auto; top: auto; width: 150px; }
.lost .moth.hiding { animation: peek 5s ease-in-out infinite; }
@keyframes peek { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 30px -6px; rotate: 8deg; } }
.lost p { color: var(--muted); max-width: 44ch; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .film, .trust { grid-template-columns: 1fr; }
  .film { justify-items: center; text-align: center; gap: 32px; }
  .filmText { align-items: center; }
  .steps, .times { grid-template-columns: 1fr; gap: 40px; }
  .wonder { grid-template-columns: 1fr; gap: 32px; }
  .doc.withToc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .hero { height: auto; aspect-ratio: 3 / 4.3; max-height: 760px; }
  .heroCopy { top: calc(76px + env(safe-area-inset-top, 0px)); transform: none; width: auto; right: 20px; gap: 10px; }
  .moth { left: 26%; top: 64%; width: 22%; }
  .end .moth { right: 8%; top: 12%; width: 110px; }
  .end::before { background: linear-gradient(180deg, transparent 0%, rgba(28, 26, 54, .6) 40%, rgba(28, 26, 54, .95) 100%); }
  .end { align-items: flex-end; min-height: 520px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .navHide { display: none; }
  .promises { grid-template-columns: 1fr; }
  .footIn { grid-template-columns: 1fr; }
  .heroCopy p:not(.heroMeta) { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .moth, .moth img, .tapDot, .lost .moth.hiding, .s1 *, .s2 *, .book * { animation: none !important; }
  .s1 .typed span { opacity: 1; }
  .reel img { animation: none; }
  .reel img:first-child { opacity: 1; }
  .set, body { transition: none; }
}
