/* =========================================================
   kennisbank.io — visuele taal geïnspireerd op shinta.framer.media
   Pastel pill aesthetic · sticky-stacking cards · curved ribbons
   ========================================================= */

:root {
  --bg: #f4f4f3;
  --bg-alt: #ffffff;
  --bg-dark: #1c1917;
  --bg-dark-2: #12100f;

  --text: #1c1917;
  --text-muted: #78716c;
  --text-subtle: #a8a29e;
  --text-on-dark: #f4f4f3;
  --text-on-dark-muted: #a8a29e;

  --border: #e7e5e4;
  --border-dark: #2a2724;

  /* Nieuw palet — plum · rose · sky */
  --plum:        #423A5C;   /* diep paars */
  --plum-light:  #6D6490;   /* lichtere tint plum */
  --rose:        #B8798A;   /* stoffig rose */
  --rose-soft:   #D6A3AE;   /* lichte rose */
  --sky:         #79B4D1;   /* zacht sky-blauw */
  --sky-soft:    #A8CDE0;   /* lichter sky */

  /* Backwards-compat aliassen zodat oude selectors blijven werken */
  --purple: var(--plum);
  --purple-deep: var(--plum-light);
  --pink:   var(--rose);
  --orange: var(--rose-soft);
  --green:  var(--sky-soft);
  --teal:   var(--sky);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 84px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
svg { display: block; max-width: 100%; }

/* ========== Typography utilities ========== */
.display,
.h2,
.stack__title,
.cta__title,
.pain__headline,
.mission__text,
.bento-card h3,
.why-card h3,
.side-card__title {
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  color: var(--text);
}

.display {
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.display > span { display: block; }
.display em {
  font-style: normal;
  color: var(--text);
  position: relative;
}
.display em::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 6%;
  height: 22%;
  background: var(--pink);
  z-index: -1;
  border-radius: 8px;
  transform: skew(-4deg);
}
.display .under {
  position: relative;
  display: inline-block;
}
.display .under::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 6px;
  border-radius: 3px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in 1.4s 0.6s var(--ease-out) forwards;
}
@keyframes underline-in { to { transform: scaleX(1); } }

.h2 { font-size: clamp(36px, 5.2vw, 72px); line-height: 1.02; }
/* "ital" class: geen cursief, wel een rose-swatch accent onder het woord */
.ital {
  font-weight: 700;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.ital::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%; bottom: 6%;
  height: 22%;
  background: var(--rose);
  z-index: -1;
  border-radius: 6px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pink);
}
.eyebrow--pink   { background: var(--pink); }
.eyebrow--green  { background: var(--green); }
.eyebrow--orange { background: var(--orange); }
.eyebrow--purple { background: var(--purple); }
.eyebrow--dark   { background: var(--bg-dark); color: var(--text-on-dark); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-on-dark);
  background: var(--text);
}
.btn:hover { transform: translateY(-2px); }
.btn__arrow {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--text);
  font-size: 12px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.btn:hover .btn__arrow { transform: rotate(45deg); }
.btn--solid { background: var(--text); color: var(--text-on-dark); }
.btn--lg { padding: 18px 28px; font-size: 16px; }
.btn--ghost-light {
  background: rgba(255,255,255,0.06);
  color: var(--text-on-dark);
  border-color: rgba(255,255,255,0.14);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.10); }
.btn--ghost-light .btn__arrow { background: var(--green); }

/* ========== Nav ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: backdrop-filter 0.35s var(--ease), background 0.35s var(--ease);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: padding 0.35s var(--ease);
}
.nav.scrolled {
  background: rgba(244, 244, 243, 0.78);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav.scrolled .nav__inner { padding-top: 12px; padding-bottom: 12px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--purple);
  position: relative;
  box-shadow: 0 0 0 4px rgba(66, 58, 92, 0.22);
}
.brand__dot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--text);
}
.brand__tld { color: var(--text-muted); font-weight: 500; }

.nav__links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}
.nav__links a { transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--text); }

@media (max-width: 860px) { .nav__links { display: none; } }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(140px, 16vw, 220px);
  max-width: var(--container);
  margin: 0 auto;
  overflow: visible;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr 1.15fr 0.95fr;
  gap: clamp(18px, 2.5vw, 36px);
  align-items: center;
  position: relative;
  z-index: 2;
  min-height: 560px;
}
@media (max-width: 1100px) { .hero__inner { grid-template-columns: 1fr 1fr; min-height: 0; } .hero__side { grid-column: span 2; } }
@media (max-width: 760px)  { .hero__inner { grid-template-columns: 1fr; } .hero__side { grid-column: auto; } }

.hero__head {
  padding-top: 20px;
  opacity: 0;
  animation: hero-rise 1s 0.15s var(--ease-out) forwards;
}
@keyframes hero-rise { to { opacity: 1; transform: none; } from { opacity: 0; transform: translateY(30px); } }

.hero__tags {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.hero__tags li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--text-muted);
}
.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot--pink { background: var(--pink); }
.dot--orange { background: var(--orange); }
.dot--purple { background: var(--purple); }

/* ----- Fan of tilted cards behind the "phone" ----- */
.hero__stage {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.fan {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.fan__card {
  position: absolute;
  width: 220px; height: 380px;
  border-radius: 32px;
  top: 50%; left: 50%;
  transform-origin: 50% 80%;
  box-shadow: 0 30px 60px -20px rgba(28,25,23,0.18);
  transition: transform 0.6s var(--ease);
}
.fan__card--1 { background: var(--orange); transform: translate(-50%, -50%) rotate(-14deg) translate(-80px, 0); animation: fan-float 9s ease-in-out infinite; }
.fan__card--2 { background: var(--purple); transform: translate(-50%, -50%) rotate(-6deg) translate(-40px, -10px); animation: fan-float 10s ease-in-out infinite 0.4s; }
.fan__card--3 { background: var(--pink);   transform: translate(-50%, -50%) rotate(8deg)  translate(40px, -10px);  animation: fan-float 11s ease-in-out infinite 0.8s; }
.fan__card--4 { background: var(--green);  transform: translate(-50%, -50%) rotate(16deg) translate(80px, 0);    animation: fan-float 12s ease-in-out infinite 1.2s; }
@keyframes fan-float {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.05); }
}

/* ----- Phone/product card ----- */
.stage-phone {
  position: relative;
  width: 260px;
  height: 460px;
  background: var(--text);
  border-radius: 38px;
  padding: 12px;
  box-shadow: 0 50px 80px -30px rgba(28,25,23,0.45),
              0 0 0 7px #0b0a09,
              0 0 0 8px #2a2724;
  z-index: 3;
  animation: phone-enter 1.2s 0.3s var(--ease-out) both;
}
@keyframes phone-enter {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}
.stage-phone__notch {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 18px;
  background: #0b0a09;
  border-radius: 999px;
  z-index: 2;
}
.stage-phone__screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 28px;
  padding: 50px 18px 18px;
  overflow: hidden;
}
.stage-phone__glow {
  position: absolute;
  inset: -60px;
  z-index: -1;
  background: radial-gradient(circle at 50% 70%, rgba(121,180,209,0.45), transparent 60%);
  filter: blur(30px);
}

.stage-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
}
.stage-chat__msg {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 92%;
  animation: chat-in 0.6s var(--ease-out) both;
}
.stage-chat__msg--user {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  border-bottom-right-radius: 6px;
  animation-delay: 0.6s;
}
.stage-chat__msg--ai {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  animation-delay: 1.1s;
}
.stage-chat__msg--ai p { margin: 0 0 8px; }
.stage-chat__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.stage-chat__sources span {
  font-family: 'Geist', sans-serif;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(66,58,92,0.10);
  color: var(--text);
  border: 1px solid rgba(66,58,92,0.28);
}
.stage-chat__msg:nth-of-type(3) { animation-delay: 1.7s; }
.stage-chat__typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  animation: chat-in 0.6s var(--ease-out) 2.3s both;
}
.stage-chat__typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.2s infinite var(--ease);
}
.stage-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.stage-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@keyframes chat-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ----- Side card ----- */
.hero__side {
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: hero-rise 1s 0.5s var(--ease-out) both;
  position: relative;
  z-index: 5;
}
.side-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 5;
  box-shadow: 0 20px 40px -20px rgba(28,25,23,0.15);
}
.side-card__badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--text);
}
.side-card__title {
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.side-card__body {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}
.side-card .btn { align-self: flex-start; }

/* ----- Swirls ----- */
.swirl {
  position: absolute;
  pointer-events: none;
  color: var(--purple);
  opacity: 0.8;
  z-index: 0;
}
.swirl path {
  /* JS sets --swirl-len + --swirl-offset on each path on load + on scroll */
  stroke-dasharray: var(--swirl-len, 2000);
  stroke-dashoffset: var(--swirl-offset, var(--swirl-len, 2000));
  transition: stroke-dashoffset 120ms linear;
  will-change: stroke-dashoffset;
}
.swirl--hero-1 {
  top: -60px;
  right: -180px;
  width: clamp(320px, 42vw, 620px);
  color: var(--green);
  opacity: 0.55;
}

/* ----- Curved ribbons (textPath) ----- */
.ribbon {
  position: absolute;
  left: -8%;
  right: -8%;
  width: 116%;
  pointer-events: none;
  z-index: 4;
}
.ribbon--top {
  display: none; /* disabled: was cutting through hero */
}
.ribbon--bottom {
  bottom: -20px;
  transform: rotate(-2deg);
  height: 180px;
}
.ribbon svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.ribbon__text {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  fill: var(--text);
  text-transform: uppercase;
}
.ribbon--top .ribbon__text textPath { animation: ribbonShift 40s linear infinite; }
.ribbon--bottom .ribbon__text textPath { animation: ribbonShift 50s linear infinite reverse; }
@keyframes ribbonShift {
  from { startOffset: 0; }
  to   { startOffset: -1000; }
}
/* SMIL fallback via JS will push the animation via startOffset attribute change — CSS animating startOffset is not universally supported. See JS. */

/* ============================================
   BRANDS STRIP
   ============================================ */
.brands {
  padding: 40px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.brands__label {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 24px;
}
.brands__row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  color: var(--text-subtle);
  letter-spacing: -0.02em;
}
.brands__row span {
  opacity: 0.75;
  transition: opacity 0.3s var(--ease);
}
.brands__row span:hover { opacity: 1; color: var(--text); }

/* ============================================
   PAIN — pinned dark section with floating chips
   ============================================ */
.pain {
  position: relative;
  height: 260vh;
  background: var(--bg);
}
.pain__pinned {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  transition: background 0.7s var(--ease), color 0.7s var(--ease);
}
.pain.dark .pain__pinned { background: var(--bg-dark); color: var(--text-on-dark); }

.pain__headline {
  font-size: clamp(40px, 7vw, 104px);
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-align: center;
  padding: 0 var(--gutter);
  max-width: 1200px;
  position: relative;
  z-index: 3;
  color: currentColor;
}
.pain__headline em {
  font-style: normal;
  font-weight: 700;
  color: var(--rose-soft);
}

.pain-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px 24px 28px;
  background: #2a2724;
  color: var(--text-on-dark);
  border-radius: 24px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 22px;
  max-width: 440px;
  line-height: 1.25;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translate(var(--tx, 0), 50px) scale(0.85) rotate(var(--rot, 0));
  transition: opacity 0.55s var(--ease-out), transform 0.6s var(--ease-out);
  z-index: 4;
}
.pain-chip.in { opacity: 1; transform: translate(0, 0) scale(1) rotate(var(--rot, 0)); }

.pain-chip__x {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.pain-chip--1 { top: 14%;  left: 8%;   --rot: -5deg; }
.pain-chip--2 { top: 10%;  right: 10%; --rot: 4deg;  }
.pain-chip--3 { top: 40%;  left: 4%;   --rot: 3deg;  }
.pain-chip--4 { top: 38%;  right: 6%;  --rot: -6deg; }
.pain-chip--5 { bottom: 18%; left: 12%; --rot: 4deg; }
.pain-chip--6 { bottom: 14%; right: 14%; --rot: -3deg; }
@media (max-width: 760px) {
  .pain-chip { max-width: 200px; font-size: 12px; padding: 10px 14px 10px 10px; }
  .pain-chip--1, .pain-chip--2 { top: 6%; }
  .pain-chip--5, .pain-chip--6 { bottom: 8%; }
}

/* ============================================
   MISSION — progressive word reveal on scroll
   ============================================ */
.mission {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(120px, 14vw, 200px) var(--gutter);
  text-align: center;
}
.swirl--mission {
  position: absolute;
  top: 50%;
  left: -180px;
  transform: translateY(-50%);
  width: clamp(360px, 48vw, 720px);
  color: var(--rose);
  opacity: 0.5;
  z-index: 0;
}
.mission .eyebrow,
.mission__text { position: relative; z-index: 1; }
.mission .eyebrow { margin-bottom: 30px; }
.mission__text {
  font-size: clamp(36px, 5.2vw, 72px);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
  color: var(--text-subtle);
  display: block;
}
.mission__text .word {
  display: inline-block;
  padding-right: 0.22em;
  color: var(--text-subtle);
  transition: color 0.3s var(--ease);
}
.mission__text .word.on { color: var(--text); }

/* ============================================
   SPLIT — creator-led style
   ============================================ */
.split {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 120px) var(--gutter);
}
.split__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .split__inner { grid-template-columns: 1fr; } }

.split__copy p {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 17px;
  margin: 20px 0 0;
}
.split__visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}
.swirl--split {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(360px, 60vw, 760px);
  height: auto;
  opacity: 0.85;
}

.metric-pill {
  position: relative;
  padding: 30px 36px;
  border-radius: 22px;
  background: var(--plum);
  color: var(--text-on-dark);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 40px -20px rgba(66,58,92,0.55);
  z-index: 2;
}
.metric-pill--purple { background: var(--plum); }
.metric-pill__num {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 4.5vw, 56px);
  letter-spacing: -0.04em;
  color: var(--text-on-dark);
}
.metric-pill__label {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: rgba(244,244,243,0.78);
}

/* ============================================
   PROTOCOL — sticky stacking cards (the star)
   ============================================ */
.protocol {
  position: relative;
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter) 0;
}
.protocol__intro {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto clamp(40px, 6vw, 80px);
}
.swirl--protocol {
  position: absolute;
  top: 40px;
  right: -240px;
  width: clamp(380px, 52vw, 800px);
  color: var(--plum);
  opacity: 0.4;
  z-index: 0;
}
.protocol__intro .eyebrow { margin-bottom: 22px; }
.protocol__lead {
  color: var(--text-muted);
  font-size: 18px;
  margin: 24px auto 0;
  max-width: 620px;
}

.stack {
  position: relative;
}

.stack__card {
  --tab-w: clamp(120px, 12vw, 180px);
  --tab-h: 46px;
  --card-bg: var(--purple);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  padding-top: var(--tab-h);
  margin-bottom: 24px;
}
.stack__card--purple { --card-bg: var(--plum);       --card-fg: var(--text-on-dark); }
.stack__card--pink   { --card-bg: var(--rose);       --card-fg: var(--text); }
.stack__card--orange { --card-bg: var(--rose-soft);  --card-fg: var(--text); }
.stack__card--green  { --card-bg: var(--sky);        --card-fg: var(--text); }
.stack__card--teal   { --card-bg: var(--plum-light); --card-fg: var(--text-on-dark); }

.stack__tab {
  position: absolute;
  top: 0;
  left: calc(var(--idx) * var(--tab-w));
  height: var(--tab-h);
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--card-fg, var(--text));
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  white-space: nowrap;
  box-shadow: 0 -6px 14px -8px rgba(0,0,0,0.12);
  z-index: 2;
}

.stack__body {
  position: relative;
  background: var(--card-bg);
  border-radius: 0 32px 32px 32px;
  padding: clamp(36px, 5vw, 64px);
  min-height: min(76vh, 640px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(28,25,23,0.3);
}
@media (max-width: 900px) {
  .stack__body { grid-template-columns: 1fr; }
  .stack__art { order: -1; justify-self: center; max-width: 240px; }
}

.stack__content { max-width: 560px; }
.stack__title {
  font-size: clamp(44px, 6vw, 82px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--card-fg, var(--text));
  margin-bottom: 20px;
}
.stack__desc {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--card-fg, var(--text));
  opacity: 0.85;
  line-height: 1.55;
  margin: 0 0 24px;
}
.stack__list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 8px;
}
.stack__list li {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--card-fg, var(--text));
  padding-left: 22px;
  position: relative;
}
.stack__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: currentColor;
}
.stack__meta {
  display: inline-flex;
  align-items: center;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  color: var(--card-fg, var(--text));
  letter-spacing: 0.04em;
}
.stack__card--pink .stack__meta,
.stack__card--orange .stack__meta,
.stack__card--green .stack__meta {
  background: rgba(28,25,23,0.12);
}
.stack__art svg * { stroke: var(--card-fg, var(--text)); }
.stack__art svg [fill]:not([fill="none"]) { fill: var(--card-fg, var(--text)); }

.stack__art {
  position: relative;
  width: 100%;
  max-width: 340px;
  justify-self: end;
  opacity: 0.95;
}
.stack__art svg { width: 100%; height: auto; }
.rotate-slow { animation: rotateSlow 22s linear infinite; }
@keyframes rotateSlow { to { transform: rotate(360deg); } }

.protocol__spacer { height: 12vh; }

/* ============================================
   APPS — bento
   ============================================ */
.apps {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}
.apps__head {
  max-width: 780px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.apps__head .eyebrow { margin-bottom: 20px; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } }

.bento-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.4s var(--ease);
  overflow: hidden;
  min-height: 260px;
}
.bento-card:hover { transform: translateY(-4px); }
.bento-card--wide { grid-column: span 2; }
@media (max-width: 640px) { .bento-card--wide { grid-column: auto; } }

.bento-card--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.bento-card--purple { background: var(--plum); color: var(--text-on-dark); }
.bento-card--purple p { opacity: 0.85; }
.bento-card--pink   { background: var(--rose); }
.bento-card--orange { background: var(--rose-soft); }
.bento-card--green  { background: var(--sky); }

.bento-tag {
  display: inline-flex;
  align-self: flex-start;
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(28,25,23,0.1);
  color: inherit;
}
.bento-card--dark .bento-tag { background: rgba(255,255,255,0.08); }

.bento-card h3 {
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: inherit;
}
.bento-card p {
  font-size: 15.5px;
  color: inherit;
  opacity: 0.82;
  margin: 0;
}
.bento-card--dark p { color: var(--text-on-dark-muted); opacity: 1; }

.bento-code {
  margin: auto 0 0;
  background: var(--text);
  color: var(--bg);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}
.bento-code code { color: inherit; }

.bento-endpoint {
  margin: auto 0 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 10px 14px;
  background: rgba(28,25,23,0.1);
  border-radius: 10px;
  align-self: flex-start;
}

.bento-chat {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}
.bento-chat__msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  max-width: 90%;
  line-height: 1.45;
}
.bento-chat__msg--user {
  align-self: flex-end;
  background: rgba(255,255,255,0.1);
  color: var(--text-on-dark);
  border-bottom-right-radius: 6px;
}
.bento-chat__msg--ai {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--text);
  border-bottom-left-radius: 6px;
}
.bento-chat__msg--ai p { margin: 0 0 8px; }
.bento-chat__sources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bento-chat__sources span {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(66,58,92,0.14);
  color: var(--text);
  border: 1px solid rgba(66,58,92,0.32);
}

/* ============================================
   WHY
   ============================================ */
.why {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}
.swirl--why {
  position: absolute;
  top: -80px;
  right: -240px;
  width: clamp(380px, 55vw, 820px);
  opacity: 0.7;
  z-index: 0;
}

.why__head { max-width: 820px; position: relative; z-index: 1; margin-bottom: clamp(40px, 6vw, 72px); }
.why__head .eyebrow { margin-bottom: 22px; }

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) { .why__grid { grid-template-columns: 1fr; } }
.why-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  transition: transform 0.4s var(--ease);
}
.why-card:hover { transform: translateY(-4px); }
.why-card__num {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 40px;
  text-transform: uppercase;
}
.why-card h3 {
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.why-card p { margin: 0; color: var(--text-muted); font-size: 16px; }

/* ============================================
   FAQ
   ============================================ */
.faq-section {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}
.swirl--faq {
  position: absolute;
  top: 60px;
  right: -160px;
  width: clamp(280px, 38vw, 540px);
  color: var(--rose-soft);
  opacity: 0.5;
  z-index: 0;
}
.faq-section__inner { position: relative; z-index: 1; }
.faq-section__head { margin-bottom: 40px; }
.faq-section__head .eyebrow { margin-bottom: 20px; }

.faq { display: grid; gap: 10px; }
.faq__item {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 2px 26px;
  transition: background 0.3s var(--ease);
}
.faq__item[open] { background: #ebe9e8; }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 1.6vw, 19px);
  letter-spacing: -0.02em;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__icon {
  position: relative;
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0;
  height: 2px;
  background: var(--text);
  transform: translateY(-50%);
  transition: transform 0.35s var(--ease);
}
.faq__icon::after { transform: translateY(-50%) rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: translateY(-50%) rotate(0deg); }

.faq__body {
  padding: 0 0 22px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 700px;
}
.faq__body p { margin: 0; }

/* ============================================
   CTA
   ============================================ */
.cta {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(80px, 10vw, 140px);
}
.cta__card {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-xl);
  padding: clamp(56px, 8vw, 110px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta__card::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(184, 121, 138, 0.40), transparent 60%); /* rose */
  pointer-events: none;
}
.cta__card::after {
  content: "";
  position: absolute;
  bottom: -30%; left: -10%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(121, 180, 209, 0.35), transparent 60%); /* sky */
  pointer-events: none;
}
.swirl--cta {
  position: absolute;
  top: -8%; left: -12%;
  width: clamp(360px, 50vw, 680px);
  z-index: 0;
  opacity: 0.55;
}
.cta__card .eyebrow { position: relative; z-index: 1; margin-bottom: 22px; }
.cta__title {
  font-size: clamp(44px, 6vw, 84px);
  letter-spacing: -0.045em;
  line-height: 1;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  color: var(--text-on-dark);
}
.cta__title .ital { color: var(--sky); }
.cta__title .ital::after { background: var(--sky); opacity: 0.35; }
.cta__lead {
  color: var(--text-on-dark-muted);
  font-size: clamp(16px, 1.4vw, 19px);
  max-width: 560px;
  margin: 24px auto 36px;
  position: relative;
  z-index: 1;
}
.cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
}
.footer__tag {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}
.footer__links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}
.footer__links a:hover { color: var(--text); }
.footer__meta { text-align: right; color: var(--text-muted); font-size: 14px; }
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__meta { text-align: center; }
}

/* ============================================
   REVEAL utilities
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .mission__text .word { color: var(--text) !important; }
  .pain-chip { opacity: 1; transform: none; }
}
