/* ==========================================================================
   Kalre IT — Design System
   Inspired by kalre.com: Montserrat headings, Nunito Sans body,
   neon magenta/cyan on deep-purple/black, grid hero.
   ========================================================================== */

:root {
  --magenta: #2e7bff;
  --magenta-700: #1b4fd0;
  --cyan: #05e3d3;
  --cyan-200: #96f6ef;
  --purple: #0a1f44;
  --purple-800: #10234a;
  --ink: #060b1c;
  --ink-2: #0b1530;
  --slate: #555d66;
  --line: rgba(150, 246, 239, 0.14);
  --white: #ffffff;
  --muted: #9aa6c4;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --grad: linear-gradient(100deg, var(--magenta) 0%, #4f46e5 55%, var(--cyan) 130%);
  --grad-text: linear-gradient(95deg, var(--cyan-200), var(--magenta));
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 0 1px rgba(46, 123, 255, 0.35), 0 18px 60px -20px rgba(46, 123, 255, 0.45);
  --font-head: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: #ece8f6;
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 800; line-height: 1.12; color: var(--white); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { margin-bottom: 1rem; color: #d9d3ea; }
a { color: var(--cyan-200); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--magenta); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1rem 1.2rem; }
li { margin-bottom: .45rem; color: #d9d3ea; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.text-center { text-align: center; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .76rem; color: var(--cyan); margin-bottom: .8rem; display: inline-block; }
.lead { font-size: 1.18rem; color: #cfc8e4; max-width: 720px; }
.muted { color: var(--muted); }

/* ---- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 700; font-size: .98rem; padding: 14px 26px; border-radius: 999px; cursor: pointer; border: 0; transition: transform .15s ease, box-shadow .2s ease, background .2s; text-align: center; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 0 0 1px rgba(5,227,211,.5), 0 22px 60px -18px rgba(46,123,255,.6); }
.btn--ghost { background: rgba(255,255,255,.05); color: #fff; border: 1px solid var(--card-border); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan-200); transform: translateY(-2px); }
.btn--lg { padding: 17px 34px; font-size: 1.05rem; }

/* ---- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(11,1,24,.78); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: -.03em; display: flex; align-items: center; gap: .15rem; }
.brand:hover { color: #fff; }
.brand .dot { color: var(--magenta); }
.brand small { display: block; font-size: .6rem; letter-spacing: .22em; color: var(--cyan); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; }
.nav-links a { color: #e7e2f3; font-family: var(--font-head); font-weight: 600; font-size: .93rem; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(46,123,255,.14); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone { font-family: var(--font-head); font-weight: 800; color: #fff; white-space: nowrap; }
.nav-phone:hover { color: var(--cyan-200); }
.nav-toggle { display: none; background: none; border: 1px solid var(--card-border); border-radius: 8px; width: 44px; height: 40px; color: #fff; font-size: 1.3rem; cursor: pointer; }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(150,246,239,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(46,123,255,.06) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%); }
.hero::after { content: ""; position: absolute; top: -160px; right: -120px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(79,70,229,.35), transparent 62%); filter: blur(30px); z-index: 0; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 1.2rem 0 1.8rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; }
.hero-trust strong { color: #fff; }
.stars { color: #ffc93c; letter-spacing: 2px; }

.hero-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.hero-card h3 { margin-bottom: .3rem; }
.hero-card .field { margin-bottom: 12px; }
.hero-card label { font-size: .8rem; font-family: var(--font-head); font-weight: 600; color: var(--cyan-200); display: block; margin-bottom: 5px; }
.hero-card input, .hero-card select, .hero-card textarea { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: rgba(0,0,0,.35); color: #fff; font-family: var(--font-body); font-size: .95rem; }
.hero-card input:focus, .hero-card select:focus, .hero-card textarea:focus { outline: none; border-color: var(--cyan); }

/* ---- Cards / grids ------------------------------------------------------ */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s; height: 100%; }
.card:hover { transform: translateY(-4px); border-color: rgba(46,123,255,.5); box-shadow: var(--shadow); }
.card .ico { font-size: 1.9rem; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, rgba(46,123,255,.16), rgba(5,227,211,.12)); border: 1px solid var(--card-border); margin-bottom: 16px; }
.card h3 { margin-bottom: .4rem; }
.card h3 a { color: #fff; }
.card h3 a:hover { color: var(--magenta); }
.card p { font-size: .96rem; margin-bottom: .8rem; }
.card .more { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }

.feature-list { list-style: none; margin: 0; }
.feature-list li { position: relative; padding-left: 30px; margin-bottom: .7rem; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--cyan); font-weight: 800; }

/* ---- Stat band ---------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 22px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: 2.3rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { position: relative; border-radius: 22px; padding: 56px 40px; text-align: center; overflow: hidden; background: linear-gradient(120deg, var(--purple-800), var(--purple)); border: 1px solid rgba(46,123,255,.3); }
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(150,246,239,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(46,123,255,.07) 1px, transparent 1px); background-size: 38px 38px; mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000, transparent); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: .5rem; }
.cta-band p { max-width: 620px; margin: 0 auto 1.4rem; color: #e8e2f6; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Article / prose ---------------------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; margin-bottom: .4em; }
.prose p, .prose li { font-size: 1.05rem; }
.prose ul { margin-left: 1.3rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--magenta); padding: 6px 0 6px 20px; margin: 1.4em 0; color: #efeaf8; font-style: italic; }

/* ---- Breadcrumbs -------------------------------------------------------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--cyan-200); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ---- Page hero (interior) ----------------------------------------------- */
.page-hero { position: relative; padding: 56px 0 44px; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(150,246,239,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(46,123,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 80% at 30% 20%, #000, transparent); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 880px; }
.page-hero .lead { margin-top: 1rem; }

/* ---- FAQ accordion ------------------------------------------------------ */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--card-border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--card); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; padding: 18px 20px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq-q .pm { color: var(--magenta); font-size: 1.3rem; transition: transform .2s; }
.faq-item.open .faq-q .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 20px; }
.faq-item.open .faq-a { max-height: 600px; padding-bottom: 18px; }
.faq-a p { font-size: .98rem; }

/* ---- Logos / chips ------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: 8px 14px; border-radius: 999px; background: rgba(5,227,211,.08); border: 1px solid var(--card-border); color: #d9f7f4; }
.chip a { color: inherit; }

/* ---- Testimonials ------------------------------------------------------- */
.quote-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; }
.quote-card .stars { font-size: 1rem; }
.quote-card p { font-style: italic; color: #efeaf8; margin: .7rem 0; }
.quote-card .who { font-family: var(--font-head); font-weight: 700; color: #fff; font-style: normal; }
.quote-card .who span { display: block; color: var(--muted); font-weight: 500; font-size: .85rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: linear-gradient(180deg, var(--ink), #03060f); border-top: 1px solid var(--line); padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .95rem; color: #fff; margin-bottom: 14px; letter-spacing: .04em; }
.footer-grid ul { list-style: none; margin: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-grid a { color: #9aa6c4; font-size: .92rem; }
.footer-grid a:hover { color: var(--cyan-200); }
.footer-brand p { color: #9aa6c4; font-size: .93rem; margin-top: 10px; max-width: 320px; }
.footer-contact { color: #cfc8e4; font-size: .95rem; margin-top: 8px; }
.footer-contact a { color: var(--cyan-200); font-weight: 700; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .82rem; }
.footer-bottom a { color: var(--muted); }

/* ---- Floating call button (mobile) -------------------------------------- */
.call-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: var(--grad); color: #fff; border-radius: 999px; padding: 14px 20px; font-family: var(--font-head); font-weight: 800; box-shadow: var(--shadow-glow); display: none; }
.call-fab:hover { color: #fff; }

/* ---- Forms (contact) ---------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: #e7e2f3; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: rgba(0,0,0,.3); color: #fff; font-family: var(--font-body); font-size: 1rem; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--cyan); }
.form-note { font-size: .82rem; color: var(--muted); }

/* ---- Misc --------------------------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.center-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* ---- Pricing ------------------------------------------------------------ */
.price-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px; height: 100%; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--magenta); box-shadow: var(--shadow-glow); position: relative; }
.price-card.featured::before { content: "Most Popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .75rem; padding: 5px 14px; border-radius: 999px; }
.price-card .price { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: #fff; margin: 8px 0; }
.price-card .price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; margin: 16px 0; flex: 1; }
.price-card li { padding-left: 26px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 800; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Collapse the link list to the hamburger before it can crowd/wrap.
   Phone + CTA button stay visible on tablet; they drop on small phones. */
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 14px; gap: 4px; z-index: 60; }
  .nav-links.open a { padding: 12px; border-radius: 8px; white-space: normal; }
}
@media (max-width: 620px) {
  .nav-cta .btn, .nav-cta .nav-phone { display: none; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .call-fab { display: inline-block; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 22px; }
}

/* ==========================================================================
   Motion — entrance, scroll-reveal & gradient shimmer (AI Consulting KC)
   All effects respect prefers-reduced-motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* Animated sheen across gradient text */
  .gradient-text, .hero h1 span, .stat .num {
    background-size: 220% auto;
    animation: sheen 7s linear infinite;
  }
  @keyframes sheen { to { background-position: 220% center; } }

  /* Hero entrance (load) — staggered, no flash (animates from hidden→shown) */
  .hero h1, .hero .eyebrow, .hero p.lead, .hero-cta, .hero-trust, .hero-card,
  .page-hero h1, .page-hero .eyebrow, .page-hero .lead, .page-hero .hero-cta {
    animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero .eyebrow, .page-hero .eyebrow { animation-delay: .02s; }
  .hero h1, .page-hero h1 { animation-delay: .08s; }
  .hero p.lead, .page-hero .lead { animation-delay: .16s; }
  .hero-cta, .page-hero .hero-cta { animation-delay: .24s; }
  .hero-trust { animation-delay: .32s; }
  .hero-card { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

  /* Floating glow in the hero */
  .hero::after { animation: float 9s ease-in-out infinite; }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(26px); } }

  /* Scroll reveal (JS adds .reveal to below-the-fold items, then .is-visible) */
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* Subtle pulse for the floating call button */
.call-fab { animation: fabpulse 2.4s ease-in-out infinite; }
@keyframes fabpulse { 0%,100% { box-shadow: var(--shadow-glow); } 50% { box-shadow: 0 0 0 1px rgba(5,227,211,.6), 0 0 34px -4px rgba(46,123,255,.8); } }

/* ==========================================================================
   Hero AI figure, textured background & lead-capture band
   ========================================================================== */
/* Textured AI background on the homepage hero (over the deep navy + CSS grid) */
.page-home .hero {
  background-image:
    linear-gradient(rgba(6,11,28,0.78), rgba(6,11,28,0.92)),
    url("/assets/img/1-01_aiconsulting_two-grid_background.png");
  background-size: cover;
  background-position: center;
}

/* Animated AI concept graphic in the hero */
.hero-figure { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-figure img {
  position: relative; z-index: 1; width: min(460px, 92%); height: auto;
  filter: drop-shadow(0 24px 60px rgba(46,123,255,0.45));
}
.hero-figure::before {
  content: ""; position: absolute; z-index: 0; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,123,255,0.40), rgba(31,212,230,0.16) 45%, transparent 70%);
  filter: blur(8px);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-figure img { animation: floatY 6s ease-in-out infinite; }
  .hero-figure::before { animation: glowpulse 6s ease-in-out infinite; }
  /* Rotating conic "data ring" behind the graphic */
  .hero-figure::after {
    content: ""; position: absolute; z-index: 0; width: 96%; aspect-ratio: 1; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 78%, rgba(5,227,211,0.5) 88%, transparent 100%);
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 63%, transparent 64%);
            mask: radial-gradient(circle, transparent 60%, #000 61%, #000 63%, transparent 64%);
    animation: spin 14s linear infinite; opacity: .7;
  }
}
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes glowpulse { 0%,100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Lead-capture band (sits just under the hero) */
.lead-band {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center;
  background: linear-gradient(120deg, var(--ink-2), var(--purple));
  border: 1px solid rgba(46,123,255,0.30); border-radius: 22px; padding: 30px 34px;
  box-shadow: var(--shadow);
}
.lead-band .hero-card { background: rgba(0,0,0,.28); }
@media (max-width: 880px) {
  .lead-band { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .hero-figure { min-height: 280px; margin-top: 18px; }
}

/* ==========================================================================
   Interactive explainers — stepper, node explorer, supply-chain flow, glossary
   ========================================================================== */
/* Fabrication stepper */
.stepper { max-width: 1000px; margin: 0 auto; }
.stepper__tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: thin; }
.stepper__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--card-border); color: #cdd6ea; font-family: var(--font-head); font-weight: 600; font-size: .86rem; padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.stepper__tab:hover { border-color: var(--cyan); color: #fff; }
.stepper__tab.is-active { background: var(--grad); color: #fff; border-color: transparent; }
.stepper__num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: .74rem; }
.stepper__stage { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; }
.stepper__panel { display: none; animation: rise .4s ease both; }
.stepper__panel.is-active { display: block; }
.stepper__panel h3 { margin-bottom: .5rem; }
.stepper__panel p { font-size: 1.02rem; }
.stepper__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.stepper__count { font-family: var(--font-head); font-weight: 700; color: var(--cyan-200); font-size: .9rem; }

/* Process-node explorer */
.nodes { max-width: 760px; margin: 0 auto; }
.nodes__track { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--card); border: 1px solid var(--card-border); border-radius: 999px; padding: 8px; position: relative; }
.nodes__pin { flex: 1; background: none; border: 0; color: #cdd6ea; font-family: var(--font-head); font-weight: 800; font-size: clamp(.8rem,2.2vw,1.05rem); padding: 12px 4px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.nodes__pin:hover { color: #fff; }
.nodes__pin.is-active { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.nodes__details { margin-top: 20px; }
.nodes__detail { display: none; text-align: center; animation: rise .4s ease both; }
.nodes__detail.is-active { display: block; }
.nodes__big { font-family: var(--font-head); font-weight: 800; font-size: 3rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.nodes__big small { display: block; font-size: .9rem; color: var(--muted); -webkit-text-fill-color: var(--muted); margin-top: 4px; }
.nodes__detail p { margin-top: 12px; }

/* Supply-chain flow */
.flow { max-width: 980px; margin: 0 auto; }
.flow__track { display: flex; align-items: stretch; justify-content: center; gap: 6px; flex-wrap: wrap; }
.flow__node { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; min-width: 120px; text-align: left; transition: border-color .15s, transform .15s; }
.flow__node:hover { border-color: var(--cyan); transform: translateY(-2px); }
.flow__node.is-active { border-color: var(--magenta); box-shadow: var(--shadow-glow); }
.flow__stage { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: .92rem; }
.flow__who { color: var(--muted); font-size: .78rem; }
.flow__arrow { display: flex; align-items: center; color: var(--cyan); font-weight: 800; }
.flow__details { margin-top: 22px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; }
.flow__detail { display: none; animation: rise .4s ease both; }
.flow__detail.is-active { display: block; }

/* Glossary controls */
.gloss-controls { max-width: 940px; margin: 0 auto; }
.gloss-search { width: 100%; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--card-border); background: rgba(0,0,0,.3); color: #fff; font-family: var(--font-body); font-size: 1.02rem; }
.gloss-search:focus { outline: none; border-color: var(--cyan); }
.gloss-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.gloss-filter { background: var(--card); border: 1px solid var(--card-border); color: #cdd6ea; font-family: var(--font-head); font-weight: 600; font-size: .84rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.gloss-filter:hover { border-color: var(--cyan); color: #fff; }
.gloss-filter.is-active { background: var(--grad); color: #fff; border-color: transparent; }
.gloss-term .chip { text-transform: none; letter-spacing: 0; }

/* ==========================================================================
   Vertical process timeline (all chip-fab steps visible at once)
   ========================================================================== */
.proc { max-width: 860px; margin: 0 auto; position: relative; }
.proc__item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.proc__rail { position: relative; display: flex; justify-content: center; }
.proc__rail::before { content: ""; position: absolute; top: 0; bottom: -28px; width: 2px; background: linear-gradient(var(--magenta), var(--cyan)); opacity: .35; }
.proc__item:last-child .proc__rail::before { display: none; }
.proc__num { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--grad); box-shadow: var(--shadow-glow); }
.proc__card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 28px; transition: border-color .18s, transform .18s; }
.proc__card:hover { border-color: rgba(46,123,255,.5); transform: translateY(-2px); }
.proc__card h3 { margin-bottom: .25rem; }
.proc__short { color: var(--cyan-200); font-family: var(--font-head); font-weight: 600; font-size: .92rem; margin-bottom: .6rem; }
.proc__card p { font-size: 1rem; }
@media (max-width: 620px) {
  .proc__item { grid-template-columns: 44px 1fr; gap: 12px; }
  .proc__num { width: 36px; height: 36px; font-size: 1rem; }
  .proc__card { padding: 18px; }
}

/* ==========================================================================
   AI model comparison table + History-of-AI timeline
   ========================================================================== */
.mtable-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: var(--radius); }
.mtable { width: 100%; border-collapse: collapse; min-width: 680px; font-size: .95rem; }
.mtable th, .mtable td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--card-border); vertical-align: middle; }
.mtable thead th { background: var(--ink-2); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .82rem; letter-spacing: .02em; position: sticky; top: 0; }
.mtable th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.mtable th.sortable:hover { color: var(--cyan-200); }
.mtable tbody tr:hover { background: rgba(46,123,255,.06); }
.mtable .mnum { font-family: var(--font-head); font-weight: 700; color: var(--cyan-200); white-space: nowrap; }
.mtable .mbest { color: var(--muted); font-size: .88rem; }
.mbar { width: 120px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.mbar span { display: block; height: 100%; background: var(--grad); }

/* Timeline */
.tl { max-width: 820px; margin: 0 auto; }
.tl__item { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.tl__rail { position: relative; display: flex; justify-content: center; padding-top: 8px; }
.tl__rail::before { content: ""; position: absolute; top: 0; bottom: -24px; width: 2px; background: linear-gradient(var(--magenta), var(--cyan)); opacity: .3; }
.tl__item:last-child .tl__rail::before { display: none; }
.tl__dot { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(46,123,255,.18); }
.tl__card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; transition: border-color .18s, transform .18s; }
.tl__card:hover { border-color: rgba(46,123,255,.5); transform: translateY(-2px); }
.tl__year { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 620px) { .tl__item { grid-template-columns: 28px 1fr; gap: 10px; } }

/* ==========================================================================
   Podcast takeaways, deep chip facts, AI Academy & quiz
   ========================================================================== */
.ep-takeaway { font-size:.9rem; color:#dfe6f5; background:rgba(46,123,255,.10); border-left:3px solid var(--cyan); border-radius:8px; padding:8px 12px; margin:.4rem 0 .6rem; }
.lessons-grid { max-width:880px; margin:0 auto; columns:1; }
@media (min-width:760px){ .lessons-grid{ columns:1; } }
.lessons-grid li a { color:#e7ecfb; }
.lessons-grid li a:hover { color:var(--cyan-200); }

/* Deep chip-step facts box on the overview cards */
.proc__facts { background:rgba(255,255,255,.03); border:1px solid var(--card-border); border-radius:12px; padding:14px 16px; margin:14px 0; }
.proc__facts-h { font-family:var(--font-head); font-weight:700; font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color:var(--cyan); margin-bottom:8px; }
.proc__facts ul { margin:0 0 0 1.1rem; }
.proc__facts li { font-size:.92rem; margin-bottom:.3rem; }
.proc__players { font-size:.9rem; color:var(--muted); margin:.4rem 0 .8rem; }

/* AI Academy */
.acad-card { position:relative; display:block; }
.acad-check { position:absolute; top:14px; right:14px; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--grad); color:#fff; font-size:.8rem; font-weight:800; opacity:0; transform:scale(.6); transition:opacity .2s, transform .2s; }
.acad-card.is-complete .acad-check { opacity:1; transform:scale(1); }
.acad-card.is-complete { border-color:rgba(5,227,211,.5); }
.acad-progress { max-width:520px; margin-top:22px; }
.acad-progress__bar { height:10px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; }
.acad-progress__bar span { display:block; height:100%; width:0; background:var(--grad); transition:width .5s ease; }

/* Quiz */
.quiz__q { background:var(--card); border:1px solid var(--card-border); border-radius:var(--radius); padding:20px 22px; margin-bottom:16px; }
.quiz__qtext { font-family:var(--font-head); font-weight:700; color:#fff; margin-bottom:12px; }
.quiz__opts { display:grid; gap:10px; }
.quiz__opt { text-align:left; background:rgba(0,0,0,.25); border:1px solid var(--card-border); color:#e7ecfb; font-family:var(--font-body); font-size:.98rem; padding:12px 16px; border-radius:10px; cursor:pointer; transition:border-color .15s, background .15s; }
.quiz__opt:hover:not(:disabled) { border-color:var(--cyan); }
.quiz__opt:disabled { cursor:default; }
.quiz__opt.is-correct { border-color:#2fe3a0; background:rgba(47,227,160,.14); color:#fff; }
.quiz__opt.is-wrong { border-color:#ff6b8b; background:rgba(255,107,139,.12); color:#fff; }
.quiz__fb { margin-top:12px; font-size:.92rem; color:#d9e2f5; }
.quiz__fb.is-correct { color:#aef0d4; }
.quiz__fb.is-wrong { color:#ffd0db; }
.quiz__score { text-align:center; font-size:1.05rem; padding:18px; }
