@font-face { font-family: 'Cormorant'; font-weight: 300; font-style: normal; font-display: swap; src: url(/fonts/cormorant-300.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-weight: 300; font-style: italic; font-display: swap; src: url(/fonts/cormorant-300i.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/cormorant-400i.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/cormorant-500.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url(/fonts/manrope-400.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url(/fonts/manrope-600.woff2) format('woff2'); }

/* Tokens mirror src/theme/tokens.ts. The site is night-only, like the app. */
:root {
  --night: #0A0E1F;
  --dusk: #151B38;
  --veil: rgba(158, 148, 214, 0.22);
  --iris: #9D93D4;
  --amethyst: #5C4E9E;
  --gold: #E7C982;
  --gold-deep: #A9853F;
  --starlight: #FFF4D8;
  --moth: #F2EEE3;
  --fog: #A7A3BE;
  --whisper: #8B87AE;
  --glass: rgba(21, 27, 56, 0.55);
  --sheen: rgba(242, 238, 227, 0.07);
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--moth);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The sky: a fixed star field over a slow indigo-to-iris wash. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(92, 78, 158, 0.38), transparent 70%),
    radial-gradient(50rem 36rem at -10% 60%, rgba(92, 78, 158, 0.16), transparent 70%),
    url(/img/stars.svg) center top / 1200px auto repeat,
    linear-gradient(var(--night), #0D1230 70%, var(--night));
}
::selection { background: rgba(231, 201, 130, 0.3); color: var(--starlight); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--amethyst) var(--night); }
a { color: var(--gold); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img, svg { display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; color: var(--moth); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(3rem, 6.4vw, 5.25rem); line-height: 1.02; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.06; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { color: var(--fog); font-size: 1.125rem; max-width: 34rem; text-wrap: pretty; }

/* Header */
header.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--moth); text-decoration: none; font: 500 1.6rem/1 var(--serif); letter-spacing: 0.01em; }
.brand img { width: 34px; height: 34px; }
header.top nav { display: flex; gap: 24px; font-size: 0.95rem; }
header.top nav a { color: var(--fog); text-decoration: none; }
header.top nav a:hover { color: var(--moth); }

/* Language menu: native <details>, so it works without JS. */
.langs { position: relative; }
.langs summary { list-style: none; display: flex; align-items: center; gap: 8px; color: var(--fog); cursor: pointer; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ''; width: 6px; height: 6px; margin: -3px 0 0 2px; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), margin 0.25s; }
.langs[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.langs summary:hover, .langs[open] summary { color: var(--moth); }
.langs ul { position: absolute; right: -10px; top: calc(100% + 12px); z-index: 20; min-width: 172px; margin: 0; padding: 6px; list-style: none; background: var(--dusk); border: 1px solid var(--veil); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); }
.langs[open] ul { animation: langs-in 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes langs-in { from { opacity: 0; transform: translateY(-4px); } }
header.top .langs li a { display: block; padding: 9px 14px; border-radius: 9px; }
header.top .langs li a:hover { background: var(--sheen); }
header.top .langs a[aria-current] { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: linear-gradient(100deg, var(--gold), var(--gold-deep));
  color: #1A1530; font: 600 1rem/1 var(--sans); text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.8); }
.btn:active { transform: translateY(0); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }
.soon { color: var(--whisper); font-size: 0.95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 40px 0 120px; }
.hero .lede { margin-top: 28px; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.phone {
  position: relative; width: min(330px, 78vw); aspect-ratio: 760 / 1651;
  border-radius: 52px; padding: 9px;
  background: linear-gradient(160deg, #2A2F4D, #11152A);
  box-shadow: 0 0 0 1px rgba(158, 148, 214, 0.25), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.phone img { width: 100%; height: 100%; border-radius: 44px; object-fit: cover; }
.caption { margin-top: 18px; color: var(--whisper); font-size: 0.85rem; }
.float {
  position: absolute; border-radius: 22px; padding: 14px 16px;
  background: rgba(26, 31, 62, 0.72); border: 1px solid var(--veil);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7);
}
.notif { top: 9%; left: -6%; width: 290px; display: grid; grid-template-columns: 38px 1fr auto; gap: 2px 12px; align-items: start; }
.notif img { grid-row: span 2; width: 38px; height: 38px; border-radius: 10px; background: var(--night); padding: 3px; }
.notif b { font: 600 0.9rem/1.3 var(--sans); }
.notif time { color: var(--whisper); font-size: 0.78rem; }
.notif span { grid-column: 2 / 4; color: var(--fog); font-size: 0.86rem; line-height: 1.4; }
.moonchip { bottom: 16%; right: -4%; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; }
.moonchip svg { width: 40px; height: 40px; }
.moonchip b { display: block; font: 500 1.2rem/1.1 var(--serif); }
.moonchip small { color: var(--fog); font-size: 0.8rem; }
.float-label { position: absolute; color: var(--whisper); font-size: 0.78rem; white-space: nowrap; }

/* Sections */
section.band { padding: 110px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split .lede { margin-top: 24px; }
.split.flip > :first-child { order: 2; }

/* Reading card (mirrors the Today screen) */
.card {
  border-radius: 28px; padding: 8px 28px;
  background: var(--glass); border: 1px solid var(--veil);
  box-shadow: inset 0 1px 0 var(--sheen), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.verse { font: italic 300 clamp(1.45rem, 2.4vw, 1.75rem)/1.45 var(--serif); color: var(--moth); text-align: center; padding: 30px 6px 26px; text-wrap: pretty; }
.facet { display: grid; grid-template-columns: 24px 1fr; gap: 4px 16px; padding: 18px 0; border-top: 1px solid var(--veil); }
.facet svg { margin-top: 2px; }
.facet dt { color: var(--fog); font-size: 0.85rem; }
.facet dd { grid-column: 2; margin: 0; }
.almanac { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--veil); margin: 0 -28px; }
.almanac div { padding: 18px 12px 20px; text-align: center; }
.almanac div + div { border-left: 1px solid var(--veil); }
.almanac dt { color: var(--whisper); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.almanac dd { font-variant-numeric: lining-nums; margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 1.35rem/1.2 var(--serif); }
.swatch { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.almanac svg { width: 18px; height: 18px; }
.points { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.points svg { margin-top: 4px; }
.points b { display: block; font-weight: 600; }
.points span { color: var(--fog); }

/* Signs */
.signs-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 36px; max-width: 30rem; }
.signs-grid button {
  aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--veil); background: rgba(21, 27, 56, 0.4);
  color: var(--iris); font: 400 1.5rem/1 var(--serif); cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.signs-grid button:hover { color: var(--moth); border-color: rgba(158, 148, 214, 0.45); }
.signs-grid button[aria-pressed='true'] { color: var(--gold); border-color: var(--gold); background: rgba(231, 201, 130, 0.1); }
.sign-card { padding: 32px 32px 30px; text-align: center; }
.sign-card svg.constellation { width: 100%; max-width: 280px; height: 170px; margin: 0 auto; overflow: visible; }
.sign-card h3 { font-size: 2.6rem; font-weight: 500; margin-top: 12px; }
.sign-card .meta { color: var(--fog); font-size: 0.88rem; margin-top: 4px; }
.sign-card .verse { padding: 22px 0 0; font-size: 1.4rem; }
.constellation line { stroke: var(--gold); stroke-opacity: 0.7; stroke-width: 1.2; stroke-linecap: round; }
.constellation circle { fill: var(--starlight); }
.drawing line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--i) * 70ms); }
.drawing circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: twinkle 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
.fine { color: var(--whisper); font-size: 0.85rem; margin-top: 16px; text-align: center; }

/* Oracle chat */
.chat { padding: 28px; display: grid; gap: 14px; }
.bubble { max-width: 86%; padding: 14px 18px; border-radius: 22px; }
.bubble.me { justify-self: end; background: rgba(157, 147, 212, 0.16); border: 1px solid var(--veil); border-bottom-right-radius: 8px; }
.oracle-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: end; }
.oracle-row img { width: 34px; height: 34px; }
.bubble.oracle { max-width: 100%; font: 400 1.25rem/1.5 var(--serif); background: rgba(10, 14, 31, 0.55); border: 1px solid rgba(231, 201, 130, 0.25); border-bottom-left-radius: 8px; }
.chat .fine { margin-top: 2px; }

/* Quiet by design */
.quiet { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; }
.bird-big { width: min(420px, 80vw); margin: 0 auto; }
.list { margin: 32px 0 0; }
.list div { padding: 18px 0; border-top: 1px solid var(--veil); }
.list dt { font-weight: 600; }
.list dd { margin: 4px 0 0; color: var(--fog); }

/* Final call */
.finale { text-align: center; padding: 120px 0 130px; }
.finale img { width: 84px; height: 84px; margin: 0 auto 26px; }
.finale .lede { margin: 22px auto 0; }
.finale .cta-row { justify-content: center; }
.motto { margin-top: 44px; font: italic 300 1.25rem/1.4 var(--serif); color: var(--iris); }

/* Footer */
footer.bottom { border-top: 1px solid var(--veil); padding: 32px 0 48px; color: var(--whisper); font-size: 0.9rem; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
footer.bottom a { color: var(--fog); text-decoration: none; }
footer.bottom a:hover { color: var(--moth); }
footer.bottom .langs-row { flex-basis: 100%; gap: 8px 20px; }
footer.bottom .langs-row a[aria-current] { color: var(--moth); }

/* Entrance: content is visible by default; JS opts in to the reveal. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero, .split, .quiet { grid-template-columns: 1fr; gap: 56px; }
  .split.flip > :first-child { order: 0; }
  .hero { padding: 16px 0 80px; }
  section.band { padding: 72px 0; }
  .notif { left: -2%; top: 4%; width: 260px; }
  .moonchip { right: -2%; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  header.top nav a.contact { display: none; }
  .signs-grid { grid-template-columns: repeat(4, 1fr); }
  .card { padding: 4px 20px; }
  .almanac { margin: 0 -20px; }
  .almanac dd { font-size: 1.15rem; }
  .sign-card { padding: 26px 20px; }
  .chat { padding: 20px; }
  .notif { width: 232px; left: -4px; }
  .moonchip { right: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .drawing line, .drawing circle { animation: none; stroke-dashoffset: 0; opacity: 1; }
}
