/* ==========================================================================
   Elderian Store - stylesheet
   --------------------------------------------------------------------------
   One file, no framework, no external fonts, no CDN. The whole site is a few
   static files on Cloudflare Pages, which is what keeps it free; a font or a
   framework fetched from someone else's CDN is the one thing that could stop
   it working on a day we are not looking.

   The palette is the server's own: deep charcoal, parchment, and the coin gold.
   ========================================================================== */

:root {
  --ink:        #0d0b09;
  --ink-2:      #16130f;
  --ink-3:      #1d1915;
  --line:       #2c2620;
  --line-soft:  #221d18;

  --paper:      #ece5d8;
  --paper-dim:  #a99f8d;
  --paper-mute: #7c7365;

  --gold:       #c9a227;
  --gold-hi:    #e8c451;
  --gold-dim:   #8a6f1b;

  --green:      #4f9a52;
  --red:        #b3453f;
  --blue:       #4a6f9c;

  --radius:     10px;
  --radius-sm:  6px;
  --wrap:       1080px;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
  --shadow:     0 6px 20px rgba(0,0,0,.45);
  --shadow-lg:  0 18px 50px rgba(0,0,0,.55);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A very faint warmth in the background so the page is not a flat rectangle.
   Pure CSS - no image to download. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(201,162,39,.10), transparent 70%),
    radial-gradient(700px 400px at 100% 100%, rgba(74,111,156,.06), transparent 70%);
  z-index: 0;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------- skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: .6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13,11,9,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  text-decoration: none;
  color: var(--paper);
}
.brand-mark { align-self: center; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.brand-sub {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-nav {
  display: flex;
  gap: 1.35rem;
  font-size: .9rem;
}
.site-nav a {
  color: var(--paper-dim);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-dim);
}

/* -------------------------------------------------------------------- hero */

.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner { max-width: 44rem; }

.eyebrow {
  margin: 0 0 .9rem;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  font-weight: 700;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: 1.06rem;
  color: var(--paper-dim);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}

.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .5rem;
  font-size: .92rem;
  color: var(--paper-mute);
}
.hero-points li { padding-left: 1.4rem; position: relative; }
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .5rem;
  height: .5rem;
  background: var(--gold);
  border-radius: 50%;
  opacity: .75;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: #17130a;
  border-color: var(--gold-hi);
}
.btn-primary:hover { background: var(--gold-hi); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-hi); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.btn-block { width: 100%; }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--ink-2); border-block: 1px solid var(--line-soft); }

.section-head { margin-bottom: 2rem; }
.section-head h2 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -.005em;
}
.section-sub {
  margin: 0;
  color: var(--paper-dim);
  max-width: 42rem;
}

/* ------------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 1rem;
  /* The badge sits half outside the card, so the grid needs the extra room at
     the top or the first row's badges are clipped by whatever follows. */
  padding-top: .8rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.section-alt .card { background: var(--ink-3); }

.card:hover,
.card:focus-within {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-featured { border-color: var(--gold-dim); }

.card-badge {
  position: absolute;
  top: -.65rem;
  left: 1.35rem;
  background: var(--gold);
  color: #17130a;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .22rem .6rem;
  border-radius: 999px;
}

.card-name {
  margin: 0 0 1rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.card-coins {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-hi);
}
.card-coins .unit {
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.card-bonus {
  margin: .55rem 0 0;
  font-size: .84rem;
  color: var(--green);
  font-weight: 600;
  min-height: 1.3em;
}

.card-tagline {
  margin: .85rem 0 1.4rem;
  font-size: .89rem;
  color: var(--paper-dim);
  flex: 1;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding-top: 1rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--line-soft);
}
.card-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}
.card-rate {
  font-size: .74rem;
  color: var(--paper-mute);
  text-align: right;
}

/* ------------------------------------------------------------------- steps */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.steps li { position: relative; padding-top: 2.6rem; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: .85rem;
  font-weight: 700;
}
.steps h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 600;
}
.steps p { margin: 0; color: var(--paper-dim); font-size: .92rem; }

/* ----------------------------------------------------------------- notices */

.notice {
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  background: var(--ink-3);
  font-size: .93rem;
}
.notice h3 {
  margin: 0 0 .6rem;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.notice ul { margin: 0; padding-left: 1.1rem; color: var(--paper-dim); }
.notice li + li { margin-top: .45rem; }
.notice strong { color: var(--paper); }

.notice-info { border-left: 3px solid var(--blue); }
.notice-error { border-left: 3px solid var(--red); color: var(--paper-dim); }
.notice-warn  { border-left: 3px solid var(--gold); color: var(--paper-dim); }
.notice-ok    { border-left: 3px solid var(--green); }

/* ---------------------------------------------------- checkout / thank-you */

.panel {
  max-width: 34rem;
  margin-inline: auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: .4rem;
}
.field input {
  width: 100%;
  padding: .7rem .85rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font: inherit;
  font-size: .95rem;
}
.field input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,162,39,.14);
}
.field-hint { margin: .35rem 0 0; font-size: .8rem; color: var(--paper-mute); }

.summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 1.25rem;
  border-block: 1px solid var(--line-soft);
}
.summary-label { font-size: .9rem; color: var(--paper-dim); }
.summary-amount {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-hi);
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(0,0,0,.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -.15em;
  margin-right: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  html { scroll-behavior: auto; }
  .card:hover, .card:focus-within { transform: none; }
}

.status-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.4rem;
  border: 2px solid currentColor;
}
.status-ok    { color: var(--green); }
.status-wait  { color: var(--gold); }
.status-bad   { color: var(--red); }

.center { text-align: center; }

.kv {
  margin: 1.35rem 0 0;
  display: grid;
  gap: .5rem;
  font-size: .9rem;
}
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line-soft);
}
.kv dt { color: var(--paper-mute); margin: 0; }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv .mono { font-family: var(--mono); font-size: .85em; font-weight: 400; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.5rem 0;
  background: var(--ink);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.footer-brand { margin: 0; color: var(--paper-dim); font-size: .9rem; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: .9rem;
}
.site-footer nav a:hover { color: var(--gold-hi); }
.footer-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: .8rem;
  color: var(--paper-mute);
  max-width: 46rem;
}

/* ------------------------------------------------------------------- misc */

.loading { color: var(--paper-mute); font-size: .95rem; }

code, .mono { font-family: var(--mono); font-size: .88em; }

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 1.75rem, var(--wrap)); }
  .header-inner { min-height: 56px; gap: .75rem; }
  /* The nav must not wrap: two-line nav items make the whole header taller on
     exactly the screens with the least room. Shrink it instead. */
  .site-nav { gap: .95rem; font-size: .82rem; white-space: nowrap; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .card-coins { font-size: 1.85rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}
