/* =====================================================================
   Funde Ka Funda — Instrumentation in Desalination Plants
   Shared stylesheet for index.html, thank-you.html and legal pages
   ===================================================================== */

/* ---------- 1. Design tokens (taken from the ebook cover) ---------- */
:root {
  --navy-950: #050d24;
  --navy-900: #081635;
  --navy-800: #0d2052;
  --navy-700: #13306c;
  --navy-600: #1c3f86;
  --royal: #2563eb;
  --royal-400: #60a5fa;
  --cyan: #5eead4;
  --gold: #f5b800;
  --gold-300: #ffd34d;
  --gold-700: #c99600;
  --green: #16a34a;
  --green-400: #4ade80;
  --red: #e11d48;

  --ink: #0f1b3d;
  --ink-soft: #3b4766;
  --muted: #64708c;
  --line: #e3e8f2;
  --bg-light: #f4f7fc;
  --white: #ffffff;
  --on-dark: #e8eefc;
  --on-dark-soft: #aebbdc;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(8, 22, 53, .08);
  --shadow: 0 12px 32px rgba(8, 22, 53, .12);
  --shadow-lg: 0 30px 60px rgba(3, 10, 30, .35);

  --container: 1180px;
  --nav-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--royal); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--gold); color: var(--navy-900); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { left: 8px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--light { background: var(--bg-light); }
.section--dark { background: radial-gradient(1200px 600px at 80% -10%, #1a3a86 0%, transparent 60%), linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 14px;
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--gold); }
.section-head { max-width: 820px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; text-transform: uppercase; }
.section-head p { color: var(--ink-soft); font-size: 18px; }
.section--dark .section-head p { color: var(--on-dark-soft); }
.hl { color: var(--gold); }
.hl-blue { color: var(--royal); }

/* Engineering grid texture for dark sections */
.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(94, 234, 212, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

/* ---------- 3. Buttons ---------- */
.btn {
  --bg: var(--gold); --fg: var(--navy-900);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 28px;
  border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 800 16px/1.1 var(--font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(245, 184, 0, .32), inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--gold-300); box-shadow: 0 14px 28px rgba(245, 184, 0, .4), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--lg { min-height: 62px; padding: 18px 40px; font-size: 18px; }
.btn--block { width: 100%; }
.btn--sm { min-height: 42px; padding: 10px 20px; font-size: 14px; }
.btn--green { --bg: var(--green); --fg: #fff; box-shadow: 0 10px 26px rgba(22, 163, 74, .35), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn--green:hover { background: #15b050; box-shadow: 0 14px 30px rgba(22, 163, 74, .45), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn--youtube { --bg: #e62117; --fg: #fff; box-shadow: 0 8px 20px rgba(230, 33, 23, .3); }
.btn--youtube:hover { background: #ff2d22; }
.btn--instagram { --bg: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); color: #fff; box-shadow: 0 8px 20px rgba(220, 39, 67, .3); }
.btn--instagram:hover { background: linear-gradient(45deg, #f6a54d, #e33b56 50%, #c92a97); }
.btn--ghost { --bg: transparent; --fg: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.cta-note { margin-top: 14px; font-size: 14px; color: var(--on-dark-soft); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.cta-note span { display: inline-flex; align-items: center; gap: 6px; }
.cta-note svg { width: 16px; height: 16px; color: var(--cyan); }
.cta-row { margin-top: 44px; text-align: center; }
.cta-row .cta-note { justify-content: center; color: var(--muted); }
.section--dark .cta-row .cta-note { color: var(--on-dark-soft); }

/* ---------- 4. Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 22, 53, .86);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled { background: rgba(5, 13, 36, .96); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-weight: 900; letter-spacing: .06em; font-size: 16px; white-space: nowrap; }
.brand__tag { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.nav__links { display: flex; gap: 4px; margin-left: auto; list-style: none; }
.nav__links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--on-dark); text-decoration: none; font-size: 15px; font-weight: 600; transition: background .15s, color .15s; }
.nav__links a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 1060px) {
  .nav__links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; padding: 10px 20px 18px; background: var(--navy-950); border-bottom: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 20px 30px rgba(0, 0, 0, .35); }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 13px 12px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav__toggle { display: inline-flex; }
  .nav__cta { margin-left: 0; }
}
@media (max-width: 560px) {
  :root { --nav-h: 62px; }
  .brand img { width: 34px; height: 34px; }
  .brand__name { font-size: 14px; }
  .brand__tag { font-size: 9.5px; letter-spacing: .1em; }
  .nav__cta { display: none; }
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 85% 20%, rgba(37, 99, 235, .45), transparent 65%),
    radial-gradient(700px 500px at 0% 100%, rgba(94, 234, 212, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--on-dark);
  padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 900; color: var(--white); text-transform: uppercase; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 .hl { display: block; }
.hero__sub { font-size: clamp(19px, 2vw, 23px); font-weight: 600; color: var(--cyan); line-height: 1.4; margin-bottom: 20px; }
.hero__lead { color: var(--on-dark-soft); font-size: 17.5px; max-width: 620px; }
.checks { list-style: none; display: grid; gap: 12px; margin: 26px 0 32px; }
.checks li { position: relative; padding-left: 36px; font-weight: 500; color: var(--on-dark); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(94, 234, 212, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235EEAD4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/15px no-repeat;
  box-shadow: inset 0 0 0 1.5px rgba(94, 234, 212, .5);
}
.checks--light li { color: var(--ink); }
.checks--light li::before { background-color: rgba(22, 163, 74, .1); box-shadow: inset 0 0 0 1.5px rgba(22, 163, 74, .45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

.hero__visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 640px; }
.hero__glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(94, 234, 212, .22), rgba(37, 99, 235, .12) 45%, transparent 70%); filter: blur(10px); }

.chip-float {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(10, 26, 66, .82); color: var(--white);
  border: 1px solid rgba(94, 234, 212, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  animation: bob 6s ease-in-out infinite;
}
.chip-float i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(245, 184, 0, .2); }
.chip-float:nth-of-type(1) { top: 6%; left: -2%; }
.chip-float:nth-of-type(2) { top: 18%; right: -4%; animation-delay: -1.2s; }
.chip-float:nth-of-type(3) { top: 52%; left: -8%; animation-delay: -2.4s; }
.chip-float:nth-of-type(4) { bottom: 20%; right: -6%; animation-delay: -3.6s; }
.chip-float:nth-of-type(5) { bottom: 3%; left: 6%; animation-delay: -4.8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- 6. 3D book mockup (uses the original cover image) ---------- */
.book-wrap { position: relative; z-index: 2; perspective: 1800px; }
.book {
  --w: 340px; --t: 28px;
  position: relative;
  width: var(--w); height: calc(var(--w) * 1.4138);
  transform-style: preserve-3d;
  transform: rotateY(-26deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.book-wrap:hover .book { transform: rotateY(-14deg) rotateX(2deg); }
.book__front {
  position: absolute; inset: 0;
  transform: translateZ(calc(var(--t) / 2));
  border-radius: 2px 6px 6px 2px; overflow: hidden;
  box-shadow: 6px 6px 18px rgba(0, 0, 0, .25);
}
.book__front img { width: 100%; height: 100%; object-fit: cover; }
.book__front::after { /* binding crease + gloss */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .18) 0%, rgba(0, 0, 0, .35) 1.6%, rgba(255, 255, 255, .12) 3.2%, transparent 6%),
    linear-gradient(115deg, rgba(255, 255, 255, .14) 0%, transparent 35%, transparent 70%, rgba(255, 255, 255, .06) 100%);
}
.book__pages {
  position: absolute; top: 4px; left: 0;
  width: var(--t); height: calc(100% - 8px);
  transform: translateX(calc(var(--w) - var(--t) / 2 - 4px)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #fff 0 2px, #e9edf5 2px 3px);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .15);
}
.book__back {
  position: absolute; inset: 0;
  transform: translateZ(calc(var(--t) / -2));
  background: var(--navy-900);
  border-radius: 2px 6px 6px 2px;
  box-shadow: -18px 22px 60px rgba(0, 0, 0, .55);
}
.book__spine {
  position: absolute; top: 0; left: 0;
  width: var(--t); height: 100%;
  transform: translateX(calc(var(--t) / -2)) rotateY(-90deg);
  background: linear-gradient(90deg, #06102b, #0d2052 50%, #06102b);
}
.book--hero { --w: 400px; --t: 30px; }
.book--sm { --w: 240px; --t: 20px; }
.book--md { --w: 300px; --t: 24px; }
.book-shadow { position: absolute; left: 50%; bottom: -36px; width: 80%; height: 40px; transform: translateX(-46%); background: radial-gradient(ellipse at center, rgba(0, 0, 0, .45), transparent 70%); filter: blur(6px); z-index: 1; }

/* ---------- 7. Problem section ---------- */
.problem-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 1040px; margin: 0 auto; }
.problem {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.problem:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d6f2; }
.problem__q { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff4d1; color: var(--gold-700); font-weight: 900; font-size: 20px; }
.problem p { margin: 0; font-weight: 500; color: var(--ink); }
.problem strong { color: var(--navy-700); }
.callout {
  max-width: 900px; margin: 44px auto 0; text-align: center;
  padding: 28px 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: var(--white);
  font-size: clamp(18px, 2.1vw, 21px); font-weight: 600; line-height: 1.5;
  box-shadow: var(--shadow);
}
.callout strong { color: var(--gold); }

/* ---------- 8. Introducing the ebook ---------- */
.intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.intro__visual { display: flex; justify-content: center; padding: 30px 0 50px; position: relative; }
.intro__visual::before { content: ""; position: absolute; inset: 6% 8%; border-radius: 50%; background: radial-gradient(circle, rgba(37, 99, 235, .16), transparent 70%); }
.intro__text h2 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 900; text-transform: uppercase; }
.intro__text p { color: var(--ink-soft); font-size: 18px; }
.flow {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.flow span { padding: 6px 12px; border-radius: 999px; background: #e8efff; color: var(--navy-700); border: 1px solid #cfdcfb; }
.flow b { color: var(--royal-400); font-weight: 900; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.feature {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.feature::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--royal), var(--cyan)); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__num { font-size: 13px; font-weight: 900; color: var(--royal); letter-spacing: .14em; }
.feature h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; margin: 8px 0 10px; color: var(--navy-800); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.icon-badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-800), var(--royal)); color: var(--cyan); margin-bottom: 16px; box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
.icon-badge svg { width: 26px; height: 26px; }

/* ---------- 9. Chapters accordion ---------- */
.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.chapters__col { display: grid; gap: 14px; }
.chapter {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  transition: background .2s ease, border-color .2s ease;
}
.chapter:hover { border-color: rgba(94, 234, 212, .35); }
.chapter[open] { background: rgba(255, 255, 255, .07); border-color: rgba(94, 234, 212, .45); }
.chapter summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: center;
  padding: 16px 18px;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter__no { font-size: 13px; font-weight: 900; color: var(--gold); letter-spacing: .08em; min-width: 30px; }
.chapter__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(94, 234, 212, .1); color: var(--cyan); }
.chapter__icon svg { width: 22px; height: 22px; }
.chapter__title { font-weight: 700; font-size: 17px; color: var(--white); line-height: 1.3; }
.chapter__chev { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--on-dark); transition: transform .25s ease, background .2s; }
.chapter__chev svg { width: 16px; height: 16px; }
.chapter[open] .chapter__chev { transform: rotate(180deg); background: var(--gold); color: var(--navy-900); }
.chapter__body { padding: 0 20px 20px 20px; color: var(--on-dark-soft); font-size: 15.5px; }
.chapter__body p { margin-bottom: 10px; }
.chapter__body ul { list-style: none; display: grid; gap: 6px; }
.chapter__body li { position: relative; padding-left: 20px; color: var(--on-dark); }
.chapter__body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); transform: rotate(45deg); }
.chapters-tools { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.link-btn { background: none; border: 1px solid rgba(255, 255, 255, .25); color: var(--on-dark); padding: 8px 16px; border-radius: 999px; font: 600 14px var(--font); cursor: pointer; }
.link-btn:hover { border-color: var(--cyan); color: var(--white); }
.extras { margin-top: 18px; text-align: center; color: var(--on-dark-soft); font-size: 15px; }
.extras strong { color: var(--white); }

/* ---------- 10. Special features ---------- */
.specials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.special {
  padding: 24px; border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.special:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.special h3 { font-size: 16px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.special p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.special .icon-badge { width: 46px; height: 46px; margin-bottom: 14px; }
.special--concept .icon-badge { background: linear-gradient(135deg, #b88900, var(--gold)); color: #fff; }
.special--tip .icon-badge { background: linear-gradient(135deg, #0f7a3a, #22c55e); color: #fff; }
.special--watch .icon-badge { background: linear-gradient(135deg, #b4123a, #f43f5e); color: #fff; }
.special--concept h3 { color: #8a6400; }
.special--tip h3 { color: #11743a; }
.special--watch h3 { color: #c0153f; }
.special--wide { grid-column: span 1; }
.snippets { margin-top: 48px; }
.snippets__label { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.snippets__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.snippet { margin: 0; background: var(--white); border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
.snippet:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.snippet img { border-radius: 8px; width: 100%; }
.snippet figcaption { font-size: 13px; color: var(--muted); padding: 10px 4px 2px; }

/* ---------- 11. Audience ---------- */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.persona {
  position: relative; padding: 30px 24px 26px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .2s ease, border-color .2s ease;
}
.persona:hover { transform: translateY(-4px); border-color: rgba(245, 184, 0, .5); }
.persona .icon-badge { background: rgba(245, 184, 0, .14); color: var(--gold); box-shadow: none; border: 1px solid rgba(245, 184, 0, .35); }
.persona h3 { font-size: 17px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: var(--white); }
.persona p { margin: 0; color: var(--on-dark-soft); font-size: 15.5px; }

/* ---------- 12. Comparison ---------- */
.compare { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; max-width: 1040px; margin: 0 auto; align-items: stretch; }
.compare__col { border-radius: var(--radius-lg); padding: 32px 30px; }
.compare__col h3 { font-size: 15px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 20px; }
.compare__col ul { list-style: none; display: grid; gap: 14px; }
.compare__col li { position: relative; padding-left: 34px; }
.compare__col--plain { background: var(--white); border: 1px dashed #c8d1e3; color: var(--ink-soft); }
.compare__col--plain h3 { color: var(--muted); }
.compare__col--plain li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b7c2d8; }
.compare__col--plain li::after { content: ""; position: absolute; left: 7px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: #b7c2d8; }
.compare__col--book { background: linear-gradient(160deg, var(--navy-800), var(--navy-700)); color: var(--on-dark); box-shadow: var(--shadow-lg); border: 1px solid rgba(94, 234, 212, .3); position: relative; }
.compare__col--book h3 { color: var(--gold); }
.compare__col--book li { font-weight: 500; }
.compare__col--book li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D2052' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.compare__note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }

/* ---------- 13. Author ---------- */
.author { display: grid; grid-template-columns: 360px 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; max-width: 1080px; margin: 0 auto; }
.author__photo { position: relative; }
.author__photo img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 5/6; object-fit: cover; box-shadow: var(--shadow-lg); border: 4px solid rgba(255, 255, 255, .08); }
.author__photo::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 2px solid var(--gold); border-radius: var(--radius-lg); z-index: -1; opacity: .6; }
.author__badge { position: absolute; right: -14px; bottom: 22px; background: var(--gold); color: var(--navy-900); font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.author h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; text-transform: uppercase; }
.author .author__name { font-size: 26px; font-weight: 800; color: var(--white); margin: 6px 0 2px; }
.author .author__role { color: var(--cyan); font-weight: 600; margin-bottom: 18px; }
.author p { color: var(--on-dark-soft); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; list-style: none; }
.topics li { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-size: 14px; font-weight: 600; color: var(--on-dark); }
.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: var(--white); text-decoration: none; font-weight: 700; font-size: 15px; transition: background .2s, border-color .2s; }
.social-link:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); }
.social-link svg { width: 20px; height: 20px; }
.social-link--yt svg { color: #ff3b30; }
.social-link--ig svg { color: #f472b6; }

/* ---------- 14. Preview gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery__item {
  position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: var(--white); cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; text-align: left;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
  font: inherit; color: inherit;
}
.gallery__item:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(8, 22, 53, .18); }
.gallery__img { display: block; aspect-ratio: 1 / 1.1; overflow: hidden; background: #eef2f9; }
.gallery__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.gallery__item:hover .gallery__img img { transform: scale(1.04); }
.gallery__cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.gallery__cap strong { font-size: 15px; color: var(--navy-800); display: block; }
.gallery__cap small { color: var(--muted); font-size: 13px; }
.gallery__zoom { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #eef3ff; color: var(--royal); display: grid; place-items: center; }
.gallery__zoom svg { width: 16px; height: 16px; }

.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(3, 9, 26, .92); padding: 56px 16px 24px; }
.lightbox.is-open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__figure { margin: 0; max-width: min(920px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); background: #fff; }
.lightbox__cap { color: var(--on-dark); margin-top: 12px; font-size: 15px; text-align: center; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .15s; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

/* ---------- 15. Pricing ---------- */
.pricing { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 60px); align-items: center; max-width: 1080px; margin: 0 auto; }
.pricing__visual { display: flex; justify-content: center; padding: 30px 0 50px; position: relative; }
.price-card {
  position: relative; background: var(--white); color: var(--ink);
  border-radius: 26px; padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .35);
  border: 2px solid var(--gold);
}
.price-card__ribbon { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy-900); font-weight: 900; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 18px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 18px rgba(245, 184, 0, .4); }
.price-card h3 { font-size: clamp(22px, 2.6vw, 27px); font-weight: 900; color: var(--navy-800); margin: 8px 0 6px; }
.price-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.price-meta b { color: var(--ink); font-weight: 700; }
.price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.price__now { font-size: clamp(40px, 5vw, 54px); font-weight: 900; color: var(--navy-800); letter-spacing: -.02em; line-height: 1; }
.price__was { font-size: 22px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.price__label { font-size: 14px; color: var(--muted); font-weight: 600; }
.price__pending { font-size: 18px !important; color: var(--red) !important; letter-spacing: 0 !important; }
.price-card .checks { margin: 0 0 26px; gap: 10px; }
.price-card .checks li { font-size: 16px; }
.secure { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.secure div { display: flex; gap: 10px; align-items: flex-start; }
.secure svg { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 2px; }

/* ---------- 16. FAQ ---------- */
.faq { max-width: 880px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: #b9caf1; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 22px; font-weight: 700; font-size: 17px; color: var(--navy-800); }
.faq summary::-webkit-details-marker { display: none; }
.faq__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #eef3ff; color: var(--royal); display: grid; place-items: center; transition: transform .25s ease, background .2s, color .2s; }
.faq__icon svg { width: 14px; height: 14px; }
.faq details[open] .faq__icon { transform: rotate(45deg); background: var(--royal); color: #fff; }
.faq__a { padding: 0 22px 20px; color: var(--ink-soft); }
.faq__a p:last-child { margin-bottom: 0; }

/* details open animation (progressive enhancement) */
.acc-body { animation: accIn .25s ease; }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 17. Final CTA ---------- */
.final { text-align: center; overflow: hidden; }
.final h2 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 900; text-transform: uppercase; max-width: 900px; margin-inline: auto; }
.final p { color: var(--on-dark-soft); font-size: 19px; max-width: 680px; margin: 0 auto 30px; }
.final .cta-note { justify-content: center; }
.final__inner { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; text-align: left; max-width: 1000px; margin: 0 auto; }
.final__inner h2, .final__inner p { margin-left: 0; }
.final__inner .cta-note { justify-content: flex-start; }

/* ---------- 18. Footer ---------- */
.footer { background: var(--navy-950); color: var(--on-dark-soft); padding: 56px 0 32px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer h4 { color: var(--white); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { color: var(--gold); text-decoration: underline; }
.footer__brand p { margin: 14px 0 0; max-width: 360px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 24px; font-size: 14px; }
.footer__disclaimer { font-size: 13px; color: #7f8db0; max-width: 760px; }

/* ---------- 19. Sticky mobile purchase bar ---------- */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(5, 13, 36, .97); border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
  transform: translateY(110%); transition: transform .3s ease;
}
.sticky-buy.is-visible { transform: translateY(0); }
.sticky-buy__thumb { width: 38px; height: 54px; object-fit: cover; border-radius: 3px; flex: none; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.sticky-buy__info { min-width: 0; flex: 1; line-height: 1.25; }
.sticky-buy__title { color: var(--white); font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy__price { color: var(--gold); font-weight: 800; font-size: 14px; }
.sticky-buy .btn { min-height: 48px; padding: 12px 18px; font-size: 14px; flex: none; }

/* ---------- 20. Toast (shown if a config value is still a placeholder) ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 400; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: min(92vw, 520px); background: #fff; color: var(--ink); border-left: 5px solid var(--red); border-radius: 10px; padding: 14px 18px; font-size: 15px; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 21. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 22. Thank-you page ---------- */
.ty-hero { min-height: 100vh; padding: 36px 0 72px; }
.ty-top { display: flex; justify-content: center; margin-bottom: 40px; }
.ty-success { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.ty-check { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #34d870, var(--green)); color: #fff; box-shadow: 0 0 0 10px rgba(22, 163, 74, .18), 0 0 0 22px rgba(22, 163, 74, .08), 0 20px 40px rgba(0, 0, 0, .3); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ty-check svg { width: 50px; height: 50px; }
.ty-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .35s ease forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ty-success h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 900; color: var(--white); text-transform: uppercase; }
.ty-success p { font-size: 19px; color: var(--on-dark-soft); margin: 0; }
.ty-success p strong { color: var(--white); }

.dl-card { position: relative; max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; background: var(--white); color: var(--ink); border-radius: 28px; padding: clamp(28px, 4.5vw, 52px); box-shadow: 0 40px 80px rgba(0, 0, 0, .4); }
.dl-card__book { padding: 10px 20px 36px 10px; display: flex; justify-content: center; position: relative; }
.dl-card h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; text-transform: uppercase; color: var(--navy-800); margin-bottom: 4px; }
.dl-card__author { font-weight: 800; letter-spacing: .14em; color: var(--royal); font-size: 14px; margin-bottom: 18px; }
.dl-card__ready { font-size: 22px; font-weight: 800; color: var(--green); margin-bottom: 4px; }
.dl-card p { color: var(--ink-soft); }
.dl-card .btn { margin-top: 8px; }
.dl-card__file { font-size: 13px; color: var(--muted); margin-top: 12px; word-break: break-all; }

.ty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 960px; margin: 28px auto 0; }
.ty-panel { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-lg); padding: 30px; }
.ty-panel h3 { font-size: 16px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.ty-panel p { color: var(--on-dark-soft); }
.ty-panel .checks { margin: 0; }
.ty-panel .btn { width: 100%; margin-top: 10px; }
.ty-help { max-width: 960px; margin: 24px auto 0; background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .22); border-radius: var(--radius-lg); padding: 28px 30px; }
.ty-help h3 { font-size: 16px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.ty-help ol { margin: 0 0 14px; padding-left: 22px; color: var(--on-dark); display: grid; gap: 6px; }
.ty-help p { color: var(--on-dark-soft); margin: 0; }
.ty-help a { color: var(--gold); }

/* ---------- 23. Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 900; color: var(--navy-800); }
.legal h2 { font-size: 21px; margin-top: 32px; color: var(--navy-800); }
.legal .placeholder { background: #fff8e1; border: 1px dashed var(--gold-700); padding: 14px 18px; border-radius: 10px; color: #6b5200; font-size: 15px; }
.legal-header { background: var(--navy-900); }

/* ---------- 24. Responsive ---------- */
@media (max-width: 1100px) {
  .features, .specials, .audience { grid-template-columns: repeat(2, 1fr); }
  .chip-float:nth-of-type(3) { left: -2%; }
  .chip-float:nth-of-type(4) { right: -2%; }
  .book--hero { --w: 340px; --t: 28px; }
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__text { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero .checks { text-align: left; max-width: 560px; margin-inline: auto; }
  .hero .cta-note { justify-content: center; }
  .hero__visual { min-height: 0; padding: 30px 0 60px; flex-direction: column; }
  .book--hero { --w: 290px; --t: 24px; }
  .chip-cloud { position: static; }
  .intro, .pricing, .author, .final__inner { grid-template-columns: 1fr; }
  .intro__text, .final__inner { text-align: center; }
  .flow { justify-content: center; }
  .final__inner .cta-note { justify-content: center; }
  .author { text-align: center; }
  .author__photo { width: 100%; max-width: 320px; margin: 0 auto; }
  .topics, .social-row { justify-content: center; }
  .chapters { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .dl-card { grid-template-columns: 1fr; text-align: center; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .sticky-buy { display: flex; }
  body.has-sticky { padding-bottom: 76px; }
  .problem-list { grid-template-columns: 1fr; }
  .snippets__grid { grid-template-columns: 1fr; }
  .ty-grid { grid-template-columns: 1fr; }
  .toast { bottom: 96px; }
  /* Floating labels become a tidy chip row under the book on small screens */
  .hero__visual .chip-float { position: static; animation: none; font-size: 13px; padding: 7px 12px; }
  .chip-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; max-width: 460px; }
}
@media (min-width: 769px) { .chip-cloud { display: contents; } }
@media (max-width: 600px) {
  .features, .specials, .audience, .gallery { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; padding: 18px 22px; font-size: 17px; }
  .book { transform: rotateY(-20deg) rotateX(3deg); }
  .book--hero { --w: 240px; --t: 20px; }
  .book--md { --w: 230px; --t: 20px; }
  .book--sm { --w: 200px; --t: 16px; }
  .chapter summary { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px; }
  .chapter__icon { display: none; }
  .chapter__title { font-size: 16px; }
  .chapter__body { padding: 0 16px 18px; }
  .price-card__ribbon { font-size: 11px; }
  .footer__grid { grid-template-columns: 1fr; }
  .author__badge { right: 8px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
  .lightbox { padding-bottom: 76px; }
  .lightbox__img { max-height: calc(100dvh - 170px); }
}
@media (max-width: 380px) {
  .book--hero { --w: 210px; --t: 18px; }
  .brand__tag { display: none; }
}

/* ---------- 25. Rendered 3D mockup (hero) + author cut-out photo ---------- */
.hero-mockup { position: relative; z-index: 2; width: min(520px, 94%); height: auto; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .5)); transition: transform .5s ease; }
.hero__visual:hover .hero-mockup { transform: translateY(-6px) rotate(-.6deg); }
.author__photo img { object-fit: contain; object-position: bottom center; background: radial-gradient(circle at 50% 40%, rgba(94, 234, 212, .28), rgba(37, 99, 235, .25) 45%, rgba(13, 32, 82, .9) 75%), linear-gradient(180deg, #16306e, #0b1a45); padding-top: 18px; }
@media (max-width: 960px) { .hero-mockup { width: min(340px, 78%); } }
@media (max-width: 600px) { .hero-mockup { width: min(280px, 80%); } }
