/* whoskeen.app: shared styles for every page. Colours, type, shape and motion
   come from tokens.css (role variables only, no raw hex). Motion follows
   docs/MOTION.md: calm and quick, nothing bounces, tilts or rotates. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  font-family: var(--k-font); font-weight: var(--k-weight-body);
  color: var(--k-ink); background: var(--k-hero);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; }
.i { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; vertical-align: -0.18em; }
.display { font-weight: var(--k-weight-display); letter-spacing: var(--k-display-tracking); line-height: var(--k-display-leading); }
.container { width: min(1280px, 100% - 48px); margin: 0 auto; }

/* Shadows are plum at low strength, never black */
:root {
  --shadow-float: 0 12px 30px -14px color-mix(in srgb, var(--k-ink) 50%, transparent);
  --shadow-nav: 0 10px 30px -15px color-mix(in srgb, var(--k-ink) 35%, transparent);
  --shadow-phone: 0 40px 80px -24px color-mix(in srgb, var(--k-ink) 55%, transparent);
  --tint: color-mix(in srgb, var(--k-surface) 60%, transparent);
  --frost: color-mix(in srgb, var(--k-paper) 82%, transparent);
}

:focus-visible { outline: 3px solid var(--k-ink); outline-offset: 3px; }
.bg-ink :focus-visible { outline-color: var(--k-on-ink); }
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 120; padding: 12px 20px;
  border-radius: var(--k-radius-pill); background: var(--k-ink); color: var(--k-on-ink);
  font-weight: var(--k-weight-bold); text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

/* Buttons. Press: background 8% darker (MOTION 6), never a scale. */
.pill, .store {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--k-radius-pill); text-decoration: none; white-space: nowrap;
  transition: filter var(--k-dur-fast) var(--k-ease);
}
.pill { gap: 8px; height: 60px; padding: 0 30px; font-weight: var(--k-weight-bold); font-size: 18px; }
a.pill:hover, a.store:hover { filter: brightness(.95); }
a.pill:active, a.store:active { filter: brightness(.92); transition-duration: var(--k-dur-instant); }
.pill.ink { background: var(--k-ink); color: var(--k-on-ink); }

/* Text links. Press: opacity .55 */
nav .links a, footer nav a, .card a, .more a, .prose a { transition: opacity var(--k-dur-fast) var(--k-ease); text-underline-offset: 5px; }
nav .links a:active, footer nav a:active, .card a:active, .more a:active, .prose a:active { opacity: .55; transition-duration: var(--k-dur-instant); }

/* Nav */
.nav-wrap { position: sticky; top: 20px; z-index: 50; padding-top: 20px; }
nav[aria-label="Main"] {
  display: flex; align-items: center; gap: 28px;
  background: var(--k-paper); border-radius: var(--k-radius-pill);
  padding: 10px 10px 10px 32px; box-shadow: var(--shadow-nav);
}
.logo { display: flex; flex: none; text-decoration: none; border-radius: var(--k-radius-pill); }
.logo img { height: 36px; width: auto; }
nav .links { display: flex; gap: 26px; font-weight: 600; font-size: 17px; }
nav .links a { text-decoration: none; }
nav .links a:hover { text-decoration: underline; }
nav .pill { margin-left: auto; height: 54px; }

/* Store badges. Before launch they say "Coming soon" and don't link anywhere. */
.stores { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.store { gap: 12px; height: 64px; padding: 0 26px; background: var(--k-ink); color: var(--k-on-ink); }
.store b { display: block; font-size: 18px; line-height: 1.1; }
.store small { display: block; font-size: 12px; opacity: .7; }
.store i { font-style: normal; font-size: 28px; }
.store.soon { cursor: default; }

/* Hero */
.hero { padding: 72px 0 96px; color: var(--k-on-hero); }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(56px, 7.6vw, 112px); text-wrap: balance; }
.hero h1 > span { display: inline-block; }
.hero p { font-size: 22px; line-height: 1.4; max-width: 520px; margin-top: 28px; font-weight: 600; }
.hero .note { font-size: 15px; margin-top: 16px; opacity: .75; }

.device { position: relative; justify-self: center; }
.phone {
  position: relative; width: 340px; height: 735px; border-radius: 52px; background: var(--k-ink);
  padding: 11px; box-shadow: var(--shadow-phone);
}
.phone .clip { width: 318px; height: 713px; border-radius: 42px; overflow: hidden; background: var(--k-hero); }
.phone video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Pause and play the app video (WCAG 2.2.2). It sits quietly beside the phone, off the app's own UI. */
.play {
  position: absolute; left: -60px; bottom: 20px; z-index: 3;
  width: 44px; height: 44px; border: 0; border-radius: var(--k-radius-pill); cursor: pointer;
  display: grid; place-items: center; font-size: 18px;
  background: var(--frost); color: var(--k-ink);
  opacity: .7; transition: opacity var(--k-dur-fast) var(--k-ease);
}
.play:hover, .play:focus-visible { opacity: 1; }
.play .i { grid-area: 1 / 1; transition: opacity var(--k-dur-fast) var(--k-ease); }
.play .i + .i, .play.paused .i:first-child { opacity: 0; }
.play.paused .i + .i { opacity: 1; }

.answer, .count {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  border-radius: var(--k-radius-pill); font-weight: var(--k-weight-bold); font-size: 17px; white-space: nowrap;
  box-shadow: var(--shadow-float);
}
.answer { background: var(--k-surface); color: var(--k-ink); padding: 6px 20px 6px 6px; }
.answer .av { width: 40px; height: 40px; font-size: 22px; }
.count { background: var(--k-ink); color: var(--k-on-ink); padding: 14px 22px; font-size: 16px; bottom: 64px; right: -60px; }
.count .i { font-size: 20px; }
.s1 { top: 120px; left: -110px; }
.s2 { top: 300px; right: -92px; }
.s3 { top: 470px; left: -84px; }

/* Sections: every section is a colour block */
section.block { padding: 120px 0; }
.bg-warm { background: var(--k-warm); }
.bg-soft { background: var(--k-soft); }
.bg-ink { background: var(--k-ink); color: var(--k-on-ink); }
.bg-paper { background: var(--k-paper); }
.bg-pop { background: var(--k-pop); }
.bg-hero { background: var(--k-hero); color: var(--k-on-hero); }
h2 { font-size: clamp(48px, 6.5vw, 96px); }
.intro { font-size: 22px; line-height: 1.4; margin-top: 20px; max-width: 640px; font-weight: 500; }
.more { margin-top: 24px; font-size: 18px; font-weight: var(--k-weight-bold); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.step { border-radius: var(--k-radius-surface); padding: 32px; min-height: 460px; display: flex; flex-direction: column; overflow: hidden; }
.step h3 { font-size: 48px; }
.step p { font-size: 18px; line-height: 1.4; margin-top: 12px; }
.step .art { margin-top: auto; padding-top: 28px; }
.mini-notif { background: var(--frost); border-radius: var(--k-radius-surface); padding: 14px 18px 16px; font-size: 15px; line-height: 1.35; }
.mini-notif .top { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .75; }
.mini-notif .when { margin-left: auto; letter-spacing: 0; }
.mini-notif .ic { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.mini-notif b { display: block; margin-top: 8px; font-size: 18px; }
.notif-art .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
/* Both actions in the same frosted cream: lime is only for "You're in" and matched moments */
.notif-art .actions span { height: 48px; border-radius: var(--k-radius-pill); display: grid; place-items: center; font-weight: var(--k-weight-bold); font-size: 16px; background: var(--frost); }
.mini-yes { display: grid; gap: 14px; justify-items: center; }
.mini-yes .yes { width: 100%; height: 96px; border-radius: var(--k-radius-pill); display: grid; place-items: center; font-weight: var(--k-weight-display); font-size: 40px; letter-spacing: -0.02em; background: var(--k-ink); color: var(--k-on-ink); }
.mini-yes .no { font-size: 16px; font-weight: var(--k-weight-bold); padding: 8px; }
.av { border-radius: 50%; display: grid; place-items: center; color: var(--k-ink); flex: none; }
.crew-card { background: var(--k-surface); border-radius: var(--k-radius-surface); padding: 14px 18px 6px; }
.crew-card .tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--k-radius-pill); background: var(--k-paper); font-size: 13px; font-weight: var(--k-weight-bold); margin-bottom: 4px; }
.crew-card .member { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.crew-card .member + .member { border-top: 1px solid var(--k-line); }
.crew-card .av { width: 40px; height: 40px; font-size: 22px; }
.crew-card b { display: block; font-size: 16px; }
.crew-card small { display: block; font-size: 13px; opacity: .7; margin-top: 1px; }

/* Tonight only */
.tonight h2 { font-size: clamp(56px, 8vw, 128px); }
.tonight h2 s { text-decoration: none; position: relative; color: color-mix(in srgb, var(--k-on-ink) 55%, transparent); }
.tonight h2 s::after { content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 6px; border-radius: var(--k-radius-pill); background: var(--k-hero); transform-origin: left; }
.tonight .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.tonight .grid div { border-top: 3px solid currentColor; padding-top: 20px; font-size: 19px; line-height: 1.4; }
.tonight .grid b { display: block; font-size: 28px; letter-spacing: -0.02em; margin-bottom: 6px; color: var(--k-warm); }

/* Safety */
.safety .container { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--k-surface); border-radius: var(--k-radius-surface); padding: 28px; }
.card .e { font-size: 28px; width: 56px; height: 56px; border-radius: var(--k-radius-inner); background: var(--k-soft); display: grid; place-items: center; }
.card h3 { font-size: 24px; letter-spacing: -0.02em; margin-top: 14px; }
.card p { font-size: 16px; line-height: 1.45; margin-top: 6px; opacity: .8; }
.card a { display: inline-block; margin-top: 14px; font-weight: var(--k-weight-bold); font-size: 16px; }

/* FAQ. The plus loses its upright as it opens: a scale, never a rotation. */
.faq .container { max-width: 900px; }
details { background: var(--tint); border-radius: var(--k-radius-surface); margin-top: 12px; }
details:first-of-type { margin-top: 48px; }
summary { list-style: none; cursor: pointer; padding: 24px 28px; font-size: 22px; font-weight: var(--k-weight-bold); display: flex; justify-content: space-between; gap: 16px; position: relative; border-radius: var(--k-radius-surface); }
summary::-webkit-details-marker { display: none; }
summary::after, summary::before { content: ""; flex: none; border-radius: var(--k-radius-pill); background: currentColor; }
summary::after { width: 18px; height: 3px; margin-top: 13px; }
summary::before { position: absolute; width: 3px; height: 18px; right: 35.5px; top: 29.5px; transition: transform var(--k-dur-base) var(--k-ease); }
details[open] summary::before { transform: scaleY(0); }
details p { padding: 0 28px 26px; font-size: 18px; line-height: 1.5; max-width: 720px; }

/* Footer CTA */
.cta { text-align: center; padding: 140px 0 60px; }
.cta-logo { display: flex; justify-content: center; }
.cta-logo img { height: clamp(170px, 24vw, 340px); width: auto; }
.cta p { font-size: 24px; font-weight: 600; margin-top: 40px; }
.cta .stores { justify-content: center; }
footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 120px; padding-top: 28px; border-top: 2px solid color-mix(in srgb, var(--k-ink) 20%, transparent); font-size: 15px; font-weight: 600; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-brand img { height: 20px; width: auto; }

/* Inner pages: Guidelines, Privacy, Terms, Contact */
.page-head { padding: 72px 0 88px; color: var(--k-on-hero); }
.page-head h1 { font-size: clamp(56px, 7.6vw, 112px); }
.page-head p { font-size: 22px; line-height: 1.4; max-width: 640px; margin-top: 24px; font-weight: 600; }
.page-head .updated { font-size: 15px; margin-top: 16px; opacity: .75; }
.page-head .stores { margin-top: 36px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 32px; font-weight: var(--k-weight-display); letter-spacing: -0.02em; line-height: 1.15; margin-top: 56px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 18px; line-height: 1.6; }
.prose p { margin-top: 14px; }
.prose ul { margin-top: 14px; padding-left: 22px; display: grid; gap: 8px; }
.prose a { text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 17px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 14px 24px 14px 0; vertical-align: top; }
.prose th { font-weight: var(--k-weight-display); border-bottom: 2px solid var(--k-ink); }
.prose td { border-bottom: 1px solid color-mix(in srgb, var(--k-ink) 15%, transparent); }
.prose .help { background: var(--k-surface); border-radius: var(--k-radius-surface); padding: 24px 28px; margin-top: 18px; }
.prose .help p:first-child { margin-top: 0; }
.contact .cards { grid-template-columns: repeat(3, 1fr); }

/* 404: the animated mark (logo.js) on paper */
.lost { background: var(--k-paper); }
.lost main { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 24px; }
.gather { --m: clamp(120px, 22vw, 176px); line-height: 0; margin-bottom: 48px; }
.gather svg { height: var(--m); width: auto; aspect-ratio: 160 / 104; overflow: visible; }
.gather .plum { fill: var(--sunset-plum); }
.gather .coral { fill: var(--sunset-coral); }
.gather .tangerine { fill: var(--sunset-tangerine); }
.gather .pink { fill: var(--sunset-pink); }
.gather .lime { fill: var(--sunset-lime); }
.lost .line { font-size: clamp(var(--k-size-xl), 6vw, var(--k-size-mega)); }
.lost .pill { margin-top: 40px; }

/* Responsive */
@media (max-width: 960px) {
  nav .links { display: none; }
  nav[aria-label="Main"] { padding-left: 24px; }
  .hero .container, .safety .container { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .device { margin-top: 24px; }
  .steps, .tonight .grid, .contact .cards { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  section.block { padding: 88px 0; }
  .page-head { padding: 48px 0 64px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  nav[aria-label="Main"] { gap: 12px; padding-left: 20px; }
  nav .pill { height: 48px; padding: 0 20px; font-size: 16px; }
  .logo img { height: 28px; }
  .hero p, .page-head p { font-size: 19px; }
  .store { height: 60px; padding: 0 22px; }
  .phone { transform: scale(.86); transform-origin: top center; margin-bottom: -100px; }
  .play { left: -50px; }
  .s1 { left: -14px; top: 130px; } .s2 { right: -10px; top: 190px; } .s3, .count { display: none; }
  .answer { font-size: 16px; } .answer .av { width: 36px; height: 36px; font-size: 20px; }
  .mini-yes .yes { height: 84px; font-size: 36px; }
  .cards { grid-template-columns: 1fr; }
  summary { font-size: 19px; padding: 20px 22px; }
  summary::before { right: 29.5px; top: 25.5px; }
  details p { padding: 0 22px 22px; font-size: 17px; }
  .prose h2 { font-size: 26px; margin-top: 44px; }
  .prose p, .prose li { font-size: 17px; }
  .prose th, .prose td { padding: 12px 14px 12px 0; font-size: 15px; }
  footer { flex-direction: column; }
}

/* ---------------------------------------------------------------------------
   Motion (docs/MOTION.md). Only transform, opacity and clip-path animate.
   Everything here sits behind .js, so without JavaScript the page is simply still.
   --------------------------------------------------------------------------- */

/* Tide wipe on arrival (MOTION 5.5): ink, then pink, then tangerine panels slide
   down and off, 150 ms apart, onto coral. Content rises in from 1 s. Once per visit. */
.tide { display: none; }
.js .has-tide .tide { display: block; position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.tide i { position: absolute; inset: 0; animation: tide 800ms var(--k-ease) both; }
.tide .p1 { background: var(--k-warm); animation-delay: 450ms; }
.tide .p2 { background: var(--k-soft); animation-delay: 300ms; }
.tide .p3 { background: var(--k-ink); animation-delay: 150ms; }
@keyframes tide { from { transform: translateY(0); } to { transform: translateY(100%); } }

/* Arrival: .rv items rise 18 px and fade in, 90 ms apart (the Tide's content timing) */
.js .rv { animation: rise 700ms var(--k-ease) both; animation-delay: calc(var(--fg, 150ms) + var(--i, 0) * 90ms); }
.js .has-tide { --fg: 1000ms; }
.js.tide-seen .has-tide { --fg: 150ms; }
.js.tide-seen .has-tide .tide { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-sm { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }

/* On scroll: content rises 16 px and fades in, 40 ms apart in reading order */
.js [data-reveal] { opacity: 0; transform: translateY(var(--k-rise)); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity var(--k-dur-base) var(--k-ease), transform var(--k-dur-base) var(--k-ease);
  transition-delay: calc(var(--n, 0) * var(--k-stagger));
}
/* Inside the steps the art arrives last: the notification drops in, the crew rows stagger */
.js .step .art > * { opacity: 0; transform: translateY(var(--k-rise)); transition: opacity var(--k-dur-base) var(--k-ease), transform var(--k-dur-base) var(--k-ease); }
.js .step.in .art > * { opacity: 1; transform: none; transition-delay: calc(var(--n, 0) * var(--k-stagger) + 200ms + var(--j, 0) * 60ms); }
.js .notif-art .mini-notif { transform: translateY(-12px); }
.js .step.in .notif-art .mini-notif { transform: none; }
.step .art > :nth-child(2) { --j: 1; } .step .art > :nth-child(3) { --j: 2; } .step .art > :nth-child(4) { --j: 3; }

/* Tonight only: the coral strikes draw left to right once the title is in */
.js .tonight h2[data-reveal] s::after { transform: scaleX(0); transition: transform var(--k-dur-slow) var(--k-ease); }
.js .tonight h2.in s::after { transform: scaleX(1); transition-delay: 300ms; }
.js .tonight h2.in s + br + s::after { transition-delay: 420ms; }

/* FAQ: the answer rises 8 px as it opens */
details[open] p { animation: rise-sm var(--k-dur-base) var(--k-ease) both; }

/* Reduced motion (MOTION 8): no movement, no wipe, just short crossfades */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .has-tide .tide { display: none; }
  .js .has-tide { --fg: 0ms; }
  .js .rv { animation: fade var(--k-dur-fast) linear both; animation-delay: 0ms; }
  .js [data-reveal], .js .step .art > *, .js .notif-art .mini-notif { transform: none; }
  .js [data-reveal].in, .js .step.in .art > * { transition: opacity var(--k-dur-fast) linear; transition-delay: 0ms; }
  .js .tonight h2[data-reveal] s::after { transform: scaleX(1); transition: none; }
  details[open] p { animation: fade var(--k-dur-fast) linear both; }
  summary::before { transition: none; }
}
