/* ============================================================
   Advantage Books — advantagebooks.io
   Dark, tech-forward design system. Mobile-first.
   Accent: electric blue. Headings: Plus Jakarta Sans. Body: Inter.
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-raised: #0c1322;
  --surface: #101a2e;
  --surface-2: #16223a;
  --line: rgba(125, 160, 215, 0.16);
  --text: #eaf0f9;
  --text-soft: #aab8cf;
  --text-faint: #7d8ca3;
  --accent: #2e7cf6;
  --accent-bright: #5e9eff;
  --accent-soft: rgba(46, 124, 246, 0.12);
  --accent-line: rgba(46, 124, 246, 0.35);
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --space: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--text); }

::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}

.display {
  font-size: clamp(2.6rem, 8.5vw, 4.9rem);
  font-weight: 800;
}

h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3.5vw, 1.55rem); }

p { max-width: 62ch; }

.lede {
  font-size: clamp(1.125rem, 2.6vw, 1.3rem);
  color: var(--text-soft);
  line-height: 1.65;
}

.accent { color: var(--accent-bright); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
}

.container {
  width: min(100% - 2.5rem, 1140px);
  margin-inline: auto;
}

section { padding-block: var(--space); position: relative; }

.section-head { margin-bottom: clamp(2.2rem, 6vw, 3.8rem); max-width: 46rem; }
.section-head p { margin-top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 1140px);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
}
.brand img { height: 40px; width: auto; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav a {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 0.6rem 0;
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 8px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 46px; height: 46px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.25rem 1.4rem;
    transform: translateY(-110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
  }
  body.nav-open .site-nav { transform: translateY(0); visibility: visible; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav a { padding: 0.85rem 0; font-size: 1.08rem; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .nav-cta { margin: 1.1rem 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.7rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.btn:hover {
  background: var(--accent-bright);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(46, 124, 246, 0.55);
}
.btn-ghost {
  background: transparent;
  border-color: var(--accent-line);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4.5rem, 12vw, 9rem) var(--space);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 4rem; }
}
.hero h1 { margin-bottom: 1.4rem; }
.hero .lede { margin-bottom: 2.2rem; }

.hero-mark {
  position: relative;
  display: none;
  justify-self: center;
}
@media (min-width: 900px) { .hero-mark { display: block; } }
.hero-mark img { width: min(380px, 100%); filter: drop-shadow(0 24px 60px rgba(46, 124, 246, 0.25)); }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 78% 12%, rgba(46, 124, 246, 0.16), transparent 65%),
    radial-gradient(ellipse 50% 40% at 8% 85%, rgba(46, 124, 246, 0.08), transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 160, 215, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 160, 215, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
}

.hero-contact {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
}
.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--text-soft);
}
.hero-contact a:hover { color: var(--accent-bright); }
.hero-contact svg { width: 17px; height: 17px; color: var(--accent-bright); }

/* ---------- Stats band ---------- */
.stats {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(2, 1fr);
  border-block: 1px solid var(--line);
  padding-block: clamp(2.2rem, 5vw, 3.2rem);
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stat strong em { font-style: normal; color: var(--accent-bright); }
.stat span { color: var(--text-faint); font-size: 0.92rem; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.card h3 { margin-bottom: 0.7rem; }
.card p { color: var(--text-soft); }

.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 22px; height: 22px; color: var(--accent-bright); }

/* Asymmetric card layouts */
.split {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 860px) {
  .split-7-5 { grid-template-columns: 7fr 5fr; }
  .split-5-7 { grid-template-columns: 5fr 7fr; }
}

.cards-3 { display: grid; gap: 1.4rem; }
@media (min-width: 860px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Versus section ---------- */
.versus { display: grid; gap: 1.4rem; }
@media (min-width: 860px) { .versus { grid-template-columns: 1fr 1fr; } }
.versus .card { position: relative; overflow: hidden; }
.versus .card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
}

/* ---------- Pricing ---------- */
.tiers { display: grid; gap: 1.6rem; align-items: stretch; }
@media (min-width: 880px) { .tiers { grid-template-columns: 1fr 1fr; } }

.tier {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4.5vw, 2.6rem);
  position: relative;
}
.tier.featured {
  border-color: var(--accent-line);
  background: linear-gradient(165deg, #122142, var(--bg-raised));
  box-shadow: 0 30px 80px -40px rgba(46, 124, 246, 0.45);
}
.tier-flag {
  position: absolute;
  top: -13px; left: clamp(1.8rem, 4.5vw, 2.6rem);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}
.tier h3 { font-size: 1.4rem; }
.tier .price {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.8rem 0 0.1rem;
}
.tier .price small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0;
}
.tier .tier-tag { color: var(--accent-bright); font-size: 0.92rem; font-weight: 600; margin-bottom: 1.2rem; }
.tier ul { list-style: none; margin: 1.2rem 0 1.8rem; display: grid; gap: 0.7rem; }
.tier li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text-soft);
  font-size: 0.99rem;
  line-height: 1.55;
}
.tier li svg { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--accent-bright); }
.tier .btn { margin-top: auto; }
.tier .who {
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--text-faint);
}

/* ---------- Checklist ---------- */
.checklist { list-style: none; display: grid; gap: 0.7rem; padding-top: 1rem; }
.checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text-soft);
  line-height: 1.55;
}
.checklist li svg { width: 19px; height: 19px; flex: none; margin-top: 4px; color: var(--accent-bright); }
.card .who {
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--text-faint);
}

/* ---------- Plain-statement panel (not offered / expectations) ---------- */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.2rem);
}
.panel h3 { margin-bottom: 0.6rem; }
.panel p { color: var(--text-soft); }

/* ---------- Expectations ("How This Works") ---------- */
.expect-grid { display: grid; gap: 1.4rem; counter-reset: step; }
@media (min-width: 860px) { .expect-grid { grid-template-columns: repeat(2, 1fr); } }
.expect {
  counter-increment: step;
  background: linear-gradient(160deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.2rem);
}
.expect::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  margin-bottom: 0.9rem;
}
.expect h3 { font-size: 1.18rem; margin-bottom: 0.55rem; }
.expect p { color: var(--text-soft); font-size: 0.99rem; }

/* ---------- Quote / statement block ---------- */
.statement {
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 4.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  max-width: 56rem;
}
.statement .accent { color: var(--accent-bright); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2.6rem; align-items: start; }
@media (min-width: 880px) { .about-grid { grid-template-columns: 4fr 7fr; gap: 4rem; } }

.portrait {
  position: relative;
  max-width: 380px;
}
.portrait img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  width: 100%;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  z-index: -1;
}
.portrait-cap {
  margin-top: 1.6rem;
  font-family: var(--font-head);
}
.portrait-cap strong { display: block; font-size: 1.12rem; }
.portrait-cap span { color: var(--accent-bright); font-size: 0.9rem; font-weight: 600; }

.prose p + p { margin-top: 1.25rem; }
.prose p { color: var(--text-soft); }
.prose strong { color: var(--text); }

.cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}
.cred {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 5fr 6fr; gap: 4rem; } }

.contact-channel {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-channel:first-child { padding-top: 0; }
.contact-channel .card-icon { margin: 0; flex: none; }
.contact-channel strong { font-family: var(--font-head); display: block; font-size: 0.92rem; color: var(--text-faint); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-channel a, .contact-channel .channel-val {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.contact-channel a:hover { color: var(--accent-bright); }

form { display: grid; gap: 1.1rem; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-soft);
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  min-height: 48px;
  font: inherit;
  color: var(--text);
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-note { font-size: 0.88rem; color: var(--text-faint); }

/* ---------- Big CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(46, 124, 246, 0.18), transparent 70%),
    var(--bg-raised);
  border-block: 1px solid var(--line);
  text-align: center;
}
.cta-band .container { display: grid; justify-items: center; gap: 1.6rem; }
.cta-band h2 { max-width: 18ch; }
.cta-band p { color: var(--text-soft); max-width: 46ch; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2.8rem, 7vw, 4.5rem) 0 2rem;
  background: #05080f;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  margin-bottom: 2.8rem;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1.4fr; } }
.site-footer .brand img { height: 34px; }
.footer-tagline { color: var(--text-faint); margin-top: 0.9rem; font-size: 0.95rem; max-width: 32ch; }
.footer-col h4 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a {
  color: var(--text-soft);
  font-size: 0.97rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer-col a:hover { color: var(--accent-bright); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Reveal animations ----------
   Hidden state only applies when JS is confirmed running
   (main.js adds .js to <html>), so content is never
   invisible if the script fails to load. */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .site-nav a::after { transition: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(3.5rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { margin-bottom: 1.2rem; }

/* ---------- Utility ---------- */
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
