/* ============================================================
   GG33 — Learn the System (Education) page + 5-tier comparison
   Themed to MATCH the homepage (home.css tokens: Satoshi / General
   Sans / Fraunces, --bg #050302, --orange #ff6b14, ember orbs).
   ============================================================ */

html { scroll-behavior: smooth; }

.learn-body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* anchor target clears the sticky top bar */
#tiers { scroll-margin-top: 4.4rem; }

/* ---------- Persistent compare CTA (mobile dock) ---------- */
.learn-dock { display: none; }

/* ---------- Ambient background (matches homepage) ---------- */
.learn-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -5%, rgba(255, 107, 20, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(5, 3, 2, 0.4), var(--bg) 760px),
    var(--bg);
}
.learn-bg::before,
.learn-bg::after {
  content: "";
  position: absolute;
  width: 60vw; height: 60vw; max-width: 520px; max-height: 520px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.42;
  animation: learnOrb 15s ease-in-out infinite;
}
.learn-bg::before { top: -14%; left: -18%; background: radial-gradient(circle, rgba(255, 107, 20, 0.5), transparent 70%); }
.learn-bg::after  { top: 38%; right: -22%; background: radial-gradient(circle, rgba(255, 138, 44, 0.32), transparent 70%); animation-delay: -7s; }
@keyframes learnOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 7%) scale(1.12); }
}

/* ---------- Top bar ---------- */
.learn-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 2.4rem 1fr 2.4rem;
  align-items: center;
  gap: 0.6rem;
  padding: max(0.8rem, env(safe-area-inset-top)) 1.1rem 0.8rem;
  background: rgba(5, 3, 2, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(247, 244, 236, 0.05);
}
.learn-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink);
  background: rgba(247, 244, 236, 0.04); text-decoration: none;
}
.learn-brand { display: inline-flex; justify-content: center; }
.learn-brand img { height: 1.55rem; width: auto; display: block; }

/* ---------- Layout ---------- */
.learn-main {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.15rem calc(3.5rem + env(safe-area-inset-bottom));
}

/* ---------- Hero (homepage headline treatment) ---------- */
.learn-hero {
  text-align: center;
  padding: 3.2rem 0 2.4rem;
  max-width: 40rem;
  margin: 0 auto;
}
.learn-medallion {
  width: clamp(8.6rem, 38vw, 11rem);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 138, 44, 0.3);
  box-shadow: 0 16px 56px rgba(255, 107, 20, 0.18), inset 0 0 30px rgba(0, 0, 0, 0.55);
}
.learn-kicker {
  font-family: var(--sans);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--orange-2); margin: 0 0 0.9rem;
}
.learn-hero h1 {
  font-family: var(--display);
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(2.3rem, 9.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.learn-hero h1 span { display: inline; }
.hl { color: var(--orange-2); }
.learn-sub {
  font-family: var(--sans);
  font-size: 1rem; line-height: 1.55; color: var(--soft);
  margin: 1.1rem auto 1.6rem; max-width: 30ch; font-weight: 400;
}
.learn-cta-ghost {
  display: inline-block; color: #160a04; text-decoration: none;
  font-size: 0.92rem; font-weight: 700; padding: 0.8rem 1.55rem;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #ff8a2c, #df520d);
  box-shadow: 0 16px 38px rgba(255, 107, 20, 0.28);
  transition: transform 150ms var(--ease), box-shadow 180ms var(--ease);
}
.learn-cta-ghost:hover { transform: translateY(-1px); box-shadow: 0 20px 46px rgba(255, 107, 20, 0.36); }

/* hero proof strip */
.learn-proof {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.35rem 0; margin: 0.9rem 0 1.2rem;
  font-family: var(--mono, monospace); font-size: 0.68rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.learn-proof span { display: inline-flex; align-items: center; }
.learn-proof span + span::before { content: "\00b7"; margin: 0 0.65rem; color: rgba(255, 138, 44, 0.6); }
.learn-proof span:first-child { color: #f6d572; }

/* ---------- Section heads ---------- */
.tiers { padding: 1.6rem 0 1rem; }
.tiers-h2 {
  font-family: var(--display);
  max-width: none;
  text-align: center; font-size: clamp(1.7rem, 7vw, 2.3rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0 auto 0.5rem;
}
.tiers-note { text-align: center; color: var(--muted); font-size: 0.92rem; margin: 0 auto 1.8rem; }

/* ---------- Tier cards ---------- */
.tier-grid { display: flex; flex-direction: column; gap: 1rem; }

.tier {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(247, 244, 236, 0.09);
  background:
    linear-gradient(180deg, rgba(247, 244, 236, 0.05) 0%, rgba(247, 244, 236, 0.012) 55%),
    rgba(12, 8, 5, 0.55);
  padding: 1.5rem 1.35rem 1.6rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}
/* metal top accent */
.tier::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--metal, var(--orange));
}
.tier-academy  { --metal: linear-gradient(90deg, #c2a982, #8a7456); }
.tier-bronze   { --metal: linear-gradient(90deg, #ff8a2c, #c45a17); }
.tier-silver   { --metal: linear-gradient(90deg, #e1e6ee, #9aa3b0); }
.tier-gold     { --metal: linear-gradient(90deg, #f6d572, #c79a36); }
.tier-diamond  { --metal: linear-gradient(90deg, #c6edf5, #7fb9c8); }
/* each card carries its metal all the way through: border, glow, price, bullets */
.tier-silver  { border-color: rgba(225, 230, 238, 0.17); box-shadow: 0 20px 50px rgba(154, 163, 176, 0.1); }
.tier-gold    { border-color: rgba(246, 213, 114, 0.22); box-shadow: 0 20px 54px rgba(246, 213, 114, 0.1); }
.tier-diamond { border-color: rgba(198, 237, 245, 0.2); box-shadow: 0 20px 54px rgba(127, 185, 200, 0.12); }
.tier-academy .tier-price strong { color: #d4bd95; }
.tier-bronze  .tier-price strong { color: var(--orange-2); }
.tier-silver  .tier-price strong { color: #e6ebf2; }
.tier-gold    .tier-price strong { color: #f6d572; }
.tier-diamond .tier-price strong { color: #d2f1f8; }
.tier-academy .tier-list li::before { background: #c2a982; }
.tier-silver  .tier-list li::before { background: #b9c2cd; }
.tier-gold    .tier-list li::before { background: #e3c463; }
.tier-diamond .tier-list li::before { background: #a8dbe8; }

.tier.is-popular {
  border-color: rgba(255, 107, 20, 0.5);
  box-shadow: 0 22px 60px rgba(255, 107, 20, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 107, 20, 0.12), rgba(247, 244, 236, 0.015) 60%),
    rgba(12, 8, 5, 0.6);
}
.tier.is-apply {
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.028), rgba(0, 0, 0, 0.12));
  border-color: rgba(247, 244, 236, 0.07);
}

.tier-badge {
  position: absolute; top: 0.9rem; right: 0.95rem;
  font-family: var(--sans);
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #160a04; background: linear-gradient(135deg, var(--orange-2), var(--orange));
  padding: 0.3rem 0.62rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(255, 107, 20, 0.32);
}
.tier-lock { position: absolute; top: 0.95rem; right: 1.05rem; font-size: 0.82rem; opacity: 0.5; }

.tier-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.tier-name {
  font-family: var(--display);
  font-style: normal;
  font-size: 1.55rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
}
.tier-academy  .tier-name { color: #d4bd95; }
.tier-bronze   .tier-name { color: #ff944a; }
.tier-silver   .tier-name { color: #e6ebf2; }
.tier-gold     .tier-name { color: #f6d572; }
.tier-diamond  .tier-name { color: #d2f1f8; }
.tier-tag {
  font-family: var(--sans);
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}

.tier-price { margin: 0.8rem 0 0.25rem; display: flex; align-items: baseline; gap: 0.45rem; }
.tier-price strong { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.tier-price span { font-size: 0.82rem; color: var(--muted); }

.tier-rating { display: flex; align-items: center; gap: 0.4rem; margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--soft); }
.tier-rating .tier-star { color: #f6d572; font-size: 0.95rem; line-height: 1; }
.tier-rating strong { color: var(--ink); font-weight: 700; }
.tier-rating .tier-rcount { color: var(--muted); }

.tier-for { font-size: 0.96rem; color: var(--soft); margin: 0.5rem 0 1rem; line-height: 1.4; }

.tier-list { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: 0.55rem; }
.tier-list li {
  position: relative; padding-left: 1.45rem; font-size: 0.9rem; line-height: 1.42; color: rgba(247, 244, 236, 0.82);
}
.tier-list li::before {
  content: ""; position: absolute; left: 0; top: 0.45rem; width: 0.5rem; height: 0.5rem;
  border-radius: 999px; background: var(--orange); opacity: 0.9;
}
.tier-list strong { color: var(--ink); font-weight: 600; }

.tier-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 3.2rem; border-radius: 999px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--ink);
  background: rgba(247, 244, 236, 0.05);
  transition: transform 150ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}
.tier-btn:hover { transform: translateY(-1px); background: rgba(247, 244, 236, 0.09); }
.tier-btn-solid {
  border: 0; color: #160a04;
  background: linear-gradient(135deg, #ff8a2c, #df520d);
  box-shadow: 0 16px 38px rgba(255, 107, 20, 0.3);
}
.tier-btn-line { border-color: rgba(246, 213, 114, 0.45); color: #f6d572; background: transparent; }
.tier-diamond .tier-btn-line { border-color: rgba(198, 237, 245, 0.45); color: #d2f1f8; }

/* ---------- Swipe dots (matches homepage carousel) ---------- */
.tier-dots { display: flex; gap: 0.45rem; justify-content: center; padding: 1rem 0 0.2rem; }
.tier-dot {
  width: 0.4rem; height: 0.4rem; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: rgba(247, 244, 236, 0.22);
  transition: width 240ms var(--ease), background 240ms var(--ease);
}
.tier-dot.active { width: 1.6rem; background: rgba(255, 138, 44, 0.95); }

/* ---------- FAQ ---------- */
.learn-faq { padding: 2.8rem 0 1rem; max-width: 40rem; margin: 0 auto; }
.faq-item { padding: 1.15rem 0; border-top: 1px solid rgba(247, 244, 236, 0.08); }
.faq-item:first-of-type { border-top: 0; }
.faq-item h3 { font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin: 0 0 0.4rem; letter-spacing: -0.01em; color: var(--ink); }
.faq-item p { font-size: 0.94rem; line-height: 1.55; color: var(--soft); margin: 0; }
.faq-item strong { color: var(--ink); }
.faq-item a { color: var(--orange-2); text-decoration: none; border-bottom: 1px solid rgba(255, 138, 44, 0.4); }
.faq-item a:hover { border-bottom-color: var(--orange-2); }

/* ---------- Trust byline ---------- */
.learn-byline {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(247, 244, 236, 0.08);
  text-align: center;
}
.learn-byline p { margin: 0 0 0.7rem; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }
.learn-byline strong { color: var(--soft); font-weight: 600; }
.learn-free-link {
  display: inline-block;
  font-size: 0.86rem; font-weight: 500; color: var(--orange-2); text-decoration: none;
}
.learn-free-link:hover { color: var(--orange); }

/* ---------- Close ---------- */
.learn-close { text-align: center; padding: 2.6rem 0 1rem; max-width: 34rem; margin: 0 auto; }
.learn-close h2 {
  font-family: var(--display); max-width: none;
  font-size: clamp(1.8rem, 7.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 0 auto 1.5rem;
}
.learn-close-btn { max-width: 22rem; margin: 0 auto; }
.learn-close-link { display: inline-block; margin-top: 1.1rem; color: var(--muted); font-size: 0.88rem; text-decoration: none; }
.learn-close-link:hover { color: var(--soft); }

/* ---------- Mobile / tablet: Porsche-style swipe carousel ---------- */
@media (max-width: 919px) {
  .tier-grid {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.9rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.15rem;
    padding: 0.5rem 1.15rem 0.4rem;
    scrollbar-width: none;
  }
  .tier-grid::-webkit-scrollbar { display: none; }

  .tier {
    flex: 0 0 calc(100vw - 3.6rem);
    max-width: 21.5rem;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
  }
  .tier-list { flex: 1 1 auto; }
  .tier-btn { margin-top: auto; }

  /* hero's in-flow link gives way to the persistent dock on mobile */
  .learn-cta-ghost { display: none; }

  /* close the dead space left by the hidden hero link, above "Choose your level" */
  .learn-hero { padding-bottom: 1.4rem; }
  .learn-sub { margin-bottom: 0.2rem; }
  .tiers { padding-top: 1.2rem; }

  /* leave just enough room for the last FAQ to clear the fixed dock */
  .learn-main { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }

  .learn-dock {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: block;
    padding: 1.4rem 1.15rem calc(0.9rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 28%, rgba(5, 3, 2, 0.82) 64%, rgba(5, 3, 2, 0));
    pointer-events: none;
  }
  .learn-dock-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
    min-height: 3.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff8a2c, #df520d);
    color: #160a04;
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 14px 38px rgba(255, 107, 20, 0.34);
  }
  .learn-dock-btn:active { transform: translateY(1px); }
}

/* ---------- Desktop: 5 tiers in a row ---------- */
@media (min-width: 920px) {
  .tier-grid { flex-direction: row; align-items: stretch; gap: 0.85rem; }
  .tier { flex: 1 1 0; display: flex; flex-direction: column; padding: 1.6rem 1.15rem 1.5rem; }
  .tier-list { flex: 1 1 auto; }
  .tier.is-popular { transform: scale(1.035); }
  .tier-dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tier-btn, .tier, .learn-bg::before, .learn-bg::after { transition: none; animation: none; }
}

/* keyboard focus - same orange treatment as the homepage */
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange-2, #ff8a2c); outline-offset: 2px; }

/* press feedback on touch */
@media (hover: none) {
  .tier-btn:active, .learn-dock-btn:active, .learn-cta-ghost:active { transform: scale(0.97); transition: transform 80ms ease; }
}

/* Desktop-only nav links in the top bar (markup is inert on phones) */
.lp-desk-nav { display: none; }

/* ============================================================
   Desktop layer (min-width: 761px) — mobile rendering untouched.
   Site chrome + scaled hero; the 5-tier row (>=920px) gets a
   wider canvas at large sizes.
   ============================================================ */
@media (min-width: 761px) {
  .learn-top {
    grid-template-columns: auto auto 1fr;
    gap: 1.1rem;
    min-height: 4.3rem;
    padding: 0.75rem max(1.4rem, calc((100% - 77.5rem) / 2));
    background: rgba(5, 3, 2, 0.62);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
  }
  .learn-top > .learn-top-spacer { display: none; }
  .learn-back { width: 2.6rem; height: 2.6rem; transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease); }
  .learn-back:hover { border-color: rgba(255, 138, 44, 0.55); background: rgba(255, 107, 20, 0.1); transform: translateX(-2px); }
  .learn-brand { justify-content: flex-start; }
  .learn-brand img { height: 1.8rem; }

  .lp-desk-nav { display: flex; align-items: center; justify-content: flex-end; justify-self: end; gap: clamp(0.2rem, 1.2vw, 0.65rem); }
  .lp-desk-nav a { padding: 0.52rem 0.85rem; border-radius: 999px; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em; color: var(--soft); text-decoration: none; transition: color 150ms var(--ease), background 150ms var(--ease); white-space: nowrap; }
  .lp-desk-nav a:hover { color: var(--ink); background: rgba(247, 244, 236, 0.07); }
  .lp-desk-nav a[aria-current="page"] { color: var(--orange-2); }
  .lp-desk-nav .lp-nav-cta { margin-left: 0.5rem; padding: 0.55rem 1.15rem; color: #160a04; font-weight: 700; background: linear-gradient(135deg, #ff8a2c, #df520d); box-shadow: 0 10px 26px rgba(255, 107, 20, 0.26); }
  .lp-desk-nav .lp-nav-cta:hover { color: #160a04; background: linear-gradient(135deg, #ffa14e, #ef5f14); }

  .learn-hero { padding: 4.2rem 0 2.8rem; max-width: 46rem; }
  .learn-hero h1 { font-size: clamp(2.8rem, 4.4vw, 3.7rem); }
  .learn-sub { font-size: 1.12rem; max-width: 54ch; margin-left: auto; margin-right: auto; }
}

/* Narrow desktop: thin the nav so the bar never crowds */
@media (min-width: 761px) and (max-width: 919px) {
  .lp-desk-nav a:not(.lp-nav-cta) { display: none; }
}
@media (min-width: 920px) and (max-width: 1149px) {
  .lp-desk-nav a:nth-of-type(4),
  .lp-desk-nav a:nth-of-type(5) { display: none; }
}

/* The 5-tier comparison gets the full line on big desktops */
@media (min-width: 1180px) {
  .learn-main { max-width: 76rem; }
  .tier { padding-left: 1.2rem; padding-right: 1.2rem; }
}
