/* =========================================================
   Grapher Labs — Landing Page
   Design system + components
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #FAFAF7;
  --bg-warm: #F4F2EC;
  --surface: #FFFFFF;
  --surface-2: #FBFBFA;

  /* Ink */
  --ink: #0C0D12;
  --ink-2: #3C404B;
  --ink-3: #6B7080;
  --muted: #AFB4C0;        /* hero gray line */

  /* Lines */
  --line: #EAE8E1;
  --line-2: #E4E2DB;
  --line-strong: #D8D6CE;

  /* Brand */
  --accent: #2563EB;
  --accent-600: #1D4FD8;
  --accent-700: #1A45BE;
  --accent-soft: #EAF0FF;
  --accent-ring: rgba(37, 99, 235, 0.16);

  --emerald: #0E9F6E;
  --emerald-soft: #E6F6EF;
  --violet: #6D5EF0;
  --violet-soft: #EFEDFD;
  --amber: #FFE48A;
  --amber-2: #FBD24B;
  --rose: #E5907A;

  /* Effects */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(16, 18, 27, 0.04), 0 1px 1px rgba(16, 18, 27, 0.03);
  --shadow-sm: 0 2px 6px rgba(16, 18, 27, 0.05), 0 1px 2px rgba(16, 18, 27, 0.04);
  --shadow: 0 10px 30px -12px rgba(16, 18, 27, 0.18), 0 2px 8px rgba(16, 18, 27, 0.05);
  --shadow-lg: 0 30px 60px -25px rgba(16, 18, 27, 0.28), 0 8px 22px -12px rgba(16, 18, 27, 0.12);
  --shadow-float: 0 18px 40px -18px rgba(16, 18, 27, 0.22), 0 4px 10px -4px rgba(16, 18, 27, 0.08);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-hand: 'Caveat', cursive;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem;
  padding: 11px 20px; border-radius: 999px;
  transition: transform 0.18s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn--primary:hover { background: var(--accent-600); transform: translateY(-1px); box-shadow: 0 12px 26px -10px var(--accent-ring); }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-xs); }
.btn--ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--text { color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.btn--text:hover { color: var(--accent); }
.btn--text svg { transition: transform 0.2s var(--ease); }
.btn--text:hover svg { transform: translateY(3px); }
.btn--lg { padding: 15px 28px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.link-quiet { color: var(--ink-2); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.link-quiet:hover { color: var(--ink); }

/* ---------------- Brand ---------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: grid; place-items: center; }
.brand__mark .edge { stroke: var(--ink); }
.brand__mark .node { fill: var(--ink); }
.brand__mark .node--accent { fill: var(--accent); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; color: var(--ink); }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 250, 247, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 0.93rem; font-weight: 500; color: var(--ink-2); transition: color 0.2s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; transition: right 0.25s var(--ease); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { right: 0; }
.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 68px 0 auto 0; z-index: 99;
  background: rgba(250, 250, 247, 0.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px 28px;
  display: flex; flex-direction: column; gap: 18px;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform 0.28s var(--ease), opacity 0.24s;
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__links a { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 150px 0 120px;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, #FFFFFF 0%, var(--bg) 46%, var(--bg-warm) 100%);
}
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(12,13,18,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 35%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 35%, #000 0%, transparent 75%);
}

.hero__core { position: relative; z-index: 2; text-align: center; max-width: 880px; }
.hero__icon {
  width: 76px; height: 76px; margin: 0 auto 30px;
  background: var(--surface); border-radius: 20px;
  display: grid; place-items: center;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--line);
}
.hero__eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
  border: 1px solid rgba(37,99,235,0.12);
}
.hero__title {
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.hero__title .muted { color: var(--muted); }
.hero__sub {
  margin: 26px auto 0; max-width: 620px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-2); line-height: 1.6;
}
.hero__cta { margin-top: 34px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero__trust {
  margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--ink-3);
}
.hero__trust .dot { color: var(--line-strong); }

/* ---------- Floating cards ---------- */
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.float {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  padding: 14px 16px;
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) var(--rot, rotate(0deg)); }
  50% { transform: translateY(-9px) var(--rot, rotate(0deg)); }
}

.float--note {
  top: 13%; left: 3%;
  background: linear-gradient(170deg, #FFEFA8, var(--amber));
  border: none; border-radius: 6px 10px 8px 12px;
  width: 220px; padding: 18px 18px 20px;
  box-shadow: 0 16px 30px -14px rgba(180,150,20,0.5);
  --rot: rotate(-5deg);
  font-family: var(--font-hand);
  animation-delay: 0s;
}
.float--note p { font-size: 1.18rem; line-height: 1.25; color: #5A4A12; font-weight: 600; }
.note__pin { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7a7a, #d63030); box-shadow: 0 3px 5px rgba(0,0,0,0.25); transform: translateX(-50%); }

.float--chip-graph {
  top: 38%; left: 4%; padding: 12px;
  --rot: rotate(4deg); animation-delay: 1.2s;
}

.float--forecast {
  top: 11%; right: 3%; width: 210px;
  --rot: rotate(3deg); animation-delay: 0.6s;
}
.fc__head { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--ink-3); font-weight: 500; }
.fc__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.fc__big { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; margin-top: 6px; letter-spacing: -0.03em; }
.fc__big small { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.fc__delta { font-size: 0.78rem; font-weight: 600; margin-top: 2px; }
.fc__delta.up { color: var(--emerald); }
.fc__spark { width: 100%; height: 38px; margin-top: 8px; }

.float--scenario {
  top: 45%; right: 2%; padding: 13px 16px;
  --rot: rotate(-4deg); animation-delay: 1.8s;
}
.sc__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.sc__code { display: block; font-family: var(--font-mono); font-size: 0.92rem; margin-top: 6px; color: var(--ink); }
.sc__code .tok-var { color: var(--accent); }
.sc__code .tok-num { color: var(--emerald); }
.sc__meta { font-size: 0.72rem; color: var(--ink-3); margin-top: 6px; }

.float--results {
  bottom: 8%; left: 4%; width: 248px; padding: 16px 18px;
  --rot: rotate(3deg); animation-delay: 2.4s;
}
.rs__title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
.rs__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; margin-top: 10px; }
.rs__name { color: var(--ink-2); }
.rs__val { font-weight: 700; font-family: var(--font-display); }
.rs__val.pos { color: var(--emerald); }
.rs__val.neg { color: var(--rose); }
.rs__bar { height: 6px; border-radius: 999px; background: var(--bg-warm); margin-top: 5px; overflow: hidden; }
.rs__bar i { display: block; height: 100%; border-radius: 999px; background: var(--emerald); }

.float--integrations {
  bottom: 11%; right: 4%; width: 210px; padding: 15px 16px;
  --rot: rotate(-3deg); animation-delay: 3s;
}
.ig__title { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 11px; }
.ig__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ig__tile {
  aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs); transition: transform 0.2s var(--ease);
}
.ig__tile img { width: 30px; height: 30px; object-fit: contain; }
.ig__tile--more { background: var(--bg-warm); border-color: transparent; color: var(--ink-3); font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; }

/* =========================================================
   LOGOS / TRUST STRIP
   ========================================================= */
.logos { padding: 8px 0 56px; }
.logos__label { text-align: center; font-size: 0.85rem; color: var(--ink-3); margin-bottom: 22px; font-weight: 500; }
.logos__row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 14px 40px;
}
.logos__item {
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px;
  opacity: 0.85;
}
.logos__item em { font-style: normal; font-weight: 500; font-size: 0.74rem; color: var(--ink-3); background: var(--bg-warm); padding: 2px 8px; border-radius: 999px; }

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.kicker.light { color: rgba(255,255,255,0.7); }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -0.035em; }
.section-head h2 em { font-style: italic; color: var(--accent); font-family: var(--font-display); }
.section-head p { margin-top: 18px; font-size: 1.08rem; color: var(--ink-2); line-height: 1.6; }

/* =========================================================
   PRODUCT / APP
   ========================================================= */
.product { padding: 60px 0 100px; }

.app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.app__chrome {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.app__dots { display: flex; gap: 7px; }
.app__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.app__dots i:nth-child(1) { background: #F0A8A0; }
.app__dots i:nth-child(2) { background: #F4D58A; }
.app__dots i:nth-child(3) { background: #A8D8B0; }
.app__url {
  flex: 1; max-width: 420px; margin: 0 auto;
  text-align: center; font-size: 0.78rem; color: var(--ink-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; font-family: var(--font-mono); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app__chrome-actions { display: flex; gap: 6px; }
.app__chrome-actions span { width: 14px; height: 4px; border-radius: 2px; background: var(--line-strong); }

.app__body { display: grid; grid-template-columns: 196px 1fr 224px; min-height: 540px; }

/* Sidebar */
.app__side { border-right: 1px solid var(--line); padding: 18px 14px; background: var(--surface-2); }
.side__group + .side__group { margin-top: 22px; }
.side__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 600; padding: 0 8px; margin-bottom: 8px; }
.side__item { display: block; font-size: 0.85rem; color: var(--ink-2); padding: 7px 10px; border-radius: var(--radius-xs); transition: background 0.15s, color 0.15s; cursor: pointer; }
.side__item:hover { background: var(--bg-warm); color: var(--ink); }
.side__item.is-active { background: var(--accent-soft); color: var(--accent-700); font-weight: 600; }

/* Main */
.app__main { padding: 24px 26px; min-width: 0; }
.main__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.main__head h3 { font-size: 1.25rem; }
.main__sub { font-size: 0.85rem; color: var(--ink-3); margin-top: 4px; }
.main__sub code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; }
.seg { display: inline-flex; background: var(--bg-warm); border-radius: 999px; padding: 3px; }
.seg__btn { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); padding: 6px 14px; border-radius: 999px; transition: all 0.18s; }
.seg__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

/* Chart */
.chart { position: relative; margin: 22px 0 12px; display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.chart__yaxis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.68rem; color: var(--ink-3); padding: 4px 0 22px; text-align: right; }
.chart__svg { width: 100%; height: 300px; grid-column: 2; }
.chart .grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.cone-int { } .cone-base { }
.line-base { stroke: #9AA2B1; stroke-width: 2; stroke-dasharray: 5 4; }
.line-int { stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 4px 8px var(--accent-ring)); }
.pt-base { fill: #9AA2B1; }
.pt-int { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.chart__xaxis { grid-column: 2; display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--ink-3); margin-top: 2px; }

.chart__tip {
  position: absolute; z-index: 4;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px;
  font-size: 0.74rem; box-shadow: var(--shadow); min-width: 168px;
  pointer-events: none;
}
.tip__row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.tip__row b { margin-left: auto; font-family: var(--font-display); }
.tip__k { font-weight: 600; color: rgba(255,255,255,0.6); }
.tip__sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.tip__sw.int { background: var(--accent); }
.tip__sw.base { background: #9AA2B1; }
.tip__band { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.7); }

.legend { display: flex; gap: 20px; flex-wrap: wrap; margin: 6px 0 18px; padding-left: 52px; }
.legend__i { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--ink-2); }
.legend .sw { width: 16px; height: 4px; border-radius: 2px; }
.legend .sw.int { background: var(--accent); }
.legend .sw.base { background: #9AA2B1; }
.legend .sw.band { background: var(--accent-soft); height: 12px; width: 16px; border-radius: 3px; }

/* Table */
.table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table__head, .table__row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.1fr; align-items: center; gap: 8px; padding: 12px 16px; }
.table__head { background: var(--surface-2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; }
.table__row { font-size: 0.86rem; border-top: 1px solid var(--line); }
.table__row .pos { color: var(--emerald); font-weight: 600; }
.table__row .neg { color: var(--rose); font-weight: 600; }
.table__row.is-hi { background: var(--accent-soft); }
.t-name { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.tag { font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-700); background: rgba(37,99,235,0.12); padding: 2px 7px; border-radius: 999px; font-style: normal; }
.t-conf { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 0.8rem; }
.t-conf i { flex: 1; max-width: 60px; height: 5px; border-radius: 999px; background: var(--accent); opacity: 0.85; }
.t-conf { position: relative; }
.t-conf::before { content: ""; }

/* Right rail */
.app__rail { border-left: 1px solid var(--line); padding: 20px 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 16px; }
.rail__metric { display: flex; flex-direction: column; gap: 2px; }
.rail__k { font-size: 0.74rem; color: var(--ink-3); font-weight: 500; }
.rail__v { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.rail__v small { font-size: 0.72rem; font-weight: 600; color: var(--ink-3); }
.rail__d { font-size: 0.74rem; font-weight: 600; }
.rail__d.up { color: var(--emerald); }
.rail__d.down { color: var(--accent); }
.rail__why { margin-top: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.why__head { font-size: 0.78rem; font-weight: 700; font-family: var(--font-display); margin-bottom: 6px; }
.rail__why p { font-size: 0.78rem; color: var(--ink-2); line-height: 1.5; }
.why__link { display: inline-block; margin-top: 10px; font-size: 0.78rem; font-weight: 600; color: var(--accent); cursor: pointer; }

/* =========================================================
   FEATURES
   ========================================================= */
.features { padding: 100px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.feature__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; }
.feature__icon.i-graph { background: var(--violet-soft); color: var(--violet); }
.feature__icon.i-sim { background: var(--accent-soft); color: var(--accent); }
.feature__icon.i-why { background: var(--emerald-soft); color: var(--emerald); }
.feature h3 { font-size: 1.3rem; margin-bottom: 10px; }
.feature p { color: var(--ink-2); font-size: 0.95rem; }
.feature p code { font-family: var(--font-mono); font-size: 0.85rem; background: var(--bg-warm); padding: 1px 5px; border-radius: 5px; }
.feature__list { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.feature__list li { font-size: 0.86rem; color: var(--ink-2); padding-left: 24px; position: relative; }
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* =========================================================
   STATS BAND
   ========================================================= */
.stats {
  background: var(--ink);
  color: #fff;
  padding: 90px 0;
  position: relative; overflow: hidden;
}
.stats::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(90% 90% at 80% 10%, #000, transparent 70%);
  mask-image: radial-gradient(90% 90% at 80% 10%, #000, transparent 70%);
}
.stats__lead { position: relative; max-width: 760px; margin-bottom: 56px; }
.stats__lead h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.stats__grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.stat { border-top: 2px solid rgba(255,255,255,0.16); padding-top: 22px; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(180deg, #fff, #c7d6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__num--word { font-size: 2.2rem; line-height: 1.05; }
.stat p { margin-top: 16px; color: rgba(255,255,255,0.74); font-size: 0.96rem; line-height: 1.55; }
.stat__src { display: inline-block; margin-top: 14px; font-size: 0.74rem; color: rgba(255,255,255,0.45); font-family: var(--font-mono); }

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how { padding: 100px 0; }
.steps { display: flex; align-items: stretch; gap: 8px; }
.step {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step__n { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); width: 44px; height: 30px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--ink-2); }
.step__arrow { display: grid; place-items: center; color: var(--line-strong); font-size: 1.4rem; flex-shrink: 0; }

/* =========================================================
   SOLUTIONS
   ========================================================= */
.solutions { padding: 100px 0; background: var(--bg-warm); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.use {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.use::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px;
  border-radius: 50%; background: var(--accent-soft); opacity: 0; transition: opacity 0.3s;
}
.use:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.use:hover::after { opacity: 0.5; }
.use__tag { position: relative; z-index: 1; display: inline-block; font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-700); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.use h3 { position: relative; z-index: 1; font-size: 1.4rem; margin-bottom: 10px; }
.use p { position: relative; z-index: 1; color: var(--ink-2); font-size: 0.96rem; }

/* =========================================================
   RESEARCH
   ========================================================= */
.research { padding: 100px 0; }
.research__inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.research__copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.research__copy > p { margin-top: 18px; color: var(--ink-2); font-size: 1.05rem; }
.pullquote {
  margin: 28px 0; padding: 22px 24px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm); font-size: 1.08rem; color: var(--ink); line-height: 1.5;
}
.pullquote strong { color: var(--accent); }
.pullquote cite { display: block; margin-top: 12px; font-size: 0.85rem; font-style: normal; color: var(--ink-3); }
.research__papers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.paper {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs); cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
  display: flex; flex-direction: column;
}
.paper:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--accent); }
.paper__tag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--violet); margin-bottom: 12px; }
.paper h4 { font-size: 1rem; line-height: 1.25; margin-bottom: 8px; }
.paper p { font-size: 0.85rem; color: var(--ink-2); flex: 1; }
.paper__src { margin-top: 14px; font-size: 0.72rem; color: var(--ink-3); font-family: var(--font-mono); }

/* =========================================================
   PRICING
   ========================================================= */
.pricing { padding: 100px 0; background: var(--bg-warm); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  position: relative; transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan--featured { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: var(--shadow-lg); transform: scale(1.02); }
.plan--featured:hover { transform: scale(1.02) translateY(-4px); }
.plan__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.plan__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.plan--featured .plan__name { color: #fff; }
.plan__price { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.03em; margin: 8px 0 4px; }
.plan__price span { font-size: 0.85rem; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.plan--featured .plan__price span { color: rgba(255,255,255,0.6); }
.plan__desc { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 22px; min-height: 60px; }
.plan--featured .plan__desc { color: rgba(255,255,255,0.7); }
.plan__list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; flex: 1; }
.plan__list li { font-size: 0.88rem; color: var(--ink-2); padding-left: 26px; position: relative; }
.plan--featured .plan__list li { color: rgba(255,255,255,0.82); }
.plan__list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.plan--featured .plan__list li::before { color: #7AA2FF; }
.plan--featured .btn--primary { background: #fff; color: var(--ink); }
.plan--featured .btn--primary:hover { background: #EAF0FF; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { padding: 100px 0; }
.faq__inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq__head { position: sticky; top: 100px; }
.faq__head h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.faq__head p { margin-top: 16px; color: var(--ink-2); }
.faq__head a { color: var(--accent); font-weight: 600; }
.faq__list { display: flex; flex-direction: column; gap: 12px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.qa[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__ic { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.qa__ic::before, .qa__ic::after { content: ""; position: absolute; background: var(--ink-3); border-radius: 2px; transition: transform 0.25s var(--ease); }
.qa__ic::before { top: 7px; left: 0; width: 16px; height: 2px; }
.qa__ic::after { top: 0; left: 7px; width: 2px; height: 16px; }
.qa[open] .qa__ic::after { transform: rotate(90deg); opacity: 0; }
.qa[open] .qa__ic::before { background: var(--accent); }
.qa__body { padding: 0 22px 22px; }
.qa__body p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.6; }
.qa__body em { font-style: italic; color: var(--ink); }

/* =========================================================
   CTA
   ========================================================= */
.cta { padding: 40px 0 110px; }
.cta__card {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr 0.9fr; gap: 40px;
  padding: 56px;
}
.cta__card.pulse { animation: ctaPulse 1s var(--ease); }
@keyframes ctaPulse {
  0% { box-shadow: var(--shadow-lg), 0 0 0 0 var(--accent-ring); }
  40% { box-shadow: var(--shadow-lg), 0 0 0 10px var(--accent-ring); }
  100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(37,99,235,0); }
}
.cta__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 120% at 90% 10%, rgba(37,99,235,0.45), transparent 55%),
    radial-gradient(50% 100% at 0% 100%, rgba(109,94,240,0.32), transparent 60%);
}
.cta__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cta__content { position: relative; z-index: 1; align-self: center; }
.cta__content h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); }
.cta__content p { margin-top: 16px; color: rgba(255,255,255,0.74); font-size: 1.08rem; max-width: 420px; }
.cta__points { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.cta__points li { color: rgba(255,255,255,0.9); font-size: 0.95rem; }

.cta__form { position: relative; z-index: 1; background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); }
.cta__form h3 { font-size: 1.25rem; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 0.92rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 14px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-ring); }
.field input.is-error, .field textarea.is-error { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(229,144,122,0.18); }
.cta__fine { font-size: 0.74rem; color: var(--ink-3); text-align: center; margin-top: 12px; }

.form-success { text-align: center; padding: 20px 0; }
.form-success__check { width: 56px; height: 56px; border-radius: 50%; background: var(--emerald-soft); color: var(--emerald); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; margin: 0 auto 14px; }
.form-success h4 { font-size: 1.2rem; margin-bottom: 6px; }
.form-success p { color: var(--ink-2); font-size: 0.92rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 56px; }
.footer__tag { margin-top: 16px; color: var(--ink-2); font-size: 0.92rem; max-width: 280px; }
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.soc { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 600; color: var(--ink-2); transition: all 0.2s; }
.soc:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.footer__col h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 16px; font-family: var(--font-sans); font-weight: 600; }
.footer__col a { display: block; font-size: 0.9rem; color: var(--ink-2); padding: 5px 0; transition: color 0.2s; }
.footer__col a:hover { color: var(--accent); }
.footer__news p { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 12px; }
.news { display: flex; gap: 8px; }
.news input { flex: 1; min-width: 0; font-size: 0.88rem; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.news input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.news button { width: 42px; flex-shrink: 0; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-size: 1.1rem; font-weight: 600; transition: background 0.2s; }
.news button:hover { background: var(--accent-600); }
.news__msg { display: block; margin-top: 10px; font-size: 0.82rem; color: var(--emerald); font-weight: 500; }

.footer__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-3); }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: var(--ink); }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
/* Mid-height side chips crowd the large headline on narrower laptops — drop just those two */
@media (max-width: 1200px) {
  .float--chip-graph, .float--scenario { display: none; }
  .float--forecast { right: 1.5%; }
  .float--integrations { right: 2%; }
}

@media (max-width: 1080px) {
  .app__body { grid-template-columns: 170px 1fr; }
  .app__rail { display: none; }
  .research__inner { gap: 40px; }
}

@media (max-width: 900px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; }

  .floaters { display: none; }
  .hero { padding: 120px 0 80px; }

  .grid-3, .stats__grid, .steps, .plans { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step__arrow { transform: rotate(90deg); padding: 4px 0; }
  .grid-2, .research__papers { grid-template-columns: 1fr; }
  .research__inner, .faq__inner, .footer__inner, .cta__card { grid-template-columns: 1fr; }
  .faq__head { position: static; }
  .cta__card { padding: 36px 28px; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-4px); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .app__body { grid-template-columns: 1fr; }
  .app__side { display: none; }
  .chart__svg { height: 220px; }
  .table__head { display: none; }
  .table__row { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .table__row .t-name { grid-column: 1 / -1; }
  .legend { padding-left: 0; }
  .stat__num { font-size: 3rem; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .cta__content h2 { font-size: 2rem; }
}
