/*
 * The storefront wears the app's clothes: THE RESERVE. A banknote printed in
 * negative — green-black paper, an engraved portrait, inscription capitals,
 * microprint along the borders, gold for the seal — over the underground
 * shop's monospace readouts. Dark only, like Esoteric itself.
 */

@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/Cinzel.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #030604;
  --surface: #08100b;
  --raised: #0d1611;
  --line: #1a2a20;
  --line-strong: #2a4134;
  --ink: #e8f1ea;
  --ink-dim: #a3b9ab;
  --ink-faint: #6b8475;
  --accent: #3ee08f;
  --accent-hot: #72f0b0;
  --on-accent: #02130a;
  --gold: #d9b55c;
  --gold-hot: #f2d68f;
  --gold-deep: #a07d2c;
  --bad: #ff4d5e;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --mono: ui-monospace, 'Cascadia Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

::selection {
  background: rgb(62 224 143 / 35%);
}

/* --- Page shell ---------------------------------------------------------- */

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 55%, rgb(0 0 0 / 55%) 100%),
    repeating-linear-gradient(135deg, rgb(62 224 143 / 2.6%) 0 1px, transparent 1px 7px),
    var(--bg);
}

/* Scanlines, and a low wash of green from the top edge. */
.page::before,
.page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.page::before {
  background-image: linear-gradient(rgb(62 224 143 / 3%) 1px, transparent 1px);
  background-size: 100% 3px;
  opacity: 0.7;
}
.page::after {
  background: radial-gradient(70% 45% at 50% 0%, rgb(62 224 143 / 9%) 0%, transparent 65%);
}
.page > * {
  position: relative;
  z-index: 1;
}

.wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.top a {
  color: var(--ink-dim);
  text-decoration: none;
}
.top a:hover {
  color: var(--accent);
}
.top .domain {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.top .domain img {
  width: 28px;
  height: 28px;
}

/* --- The note: a card printed like a banknote ---------------------------- */

.note-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(140% 120% at 0% 0%, rgb(62 224 143 / 5%) 0%, transparent 60%),
    var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 0 0 5px var(--surface),
    inset 0 0 0 6px rgb(42 65 52 / 70%),
    0 30px 80px rgb(0 0 0 / 45%);
}
.microprint {
  position: absolute;
  left: 14px;
  right: 14px;
  overflow: hidden;
  color: rgb(62 224 143 / 55%);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.microprint.top-edge {
  top: 9px;
}
.microprint.bottom-edge {
  bottom: 9px;
}
.denomination {
  position: absolute;
  color: rgb(62 224 143 / 60%);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
}
.denomination.tl {
  top: 22px;
  left: 18px;
}
.denomination.br {
  right: 18px;
  bottom: 22px;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  margin-top: clamp(8px, 3vw, 28px);
}
.hero .note-card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(36px, 6vw, 60px) clamp(24px, 5vw, 56px);
}
.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 640 / 760;
  background-color: var(--accent);
  -webkit-mask: url('/portrait.png') center / 100% 100% no-repeat;
  mask: url('/portrait.png') center / 100% 100% no-repeat;
  opacity: 0.92;
}
.serial {
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-shadow: 0 0 12px rgb(62 224 143 / 35%);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.08em;
}
.tagline {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.foil {
  background-image: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 30%, var(--gold-hot) 45%, var(--gold) 60%, var(--gold-deep) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine {
  0%,
  70% {
    background-position: 200% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.lead {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--ink-dim);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
}
.pipeline {
  margin: 20px 0 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.pipeline b {
  color: var(--accent);
  font-weight: 400;
}

/* --- Buying -------------------------------------------------------------- */

.buy {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgb(0 0 0 / 35%);
}
.price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.price .amount {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
}
.price .terms {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-left: auto;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 26px rgb(62 224 143 / 30%);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover {
  background: var(--accent-hot);
  transform: scale(1.03);
}
.btn:active {
  transform: scale(1);
}
.btn:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.btn-ghost:hover {
  border-color: var(--accent);
}

.banner {
  margin: 20px 0 0;
  padding: 10px 14px;
  border: 1px solid rgb(62 224 143 / 30%);
  border-radius: 10px;
  background: rgb(62 224 143 / 6%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}
.banner.bad {
  border-color: rgb(255 77 94 / 30%);
  background: rgb(255 77 94 / 8%);
  color: var(--bad);
}

/* --- Sections ------------------------------------------------------------ */

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(44px, 7vw, 76px) 0 18px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.section-head b {
  color: var(--gold);
  font-weight: 400;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.card {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 0 0 4px var(--surface),
    inset 0 0 0 5px rgb(42 65 52 / 60%);
}
.card h2 {
  margin: 8px 0 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
}
.card .index {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.card .tag {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.for {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.for p {
  margin: 0;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgb(62 224 143 / 6%), transparent);
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.6;
}
.for b {
  color: var(--ink);
}

/* --- How it works -------------------------------------------------------- */

.how {
  display: grid;
  gap: 18px;
}
.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
}
.note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.6;
}

.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(8 16 11 / 70%);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
}
.faq p {
  margin: 10px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* margin-block, not margin: the shorthand would undo .wrap's centring. */
.closing {
  margin-block: clamp(44px, 7vw, 76px) clamp(32px, 6vw, 60px);
  text-align: center;
}
.closing .tagline {
  margin-bottom: 22px;
}
.closing .btn {
  margin: 0 auto;
}

/* --- Footer -------------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-top: auto;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.foot a {
  color: var(--ink-dim);
  text-decoration: none;
}
.foot a:hover {
  color: var(--accent);
}

/* --- Receipt (success page) ---------------------------------------------- */

.receipt {
  width: min(100% - 32px, 560px);
  margin: clamp(32px, 8vw, 80px) auto;
  padding: 34px 28px;
  border-radius: 14px;
  background:
    radial-gradient(140% 120% at 0% 0%, rgb(62 224 143 / 5%) 0%, transparent 60%),
    var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 0 0 5px var(--surface),
    inset 0 0 0 6px rgb(42 65 52 / 70%),
    0 0 80px rgb(62 224 143 / 7%);
}
.receipt h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* :where() keeps this at element specificity, so .eyebrow and .note win. */
:where(.receipt) p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.6;
}
.receipt .eyebrow {
  margin-bottom: 10px;
}
.receipt .steps {
  margin: 22px 0;
}
.receipt .note {
  margin-top: 16px;
}
.receipt a:not(.btn):not(.btn-ghost) {
  color: var(--accent);
}

.key {
  margin: 22px 0 12px;
  padding: 16px 12px;
  border: 1px solid rgb(62 224 143 / 30%);
  border-radius: 12px;
  background: #020403;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(15px, 4.4vw, 21px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 0 12px rgb(62 224 143 / 30%);
  user-select: all;
  word-break: break-all;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 760px) {
  .hero .note-card {
    grid-template-columns: 1fr;
  }
  .hero .portrait-box {
    width: 180px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .eyebrow,
  .top {
    letter-spacing: 0.16em;
  }
  .buy {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }
  .btn {
    margin-left: 0;
  }
  .price {
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-ghost {
    transition: none;
  }
  .foil {
    animation: none;
  }
}
