/* Radiant Soul Map — styles
   Midnight indigo + starlight gold. Sister aesthetic to Radiant Frequencies:
   slow, sacred, luminous. All motion gentle. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --deep: #0e0c1a;
  --panel: #171430;
  --glow: #8f5fc4;
  --gold: #d9b26a;
  --gold-soft: #e8ce92;
  --ink: #efeaf6;
  --ink-dim: rgba(239, 234, 246, 0.62);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
}

html, body {
  background:
    radial-gradient(120% 80% at 50% -20%, #241d45, transparent 60%),
    radial-gradient(80% 60% at 80% 110%, #1c1436, transparent 60%),
    var(--deep);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold-soft); text-decoration: none; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; }
.kicker { font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
.soft { color: var(--ink-dim); font-weight: 300; }

/* ——— twinkling starfield ——— */
.starfield, .starfield::before, .starfield::after {
  position: fixed; inset: 0; pointer-events: none; content: "";
}
.starfield {
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff9, transparent 60%),
    radial-gradient(1px 1px at 78% 12%, #fff7, transparent 60%),
    radial-gradient(1.5px 1.5px at 33% 65%, #ffdf9e88, transparent 60%),
    radial-gradient(1px 1px at 61% 41%, #fff8, transparent 60%),
    radial-gradient(1px 1px at 88% 72%, #fff6, transparent 60%),
    radial-gradient(1.5px 1.5px at 45% 88%, #cdb2ff77, transparent 60%),
    radial-gradient(1px 1px at 8% 82%, #fff7, transparent 60%),
    radial-gradient(1px 1px at 94% 33%, #ffdf9e77, transparent 60%),
    radial-gradient(1px 1px at 25% 8%, #fff6, transparent 60%),
    radial-gradient(1px 1px at 55% 15%, #fff5, transparent 60%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.5; } to { opacity: 1; } }

/* ——— the gate (entry form) ——— */
.gate {
  max-width: 560px; margin: 0 auto; padding: 4rem 1.4rem 3rem;
  position: relative; text-align: center;
}
.gate-head h1 { font-size: clamp(2.6rem, 7vw, 3.6rem); letter-spacing: 0.03em; margin: 0.7rem 0 0.6rem; }
.gate-head .invite {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--ink-dim); line-height: 1.7;
  margin-bottom: 2.6rem;
}

.birth-form { text-align: left; display: flex; flex-direction: column; gap: 1.5rem; }
.field label { display: block; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 0.5rem; }
.field input[type="date"], .field input[type="time"], .field input[type="text"] {
  width: 100%; padding: 0.9rem 1rem; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.05);
  color: var(--ink); font-size: 1.05rem; font-family: var(--sans);
  color-scheme: dark;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 24px -8px var(--gold); }
.check { display: flex !important; align-items: center; gap: 0.5rem; margin-top: 0.7rem !important;
  font-size: 0.85rem !important; letter-spacing: 0.02em !important; text-transform: none !important; color: var(--ink-dim) !important; cursor: pointer; }
.check input { accent-color: var(--glow); width: 15px; height: 15px; }
.check[hidden] { display: none !important; }
.fieldnote { font-size: 0.85rem; color: var(--ink-dim); line-height: 1.6; margin-top: 0.6rem; }

.cast {
  margin-top: 0.6rem;
  font-family: var(--sans); font-size: 0.95rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: #14102a; background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  border: none; border-radius: 999px; padding: 1.05rem 2.4rem; cursor: pointer;
  transition: box-shadow 0.5s ease, transform 0.3s ease;
}
.cast:hover { box-shadow: 0 0 50px -10px var(--gold); transform: translateY(-1px); }
.smallprint { font-size: 0.78rem; color: var(--ink-dim); text-align: center; }

/* ——— the casting overlay ——— */
.casting {
  position: fixed; inset: 0; z-index: 50;
  background: #080614;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.casting[hidden] { display: none; } /* the hidden attribute must win over display:flex */
.casting-orb {
  width: 110px; height: 110px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  box-shadow: 0 0 80px -10px var(--gold), inset 0 0 40px -12px var(--glow);
  animation: castbreathe 2.6s ease-in-out infinite;
}
@keyframes castbreathe { 0%,100% { transform: scale(0.8); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
.casting-line { font-style: italic; font-size: 1.2rem; color: var(--ink-dim); }

/* ——— the chart page ——— */
.chart-page { max-width: 900px; margin: 0 auto; padding: 3rem 1.4rem 4rem; position: relative; text-align: center; }
.chart-page h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0.5rem 0 0.2rem; }
.born-line { font-family: var(--serif); font-style: italic; color: var(--ink-dim); margin-bottom: 2.2rem; }

.wheel-wrap { max-width: 520px; margin: 0 auto 0.6rem; position: relative; }
.wheel-hint { font-size: 0.78rem; color: var(--ink-dim); margin-bottom: 0.4rem; }
.system-note { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 3rem; }

/* wheel interactivity */
.wheel-tip {
  position: absolute; z-index: 5; transform: translateX(-50%);
  background: #14102a; border: 1px solid var(--gold); border-radius: 8px;
  padding: 0.4rem 0.7rem; font-size: 0.8rem; color: var(--ink); white-space: nowrap;
  pointer-events: none; box-shadow: 0 6px 20px -6px rgba(0,0,0,0.6);
}
.asp-line { transition: stroke-opacity 0.3s ease, stroke-width 0.3s ease; }
.asp-line.lit { stroke-opacity: 1 !important; stroke-width: 2.4 !important; }
.asp-line.faded { stroke-opacity: 0.08 !important; }
.planet .pdot { transition: stroke 0.3s ease, fill 0.3s ease; }
.planet:hover .pdot { stroke: var(--gold); fill: rgba(217,178,106,0.18); }
.asp-line.off { display: none; }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .asp-line { animation: none !important; stroke-dashoffset: 0 !important; }
}

/* the Explore door — optional depth, calm by default */
.explore-toggle {
  background: none; border: 1px solid rgba(217,178,106,0.3); border-radius: 999px;
  color: var(--gold-soft); font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.55rem 1.3rem; cursor: pointer; margin-bottom: 1.2rem;
  transition: all 0.3s ease;
}
.explore-toggle:hover, .explore-toggle.open { border-color: var(--gold); color: var(--gold); }
.explore-panel {
  max-width: 480px; margin: 0 auto 1.6rem; background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1.3rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; justify-content: center; margin-bottom: 1.1rem; }
.lg-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--ink-dim); }
.lg-item i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.chip {
  background: transparent; border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  color: var(--ink-dim); font-family: var(--sans); font-size: 0.78rem; padding: 0.4rem 0.9rem; cursor: pointer;
  transition: all 0.25s ease;
}
.chip:hover { color: var(--ink); }
.chip.active { color: #14102a; background: linear-gradient(120deg, var(--gold-soft), var(--gold)); border-color: transparent; }
.compare-readout {
  font-size: 0.9rem; color: var(--ink-dim); line-height: 1.6; text-align: center;
  padding-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0.07);
}
.compare-readout strong { color: var(--gold-soft); font-weight: 500; }
.compare-readout .cr-read { display: block; margin-top: 0.4rem; color: var(--ink); }
.wheel-wrap svg { width: 100%; height: auto; filter: drop-shadow(0 0 40px rgba(217,178,106,0.15)); }

/* the woven truth */
.synthesis {
  font-style: italic; font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.7;
  color: var(--ink); max-width: 30em; margin: 0 auto 2.6rem;
}
.section-lead { color: var(--ink-dim); max-width: 36em; margin: -0.6rem auto 1.6rem; line-height: 1.7; font-size: 0.95rem; }

/* big three */
.big-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-bottom: 3rem; }
.essence-card {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px; padding: 1.8rem 1.5rem; text-align: left;
  border-top: 2px solid var(--gold);
}
.essence-card .glyph { font-size: 1.9rem; color: var(--gold-soft); }
.essence-card h3 { font-size: 1.45rem; margin: 0.4rem 0 0.15rem; }
.essence-card .placement { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.essence-card p { color: var(--ink-dim); line-height: 1.75; font-size: 0.96rem; }

/* planet rows */
.section-title { margin: 3rem 0 1.4rem; }
.section-title h2 { font-size: 1.9rem; }
.planets { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.planet-row {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 1.3rem 1.4rem;
}
.planet-row .head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.planet-row .pglyph { font-size: 1.25rem; color: var(--gold-soft); }
.planet-row .pname { font-family: var(--serif); font-size: 1.2rem; }
.planet-row .pplace { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.planet-row .ptheme { font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.06em; margin-left: auto; }
.planet-row p { color: var(--ink-dim); line-height: 1.7; font-size: 0.93rem; margin-top: 0.6rem; }
.aspect-row .head { align-items: center; }
.aspect-row .pglyph { font-size: 1.05rem; }

/* premium lock panel — one clean, obvious call to action (no confusing blur) */
.lock-panel {
  max-width: 560px; margin: 0 auto; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, var(--panel), #141130);
  border: 1px solid rgba(217,178,106,0.35); border-radius: 20px;
  padding: 2.6rem 2rem;
  box-shadow: 0 20px 60px -30px rgba(217,178,106,0.4);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}
.lock-panel:hover { border-color: var(--gold); box-shadow: 0 24px 70px -28px rgba(217,178,106,0.55); transform: translateY(-2px); }
.lock-panel .lp-lock { font-size: 1.8rem; color: var(--gold); display: block; }
.lock-panel .lp-intro { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink); margin: 0.8rem 0 1.2rem; }
.lock-panel .lp-list { list-style: none; text-align: left; max-width: 24em; margin: 0 auto 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; }
.lock-panel .lp-list li { color: var(--ink-dim); line-height: 1.55; padding-left: 1.4rem; position: relative; font-size: 0.95rem; }
.lock-panel .lp-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }
.lock-panel .lp-btn {
  font-family: var(--sans); font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #14102a; background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  border: none; border-radius: 999px; padding: 0.95rem 2.4rem; cursor: pointer;
}
.lock-panel .lp-note { font-size: 0.8rem; color: var(--ink-dim); margin-top: 0.9rem; }

/* the unlock modal (shared style with RF veil) */
.modal {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center;
  background: rgba(6, 5, 12, 0.84); backdrop-filter: blur(10px); padding: 1.4rem;
}
.modal.open { display: flex; }
.modal-card {
  max-width: 26rem; width: 100%; text-align: center;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px; padding: 2.4rem 1.8rem;
  box-shadow: 0 30px 80px -20px rgba(143, 95, 196, 0.45);
}
.modal-card h2 { font-size: 1.7rem; margin: 0.5rem 0 0.8rem; }
.modal-card p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.4rem; }
.modal-card input[type=email] {
  width: 100%; padding: 0.85rem 1rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.05);
  color: var(--ink); font-size: 1rem; margin-bottom: 0.8rem; font-family: var(--sans);
  color-scheme: dark; -webkit-text-fill-color: var(--ink);
}
.modal-card input[type=email]::placeholder { color: var(--ink-dim); }
.modal-card input[type=email]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 20px -8px var(--gold); }
/* stop Chrome autofill from painting the field a jarring yellow/blue */
.modal-card input[type=email]:-webkit-autofill,
.modal-card input[type=email]:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #221d40 inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
.modal-card button[type=submit] {
  width: 100%; padding: 0.9rem; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold)); color: #14102a;
  font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--sans);
}
.modal-card .later { display: inline-block; margin-top: 1rem; font-size: 0.82rem; color: var(--ink-dim); cursor: pointer; }

/* shadow & gift */
.duality { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; text-align: left; }
.duality .essence-card.shadow { border-top-color: #5b5aa8; }
.duality .essence-card.gift { border-top-color: var(--gold); }

.recast { margin-top: 3rem; }
.recast a {
  font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 0.7rem 1.6rem;
}
.recast a:hover { color: var(--ink); border-color: var(--gold); }

/* footer */
.foot { text-align: center; padding: 2.4rem 1.4rem 3rem; color: var(--ink-dim); font-size: 0.78rem; line-height: 1.8; position: relative; }
.foot .rule { opacity: 0.75; max-width: 42em; margin: 0.4rem auto 0; }

@media (prefers-reduced-motion: reduce) {
  .starfield, .casting-orb { animation: none; }
}
