/* ============================================================
   landing_cardia.css — WisdomTwin marketing landing page styled
   after cardiatec.ai: navy + aqua on light, Roboto, huge fluid
   headings, full-viewport stacked sections with rounded tops,
   three.js dot-wave hero, GSAP/Lenis motion, Swiper carousels.
   Self-contained: only used by templates/index.html.
   ============================================================ */

:root {
  --navy: #09155a;
  --navy-30: rgba(9, 21, 90, 0.30);
  --navy-48: rgba(9, 21, 90, 0.48);
  --aqua: #c99a3a;
  --aqua-deep: #a8791f;
  --white: #ffffff;
  --paper: #f4efe4;
  --paper-2: #efe8d9;
  --line: rgba(9, 21, 90, 0.14);
  --waves-bg-color: #f4efe4;

  /* Utopia-style fluid type scale (mirrors cardiatec) */
  --step--2: clamp(0.69rem, 0.66rem + 0.18vw, 0.80rem);
  --step--1: clamp(0.83rem, 0.78rem + 0.27vw, 1.00rem);
  --step-0:  clamp(1.00rem, 0.93rem + 0.36vw, 1.25rem);
  --step-1:  clamp(1.20rem, 1.09rem + 0.54vw, 1.56rem);
  --step-2:  clamp(1.44rem, 1.28rem + 0.80vw, 1.95rem);
  --step-3:  clamp(1.73rem, 1.49rem + 1.18vw, 2.44rem);
  --step-4:  clamp(2.07rem, 1.73rem + 1.71vw, 3.05rem);
  --step-5:  clamp(2.49rem, 1.99rem + 2.46vw, 3.82rem);
  --hero:    clamp(3.2rem, 1.6rem + 8vw, 11rem);

  --space-2xs: clamp(0.5rem, 0.45rem + 0.27vw, 0.75rem);
  --space-xs:  clamp(0.75rem, 0.66rem + 0.45vw, 1.13rem);
  --space-s:   clamp(1rem, 0.86rem + 0.71vw, 1.5rem);
  --space-m:   clamp(1.5rem, 1.28rem + 1.07vw, 2.25rem);
  --space-l:   clamp(2rem, 1.6rem + 2vw, 4rem);
  --space-xl:  clamp(3rem, 2.2rem + 4vw, 7rem);
  --space-2xl: clamp(4rem, 2.8rem + 6vw, 10rem);

  --section-padding: var(--space-l);
  --grid-max: 1600px;
  --radius-top: 40px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 400;
  color: var(--navy);
  background: var(--paper);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-weight: 700; line-height: 0.92; letter-spacing: -0.02em; margin: 0; }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  margin: 0;
}
.muted { color: var(--navy-48); }

/* line-split mask for GSAP reveals */
.split-line { display: block; overflow: hidden; }
.split-line > span { display: block; will-change: transform; }
[data-reveal] { opacity: 0; transform: translateY(40px); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: 600; font-size: var(--step-0);
  padding: 0.9em 1.6em; border-radius: 999px;
  background: var(--navy); color: var(--white);
  border: 1px solid var(--navy);
  transition: transform .3s cubic-bezier(.16,1,.3,1), background .3s, color .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px var(--navy-30); }
.btn .arr { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.btn:hover .arr { transform: translateX(5px); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy-30); }
.btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ============================================================
   HEADER
   ============================================================ */
.lc-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-s) var(--section-padding);
  will-change: transform;
}
.lc-header__brand { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.lc-header__nav { display: flex; gap: var(--space-m); align-items: center; }
.lc-header__nav a { font-size: var(--step--1); font-weight: 500; color: var(--navy); opacity: .8; transition: opacity .25s; }
.lc-header__nav a:hover { opacity: 1; }
.lc-header__cta { display: inline-flex; }
@media (max-width: 900px) {
  .lc-header__nav { display: none; }
}

/* ============================================================
   STACKED SECTIONS — each is full-viewport, sticky, rounded top
   ============================================================ */
.stack { position: relative; }
.section {
  position: relative;
  min-height: 100svh;
  width: 100%;
  padding: calc(var(--space-2xl) + var(--space-l)) var(--section-padding) var(--space-2xl);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--paper);
  border-top-left-radius: var(--radius-top);
  border-top-radius: var(--radius-top);
  border-top-right-radius: var(--radius-top);
}
.section--sticky { position: sticky; top: 0; }
.section__inner { width: 100%; max-width: var(--grid-max); margin: 0 auto; }

/* alternating tones */
.section--navy { background: var(--navy); color: var(--white); }
.section--navy .eyebrow { color: var(--aqua); }
.section--navy .muted { color: rgba(255,255,255,0.6); }
.section--paper2 { background: var(--paper-2); }
.section--white { background: var(--white); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; width: 100%;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--paper);
}
#wave-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
}
.hero__grid {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--grid-max); margin: 0 auto;
  padding: var(--space-2xl) var(--section-padding) var(--space-xl);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-l);
  align-items: center;
}
.hero__title {
  font-size: var(--hero);
  line-height: 0.86; letter-spacing: -0.03em;
  color: var(--navy);
  text-transform: none;
}
.hero__title .ln { display: block; }
.hero__title .accent { color: var(--aqua-deep); }

.hero__right { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); }
.hero__desc-carousel { width: 100%; max-width: 30rem; }
.hero__desc-carousel .swiper-slide { font-size: var(--step-1); line-height: 1.45; color: var(--navy-48); }
.hero__desc-carousel .swiper-slide strong { color: var(--navy); font-weight: 600; }

.hero__cta-row { display: flex; gap: var(--space-s); flex-wrap: wrap; }

/* carousel pagination shared */
.carousel-foot { display: flex; align-items: center; gap: var(--space-s); width: 100%; max-width: 30rem; margin-top: var(--space-xs); }
.carousel-frac { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.1em; color: var(--navy); font-variant-numeric: tabular-nums; min-width: 4ch; }
.carousel-bar { position: relative; flex: 1; height: 2px; background: var(--navy-30); overflow: hidden; }
.carousel-bar .swiper-pagination-progressbar-fill { background: var(--navy); }
.carousel-nav { display: flex; gap: 0.5rem; }
.carousel-nav button {
  width: 2.6rem; height: 2.6rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--navy-30); background: transparent; color: var(--navy);
  display: grid; place-items: center; transition: background .25s, color .25s, transform .25s;
}
.carousel-nav button:hover { background: var(--navy); color: var(--white); }
.carousel-nav button:active { transform: scale(.92); }
.carousel-nav button svg { width: 1.1rem; height: 1.1rem; }
.section--navy .carousel-frac { color: var(--white); }
.section--navy .carousel-bar { background: rgba(255,255,255,0.25); }
.section--navy .carousel-bar .swiper-pagination-progressbar-fill { background: var(--aqua); }
.section--navy .carousel-nav button { border-color: rgba(255,255,255,0.3); color: var(--white); }
.section--navy .carousel-nav button:hover { background: var(--white); color: var(--navy); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-m); padding-top: calc(var(--space-2xl) * 1.4); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.sec-head { max-width: 60rem; margin-bottom: var(--space-l); }
.sec-head h2 { font-size: var(--step-5); margin-top: var(--space-2xs); }
.sec-head p { font-size: var(--step-1); margin-top: var(--space-s); max-width: 48rem; }

/* ---- Intro/Problem big statement ---- */
.statement { font-size: var(--step-4); line-height: 1.05; max-width: 22ch; }
.statement .accent { color: var(--aqua); }

/* stat carousel */
.stat-carousel { width: 100%; }
.stat-slide { display: flex; flex-direction: column; gap: var(--space-xs); padding-right: var(--space-l); }
.stat-slide .big { font-size: clamp(4rem, 3rem + 6vw, 11rem); line-height: 0.9; font-weight: 800; letter-spacing: -0.04em; }
.stat-slide .lbl { font-size: var(--step-1); max-width: 30rem; color: rgba(255,255,255,0.7); }
.section--navy .stat-slide .big { color: var(--aqua); }

/* ---- Data / pipeline visual carousel ---- */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.data-visual {
  position: relative; aspect-ratio: 1/1; border-radius: 24px; overflow: hidden;
  background: linear-gradient(140deg, var(--navy) 0%, #1a2a7a 100%);
  display: grid; place-items: center;
}
.data-visual .glyph { font-size: clamp(5rem, 3rem + 12vw, 14rem); color: var(--aqua); opacity: .9; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.data-carousel .swiper-slide { display: flex; flex-direction: column; gap: var(--space-s); }
.data-carousel .step-num { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; color: var(--aqua-deep); }
.data-carousel .step-title { font-size: var(--step-3); }
.data-carousel .step-desc { font-size: var(--step-1); color: var(--navy-48); max-width: 34rem; }
@media (max-width: 900px) { .data-grid { grid-template-columns: 1fr; gap: var(--space-l); } }

/* ---- two-col feature ---- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.feature-grid .visual {
  aspect-ratio: 4/3; border-radius: 24px; overflow: hidden; position: relative;
  background: var(--white); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.feature-grid h2 { font-size: var(--step-4); }
.feature-grid .lead { font-size: var(--step-1); color: var(--navy-48); margin-top: var(--space-s); }
.feature-list { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: grid; gap: var(--space-xs); }
.feature-list li { display: flex; gap: 0.7rem; align-items: center; font-size: var(--step-0); }
.feature-list .dot { width: 0.55rem; height: 0.55rem; border-radius: 999px; background: var(--aqua-deep); flex: none; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; gap: var(--space-l); } }

/* chat mock */
.chat-mock { width: 86%; display: grid; gap: var(--space-s); }
.chat-row { display: flex; gap: 0.7rem; align-items: flex-start; }
.chat-bubble { padding: 0.8em 1.1em; border-radius: 18px; font-size: var(--step--1); line-height: 1.5; }
.chat-q { background: var(--paper-2); color: var(--navy); border-bottom-left-radius: 4px; }
.chat-a { background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; margin-left: auto; }
.chat-cites { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chat-cite { font-size: var(--step--2); padding: 0.3em 0.7em; border-radius: 999px; background: rgba(118,170,163,0.18); color: var(--aqua-deep); font-weight: 600; }

/* mic pulse */
.mic-wrap { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4/3; }
.mic-core { width: 6rem; height: 6rem; border-radius: 999px; background: rgba(118,170,163,0.18); border: 1px solid var(--aqua); display: grid; place-items: center; color: var(--aqua-deep); position: relative; z-index: 2; }
.mic-core svg { width: 2.4rem; height: 2.4rem; }
.mic-ring { position: absolute; border-radius: 999px; border: 1px solid var(--aqua); opacity: 0; }

/* ============================================================
   GRID CAROUSELS (personas + stories)
   ============================================================ */
.grid-carousel { width: 100%; }
.persona-card, .story-card {
  background: var(--white); color: var(--navy); border: 1px solid var(--line); border-radius: 20px;
  padding: var(--space-m); height: 100%; display: flex; flex-direction: column; gap: var(--space-xs);
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s, border-color .4s;
}
.persona-card:hover, .story-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px var(--navy-30); border-color: var(--aqua); }
.persona-card .icon, .story-card .icon {
  width: 3rem; height: 3rem; border-radius: 999px; display: grid; place-items: center;
  background: rgba(118,170,163,0.16); color: var(--aqua-deep);
}
.persona-card .icon svg, .story-card .icon svg { width: 1.5rem; height: 1.5rem; }
.persona-card h3, .story-card h3 { font-size: var(--step-1); line-height: 1.1; }
.persona-card p, .story-card p { font-size: var(--step--1); color: var(--navy-48); margin: 0; }
.story-card .persona-name { font-size: var(--step--1); color: var(--aqua-deep); font-weight: 600; margin-top: auto; }
.story-card .read { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: var(--step--1); color: var(--navy); }
.grid-carousel .swiper-slide { height: auto; }

.sec-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-m); flex-wrap: wrap; }

/* ============================================================
   LET'S TALK / LEAD
   ============================================================ */
.talk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.talk-grid h2 { font-size: var(--step-5); }
@media (max-width: 900px) { .talk-grid { grid-template-columns: 1fr; gap: var(--space-l); } }

.lead-form { display: grid; gap: var(--space-s); width: 100%; max-width: 30rem; }
.lead-form input, .lead-form select {
  width: 100%; font: inherit; font-size: var(--step-0);
  padding: 0.95em 1.2em; border-radius: 999px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25);
  color: var(--white); outline: none; transition: border-color .25s, background .25s;
}
.lead-form input::placeholder { color: rgba(255,255,255,0.55); }
.lead-form select { color: rgba(255,255,255,0.85); }
.lead-form select option { color: var(--navy); }
.lead-form input:focus, .lead-form select:focus { border-color: var(--aqua); background: rgba(255,255,255,0.12); }
.lead-form button { font: inherit; cursor: pointer; }
.lead-form--hidden { display: none; }
.lead-success { display: none; }
.lead-success:not(.lead-success--hidden) {
  display: block; padding: var(--space-m); border-radius: 20px;
  background: rgba(118,170,163,0.18); border: 1px solid var(--aqua); max-width: 30rem;
}
.lead-success strong { color: var(--aqua); font-size: var(--step-1); display: block; margin-bottom: 0.3rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.lc-footer { background: var(--navy); color: var(--white); padding: var(--space-2xl) var(--section-padding) var(--space-l); }
.lc-footer__inner { max-width: var(--grid-max); margin: 0 auto; }
.lc-footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-l); padding-bottom: var(--space-xl); border-bottom: 1px solid rgba(255,255,255,0.15); }
.lc-footer__brand { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.03em; }
.lc-footer h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.15em; color: var(--aqua); margin: 0 0 var(--space-s); font-weight: 600; }
.lc-footer a { color: rgba(255,255,255,0.8); transition: color .2s; display: block; margin-bottom: 0.4rem; }
.lc-footer a:hover { color: var(--white); }
.lc-footer__bottom { padding-top: var(--space-m); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-s); font-size: var(--step--1); color: rgba(255,255,255,0.55); }
@media (max-width: 700px) { .lc-footer__top { grid-template-columns: 1fr; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .split-line > span { transform: none !important; }
  .lenis.lenis-smooth { scroll-behavior: auto; }
}
