:root {
  --bg: hsl(222 47% 6%);
  --bg-2: hsl(222 40% 9%);
  --card: hsl(222 32% 12%);
  --border: hsl(222 20% 20%);
  --fg: hsl(210 40% 96%);
  --muted: hsl(215 16% 65%);
  --primary: hsl(222 47% 14%);
  --accent: hsl(45 95% 58%);
  --accent-2: hsl(35 95% 55%);
  --accent-fg: hsl(222 47% 8%);
  --radius: 14px;
  --shadow-card: 0 8px 24px -12px rgba(0,0,0,.5);
  --shadow-glow: 0 12px 40px -10px hsl(45 95% 58% / .35);
  --gradient-accent: linear-gradient(135deg, hsl(45 95% 58%), hsl(35 95% 55%));
  --gradient-hero: linear-gradient(135deg, hsl(222 47% 10%), hsl(222 47% 14%));
  --gradient-card: linear-gradient(180deg, hsl(222 32% 13%), hsl(222 32% 11%));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsla(222, 47%, 6%, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: 'Montserrat', sans-serif; font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gradient-accent); box-shadow: var(--shadow-glow); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-size: .92rem; }
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--fg); padding: .4rem .7rem; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; transition: transform .2s, opacity .2s; border: 1px solid var(--border); background: var(--card); color: var(--fg); cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }
.btn-accent { background: var(--gradient-accent); color: var(--accent-fg); border: 0; box-shadow: var(--shadow-glow); }
.btn-block { width: 100%; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 5rem 0 6rem; text-align: center; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, hsla(222,47%,6%,.6), hsla(222,47%,6%,.85), var(--bg)); }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: 999px; border: 1px solid hsl(45 95% 58% / .3); background: hsl(45 95% 58% / .1); color: var(--accent); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { font-size: clamp(2rem, 6vw, 4.5rem); margin-top: 1.5rem; }
.hero h1 .grad { background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 640px; margin: 1.25rem auto 0; color: var(--muted); font-size: 1.05rem; }
.hero-cta { margin-top: 2rem; display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: 2rem; display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; font-size: .85rem; color: var(--muted); }

/* Sections */
section { padding: 3rem 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head .label { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-top: .5rem; }
.section-head p { color: var(--muted); margin-top: 1rem; }

/* Video */
.video-wrap { max-width: 880px; margin: 0 auto; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-card); background: var(--card); }
.video-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Value strip */
.value-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.value-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--gradient-card); box-shadow: var(--shadow-card); }
.value-card h3 { font-size: 1.1rem; margin-top: .75rem; }
.value-card p { color: var(--muted); margin: .35rem 0 0; font-size: .92rem; }
.value-card .icon { width: 36px; height: 36px; border-radius: 10px; background: hsl(45 95% 58% / .15); display: grid; place-items: center; color: var(--accent); font-size: 1.2rem; }

/* Module grid */
.module-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.module-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .25s, box-shadow .25s; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.module-card .img { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.module-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.module-card:hover .img img { transform: scale(1.05); }
.module-card .num { position: absolute; top: .75rem; left: .75rem; width: 36px; height: 36px; border-radius: 50%; background: hsla(0,0%,100%,.95); color: var(--accent-fg); display: grid; place-items: center; font-family: 'Montserrat', sans-serif; font-weight: 800; }
.module-card .body { padding: 1.25rem; }
.module-card h3 { font-size: 1.05rem; }
.module-card .body p { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.module-card .meta { color: var(--muted); font-size: .78rem; margin-top: 1rem; }

/* Buy section */
.buy-card { position: relative; overflow: hidden; border-radius: 22px; background: var(--gradient-hero); box-shadow: var(--shadow-card); padding: 2.5rem; display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .buy-card { grid-template-columns: 1fr 1fr; padding: 4rem; } }
.buy-card .label { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.buy-card h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-top: .5rem; }
.buy-card ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.buy-card ul li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .92rem; }
.buy-card ul li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.price-card { background: hsla(0,0%,100%,.97); color: hsl(222 47% 12%); border-radius: var(--radius); padding: 2rem; }
.price-card .price { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 3rem; }
.price-card .strike { color: hsl(215 16% 50%); text-decoration: line-through; margin-left: .5rem; font-size: 1.1rem; }
.price-card .note { font-size: .8rem; color: hsl(215 16% 40%); margin-top: .35rem; }
.price-card .footer-link { font-size: .8rem; color: hsl(215 16% 40%); margin-top: 1rem; padding-top: 1rem; border-top: 1px solid hsl(215 16% 85%); }
.price-card .footer-link a { color: var(--accent-2); font-weight: 600; }

/* Auth/forms */
.center-box { min-height: 70vh; display: grid; place-items: center; padding: 2rem 1rem; }
.form-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 2rem; box-shadow: var(--shadow-card); }
.form-card h1 { text-align: center; font-size: 1.5rem; margin-top: 1rem; }
.form-card .icon-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-accent); display: grid; place-items: center; margin: 0 auto; color: var(--accent-fg); font-size: 1.4rem; box-shadow: var(--shadow-glow); }
.form-card p.helper { text-align: center; color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.form-card form { margin-top: 1.5rem; display: grid; gap: .75rem; }
input[type=text], input[type=password], input[type=email] {
  width: 100%; height: 48px; padding: 0 1rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--fg);
  font-family: 'Roboto Mono', monospace; font-size: 1rem; letter-spacing: .1em; text-align: center; text-transform: uppercase;
}
input.normal { font-family: 'Inter', sans-serif; letter-spacing: 0; text-align: left; text-transform: none; }
input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: hsl(0 75% 65%); font-size: .88rem; }
.success { color: hsl(140 60% 60%); font-size: .9rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
th, td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge-active { background: hsl(140 60% 30% / .25); color: hsl(140 60% 65%); }
.badge-redeemed { background: hsl(0 60% 30% / .25); color: hsl(0 70% 70%); }
.code { font-family: 'Roboto Mono', monospace; }

/* Module reader */
.reader-header { padding: 5rem 0 3rem; position: relative; overflow: hidden; }
.reader-header .hero-bg img { opacity: .25; }
.reader-header .back { color: var(--muted); font-size: .9rem; }
.reader-header .back:hover { color: var(--accent); }
.reader-header h1 { font-size: clamp(1.75rem, 4vw, 3rem); margin-top: 1rem; }
.reader-header .num-badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-accent); color: var(--accent-fg); font-family: 'Montserrat', sans-serif; font-weight: 800; }
.reader-article { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }
.reader-article img.lead { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; box-shadow: var(--shadow-card); }
.prose-module { font-size: 1.02rem; }
.prose-module h1 { font-size: 1.85rem; margin: 2rem 0 1rem; }
.prose-module h2 { font-size: 1.5rem; margin: 2rem 0 1rem; color: var(--accent); }
.prose-module h3 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
.prose-module h4 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.prose-module p, .prose-module li { color: hsl(210 30% 85%); }
.prose-module ul, .prose-module ol { padding-left: 1.5rem; }
.prose-module table { background: var(--card); }
.gallery { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 3rem; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery figcaption { padding: .9rem 1rem; color: var(--muted); font-size: .88rem; }
.reader-nav { display: flex; justify-content: space-between; gap: 1rem; padding: 3rem 1.25rem; max-width: 820px; margin: 0 auto; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 1.25rem; font-size: .9rem; color: var(--muted); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--fg); }
.footer-title { color: var(--fg); font-weight: 600; margin: 0 0 .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: .15rem 0; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem; text-align: center; font-size: .78rem; color: var(--muted); }

/* Mobile nav */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  body.nav-open .nav-links { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-2); padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
}

/* Welcome page */
.welcome-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; flex-wrap: wrap; }
.welcome-bar .who { font-size: .9rem; color: var(--muted); }
.welcome-bar .who strong { color: var(--fg); }
details.intro-details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2.5rem; }
details.intro-details summary { cursor: pointer; font-weight: 600; }
details.intro-details > div { margin-top: 1rem; }
