/* ============================================================
   megaAPI + Chatwoot — Landing
   Theme system: [data-theme="clean" | "vivid" | "terminal"]
   ============================================================ */

/* ---------- Tokens: CLEAN (default) ---------- */
:root,
:root[data-theme="clean"] {
  --bg:        #eef3f1;
  --bg-grad:   radial-gradient(1200px 600px at 80% -10%, #dff0ec 0%, transparent 55%),
               radial-gradient(900px 500px at -5% 0%, #e3ecff 0%, transparent 50%);
  --surface:   #ffffff;
  --surface-2: #f5f8f7;
  --surface-3: #eaf0ee;
  --border:    rgba(15, 30, 26, 0.10);
  --border-2:  rgba(15, 30, 26, 0.06);
  --text:      #0d1b17;
  --text-2:    #4d605a;
  --text-3:    #7c8c87;
  --green:     #0f9d6e;
  --blue:      #2f6bff;
  --accent:    #11a877;
  --grad:      linear-gradient(115deg, #11b07a 0%, #1c87c9 48%, #2f6bff 100%);
  --grad-soft: linear-gradient(115deg, #11b07a18, #2f6bff18);
  --on-accent: #ffffff;
  --code-bg:   #0d1b17;
  --code-text: #d6f5e8;
  --code-border: rgba(255,255,255,0.08);
  --shadow-sm: 0 1px 2px rgba(10,30,25,.06), 0 1px 1px rgba(10,30,25,.04);
  --shadow:    0 12px 32px -12px rgba(13,40,33,.22), 0 2px 6px rgba(13,40,33,.06);
  --shadow-lg: 0 30px 60px -24px rgba(13,40,33,.30);
  --ring:      0 0 0 4px rgba(47,107,255,.16);
  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --nav-bg:    rgba(255,255,255,.72);
}

/* ---------- Tokens: VIVID ---------- */
:root[data-theme="vivid"] {
  --bg:        #f3f6ff;
  --bg-grad:   radial-gradient(1100px 620px at 88% -8%, #c8f3e4 0%, transparent 52%),
               radial-gradient(1000px 560px at -8% 4%, #d4dcff 0%, transparent 50%),
               linear-gradient(180deg,#f6fbff,#eef2ff);
  --surface:   #ffffff;
  --surface-2: #f1f5ff;
  --surface-3: #e6edff;
  --border:    rgba(31, 50, 110, 0.12);
  --border-2:  rgba(31, 50, 110, 0.07);
  --text:      #10183a;
  --text-2:    #4a5680;
  --text-3:    #7e89b0;
  --green:     #0aa56f;
  --blue:      #3b5bff;
  --accent:    #1b8fb0;
  --grad:      linear-gradient(120deg, #06c281 0%, #14a5d6 42%, #4b63ff 100%);
  --grad-soft: linear-gradient(120deg, #06c28122, #4b63ff22);
  --on-accent: #ffffff;
  --code-bg:   #0a1230;
  --code-text: #cfe8ff;
  --code-border: rgba(255,255,255,0.10);
  --shadow-sm: 0 2px 6px rgba(40,60,160,.10);
  --shadow:    0 18px 44px -16px rgba(40,60,160,.32), 0 3px 10px rgba(40,60,160,.10);
  --shadow-lg: 0 40px 80px -28px rgba(40,60,160,.40);
  --ring:      0 0 0 4px rgba(75,99,255,.20);
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --nav-bg:    rgba(255,255,255,.66);
}

/* ---------- Tokens: TERMINAL ---------- */
:root[data-theme="terminal"] {
  --bg:        #0a0e14;
  --bg-grad:   radial-gradient(1100px 600px at 82% -10%, #0d2a22 0%, transparent 55%),
               radial-gradient(900px 520px at -6% 0%, #0b1d3a 0%, transparent 52%);
  --surface:   #111722;
  --surface-2: #0e141d;
  --surface-3: #161e2b;
  --border:    rgba(255,255,255,0.10);
  --border-2:  rgba(255,255,255,0.06);
  --text:      #e7eef6;
  --text-2:    #93a3b4;
  --text-3:    #6a7888;
  --green:     #36e08e;
  --blue:      #5aa6ff;
  --accent:    #36e08e;
  --grad:      linear-gradient(115deg, #2bd576 0%, #34b8c9 48%, #5aa6ff 100%);
  --grad-soft: linear-gradient(115deg, #2bd5761f, #5aa6ff1f);
  --on-accent: #04140d;
  --code-bg:   #05080d;
  --code-text: #8df0bf;
  --code-border: rgba(54,224,142,0.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow:    0 20px 48px -18px rgba(0,0,0,.66), 0 2px 8px rgba(0,0,0,.4);
  --shadow-lg: 0 40px 80px -28px rgba(0,0,0,.7);
  --ring:      0 0 0 4px rgba(90,166,255,.25);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --nav-bg:    rgba(10,14,20,.72);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
h1,h2,h3,h4 { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
::selection { background: color-mix(in oklab, var(--blue) 30%, transparent); }

/* ---------- Layout ---------- */
.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--tint { background: var(--surface-2); border-block: 1px solid var(--border-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12.5px/1 "Space Grotesk", sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  padding: 7px 12px; border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin: 18px 0 14px; }
.section-head p { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: 600 15px/1 "Space Grotesk", sans-serif;
  padding: 13px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn svg { width: 17px; height: 17px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: box-shadow .35s, background .35s, border-color .35s, backdrop-filter .35s;
}
.nav.scrolled {
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-logo { display: block; height: 30px; width: auto; flex-shrink: 0; }
.brand-logo--mega { height: 28px; }
.brand-logo--cw  { height: 28px; border-radius: 7px; }
.brand .plus { color: var(--text-3); font: 400 18px/1 "Space Grotesk", sans-serif; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 9px 13px; border-radius: 8px; font-size: 14.5px; color: var(--text-2); font-weight: 500; transition: background .2s, color .2s; }
.nav-links a:hover { background: var(--surface-3); color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-burger { display: none; }
@media (max-width: 980px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .nav-cta .btn--ghost { display: none; }
  .brand span:last-child { font-size: 15px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: flex; flex-direction: column; align-items: center; }
.hero-copy { max-width: 760px; width: 100%; text-align: center; }
.hero h1 { font-size: clamp(36px, 5.6vw, 62px); letter-spacing: -.03em; }
.hero .lead { font-size: clamp(17px, 1.9vw, 21px); color: var(--text-2); margin: 22px auto 28px; max-width: 52ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 13px/1 "Space Grotesk", sans-serif; color: var(--text-2);
  padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.pill svg { width: 14px; height: 14px; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.hero-actions .meta { font-size: 13.5px; color: var(--text-3); }


/* command box */
.cmd {
  margin-top: 26px;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--code-border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.cmd-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--code-border); }
.cmd-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.cmd-bar .dot.r { background: #ff5f57; } .cmd-bar .dot.y { background: #febc2e; } .cmd-bar .dot.g { background: #28c840; }
.cmd-bar .label { margin-left: 8px; font: 500 12px/1 "JetBrains Mono", monospace; color: rgba(255,255,255,.45); }
.cmd-bar .label::before { content: "bash"; }
.cmd-body { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px; }
.cmd-body .ps { color: var(--green); font: 600 13px/1.7 "JetBrains Mono", monospace; flex-shrink: 0; }
.cmd-body pre { font: 500 13px/1.7 "JetBrains Mono", monospace; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; }
.cmd-copy {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 "Space Grotesk", sans-serif; color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: 8px 11px; border-radius: 8px; transition: background .2s, color .2s; align-self: flex-start;
}
.cmd-copy:hover { background: rgba(255,255,255,.16); color: #fff; }
.cmd-copy.copied { background: var(--green); color: #04140d; border-color: transparent; }
.cmd-copy svg { width: 14px; height: 14px; }

/* hero visual */
.hero-visual { position: relative; }
.flow {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; position: relative;
}
.flow-title { font: 600 13px/1 "Space Grotesk", sans-serif; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.flow-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.node {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
}
.node .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.node .ic.wa { background: linear-gradient(135deg,#25d366,#0f9d6e); }
.node .ic.cw { background: linear-gradient(135deg,#3b6bff,#1f4fd6); }
.node .ic svg { width: 22px; height: 22px; }
.node b { font: 600 14px/1.2 "Space Grotesk", sans-serif; }
.node span { font-size: 12px; color: var(--text-3); }
.bridge-node {
  text-align: center; padding: 0 4px;
}
.bridge-node .badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 14px; border-radius: 12px; background: var(--grad); color: var(--on-accent);
  box-shadow: var(--shadow); font: 700 12px/1 "Space Grotesk", sans-serif;
}
.bridge-node .badge svg { width: 20px; height: 20px; }
.flow-wires { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 12px 0; }
.wire { height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px); opacity: .5; border-radius: 2px; }
.flow-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-2); }
.flow-foot .live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in oklab,var(--green) 60%,transparent);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

/* floating chips on hero visual */
.float-chip {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); padding: 10px 13px; display: flex; align-items: center; gap: 9px;
  font: 600 13px/1.1 "Space Grotesk", sans-serif;
}
.float-chip small { display: block; font: 500 11px/1.2 "IBM Plex Sans", sans-serif; color: var(--text-3); }
.float-chip .fi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.float-chip.a { top: -18px; right: -14px; animation: floaty 5s ease-in-out infinite; }
.float-chip.b { bottom: -20px; left: -16px; animation: floaty 6s ease-in-out infinite .5s; }
.float-chip.a .fi { background: linear-gradient(135deg,#25d366,#0f9d6e); }
.float-chip.b .fi { background: linear-gradient(135deg,#3b6bff,#1f4fd6); }
@keyframes floaty { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-9px);} }

/* logos strip */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--border-2); }
.trust span { font-size: 13px; color: var(--text-3); font-weight: 500; }
.trust .stack { display: flex; flex-wrap: wrap; gap: 10px; }
.trust .tag { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 "Space Grotesk", sans-serif; color: var(--text-2); padding: 7px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.trust .tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ---------- Problem ---------- */
.prob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,3vw,40px); align-items: start; }
@media (max-width: 860px){ .prob-grid { grid-template-columns: 1fr; } }
.prob-list { display: flex; flex-direction: column; gap: 12px; }
.prob-item {
  display: flex; gap: 13px; align-items: flex-start; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.prob-item .x { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in oklab, #e5484d 14%, transparent); color: #d6454a; }
.prob-item .x svg { width: 15px; height: 15px; }
.prob-item p { font-size: 15px; color: var(--text-2); }
.prob-item b { color: var(--text); font-weight: 600; }
.prob-after {
  background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--code-border); position: sticky; top: 84px;
}
.prob-after h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.prob-after .sub { color: rgba(255,255,255,.6); font-size: 14.5px; margin-bottom: 20px; }
.prob-after .one { display: flex; align-items: center; gap: 11px; padding: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; margin-bottom: 14px; }
.prob-after .one .num { width: 30px; height: 30px; border-radius: 8px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; font: 700 14px/1 "Space Grotesk", sans-serif; flex-shrink: 0; }
.prob-after .one b { color: #fff; font: 600 14.5px/1.2 "Space Grotesk", sans-serif; }
.prob-after .one small { color: rgba(255,255,255,.55); font-size: 12.5px; }
.prob-after .timer { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.prob-after .timer b { font: 700 38px/1 "Space Grotesk", sans-serif; color: var(--green); }
.prob-after .timer span { color: rgba(255,255,255,.6); font-size: 14px; }

/* ---------- How it works (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 940px){ .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px){ .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.step .n { font: 700 13px/1 "JetBrains Mono", monospace; color: var(--accent); letter-spacing: .05em; }
.step .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); margin: 14px 0 14px; }
.step .ic svg { width: 22px; height: 22px; }
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { font-size: 14px; color: var(--text-2); }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 940px){ .feat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .feat-grid { grid-template-columns: 1fr; } }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.feat::after { content:""; position:absolute; inset:0; border-radius:inherit; padding:1px; background:var(--grad); -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; opacity:0; transition:opacity .25s; pointer-events:none; }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat:hover::after { opacity:.9; }
.feat .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; color: var(--on-accent); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.feat .ic svg { width: 23px; height: 23px; }
.feat h3 { font-size: 18px; margin-bottom: 9px; }
.feat p { font-size: 14.5px; color: var(--text-2); }
.feat .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.feat .tags span { font: 600 11.5px/1 "JetBrains Mono", monospace; color: var(--text-3); padding: 6px 9px; border-radius: 7px; background: var(--surface-3); }

/* ---------- Value props ---------- */
.value-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media (max-width: 760px){ .value-grid { grid-template-columns: 1fr; } }
.value {
  display: flex; gap: 16px; align-items: flex-start; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.value .ck { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.value .ck svg { width: 19px; height: 19px; }
.value h3 { font-size: 17px; margin-bottom: 6px; }
.value p { font-size: 14.5px; color: var(--text-2); }

/* ---------- Tutorial ---------- */
.tut-cta { display: flex; justify-content: center; margin-top: 20px; }
.tut-cta .btn { display: inline-flex; align-items: center; gap: 9px; }
.tut-video {
  display: block; position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: clamp(28px, 4vw, 48px); box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9; width: 100%; max-width: 860px; margin-inline: auto;
  text-decoration: none;
}
.tut-video img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tut-video:hover img { transform: scale(1.03); }
.tut-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.28);
  transition: background .25s;
}
.tut-video:hover .tut-play { background: rgba(0,0,0,.18); }
.tut-play svg {
  width: 68px; height: 68px; color: #fff;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.5));
  transition: transform .25s;
}
.tut-video:hover .tut-play svg { transform: scale(1.1); }
@media (max-width: 600px) { .tut-play svg { width: 52px; height: 52px; } }

.tut-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px,4vw,52px); align-items: start; }
@media (max-width: 920px){ .tut-grid { grid-template-columns: 1fr; } }
.tut-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
.prereq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.prereq h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 14px; }
.prereq ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.prereq li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.prereq li svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.callout {
  background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 12px; align-items: flex-start;
}
.callout .ic { color: var(--accent); flex-shrink: 0; } .callout .ic svg { width: 20px; height: 20px; }
.callout b { font: 600 14px/1.3 "Space Grotesk", sans-serif; display: block; margin-bottom: 4px; }
.callout p { font-size: 13.5px; color: var(--text-2); }
.callout code { background: var(--surface); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; border: 1px solid var(--border); }

.tut-steps { display: flex; flex-direction: column; gap: 14px; counter-reset: tstep; }
.tstep {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 22px 22px 64px; box-shadow: var(--shadow-sm);
}
.tstep::before {
  counter-increment: tstep; content: counter(tstep);
  position: absolute; left: 18px; top: 22px; width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); color: var(--on-accent); display: grid; place-items: center;
  font: 700 15px/1 "Space Grotesk", sans-serif; box-shadow: var(--shadow-sm);
}
.tstep h4 { font-size: 17px; margin-bottom: 7px; }
.tstep p { font-size: 14.5px; color: var(--text-2); }
.tstep p + p { margin-top: 7px; }
.tstep code { background: var(--surface-3); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; color: var(--text); border: 1px solid var(--border-2); }
.tstep .hosts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.tstep .hosts span { font: 600 12px/1 "JetBrains Mono", monospace; padding: 7px 10px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-2); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin-inline: auto; }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.qa summary { list-style: none; cursor: pointer; padding: 19px 22px; display: flex; align-items: center; gap: 14px; font: 600 16.5px/1.35 "Space Grotesk", sans-serif; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .chev { margin-left: auto; flex-shrink: 0; transition: transform .25s; color: var(--text-3); }
.qa[open] summary .chev { transform: rotate(180deg); }
.qa summary .qmark { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; font: 700 13px/1 "JetBrains Mono", monospace; }
.qa .ans { padding: 0 22px 20px 62px; color: var(--text-2); font-size: 14.5px; }
.qa .ans code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* ---------- Booking form ---------- */
.book-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px,4vw,56px); align-items: stretch; }
@media (max-width: 880px){ .book-grid { grid-template-columns: 1fr; } }
.book-side h2 { font-size: clamp(28px,3.4vw,40px); margin-bottom: 16px; }
.book-side p { font-size: 16px; color: var(--text-2); margin-bottom: 24px; }
.book-points { display: flex; flex-direction: column; gap: 14px; }
.book-points li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.book-points svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.book-points b { color: var(--text); }
.book-contact { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 10px; }
.book-contact a { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.book-contact a svg { width: 18px; height: 18px; color: var(--accent); }

.book-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(24px,3vw,34px); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.book-card .topbar { position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.col-2 { grid-column: 1 / -1; }
.field label { font: 600 13px/1 "Space Grotesk", sans-serif; color: var(--text); }
.field label .req { color: #d6454a; }
.field input, .field select, .field textarea {
  font: 400 15px/1.4 "IBM Plex Sans", sans-serif; color: var(--text);
  padding: 12px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 92px; }
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237c8c87' d='M0 0h12L6 8z'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: var(--ring); background: var(--surface); }
.field input.invalid, .field select.invalid { border-color: #d6454a; box-shadow: 0 0 0 4px rgba(214,69,74,.14); }
.field .err { font-size: 12px; color: #d6454a; display: none; }
.field .err.show { display: block; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 "Space Grotesk", sans-serif; color: var(--text-2); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); transition: all .18s; }
.chip-radio:hover span { border-color: var(--accent); color: var(--text); }
.chip-radio input:checked + span { background: var(--grad); color: var(--on-accent); border-color: transparent; box-shadow: var(--shadow-sm); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.form-foot .note { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.form-foot .note svg { width: 15px; height: 15px; color: var(--accent); }
.form-success {
  display: none; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 30px 10px;
}
.form-success.show { display: flex; }
.form-success .big { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--shadow); animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
.form-success .big svg { width: 32px; height: 32px; }
.form-success h3 { font-size: 23px; }
.form-success p { color: var(--text-2); font-size: 15px; max-width: 38ch; }
.success-wa-notice {
  display: flex; align-items: flex-start; gap: 12px;
  background: color-mix(in oklab, #25d366 10%, transparent);
  border: 1px solid color-mix(in oklab, #25d366 30%, transparent);
  border-radius: var(--radius); padding: 14px 16px; max-width: 36ch; text-align: left;
}
.success-wa-notice svg { flex-shrink: 0; color: #25d366; margin-top: 1px; }
.success-wa-notice p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0; max-width: none; }
.success-wa-notice strong { color: var(--text); }
@keyframes pop { 0%{transform:scale(.4);opacity:0;} 100%{transform:scale(1);opacity:1;} }

/* ---------- CTA ---------- */
.cta-band {
  background: var(--code-bg); border-radius: var(--radius-lg); padding: clamp(36px,5vw,64px);
  text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--code-border);
}
.cta-band::before { content:""; position:absolute; inset:-2px; background: var(--bg-grad); opacity:.16; pointer-events:none; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(28px,4vw,46px); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,.7); font-size: 17px; max-width: 52ch; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn--ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Footer ---------- */
.foot { padding: 52px 0 40px; border-top: 1px solid var(--border-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px){ .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
.foot-brand p { font-size: 14px; color: var(--text-2); margin: 14px 0 16px; max-width: 34ch; }
.foot h5 { font: 600 12.5px/1 "Space Grotesk", sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 14px; }
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot ul a { font-size: 14px; color: var(--text-2); transition: color .2s; }
.foot ul a:hover { color: var(--accent); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border-2); font-size: 13px; color: var(--text-3); flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.shown { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal[data-d="1"]{ transition-delay:.06s; } .reveal[data-d="2"]{ transition-delay:.12s; }
.reveal[data-d="3"]{ transition-delay:.18s; } .reveal[data-d="4"]{ transition-delay:.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip, .flow-foot .live { animation: none !important; }
  html { scroll-behavior: auto; }
}
