/* unmoon.app — same tokens as src/design-system/tokens/colors.ts */
@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond-LightItalic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/SpaceGrotesk-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/SpaceGrotesk-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
/* Space Grotesk has no Cyrillic; Manrope covers it, as in the app. */
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ink: #0B0B0E;
  --ink2: #141419;
  --ink3: #1C1C22;
  --bone: #F0EEE9;
  --ash: #92919C;
  --smoke: #62616C;
  --seam: #2A2931;
  --silver: #B9BECA;
  --lunar: #8E91AC;
  --serif: 'Cormorant', Georgia, serif;
  --sans: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--silver); text-underline-offset: 3px; text-decoration-color: var(--smoke); }
a:hover { color: var(--bone); text-decoration-color: var(--ash); }
::selection { background: rgba(142, 145, 172, .35); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; position: relative; z-index: 2; }
.landing header.top { padding: 28px 20px; }
.wordmark { font: 500 13px/1 var(--sans); letter-spacing: 0.42em; color: var(--bone); text-decoration: none; }
nav.top a { font-size: 13px; color: var(--ash); text-decoration: none; margin-left: 18px; transition: color .3s; }
nav.top a:hover { color: var(--bone); }
.eyebrow { font: 500 11px/1.6 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--lunar); margin: 0 0 18px; }

/* ── Background ─────────────────────────────────────────── */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(142, 145, 172, .10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(185, 190, 202, .05), transparent 70%);
}
.landing main, .landing footer { position: relative; z-index: 1; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { min-height: calc(100svh - 84px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 20px 96px; position: relative; }
.hero-mark { width: min(300px, 70vw); aspect-ratio: 1; margin-bottom: 36px; transform: translate(var(--px, 0), var(--py, 0)); transition: transform 1.2s var(--ease); }
.orbit { width: 100%; height: 100%; overflow: visible; }
.o-ring { fill: none; stroke: var(--seam); stroke-width: .9; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--ease) .1s forwards; }
.o-path { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.o-path-a { stroke: var(--silver); stroke-opacity: .85; stroke-width: 1.1; animation: draw 2.4s var(--ease) .5s forwards; }
.o-path-b { stroke: var(--lunar); stroke-opacity: .75; stroke-width: 1; animation: draw 2.4s var(--ease) .8s forwards; }
.o-planet { fill: var(--silver); opacity: 0; animation: fade 1s ease 2.4s forwards; }
.o-moon { fill: var(--lunar); opacity: 0; animation: fade 1s ease 2.7s forwards; }
.o-spin { transform-box: view-box; transform-origin: 50% 50%; }
.o-spin-a { animation: spin 140s linear infinite; }
.o-spin-b { animation: spin 90s linear infinite reverse; }
.o-core { fill: var(--bone); }
.o-halo { transform-box: fill-box; transform-origin: center; animation: pulse 5s ease-in-out infinite; }

.title { font: 300 clamp(48px, 11vw, 92px)/1 var(--serif); letter-spacing: .04em; margin: 0 0 18px; }
.title span { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(14px); animation: letter 1.4s var(--ease) forwards; animation-delay: calc(1.1s + var(--i) * 90ms); }
.lede { font: italic 300 clamp(21px, 4.6vw, 28px)/1.4 var(--serif); color: var(--ash); margin: 0 0 32px; opacity: 0; animation: rise 1.4s var(--ease) 1.9s forwards; }
.badge { display: inline-block; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ash); border: 1px solid var(--seam); border-radius: 999px; padding: 9px 18px; max-width: 100%; line-height: 1.5; background: rgba(20, 20, 25, .55); backdrop-filter: blur(6px); opacity: 0; animation: rise 1.4s var(--ease) 2.2s forwards; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--smoke); text-decoration: none; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; opacity: 0; animation: fade 1.2s ease 3s forwards; }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--ash), transparent); transform-origin: top; animation: cue 2.6s var(--ease) infinite; }

/* ── The sky right now ──────────────────────────────────── */
.sky { padding-top: 40px; padding-bottom: 72px; text-align: center; }
.sky.offline { display: none; }
.sky-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--seam); border-radius: 22px; background: rgba(20, 20, 25, .6); backdrop-filter: blur(8px); overflow: hidden; }
.sky-cell { padding: 26px 18px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.sky-cell + .sky-cell { border-left: 1px solid var(--seam); }
.sky-label { display: block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--smoke); }
.sky-value { display: block; font: 300 clamp(22px, 3.4vw, 30px)/1.2 var(--serif); color: var(--bone); transition: opacity .6s; }
.sky:not(.ready) .sky-value { opacity: .25; }
.sky-phase { flex-direction: row; gap: 16px; }
.phase-disc { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 0 10px rgba(240, 238, 233, .18)); }
.disc-dark { fill: var(--ink3); stroke: var(--seam); stroke-width: .4; }
.disc-lit { fill: var(--bone); }
.sky-note { color: var(--smoke); font-size: 13px; margin: 16px 0 0; }
@media (max-width: 720px) {
  .sky-grid { grid-template-columns: 1fr; }
  .sky-cell + .sky-cell { border-left: 0; border-top: 1px solid var(--seam); }
}

/* ── Showcase ───────────────────────────────────────────── */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 120px; }
.show h2, .statement h2 { font: 300 clamp(38px, 5.6vw, 60px)/1.05 var(--serif); margin: 0 0 22px; }
.show h2 em, .statement h2 em { font-style: italic; color: var(--ash); }
.show-text > p { color: var(--ash); font-size: 17px; max-width: 460px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; }
.ticks li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--seam); color: #CFCDD3; font-size: 15px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 21px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--lunar); box-shadow: 0 0 10px rgba(142, 145, 172, .5); }

.phones { position: relative; height: 600px; --pw: 260px; --ph: 560px; }
.phone { position: absolute; margin: 0; width: var(--pw); height: var(--ph); border-radius: 42px; padding: 10px; background: linear-gradient(160deg, #26252c, #0f0f13 60%); box-shadow: 0 0 0 1px #34333b, 0 40px 80px -20px rgba(0, 0, 0, .8), 0 0 80px -30px rgba(142, 145, 172, .35); }
.phone::after { content: ''; position: absolute; top: 18px; left: 50%; width: 76px; height: 22px; margin-left: -38px; border-radius: 12px; background: #000; z-index: 2; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 33px; background: var(--ink); --sh: calc(var(--ph) - 20px); }
.screen img { display: block; width: 100%; height: auto; animation: screenscroll 34s ease-in-out infinite alternate; }
.phone-front { left: 50%; top: 10px; transform: translateX(-30%) rotate(3deg); animation: float 9s ease-in-out infinite; }
.phone-back { left: 50%; top: 40px; transform: translateX(-95%) rotate(-6deg) scale(.88); opacity: .55; filter: saturate(.7); animation: float-b 11s ease-in-out infinite; }
.phone-back img { animation-duration: 46s; animation-delay: -12s; }

/* ── Features ───────────────────────────────────────────── */
.features { padding-bottom: 120px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--seam); border-radius: 22px; overflow: hidden; }
.card { background: var(--ink); box-shadow: 0 0 0 1px var(--seam); padding: 30px 26px 34px; position: relative; }
.card:hover { background: var(--ink2); }
.card::before { content: ''; position: absolute; left: 26px; right: 26px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--silver), transparent); opacity: 0; transition: opacity .6s; }
.card:hover::before { opacity: .6; }
.card-n { font: 500 11px/1 var(--sans); letter-spacing: .2em; color: var(--smoke); }
.card h3 { font: 300 30px/1.1 var(--serif); margin: 18px 0 10px; }
.card p { margin: 0; color: var(--ash); font-size: 15px; }

/* ── Statement ──────────────────────────────────────────── */
.statement { text-align: center; padding-top: 40px; padding-bottom: 140px; }
.statement h2 { font-size: clamp(44px, 8vw, 96px); background: linear-gradient(100deg, var(--ash) 20%, var(--bone) 45%, var(--silver) 55%, var(--ash) 80%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s ease-in-out infinite; }
.statement h2 em { color: transparent; }
.statement p { color: var(--smoke); font-size: 14px; }

/* ── Reveal on scroll (only when JS runs: html.js) ──────── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), background .5s; transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; gap: 24px; padding-bottom: 80px; }
  .phones { height: 520px; --pw: 230px; --ph: 490px; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .phones { height: 470px; --pw: 210px; --ph: 445px; }
  .phone-front { transform: translateX(-22%) rotate(3deg); }
  .phone-back { transform: translateX(-88%) rotate(-6deg) scale(.86); }
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes letter { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes screenscroll { 0%, 10% { transform: translateY(0); } 90%, 100% { transform: translateY(calc(-100% + var(--sh))); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes float-b { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 8px; } }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .o-spin, .o-halo, .screen img, .phone, .statement h2 { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── Documents (privacy, terms, support, delete) ───────── */
.doc { padding: 24px 0 48px; }
.doc h1 { font: 300 clamp(34px, 7vw, 46px)/1.1 var(--serif); margin: 24px 0 8px; }
.doc .meta { color: var(--smoke); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font: 500 13px/1.6 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver); margin: 36px 0 10px; }
.doc p, .doc li { color: #CFCDD3; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc hr { border: 0; border-top: 1px solid var(--seam); margin: 48px 0; }
.note { background: var(--ink2); border: 1px solid var(--seam); border-radius: 14px; padding: 16px 18px; color: var(--ash); }

footer { border-top: 1px solid var(--seam); margin-top: 40px; padding: 28px 20px 48px; font-size: 13px; color: var(--smoke); }
footer a { color: var(--ash); margin-right: 16px; text-decoration: none; display: inline-block; margin-bottom: 6px; }
footer a:hover { color: var(--bone); }
footer p { margin: 14px 0 0; }
.wrap footer { padding-left: 0; padding-right: 0; }
