/* The Lunar Almanac . Fire Goat 2027 quiz shell
   Palette: warm cream / ink / deep red / muted gold. Premium, not kitsch. */

:root {
  --cream: #f7f1e4;
  --cream-deep: #efe6d2;
  --ink: #211d18;
  --ink-soft: #4c443a;
  --red: #8e2c15;
  --red-deep: #6f2110;
  --gold: #b1852f;
  --line: #d8cbb0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --maxw: 40rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* faint paper grain via layered gradients . no image request */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60rem 30rem at 85% -5%, rgba(177,133,47,.10), transparent 60%),
    radial-gradient(50rem 26rem at -10% 105%, rgba(142,44,21,.06), transparent 55%);
}

h1, h2, h3, .display { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 6.4vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 4.6vw, 2.1rem); }
p  { margin: 0 0 1em; }
a  { color: var(--red); }
em { font-style: italic; }
.small { font-size: .85rem; color: var(--ink-soft); }
.center { text-align: center; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / brand ---------- */
.brand {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1.1rem 1rem .9rem;
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-soft);
}
.brand svg { flex: none; }

/* moon-phase divider motif */
.moons {
  display: flex; justify-content: center; gap: .9rem;
  margin: 1.4rem auto; color: var(--gold);
}
.moons svg { width: 14px; height: 14px; }

/* ---------- landing ---------- */
.hero { padding: 2.5rem 0 3rem; text-align: center; }
.hero .kicker {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.hero .sub { max-width: 34rem; margin: 0 auto 1.6rem; color: var(--ink-soft); font-size: 1.1rem; }
.hero .date-line { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); font-style: italic; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  color: var(--cream); background: var(--red);
  padding: .95rem 2.1rem; border-radius: 3px;
  letter-spacing: .01em; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--red-deep); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .opt:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.btn-wide { width: 100%; }

.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.6rem;
  margin: 2.4rem 0 0; padding: 0; list-style: none;
  font-size: .85rem; color: var(--ink-soft);
}
.trust-strip li::before { content: "✦ "; color: var(--gold); }

/* ---------- quiz ---------- */
#quiz { display: none; padding-bottom: 4rem; }
body.quizzing #landing { display: none; }
body.quizzing #quiz { display: block; }

.progress {
  max-width: var(--maxw); margin: 0 auto 2rem; padding: 0 1.25rem;
}
.progress .track {
  height: 3px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.progress .fill {
  height: 100%; width: 0; background: var(--red);
  transition: width .35s ease;
}
.progress .label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: .5rem; }

.screen { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .progress .fill { transition: none; }
}

.q-header { font-family: var(--serif); font-size: clamp(1.35rem, 4.4vw, 1.8rem); font-weight: 600; margin: 0 0 .75rem; }
.q-note { color: var(--ink-soft); font-size: .97rem; margin-bottom: 1.5rem; }

.opts { display: grid; gap: .7rem; margin: 1.4rem 0 0; }
.opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink);
  background: #fffdf7; border: 1px solid var(--line); border-radius: 6px;
  padding: .9rem 1.1rem;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--gold); background: #fffaf0; }
.opt[aria-pressed="true"] { border-color: var(--red); background: var(--cream-deep); }

.hour-grid { grid-template-columns: 1fr 1fr; }
.hour-grid .opt { text-align: center; padding: .75rem .4rem; }
.hour-grid .opt .b { font-family: var(--serif); font-size: 1.1rem; display: block; }
.hour-grid .opt .t { font-size: .8rem; color: var(--ink-soft); }
.hour-grid .span2 { grid-column: 1 / -1; }

.date-row { display: flex; gap: .6rem; margin: 1.2rem 0; }
.date-row label { flex: 1; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.date-row select, .field input {
  width: 100%; margin-top: .35rem; font: inherit; color: var(--ink);
  background: #fffdf7; border: 1px solid var(--line); border-radius: 6px;
  padding: .8rem .7rem;
}
.field { margin: 1.2rem 0; }
.field label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.err { color: var(--red); font-size: .9rem; min-height: 1.3em; margin: .4rem 0 0; }

.backlink {
  background: none; border: 0; cursor: pointer; font: inherit;
  color: var(--ink-soft); font-size: .85rem; padding: .4rem 0; margin-top: 1.6rem;
  text-decoration: underline; text-underline-offset: 3px;
}

/* interstitial + loading */
.interstitial { text-align: center; padding: 3.2rem 0; }
.interstitial .reveal { font-family: var(--serif); font-size: clamp(1.6rem, 5.5vw, 2.3rem); margin: 1rem 0 .6rem; }
.interstitial .boundary {
  max-width: 30rem; margin: 1rem auto 0; padding: 1rem 1.2rem;
  background: var(--cream-deep); border-left: 3px solid var(--gold);
  text-align: left; font-size: .98rem;
}
.pulse-moon { width: 54px; height: 54px; margin: 0 auto 1rem; color: var(--gold); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pulse-moon { animation: none; } }
.stage-line { min-height: 1.8em; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.15rem; }

/* teaser result */
.teaser-seal {
  font-family: var(--serif); text-align: center; margin: 0 auto 1.6rem;
  border: 1px solid var(--gold); max-width: 22rem; padding: 1.4rem 1rem;
  position: relative; background: #fffdf7;
}
.teaser-seal .who { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.teaser-seal .sign { font-size: clamp(1.7rem, 6vw, 2.3rem); color: var(--red); margin: .25rem 0; }
.teaser-seal .inner { font-size: .95rem; font-style: italic; color: var(--ink-soft); }
.teaser-body { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.teaser-body .lede { font-family: var(--serif); font-size: 1.25rem; }
.open-loop {
  margin: 1.8rem 0; padding: 1.1rem 1.3rem;
  background: var(--cream-deep); border-left: 3px solid var(--red);
  font-style: italic;
}

/* ---------- footer ---------- */
footer {
  margin-top: 4rem; padding: 2.2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-soft); text-align: center;
}
footer p { max-width: 44rem; margin: 0 auto .8em; }
footer nav a { margin: 0 .55rem; color: var(--ink-soft); }

/* ---------- reading page ---------- */
.reading-hero { text-align: center; padding: 2.2rem 0 1rem; }
#sales-page-include { min-height: 8rem; }

/* ---------- legal / prose pages (support, refunds, terms, privacy, contact) ---------- */
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: .6rem; }

.doc { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.doc-head { text-align: center; padding: 1.6rem 0 .2rem; }
.doc-head .kicker {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red); margin-bottom: .9rem;
}
.doc-head h1 { font-size: clamp(1.9rem, 5.6vw, 2.6rem); }
.doc-head .sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 32rem; margin: 0 auto; }
.doc-head .updated {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 1.1rem;
}

.doc h2 {
  font-size: clamp(1.3rem, 4.2vw, 1.75rem);
  margin: 2.6rem 0 .7rem; padding-top: .3rem;
}
.doc h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); margin: 1.9rem 0 .5rem;
}
.doc ul, .doc ol { padding-left: 1.15rem; margin: 0 0 1.1em; }
.doc li { margin-bottom: .55rem; }

.callout {
  background: var(--cream-deep); border-left: 3px solid var(--gold);
  padding: 1.05rem 1.25rem; margin: 1.7rem 0;
}
.callout.urgent { border-left-color: var(--red); }
.callout p:last-child { margin-bottom: 0; }
.callout .h {
  display: block; font-family: var(--sans); font-weight: 600;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .45rem;
}

.contact-card {
  border: 1px solid var(--gold); background: #fffdf7;
  padding: 1.5rem 1.4rem; margin: 1.8rem 0; text-align: center;
}
.contact-card .label {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .3rem;
}
.contact-card .value { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 1.3rem; }
.contact-card .value:last-child { margin-bottom: 0; }
.contact-card a { text-decoration: none; border-bottom: 1px solid var(--line); }

.doc-end { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; }
.doc-end .small { margin-bottom: .5rem; }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em; background: var(--cream-deep);
  padding: .08em .35em; border-radius: 3px;
}
.address { font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; font-style: normal; }

/* interstitial continue. Appears after the reveal, never rushes the reader. */
.interstitial .reveal-continue{
  margin-top:1.6rem;
  animation:fadeUp .5s ease both;
  animation-delay:.35s;
}
@keyframes fadeUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .interstitial .reveal-continue{animation:none}
}
