/* Somnium — shared styles. Dark, grainy, quiet. Headings: Cormorant Garamond italic; text: Questrial. */

/* Self-hosted fonts (SIL Open Font License): no request to Google when a page loads */
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-300i-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-300i-latin.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: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-400i-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-400i-latin.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: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-300-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-300-latin.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: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-400-latin.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: "Questrial"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/questrial-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Questrial"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/questrial-400-latin.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; }

:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #e2ebf6;
  --ink-strong: #f2f6fb;
  --mute: rgba(226, 235, 246, 0.64);
  --faint: rgba(226, 235, 246, 0.42);
  --line: rgba(226, 235, 246, 0.1);
  --glass: rgba(6, 10, 26, 0.5);
  --glow: #3d8bff;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Questrial", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --wrap: 1120px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(61, 139, 255, 0.35); }
:focus-visible { outline: 1px solid rgba(160, 200, 255, 0.8); outline-offset: 4px; border-radius: 6px; }

/* ---------- background scene ---------- */
.scene, .grain { position: fixed; inset: 0; pointer-events: none; }
.scene { z-index: -2; width: 100%; height: 100%; display: block; filter: blur(0.6px); background: #000; }
.grain { z-index: -1; mix-blend-mode: screen; background-repeat: repeat; }
.grain.a { opacity: 0.42; animation: drift-a 48s linear infinite; }
.grain.b { opacity: 0.08; animation: drift-b 64s linear infinite, breathe 9s ease-in-out infinite alternate; }
@keyframes drift-a { to { background-position: 256px 512px; } }
@keyframes drift-b { to { background-position: -512px 256px; } }
@keyframes breathe { to { opacity: 0.42; } }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 48px); margin: 0 auto; }
section { position: relative; }
.section { padding: 120px 0; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 22px;
}
h1, h2, h3 { font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--ink-strong); margin: 0; }
h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1.02; letter-spacing: -0.005em; }
h2 { font-size: clamp(34px, 4.2vw, 58px); line-height: 1.05; }
h3 { font-size: 28px; line-height: 1.15; }
.lead { font-size: clamp(16px, 1.3vw, 18px); color: var(--mute); max-width: 520px; }
.muted { color: var(--mute); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { font-size: 14px; letter-spacing: 0.42em; text-transform: uppercase; text-decoration: none; color: var(--ink-strong); }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 13px; letter-spacing: 0.06em; }
.nav-links a { text-decoration: none; color: var(--mute); transition: color 0.25s; }
.nav-links a:hover { color: var(--ink-strong); }
.nav-links .pill-link { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  border: 1px solid rgba(226, 235, 246, 0.34);
  background: rgba(0, 0, 0, 0.18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--ink); text-decoration: none;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.btn:hover { border-color: rgba(160, 200, 255, 0.7); background: rgba(61, 139, 255, 0.1); box-shadow: 0 0 40px rgba(61, 139, 255, 0.18); }
.store-badge { display: inline-block; height: 48px; transition: opacity 0.3s, transform 0.3s; }
.store-badge:hover { opacity: 0.88; transform: translateY(-1px); }
.store-badge img { height: 100%; width: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 8vh; }
.hero h1 { max-width: 760px; margin-bottom: 26px; text-shadow: 0 0 40px rgba(61, 139, 255, 0.15); }
.hero .lead { margin: 0 0 36px; }
.scroll-hint { position: absolute; right: clamp(20px, 4vw, 48px); bottom: 32px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); writing-mode: vertical-rl; }

/* ---------- glass cards ---------- */
.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 30px;
}
.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.num { font-size: 12px; letter-spacing: 0.24em; color: var(--faint); display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.num::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(226, 235, 246, 0.22), transparent); }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--mute); font-size: 15px; }

/* ---------- section heads ---------- */
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; }
.head .lead { justify-self: end; }

/* ---------- readings list ---------- */
.readings { border-top: 1px solid var(--line); }
.reading { display: grid; grid-template-columns: 70px 1fr 1.3fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.reading .n { font-size: 12px; letter-spacing: 0.2em; color: var(--faint); }
.reading h3 { font-size: 30px; }
.reading p { margin: 0; color: var(--mute); }
.tag { display: inline-block; margin-left: 10px; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(160, 200, 255, 0.85); vertical-align: middle; }

/* ---------- sample interpretation ---------- */
.sample { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sample .quote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 26px; line-height: 1.35; color: var(--ink-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.chip.on { border-color: rgba(160, 200, 255, 0.55); color: var(--ink); background: rgba(61, 139, 255, 0.12); }
.sample .label { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.sample .block + .block { margin-top: 22px; }
.locked { filter: blur(4px); user-select: none; opacity: 0.6; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan h3 { font-size: 36px; margin-bottom: 4px; }
.plan ul { list-style: none; padding: 0; margin: 26px 0 0; }
.plan li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--mute); font-size: 15px; display: flex; gap: 12px; }
.plan li::before { content: "✦"; font-size: 10px; color: rgba(160, 200, 255, 0.7); padding-top: 5px; }
.plan.premium { border-color: rgba(120, 170, 255, 0.28); box-shadow: 0 0 80px rgba(61, 139, 255, 0.08) inset; }
.plan .note { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 26px 40px 26px 0; position: relative; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 26px; color: var(--ink-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 24px; font-family: var(--sans); font-style: normal; font-size: 22px; color: var(--faint); transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 26px; color: var(--mute); max-width: 760px; }

/* ---------- closing ---------- */
.closing { text-align: center; padding: 160px 0 140px; }
.closing h2 { max-width: 760px; margin: 0 auto 34px; }
.closing .cta-row { justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 46px 0 56px; font-size: 13px; color: var(--faint); }
.footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer a { text-decoration: none; color: var(--mute); }
.footer a:hover { color: var(--ink-strong); }

/* ---------- legal / document pages ---------- */
.doc { padding: 150px 0 110px; }
.doc .wrap { max-width: 820px; }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.doc h1 { font-size: clamp(42px, 5vw, 64px); }
.doc .updated { color: var(--faint); font-size: 13px; letter-spacing: 0.04em; margin: 14px 0 32px; }
.doc .card { padding: clamp(24px, 4vw, 48px); }
.doc h2 { font-size: 32px; margin: 44px 0 14px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 23px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--mute); font-size: 15.5px; }
.doc strong { color: var(--ink); font-weight: 400; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc a { color: #a9c9ff; text-underline-offset: 3px; }
.doc .callout { border-left: 2px solid rgba(160, 200, 255, 0.5); padding: 4px 0 4px 18px; margin: 22px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 400; color: var(--ink); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.doc td { color: var(--mute); }

/* language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-switch button {
  font: inherit; font-size: 12px; letter-spacing: 0.16em; color: var(--mute);
  background: transparent; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: rgba(226, 235, 246, 0.1); color: var(--ink-strong); }
[data-lang-block][hidden] { display: none !important; }
.lang-note { font-size: 13px; color: var(--faint); margin: 0 0 26px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid.three, .grid.two, .plans, .sample { grid-template-columns: 1fr; }
  .head { grid-template-columns: 1fr; }
  .head .lead { justify-self: start; }
  .reading { grid-template-columns: 44px 1fr; }
  .reading p { grid-column: 2; }
  .nav-links a:not(.pill-link):not(.lang-link) { display: none; }
  .nav-links { gap: 20px; }
  .section { padding: 88px 0; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain.a, .grain.b { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
