/* Luna Dream — site styles. Palette follows the app ("night indigo + lavender"). */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/cormorant-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: 500 700;
  font-display: swap;
  src: url(/fonts/cormorant-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/cormorant-italic-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: 500 700;
  font-display: swap;
  src: url(/fonts/cormorant-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #12142b;
  --bg-deep: #0d0f22;
  --bg-bottom: #1a1b3a;
  --card: #20234a;
  --card-glass: rgba(36, 39, 79, 0.72);
  --elevated: #2b2e5a;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --lavender: #cdb8f6;
  --lavender-deep: #b9a3ec;
  --purple-dark: #7462ae;
  --on-accent: #1d1a3a;
  --moon: #f4e4d0;
  --gold: #e3bd74;
  --text: #ece8f7;
  --text-2: #a7a4c7;
  --text-3: #9794bb;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: 16px;
  --max: 1140px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 55%, var(--bg-deep) 100%);
  background-color: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--lavender); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.005em; color: #fff; }
h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--lavender); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--lavender); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Night sky: static star field + two soft nebulae. No JS, no animation cost. */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 34%, rgba(244,228,208,.8), transparent 60%),
    radial-gradient(1px 1px at 63% 12%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 78% 56%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 26%, rgba(205,184,246,.9), transparent 60%),
    radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 94% 82%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(116,98,174,.28), transparent 70%),
    radial-gradient(ellipse 50% 45% at 0% 40%, rgba(89,72,160,.18), transparent 70%);
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.lead { font-size: 1.14rem; color: var(--text-2); }
.fine { font-size: .9rem; color: var(--text-3); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--gold); margin-bottom: 1.1em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px; border: 1px solid transparent;
  background: var(--lavender); color: var(--on-accent);
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 28px -10px rgba(205,184,246,.55);
}
.btn:hover { background: #ddd0fa; color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--hair-strong); box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn-small { min-height: 40px; padding: 0 1.1em; font-size: .92rem; }
.btn-large { min-height: 56px; padding: 0 1.8em; font-size: 1.08rem; }
.btn-store span { white-space: nowrap; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 1em; }
.center-row { justify-content: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .2s; }

.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18,20,43,.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.brand img { border-radius: 9px; }
.brand:hover { color: #fff; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--text-2); text-decoration: none; font-size: .95rem; }
.nav-link:hover { color: #fff; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 38em; }
.hero-art { position: relative; display: flex; justify-content: center; padding: 24px 0 0; }
.moon {
  position: absolute; top: -8px; right: 6%;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 34% 36%, #fff6e8 0%, var(--moon) 38%, #d9c3a6 100%);
  box-shadow: 0 0 60px 12px rgba(244,228,208,.22), 0 0 160px 40px rgba(205,184,246,.12);
  -webkit-mask: radial-gradient(circle at 72% 32%, transparent 44%, #000 45%);
  mask: radial-gradient(circle at 72% 32%, transparent 44%, #000 45%);
}
.moon-small { position: relative; top: 0; right: 0; width: 96px; height: 96px; margin: 0 auto 28px; }
.dream-card {
  position: relative; margin: 72px 0 0; width: min(100%, 420px);
  background: var(--card-glass); border: 1px solid var(--hair-strong); border-radius: var(--radius);
  padding: 22px 22px 20px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dream-card-label {
  position: absolute; top: -12px; left: 20px; padding: 3px 10px; border-radius: 999px;
  background: var(--elevated); border: 1px solid var(--hair-strong); color: var(--text-2);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}
.dream-card-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-3); margin-bottom: 10px; }
.mood { color: #5cc3d6; }
.dream-card-text { font-family: var(--serif); font-size: 1.28rem; line-height: 1.4; color: var(--text); }
.chips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .82rem; padding: 4px 12px; border-radius: 999px; background: rgba(205,184,246,.14); color: var(--lavender); border: 1px solid rgba(205,184,246,.22); }
.dream-card-reading { border-top: 1px solid var(--hair); padding-top: 14px; font-size: .95rem; color: var(--text-2); }
.dream-card-reading p:last-child { margin: 0; }
.reading-title { display: flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; font-size: .85rem; margin-bottom: 6px; }

/* Sections */
.section { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }

.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.feature {
  background: var(--card-glass); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: rgba(205,184,246,.28); transform: translateY(-2px); }
.feature h3 { font-size: 1.45rem; margin: 14px 0 6px; }
.feature p { color: var(--text-2); margin: 0; font-size: .98rem; }
.feature-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(205,184,246,.22), rgba(116,98,174,.18));
  color: var(--lavender); border: 1px solid rgba(205,184,246,.2);
}

.tradition-list { list-style: none; padding: 0; margin: 28px 0 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tradition-list li {
  font-family: var(--serif); font-size: 1.2rem; padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(227,189,116,.28); color: var(--moon); background: rgba(227,189,116,.06);
}

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; counter-reset: none; }
.steps li { position: relative; padding: 26px 24px 22px; border-radius: var(--radius); border: 1px solid var(--hair); background: rgba(32,35,74,.45); }
.steps p { color: var(--text-2); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 600;
  color: var(--on-accent); background: var(--moon); margin-bottom: 12px;
}

.split { display: grid; gap: 16px; }
.panel { background: var(--card-glass); border: 1px solid var(--hair); border-radius: var(--radius); padding: 28px 24px; }
.panel-quiet { background: rgba(32,35,74,.4); }
.panel h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); }
.checks { list-style: none; padding: 0; margin: 16px 0 18px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .icon { color: var(--lavender); margin-top: 4px; }

.faq { display: grid; gap: 10px; margin: 24px 0; }
.faq details { background: var(--card-glass); border: 1px solid var(--hair); border-radius: var(--radius-sm); }
.faq details[open] { border-color: rgba(205,184,246,.25); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 600; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--lavender); border-bottom: 2px solid var(--lavender);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 20px 18px; color: var(--text-2); }
.faq .answer p { margin: 0; }

.final { padding-bottom: 88px; }
.final-icon { border-radius: 26px; box-shadow: 0 20px 60px -20px rgba(205,184,246,.5); margin-bottom: 20px; }

/* Content pages */
.page, .doc { padding: 48px 0 72px; }
.page-head, .doc-head { margin-bottom: 32px; }
.page-head h1, .doc-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.faq-group { margin-bottom: 36px; }
.faq-group h2 { font-size: 1.8rem; margin-bottom: 0; }
.contact { display: flex; gap: 18px; align-items: flex-start; }
.contact h2 { font-size: 1.7rem; }
.contact p { margin: 0; color: var(--text-2); }

.doc-grid { display: grid; gap: 24px; }
.toc { border: 1px solid var(--hair); border-radius: var(--radius-sm); padding: 18px 20px; background: rgba(32,35,74,.4); align-self: start; }
.toc h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .94rem; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: #fff; }
.doc-body { max-width: 760px; min-width: 0; }
.doc-body section { scroll-margin-top: 84px; padding-bottom: 12px; }
.doc-body h2 { font-size: 1.9rem; margin-top: 1.2em; }
.doc-body h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 1.4em 0 .4em; }
.doc-body p, .doc-body li { color: var(--text-2); }
.doc-body li { margin-bottom: .5em; }
.doc-body strong { color: var(--text); }
.callout { border-left: 3px solid var(--gold); background: rgba(227,189,116,.07); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--hair); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--hair); color: var(--text-2); }
th { color: var(--text); background: rgba(255,255,255,.03); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Form */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: rgba(13,15,34,.6);
  border: 1px solid var(--hair-strong); border-radius: 12px; padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(205,184,246,.2); }
.field [aria-invalid="true"] { border-color: #e0626e; }
.hint { margin: 0; font-size: .86rem; color: var(--text-3); }
.error { margin: 0; font-size: .9rem; color: #f0a0a8; }
.form .btn { justify-self: start; }

.not-found { padding: 88px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hair); background: rgba(13,15,34,.6); padding: 48px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; gap: 32px; }
.footer-brand p { color: var(--text-2); max-width: 30em; margin: 14px 0 18px; }
.site-footer h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text-2); text-decoration: none; overflow-wrap: anywhere; }
.site-footer ul a:hover { color: #fff; }
.lang-list [aria-current] { color: var(--text); font-weight: 600; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--hair); display: grid; gap: 4px; font-size: .84rem; color: var(--text-3); }
.footer-bottom p { margin: 0; }

/* Breakpoints (mobile-first) */
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .hero { padding-top: 36px; }
  .moon { width: 110px; height: 110px; right: 2%; }
  .cta-row .btn { flex: 1 1 100%; }
  .feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; padding: 20px; }
  .feature h3 { margin: 0; font-size: 1.35rem; }
  .feature p { grid-column: 1 / -1; margin-top: 10px; }
  .hero-art { padding-top: 0; }
  .dream-card { margin-top: 56px; }
}
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}
@media (min-width: 920px) {
  :root { --gutter: 32px; }
  .hero { padding: 88px 0 56px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .section { padding: 88px 0; }
  .doc-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
  .doc-head { grid-column: 1 / -1; max-width: 820px; }
  .toc { position: sticky; top: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
}
@media print {
  .site-header, .site-footer, .sky, .toc { display: none; }
  body { background: #fff; color: #000; }
  .doc-body p, .doc-body li, th, td { color: #000; }
}
