/* ── self-hosted faces (so the type renders for everyone, not just Mac/Win) ── */
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-300.woff2) format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/eb-garamond-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/eb-garamond-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
  --gold: #e6c884; --gold-deep: #b98e46; --moon: #e9f1f0; --muted: #8aa6ac; --silver: #bfe0e2;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); color: var(--moon); line-height: 1.5;
  min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
  position: relative; overflow-x: hidden;
  background:
    radial-gradient(95% 55% at 50% 112%, rgba(255,206,140,.20), transparent 50%),    /* warm afterglow core, low */
    radial-gradient(135% 70% at 50% 118%, rgba(236,158,108,.16), transparent 58%),   /* afterglow spread */
    radial-gradient(120% 80% at 82% -12%, rgba(116,90,176,.16), transparent 52%),    /* violet aurora, upper-right */
    radial-gradient(120% 80% at 16% -8%,  rgba(66,132,150,.14), transparent 52%),    /* teal aurora, upper-left */
    linear-gradient(180deg, #0a1322 0%, #0c2030 40%, #0e2a33 70%, #0a1a20 100%); }   /* twilight -> deep water */
/* distant misty ridges silhouetted against the afterglow */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(58% 17% at 28% 87%, rgba(7,15,24,.92), transparent 70%),
    radial-gradient(66% 21% at 70% 90%, rgba(6,13,21,.94), transparent 70%),
    radial-gradient(48% 15% at 50% 93%, rgba(4,11,17,.96), transparent 72%); }
/* a slow band of mist drifting over the valley floor */
body::after { content: ""; position: fixed; left: -12%; right: -12%; bottom: 4%; height: 36%; z-index: -2;
  pointer-events: none; filter: blur(9px);
  background: radial-gradient(62% 100% at 50% 100%, rgba(196,220,228,.10), transparent 72%);
  animation: drift 26s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateX(-3%); opacity: .65; } 50% { transform: translateX(3%); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
#sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* the landing only: the enchanted valley, graded down into twilight behind the wishing UI */
body.landing:not(.notfound) {
  background:
    radial-gradient(95% 50% at 50% 112%, rgba(255,206,140,.14), transparent 50%),
    radial-gradient(120% 80% at 80% -12%, rgba(116,90,176,.12), transparent 52%),
    linear-gradient(180deg, rgba(9,17,30,.93) 0%, rgba(10,24,38,.42) 30%, rgba(12,34,46,.34) 52%, rgba(8,18,26,.97) 100%),
    url(/img/valley.jpg);
  background-position: center, center, center, center 36%;
  background-size: cover; background-repeat: no-repeat; background-attachment: fixed; }
/* a soft scrim + text-shadows so the words read over the luminous valley, without hiding it */
body.landing:not(.notfound) .wrap {
  background: radial-gradient(116% 84% at 50% 40%, rgba(6,13,22,.80), rgba(6,13,22,.46) 55%, transparent 80%);
  border-radius: 2.4rem; }
body.landing:not(.notfound) .eyebrow,
body.landing:not(.notfound) .lede,
body.landing:not(.notfound) .custom-wrap,
body.landing:not(.notfound) .fineprint { text-shadow: 0 1px 10px rgba(0,0,0,.7); }
body.landing:not(.notfound) .wordmark { text-shadow: 0 3px 24px rgba(0,0,0,.6); }
body.landing:not(.notfound) .coin-price { text-shadow: 0 1px 8px rgba(0,0,0,.85); }
/* keep the whole ritual above the fold on arrival (the valley's pool is the reflection now) */
body.landing:not(.notfound) .reflection { display: none; }
body.landing:not(.notfound) .wrap { padding-top: 1.1rem; padding-bottom: 1.1rem; }
body.landing:not(.notfound) .wordmark { font-size: clamp(2.6rem, 8.5vw, 4.6rem); }
body.landing:not(.notfound) .eyebrow { margin-bottom: 1rem; }
body.landing:not(.notfound) .lede { margin-top: 1rem; line-height: 1.55; }
body.landing:not(.notfound) .coins { margin: 1.5rem 0 .7rem; }
body.landing:not(.notfound) .cf-turnstile { margin: .8rem 0 .1rem; }
body.landing:not(.notfound) .fineprint { margin-top: 1rem; }

.wrap { max-width: 33rem; width: 100%; padding: 2.5rem 1.5rem; position: relative; z-index: 1; }

/* generic headings (gate pages) */
h1 { font-family: var(--display); font-weight: 300; font-size: clamp(2.1rem, 6vw, 3.2rem);
  letter-spacing: .03em; color: var(--gold); line-height: 1.05; margin: 0 0 .4rem; }
.muted { color: var(--muted); font-size: 1.08rem; line-height: 1.6; }

/* ── landing hero: an inscription mirrored on the water ── */
.eyebrow { font-family: var(--body); text-transform: uppercase; letter-spacing: .34em; font-size: .72rem;
  font-weight: 600; color: var(--gold-deep); margin: 0 0 1.5rem; padding-left: .34em; }
.wordmark { font-family: var(--display); font-weight: 300; font-size: clamp(3rem, 11vw, 5.5rem);
  letter-spacing: .04em; color: var(--moon); line-height: .92; margin: 0; }
.reflection { font-family: var(--display); font-weight: 300; font-size: clamp(3rem, 11vw, 5.5rem);
  letter-spacing: .04em; line-height: .92; color: var(--gold); margin: -.04em 0 0;
  transform: scaleY(-1); opacity: .22; filter: blur(1px); position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 72%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 72%); }
/* a single slow drop-ripple sweeping the reflection */
.reflection::after { content: ""; position: absolute; left: -25%; right: -25%; top: 0; height: 42%;
  background: linear-gradient(to bottom, transparent, rgba(191,224,226,.22), transparent);
  animation: drip 7.5s ease-in-out infinite; }
@keyframes drip { 0% { transform: translateY(-130%); } 55%, 100% { transform: translateY(280%); } }
@media (prefers-reduced-motion: reduce) { .reflection::after { animation: none; opacity: 0; } }

.lede { font-size: 1.15rem; line-height: 1.65; color: var(--muted); max-width: 28rem; margin: 1.4rem auto 0; }

/* coins to choose (the amount) */
.coins { display: flex; gap: 1.6rem; justify-content: center; align-items: flex-start; margin: 2.2rem 0 1rem; }
.coin-choice { display: flex; flex-direction: column; align-items: center; gap: .85rem; }
/* the three real coins — copper, silver, gold — each bearing the Lady reaching for her star */
.coin { width: 5.4rem; height: 5.4rem; border-radius: 50%; cursor: pointer; padding: 0; margin: 0; position: relative;
  background-position: center; background-size: cover; background-repeat: no-repeat; background-color: transparent;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 6px 18px rgba(0,0,0,.45);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.coin--copper { background-image: url(/img/coin-copper.png); }
.coin--silver { background-image: url(/img/coin-silver.png); }
.coin--gold   { background-image: url(/img/coin-gold.png); }
.coin-price { font-family: var(--body); font-size: .98rem; letter-spacing: .02em; color: var(--muted); transition: color .18s ease; }
/* unselected coins rest quietly so the chosen one leads */
.coin[aria-pressed="false"] { filter: brightness(.56) saturate(.84); }
/* the chosen coin is unmistakable: clearly larger, full-bright, with a luminous ring in its metal */
.coin[aria-pressed="true"] { transform: scale(1.22); filter: none; }
.coin-choice:has(.coin[aria-pressed="true"]) .coin-price { color: var(--gold); font-weight: 600; }
.coin--copper[aria-pressed="true"] { box-shadow: 0 10px 26px rgba(0,0,0,.5), 0 0 0 3px rgba(245,210,178,.92), 0 0 38px rgba(200,127,79,.6); }
.coin--silver[aria-pressed="true"] { box-shadow: 0 10px 26px rgba(0,0,0,.5), 0 0 0 3px rgba(233,243,248,.95), 0 0 38px rgba(196,210,218,.66); }
.coin--gold[aria-pressed="true"]   { box-shadow: 0 10px 26px rgba(0,0,0,.5), 0 0 0 3px rgba(255,239,194,.95), 0 0 40px rgba(230,200,132,.68); }
/* hover / keyboard focus: bring the coin up-close so you can read the Lady's relief */
.coin:hover, .coin:focus-visible { transform: scale(1.55); filter: none; z-index: 5;
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 40px rgba(230,200,132,.42); }

.custom-wrap { display: block; color: var(--muted); font-size: .98rem; letter-spacing: .02em; margin-bottom: 1.6rem; }
.custom { font-family: var(--body); background: transparent; border: 0; border-bottom: 1px solid rgba(159,182,187,.4);
  color: var(--moon); text-align: center; width: 6rem; padding: .25rem; font-size: 1.05rem; }
.custom::placeholder { color: rgba(159,182,187,.55); }
.custom:focus { outline: none; border-bottom-color: var(--gold); }

/* buttons (used across all pages) */
button { font-family: var(--body); font-weight: 600; font-size: 1.04rem; letter-spacing: .03em;
  padding: .72rem 1.6rem; border-radius: 999px; cursor: pointer; color: #1c1408; border: 1px solid transparent;
  background: linear-gradient(#f1da9e, #e6c884 55%, #d7b466); margin: .3rem;
  box-shadow: 0 6px 22px rgba(230,200,132,.20), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .12s ease, box-shadow .12s ease; }
button:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(230,200,132,.30), inset 0 1px 0 rgba(255,255,255,.5); }
button.secondary { background: transparent; color: var(--gold); border: 1px solid rgba(230,200,132,.5); box-shadow: none; }
button.secondary:hover { background: rgba(230,200,132,.08); }
.actions { margin-top: .4rem; }

label:not(.custom-wrap) { color: var(--muted); }
input:not(.custom) { font-family: var(--body); padding: .65rem .8rem; border-radius: .6rem; width: 100%; color: var(--moon);
  border: 1px solid rgba(159,182,187,.35); background: rgba(8,20,27,.6); }
input:not(.custom):focus { outline: none; border-color: rgba(230,200,132,.7); box-shadow: 0 0 0 3px rgba(230,200,132,.15); }

.error { color: #f0b3a0; min-height: 1.4em; }
.fineprint { color: var(--muted); opacity: .7; font-size: .9rem; margin-top: 1.6rem; }
.cf-turnstile { margin: 1.2rem 0 .2rem; display: flex; justify-content: center; }

/* ── visible keyboard focus (a11y, all pages) ── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.coin:focus-visible { outline-offset: 4px; }
.fineprint a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(230,200,132,.35); }
.fineprint a:hover { border-bottom-color: var(--gold); }

/* ── page shells with a footer (landing / reading / 404) ── */
body.landing, body.reading, body.notfound { flex-direction: column; align-items: center; justify-content: flex-start; }
body.landing > main.wrap, body.notfound > main.wrap { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
body.reading { text-align: left; }
body.reading > .doc { flex: 1 1 auto; }
.site-footer { flex: 0 0 auto; }

/* ── footer ── */
.site-footer { position: relative; z-index: 1; width: 100%; max-width: 41rem; padding: 2.6rem 1.5rem 2.4rem;
  text-align: center; color: var(--muted); font-size: .82rem; letter-spacing: .02em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.15rem; justify-content: center; margin-bottom: .85rem; }
.site-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease; }
.site-footer a:hover { color: var(--gold); border-bottom-color: rgba(230,200,132,.4); }
.site-footer .secure { opacity: .72; margin: 0 0 .35rem; }
.site-footer .secure b { color: var(--silver); font-weight: 600; }
.site-footer .copy { opacity: .55; margin: 0; }

/* ── reading pages: terms / privacy / refunds ── */
.doc { max-width: 41rem; width: 100%; padding: 3.4rem 1.5rem 1rem; position: relative; z-index: 1; }
.doc .back { display: inline-block; font-family: var(--body); text-transform: uppercase; letter-spacing: .28em;
  font-size: .7rem; font-weight: 600; color: var(--gold-deep); text-decoration: none; margin-bottom: 2.2rem; }
.doc .back:hover { color: var(--gold); }
.doc h1 { font-family: var(--display); font-weight: 300; font-size: clamp(2.2rem, 6vw, 3rem); color: var(--moon);
  letter-spacing: .02em; line-height: 1.05; margin: 0 0 .3rem; }
.doc .updated { color: var(--muted); opacity: .8; font-size: .85rem; margin: 0 0 2rem; }
.doc h2 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; color: var(--gold); margin: 2.5rem 0 .6rem; }
.doc p, .doc li { color: var(--moon); opacity: .92; font-size: 1.06rem; line-height: 1.72; }
.doc .lead { font-size: 1.18rem; color: var(--silver); line-height: 1.7; }
.doc ul { padding-left: 1.2rem; margin: .5rem 0; }
.doc li { margin: .35rem 0; }
.doc a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(230,200,132,.35); }
.doc a:hover { border-bottom-color: var(--gold); }
.doc strong { color: var(--silver); font-weight: 600; }
.doc .draft { border: 1px solid rgba(230,200,132,.35); border-radius: .7rem; background: rgba(230,200,132,.06);
  color: var(--gold); font-size: .92rem; line-height: 1.55; padding: .8rem 1rem; margin: 0 0 2.2rem; }

/* ── 404 ── */
.notfound .wordmark { font-size: clamp(2.6rem, 9vw, 4.4rem); }
.notfound .home-link { display: inline-block; align-self: center; margin-top: 1.6rem; font-family: var(--body); color: var(--gold);
  text-decoration: none; border-bottom: 1px solid rgba(230,200,132,.4); padding-bottom: .1rem; }
.notfound .home-link:hover { border-bottom-color: var(--gold); }

/* ── embedded checkout: the Stripe form as a panel floating on the twilight scene ── */
.pay { position: fixed; inset: 0; z-index: 20; overflow-y: auto;
  background: rgba(7,16,26,.74); backdrop-filter: blur(6px); }
.pay[hidden] { display: none; }
/* min-height:100% inner so the card centres when it fits and scrolls with even top/bottom
   breathing room when the form is taller than the window (no edge-touching, any height). */
.pay-inner { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 3.5vh 1rem; }
.pay-card { width: 100%; max-width: 460px; }
.pay-back { display: inline-flex; align-items: center; margin: 0 0 1rem; padding: .5rem 1.05rem; font-size: .95rem;
  background: transparent; color: var(--gold); border: 1px solid rgba(230,200,132,.45); box-shadow: none; }
.pay-back:hover { background: rgba(230,200,132,.08); transform: none; box-shadow: none; }
/* Stripe's embedded iframe paints its own gold card (brand colour from the Stripe Dashboard)
   with ~25px gold margins on the sides and a tall summary band on top, but flushes the white
   payment panel to the iframe's bottom edge. We can't pad inside the cross-origin iframe, so we
   extend our container below it with a matching gold band — balancing the bottom against the
   sides. --stripe-brand MUST match the Dashboard → Branding brand colour (currently #b98e46). */
#checkout { border-radius: .9rem; overflow: hidden;
  background: var(--stripe-brand, #b98e46); padding-bottom: 25px;
  box-shadow: 0 0 0 1px rgba(230,200,132,.30), 0 26px 70px rgba(0,0,0,.55), 0 0 70px rgba(230,200,132,.12); }
#checkout iframe { display: block; }
body.paying { overflow: hidden; }
.hero { max-width: 100%; border-radius: 1rem; margin-bottom: 1rem; }
iframe { border: 0; width: 100%; max-width: 520px; height: min(78vh, 660px); border-radius: 1rem;
  box-shadow: 0 12px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(230,200,132,.13); }
