/* HoroscO'clock — shared site theme ("celestial luxury ritual").
   Mirrors the app tokens in HoroscO-clock/lib/theme (app_colors.dart,
   app_typography.dart). Fonts are self-hosted (OFL) — no third-party CDNs.
   Used by: the static site, the API pages (/privacy /support /terms) and
   the generated pages (/gunluk /gorev /gokyuzu). */

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

:root {
  --ink0: #07080F; --ink1: #0D1020; --ink2: #151935; --hairline: #2A2F4A;
  --gold: #D8B26E; --gold-soft: #E9D3A4; --gold-deep: #A8833F;
  --ivory: #F3EDE2; --mist: #A9A6B8; --faint: #6E6B80; --lavender: #A99BE0;
  --success: #8DB38B; --danger: #D9776B;
  --nebula-indigo: #1B1F45; --nebula-warm: #3A2A1A;
  --serif: "Cormorant", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 20px; --r-btn: 14px; --r-tile: 12px;
  --wrap: 1080px;
  /* legacy aliases (older generated pages) */
  --text: var(--ivory); --muted: var(--mist); --card: var(--ink1); --border: var(--hairline);
  --blue: var(--gold-soft); --purple: var(--lavender); --orange: var(--gold);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--ink0); color: var(--ivory);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  position: relative; overflow-x: hidden;
}
/* Nebula: soft indigo + warm glows, fixed behind everything. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 12% -8%, rgba(27,31,69,.95), transparent 70%),
    radial-gradient(42vmax 32vmax at 100% 30%, rgba(42,34,84,.45), transparent 70%),
    radial-gradient(48vmax 36vmax at 85% 108%, rgba(58,42,26,.75), transparent 70%),
    var(--ink0);
}
/* Sparse static starfield. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 8% 14%, #F3EDE2 50%, transparent 51%),
    radial-gradient(1px 1px at 23% 62%, #A9A6B8 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 41% 9%, #E9D3A4 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 44%, #A9A6B8 50%, transparent 51%),
    radial-gradient(1px 1px at 69% 81%, #F3EDE2 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 83% 19%, #F3EDE2 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 58%, #A99BE0 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 88%, #A9A6B8 50%, transparent 51%),
    radial-gradient(1px 1px at 4% 46%, #A9A6B8 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 3%, #A9A6B8 50%, transparent 51%);
}
/* A few twinkling stars: <div class="stars" aria-hidden="true"><i></i>…</div> */
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-soft);
  box-shadow: 0 0 6px 1px rgba(233,211,164,.55); opacity: .25;
  animation: twinkle 5.5s ease-in-out infinite;
}
.stars i:nth-child(1) { top: 12%; left: 18%; }
.stars i:nth-child(2) { top: 22%; left: 78%; animation-delay: 1.2s; width: 2px; height: 2px; }
.stars i:nth-child(3) { top: 48%; left: 6%;  animation-delay: 2.6s; }
.stars i:nth-child(4) { top: 64%; left: 90%; animation-delay: .6s; width: 2px; height: 2px; }
.stars i:nth-child(5) { top: 83%; left: 32%; animation-delay: 3.4s; }
.stars i:nth-child(6) { top: 6%;  left: 56%; animation-delay: 4.3s; width: 2px; height: 2px; background: var(--lavender); }
.stars i:nth-child(7) { top: 36%; left: 62%; animation-delay: 2s; width: 2px; height: 2px; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: .95; transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stars i { opacity: .5; }
}

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ivory); margin: 0 0 .5em; line-height: 1.15; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
h1 em, h2 em, .accent { font-style: italic; font-weight: 500; color: var(--gold-soft); }
p { margin: 0 0 1em; }
a { color: var(--gold-soft); text-decoration-color: rgba(216,178,110,.45); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ivory); text-decoration-color: var(--gold); }
b, strong { font-weight: 600; color: var(--ivory); }
code { font: .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ink2); border: 1px solid var(--hairline); border-radius: 6px; padding: .08em .35em; color: var(--gold-soft); }
pre code { display: block; padding: 12px 14px; overflow-x: auto; }
pre { max-width: 100%; overflow-x: auto; margin: 0 0 1em; }
::selection { background: rgba(216,178,110,.3); color: var(--ivory); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }

.label, p.label, .doc p.label, .card p.label {
  display: inline-block; font: 600 .72rem/1.3 var(--sans); letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem;
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--mist); max-width: 36em; }
.muted { color: var(--mist); }
.small { font-size: .875rem; }

/* ---------- Focus + skip link ---------- */
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--ink0);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: var(--ink0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.narrow { max-width: 760px; }
section { padding: clamp(48px, 8vw, 96px) 0; }

/* Header */
.site-header, body > nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7,8,15,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(42,47,74,.7);
}
.site-header .wrap, body > nav .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 20px;
  flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand, .logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 1.4rem/1 var(--serif); color: var(--ivory); letter-spacing: .01em;
}
.brand:hover, .logo:hover { color: var(--gold-soft); }
.brand img { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline); }
.logo .planet-glyphs, .zodiac-glyphs { display: none; }
.site-nav, nav .links { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.site-nav a, nav .links a {
  color: var(--mist); text-decoration: none; font-size: .9rem; padding: 8px 10px; border-radius: 10px;
}
.site-nav a:hover, nav .links a:hover { color: var(--ivory); background: rgba(21,25,53,.7); }
.site-nav a[aria-current="page"] { color: var(--gold-soft); }

/* Footer */
.site-footer, body > footer {
  margin-top: 48px; border-top: 1px solid var(--hairline); padding: 36px 0 48px;
  color: var(--mist); font-size: .875rem;
}
.site-footer .wrap, body > footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer nav, body > footer .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a, body > footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover, body > footer a:hover { color: var(--gold-soft); text-decoration: underline; }
.site-footer .brand { font-size: 1.25rem; margin-bottom: 6px; }

/* ---------- Components ---------- */
.card {
  position: relative; background: linear-gradient(180deg, rgba(216,178,110,.045), transparent 40%), var(--ink1);
  border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 22px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--mist); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.btn, .gold-btn, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--r-btn); cursor: pointer;
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; letter-spacing: .01em;
  background: var(--gold); color: var(--ink0); border: 1px solid var(--gold);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover, .gold-btn:hover, button:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink0); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--ink2); color: var(--ivory); border-color: var(--gold-deep); }

.pill, .badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--hairline); background: rgba(13,16,32,.8); color: var(--mist); font-size: .85rem;
}
.pill b, .badge b { color: var(--gold-soft); font-weight: 600; }

/* Store "coming soon" badge (deliberately NOT a link). */
.store-soon {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px;
  border-radius: var(--r-btn); border: 1px solid rgba(216,178,110,.55); background: rgba(13,16,32,.85);
  color: var(--ivory); min-height: 52px;
}
.store-soon svg { flex: none; }
.store-soon small { display: block; font-size: .68rem; letter-spacing: .14em; color: var(--gold); }
.store-soon span { display: block; font: 600 1.15rem/1.15 var(--serif); }

/* Star divider: hairline with a gold four-point star at centre. */
.star-divider { display: flex; align-items: center; gap: 14px; max-width: 320px; margin: 0 auto; }
.star-divider::before, .star-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--hairline)); }
.star-divider::after { background: linear-gradient(90deg, var(--hairline), transparent); }
.star-divider i, .star {
  display: inline-block; width: 12px; height: 12px; background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.note {
  margin-top: 28px; padding: 16px 18px; border-radius: var(--r-tile);
  background: var(--ink1); border: 1px solid var(--hairline); border-left: 2px solid var(--gold);
  color: var(--mist); font-size: .92rem;
}

/* ---------- Documents (legal pages, journal, tasks) ---------- */
.doc { padding-top: clamp(36px, 6vw, 64px); padding-bottom: 24px; max-width: 800px; }
.doc > h1 { font-size: clamp(2.1rem, 5vw, 3rem); margin-bottom: .25em; }
.doc .updated { color: var(--mist); font-size: .875rem; margin-bottom: 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--hairline); }
.doc section { padding: 22px 0; border-bottom: 1px solid rgba(42,47,74,.6); }
.doc section:last-of-type { border-bottom: 0; }
.doc h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); margin: .2em 0 .45em; }
.doc h3 { font-size: 1.3rem; margin-top: 1.1em; }
.doc p, .doc li { color: #DCD6CC; font-size: 1rem; }
.doc ul, .doc ol { padding-left: 1.3em; margin: .5em 0 1em; }
.doc li { margin: .4em 0; }
.doc li::marker { color: var(--gold); }
.doc .muted, .doc p.muted { color: var(--mist); font-size: .92rem; }
.doc .card { margin: 12px 0; }
.faq .card { margin-bottom: 12px; }
.faq .card h3 { font-size: 1.3rem; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
th { color: var(--gold); font: 600 .72rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; }

/* Collapsible blocks (journal archive, task details) */
details { background: var(--ink1); border: 1px solid var(--hairline); border-radius: 16px; padding: 12px 18px; margin: 10px 0; }
details > summary {
  cursor: pointer; list-style: none; font: 600 1.2rem/1.3 var(--serif); color: var(--ivory);
  display: flex; align-items: center; gap: 10px; padding: 4px 0;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg); transition: transform .2s;
}
details[open] > summary { color: var(--gold-soft); margin-bottom: 6px; }
details[open] > summary::before { transform: rotate(45deg); }
details details { background: transparent; border: 0; border-top: 1px solid rgba(42,47,74,.6); border-radius: 0; padding: 8px 0 4px; margin: 4px 0; }
details details > summary { font-size: 1.05rem; }

/* Forms */
label { display: block; font-size: .9rem; color: var(--mist); margin-top: 4px; }
label b { color: var(--ivory); }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea {
  display: block; width: 100%; padding: 12px 14px; margin: 6px 0 14px; min-height: 48px;
  border-radius: var(--r-btn); border: 1px solid var(--hairline); background: var(--ink2);
  color: var(--ivory); font: 400 1rem/1.4 var(--sans);
}
input::placeholder, textarea::placeholder { color: #8F8CA1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,178,110,.18); }
textarea { min-height: 96px; resize: vertical; }
.hint { font-size: .8rem; color: var(--mist); margin: -8px 0 16px; }

/* ---------- Landing page ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.6rem; }
.phones { position: relative; display: flex; justify-content: center; min-height: 420px; }
.phones::before {
  content: ""; position: absolute; inset: 8% 4%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(216,178,110,.18), rgba(27,31,69,.35) 55%, transparent);
  filter: blur(8px);
}
.phone {
  display: block; width: min(64%, 280px); border-radius: 26px; border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 6px rgba(13,16,32,.9);
  background: var(--ink1);
}
.phones .phone.back { position: absolute; right: 2%; top: 9%; width: min(52%, 230px); opacity: .55; transform: rotate(5deg); }
.phones .phone.front { position: relative; margin-right: 18%; transform: rotate(-2deg); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(28px, 5vw, 52px); }
.section-head .lead { margin: 0 auto; }

.lenses { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.lens { padding: 26px 22px 24px; }
.lens .num { display: block; font: 500 italic 2.4rem/1 var(--serif); color: var(--gold); margin-bottom: 14px; }
.lens h3 { font-size: 1.6rem; }
.lens .tag { display: block; font: 600 .7rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--lavender); margin-bottom: 10px; }

.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.feature.flip .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; position: relative; }
.feature-media::before {
  content: ""; position: absolute; width: 80%; aspect-ratio: 1; top: 10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(27,31,69,.9), transparent);
}
.feature-media .phone { width: min(78%, 300px); }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--mist); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 10px; background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.ticks b { color: var(--ivory); }

.school-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 1.6rem; padding: 0; list-style: none; }

.promise { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.promise .card h3 { font-size: 1.3rem; }

.cta-band {
  text-align: center; border: 1px solid var(--hairline); border-radius: 28px; padding: clamp(36px, 6vw, 64px) 20px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(27,31,69,.9), transparent 70%), var(--ink1);
}
.cta-band .lead { margin: 0 auto 1.6rem; }

@media (max-width: 900px) {
  .lenses, .promise { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
}
@media (max-width: 720px) {
  .feature .wrap { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .feature-copy { text-align: left; }
  .phones { min-height: 0; }
  .site-header .wrap { justify-content: center; }
}
@media (max-width: 520px) {
  .lenses, .promise { grid-template-columns: 1fr; }
  .site-nav a { padding: 6px 8px; font-size: .85rem; }
  .card { padding: 18px; }
}
