/* ============================================================
   AscendQ v2 — pricing page
   (Particle side-mask now lives globally in base.css.)
   ============================================================ */

.price-hero {
  text-align: center;
  padding: 16px 0 28px;
}
.price-hero h1 {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.price-hero h1 em { color: var(--gold); font-style: italic; }
.price-hero p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
}

/* === Rating row — prominent === */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(221,185,116,0.10), rgba(221,185,116,0.04));
  border: 1px solid rgba(221,185,116,0.32);
  border-radius: 999px;
  box-shadow: 0 0 24px -6px rgba(221,185,116,0.35);
}
.rating-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
  font-size: 18px;
  text-shadow: 0 0 8px rgba(221,185,116,0.40);
}
.rating-value {
  font-family: var(--ff-serif);
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1;
}
.rating-meta {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}
.rating-meta b { color: var(--gold); font-weight: 600; }

/* === Tier cards === */
.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 8px auto 28px;
  max-width: 680px;
}
@media (max-width: 640px) { .tiers { grid-template-columns: 1fr; } }

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 26px;
  background: linear-gradient(180deg, rgba(232,228,220,0.06) 0%, rgba(232,228,220,0.025) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
  text-align: left;
}
.tier::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,228,220,0.16), transparent);
}
.tier:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(232,228,220,0.08) 0%, rgba(232,228,220,0.04) 100%);
  transform: translateY(-3px);
}
.tier.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(221,185,116,0.10) 0%, rgba(221,185,116,0.03) 100%);
  box-shadow: 0 0 0 1px rgba(221,185,116,0.30), 0 0 36px -8px rgba(221,185,116,0.40);
}
.tier.selected::before {
  background: linear-gradient(90deg, transparent, rgba(244,215,150,0.6), transparent);
}
.tier-flag {
  position: absolute;
  top: -10px;
  right: 18px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #0F1011;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(221,185,116,0.6);
}
.tier-name {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-sub);
  font-weight: 600;
  margin-bottom: 14px;
}
.tier.premium .tier-name { color: var(--gold); }
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 22px;
}
.tier-price .amount {
  font-family: var(--ff-serif);
  font-size: 52px;
  color: var(--text);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.tier-price .per {
  font-family: var(--ff-sans);
  font-size: 13px;
  color: var(--text-sub);
}

/* === Stats strip === */
/* Layout uses flex on each cell + a fixed label min-height so a 1-line label
   ("Lessons") and a 2-line label ("Brain-training games") leave the same
   vertical footprint. Numbers therefore align across columns regardless of
   label length, and the row reads as a clean horizontal strip. */
.tier-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 22px;
  padding: 16px 4px 14px;
  border-top: 1px solid rgba(232,228,220,0.08);
  border-bottom: 1px solid rgba(232,228,220,0.08);
}
.tier-stats--two { grid-template-columns: 1fr 1fr; gap: 12px; }
.tier-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 8px;
  position: relative;
}
.tier-stat + .tier-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: rgba(232,228,220,0.06);
}
.tier-stat-num {
  font-family: var(--ff-serif);
  font-size: 26px;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.01em;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tier.selected .tier-stat-num,
.tier.premium .tier-stat-num { color: var(--gold); }
.tier-stat-label {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--text-sub);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;            /* reserves 2 lines so columns stay symmetric */
  max-width: 14ch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.tier-feats {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.tier-feats li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 8px 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.4;
}
.tier-feats li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(221,185,116,0.18);
  border: 1px solid rgba(221,185,116,0.40);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DDB974' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* === Subscribe CTA + footer === */
.subscribe-wrap { text-align: center; margin-top: 8px; }
.subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 48px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0F1011;
  border: none;
  border-radius: 13px;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
  box-shadow: 0 12px 30px -10px rgba(221,185,116,0.55), 0 0 22px -4px rgba(244,215,150,0.20);
}
.subscribe em { font-style: italic; }
.subscribe:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 48px -8px rgba(221,185,116,0.85), 0 0 36px 2px rgba(244,215,150,0.42);
}
.subscribe-foot {
  margin-top: 12px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.subscribe-foot .pre { color: var(--text-faint); }

/* === Compare strip === */
.compare {
  margin: 36px auto 0;
  max-width: 680px;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ============================================================
   Mystery box — 4 boxes, 1 in 4 wins 40% off
   ============================================================ */
.mb-section {
  margin: 36px auto 44px;
  max-width: 720px;
  text-align: center;
  padding: 28px 22px 32px;
  border: 1px solid rgba(221,185,116,0.30);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(221,185,116,0.12), transparent 70%),
    rgba(15,16,17,0.55);
  position: relative;
  overflow: hidden;
}
.mb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}
.mb-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(221,185,116,0.8);
  animation: mbPulse 1.6s ease-in-out infinite;
}
@keyframes mbPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.mb-title {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(26px, 4.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
}
.mb-title em { color: var(--gold); font-style: italic; }
.mb-sub {
  font-family: var(--ff-sans);
  font-size: 14px;
  color: var(--text-sub);
  margin: 0 0 22px;
}

.mb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 auto 14px;
  max-width: 560px;
}
@media (max-width: 520px) {
  .mb-grid { gap: 10px; }
}

.mb-box {
  position: relative;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 600px;
  transition: transform .2s;
  font-family: inherit;
  color: inherit;
}
.mb-box:hover:not([disabled]) { transform: translateY(-4px); }
.mb-box:active:not([disabled]) { transform: translateY(-1px) scale(.97); }
.mb-grid.locked .mb-box { cursor: default; }

/* The 3D box body */
.mb-body {
  position: absolute;
  inset: 22% 6% 6% 6%;
  border-radius: 8px;
  background: linear-gradient(135deg, #2A2D31 0%, #1B1D20 100%);
  border: 1px solid #3A3D42;
  box-shadow:
    inset 0 -10px 20px rgba(0,0,0,0.4),
    0 8px 20px -6px rgba(0,0,0,0.5);
  transition: transform .4s, background .4s, border-color .4s;
}
/* The lid (sits on top of body) */
.mb-lid {
  position: absolute;
  left: 0;
  right: 0;
  top: 8%;
  height: 22%;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #DDB974 0%, #C8A05E 100%);
  border: 1px solid #B89656;
  box-shadow:
    inset 0 -3px 8px rgba(0,0,0,0.25),
    inset 0 2px 0 rgba(255,255,255,0.35),
    0 6px 14px -4px rgba(221,185,116,0.5);
  transform-origin: 50% 100%;
  transition: transform .5s cubic-bezier(.4,.0,.2,1), opacity .5s;
}
/* Gold ribbon stripe across the lid */
.mb-lid::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -8%;
  bottom: -8%;
  width: 14%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
  border-radius: 2px;
}

/* Subtle gold glow halo (idle) */
.mb-glow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221,185,116,0.22), transparent 60%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.mb-box:hover:not([disabled]) .mb-glow { opacity: 1; }

.mb-num {
  position: absolute;
  bottom: 8%;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  font-weight: 700;
  z-index: 2;
  transition: color .3s, opacity .3s;
}

/* The prize hidden inside the box (revealed on open) */
.mb-prize {
  position: absolute;
  inset: 22% 6% 6% 6%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(14px, 2.5vw, 20px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-sub);
  white-space: pre;
  opacity: 0;
  transition: opacity .4s, color .4s;
  z-index: 1;
}

/* Burst container (only winning box gets coins) */
.mb-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}
.mb-coin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  color: #0F1011;
  font-family: var(--ff-serif);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(221,185,116,0.5), 0 0 12px rgba(221,185,116,0.7);
  animation: mbCoinFly 1400ms cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes mbCoinFly {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.7) rotate(var(--rot)); opacity: 0; }
}

/* === Opening states === */
/* Shared: lid lifts away, prize fades in */
.mb-box.opening .mb-lid {
  transform: translateY(-60%) rotate(-15deg);
  opacity: 0;
}
.mb-box.opening .mb-prize { opacity: 1; }

/* Clicked-and-won: clicked box pops + glows */
.mb-box.clicked.winner .mb-body {
  background: linear-gradient(135deg, rgba(221,185,116,0.45) 0%, rgba(244,215,150,0.20) 100%);
  border-color: var(--gold);
  box-shadow:
    inset 0 -10px 20px rgba(0,0,0,0.2),
    0 0 24px rgba(221,185,116,0.55),
    0 0 50px rgba(221,185,116,0.35);
  animation: mbWinPulse 1.4s ease-in-out;
}
.mb-box.clicked.winner .mb-prize {
  color: #0F1011;
  font-weight: 600;
  font-style: italic;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.mb-box.clicked.winner .mb-num { color: var(--gold); }
@keyframes mbWinPulse {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.12); }
  50%  { transform: scale(1.02); }
  75%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Other boxes after reveal: dim, less visual weight */
.mb-grid.locked .mb-box.opening:not(.winner) {
  opacity: 0.55;
}
.mb-grid.locked .mb-box.opening:not(.winner) .mb-body {
  background: rgba(27,29,32,0.65);
  border-color: rgba(232,228,220,0.10);
  box-shadow: inset 0 -6px 14px rgba(0,0,0,0.4);
}

/* Winner-among-others (when user lost) — highlight which one had it */
.mb-grid.locked .mb-box.winner:not(.clicked) {
  opacity: 0.85;
}
.mb-grid.locked .mb-box.winner:not(.clicked) .mb-body {
  background: linear-gradient(135deg, rgba(221,185,116,0.22) 0%, rgba(221,185,116,0.06) 100%);
  border-color: rgba(221,185,116,0.40);
}
.mb-grid.locked .mb-box.winner:not(.clicked) .mb-prize {
  color: var(--gold);
  font-style: italic;
}

/* Clicked-but-lost: subtle red tint */
.mb-grid.locked .mb-box.clicked:not(.winner) .mb-body {
  border-color: rgba(221,107,95,0.30);
}

/* Result panel (win / lose message) */
.mb-result { margin-top: 18px; min-height: 1px; }
.mb-result.show { animation: mbResultIn .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes mbResultIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mb-win, .mb-lose {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 22px;
  border-radius: 12px;
  text-align: center;
  max-width: 480px;
}
.mb-win {
  background: linear-gradient(135deg, rgba(221,185,116,0.18) 0%, rgba(221,185,116,0.05) 100%);
  border: 1px solid var(--gold);
}
.mb-win-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.mb-win-msg {
  font-family: var(--ff-serif);
  font-size: 16px;
  color: var(--text);
  font-style: italic;
}
.mb-lose {
  background: rgba(232,228,220,0.04);
  border: 1px solid var(--border);
}
.mb-lose-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-sub);
  font-weight: 700;
}
.mb-lose-msg {
  font-family: var(--ff-serif);
  font-size: 15px;
  color: var(--text-dim);
  font-style: italic;
}

/* Tier card with the discount applied — strike the original price */
.tier-price { position: relative; }
.amount-strike {
  display: block;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: line-through;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.tier.tier-lucky .amount { color: var(--gold); }
/* 40% OFF pill on the top-LEFT corner so it never collides with the
   "Most popular" flag that sits at top-right edge of the Premium card. */
.tier.tier-lucky::after {
  content: '40% OFF';
  position: absolute;
  top: -10px;
  left: 18px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #0F1011;
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(221,185,116,0.65);
  z-index: 2;
}
