/* KiwionAI — shared design system
   Fonts: Fraunces (display) + Manrope (text), loaded per page from Google Fonts. */

:root {
  --bg: #fbf8f3;
  --bg-2: #f4efe6;
  --surface: #ffffff;
  --ink: #14202a;
  --ink-2: #44525f;
  --muted: #6f7b87;
  --line: #e7e0d4;
  --line-2: #d9d0c1;
  --brand: #10b3a4;
  --brand-2: #17c1d6;
  --brand-ink: #087a70;
  --brand-wash: #e3f6f3;
  --peach: #f7d2b6;
  --rose: #f2b8b5;
  --lilac: #d9cdf6;
  --sun: #ffe5a3;
  --night: #1c1842;
  --shadow-sm: 0 1px 2px rgba(20, 32, 42, .06), 0 2px 8px rgba(20, 32, 42, .04);
  --shadow-md: 0 2px 6px rgba(20, 32, 42, .05), 0 16px 40px -12px rgba(20, 32, 42, .18);
  --shadow-lg: 0 30px 80px -24px rgba(20, 32, 42, .35);
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-text: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1317;
    --bg-2: #111b20;
    --surface: #141f25;
    --ink: #ecf3f2;
    --ink-2: #b2c0c2;
    --muted: #8a9a9e;
    --line: #23323a;
    --line-2: #2e4049;
    --brand: #2bd3c1;
    --brand-2: #35cfe3;
    --brand-ink: #5fe3d4;
    --brand-wash: #10302d;
    --peach: #5a3a2c;
    --rose: #573033;
    --lilac: #352d5a;
    --sun: #4d4123;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 40px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1317; --bg-2: #111b20; --surface: #141f25; --ink: #ecf3f2; --ink-2: #b2c0c2;
  --muted: #8a9a9e; --line: #23323a; --line-2: #2e4049; --brand: #2bd3c1; --brand-2: #35cfe3;
  --brand-ink: #5fe3d4; --brand-wash: #10302d; --peach: #5a3a2c; --rose: #573033; --lilac: #352d5a;
  --sun: #4d4123; --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 2px 6px rgba(0,0,0,.3), 0 16px 40px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 80px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-wash); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; margin: 0; color: var(--ink); font-optical-sizing: auto; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { margin: 0; }
em.serif, .serif-i { font-family: var(--font-display); font-style: italic; font-weight: 400; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 60ch; }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--b-bg); color: var(--b-fg); font: 700 .98rem/1 var(--font-text);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { color: var(--b-fg); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-brand { --b-bg: var(--brand); --b-fg: #04201d; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-word { font-family: var(--font-text); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand-word span { color: var(--brand-ink); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 11px 18px; font-size: .92rem; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 880px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a:hover { background: none; }
  .nav-cta .btn { display: none; }
}

/* ---------- Generic cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.icon-badge {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-wash); color: var(--brand-ink); margin-bottom: 18px;
}
.icon-badge svg { width: 22px; height: 22px; }
.card h3, .card h4 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: .98rem; }

.pill {
  font-family: var(--font-text); letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; background: var(--brand-wash); color: var(--brand-ink);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.pill-quiet { background: var(--bg-2); color: var(--ink-2); }

/* ---------- Home hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 22px 0 24px; }
.hero h1 .accent { font-style: italic; font-weight: 400; color: var(--brand-ink); }
.hero .lede { margin-bottom: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--brand-ink); }

.stack-wrap { perspective: 1400px; }
.stack {
  position: relative; aspect-ratio: 1 / 1; max-width: 560px; margin-left: auto; width: 100%;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.stack .page {
  position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 6px solid var(--surface); background: var(--surface);
}
.stack .page img { width: 100%; height: 100%; object-fit: cover; }
.stack .p1 { width: 62%; aspect-ratio: 1; left: 0; top: 10%; transform: translateZ(-40px) rotate(-6deg); }
.stack .p2 { width: 56%; aspect-ratio: 1; right: 0; top: 0; transform: translateZ(-90px) rotate(5deg); }
.stack .p3 { width: 60%; aspect-ratio: 1; left: 22%; bottom: 0; transform: translateZ(60px) rotate(-1deg); z-index: 2; }
.stack .page::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 48%, transparent 62%);
  background-size: 260% 100%; background-position: var(--shine, 50%) 0;
}
.stack .tag {
  position: absolute; z-index: 3; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-md); font-size: .84rem; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.stack .tag small { display: block; font-weight: 600; color: var(--muted); font-size: .74rem; }
.stack .tag .sw { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-ink); }
.stack .tag .sw svg { width: 16px; height: 16px; }
.stack .tag { transform: translateZ(130px); animation: bob 6s ease-in-out infinite; }
.stack .t1 { left: -4%; bottom: 14%; }
.stack .t2 { right: -2%; top: 48%; animation-delay: -3s; }
@keyframes bob { 50% { translate: 0 -10px; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stack { margin: 12px auto 0; max-width: 460px; }
  .stack .t1 { left: 0; } .stack .t2 { right: 0; }
  .stack .tag { transform: translateZ(50px); }
  .stack .p2 { transform: translateZ(-40px) rotate(5deg); }
}

/* ---------- Facts strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--bg-2); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.fact span { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 860px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 22px 16px; } .fact b { font-size: 1.2rem; } .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Product showcase (home) ---------- */
.product-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(140deg, #fff3e8 0%, #fde3d6 45%, #efe2fb 100%); color: #2a1d33;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,.04);
}
.product-hero .ph-copy { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.product-hero h3 { font-size: clamp(2rem, 3.6vw, 3rem); color: #2a1d33; letter-spacing: -0.03em; }
.product-hero p { color: #5a4a5f; }
.product-hero .pill { align-self: flex-start; background: rgba(255,255,255,.7); color: #7a3e5c; }
.product-hero .pill .dot { background: #e2557d; box-shadow: 0 0 0 4px rgba(226,85,125,.2); }
.product-hero ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 10px; }
.product-hero li { display: flex; gap: 10px; align-items: flex-start; color: #3e2f45; font-weight: 600; font-size: .97rem; }
.product-hero li svg { width: 20px; height: 20px; flex: none; color: #c2456b; margin-top: 3px; }
.product-hero .btn { --b-bg: #2a1d33; --b-fg: #fff; align-self: flex-start; }
.product-hero .ph-art { position: relative; min-height: 420px; }
.product-hero .ph-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dd-mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: #2a1d33; }
.dd-mark svg { width: 30px; height: 30px; }
@media (max-width: 860px) { .product-hero { grid-template-columns: minmax(0, 1fr); } .product-hero .ph-art { min-height: 300px; order: -1; } }

.lab-card {
  margin-top: 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); background: var(--surface);
}
.lab-card .lab-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(140deg, #1d5fd8, #19b9d8); color: #fff; }
.lab-card .lab-ico svg { width: 26px; height: 26px; }
.lab-card h4 { margin-bottom: 4px; }
.lab-card p { color: var(--ink-2); font-size: .97rem; }
@media (max-width: 720px) { .lab-card { grid-template-columns: 1fr; } }

/* ---------- Pipeline diagram ---------- */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.pipeline::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: 34px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 14px);
}
.pipeline::after {
  content: ""; position: absolute; top: 31px; left: 4%; width: 14%; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); filter: blur(1px);
  animation: flow 4.2s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes flow { 0% { left: 2%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 84%; opacity: 0; } }
.step { position: relative; text-align: center; padding: 0 4px; }
.step .node { animation: nodepulse 4.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .7s); }
@keyframes nodepulse { 0%, 30%, 100% { box-shadow: var(--shadow-sm); transform: none; } 12% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 20%, transparent), 0 10px 30px -8px color-mix(in srgb, var(--brand) 60%, transparent); transform: translateY(-3px); } }
.floor { position: relative; overflow: hidden; isolation: isolate; }
.floor::before {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: 0; height: 75%; z-index: -1; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--brand) 40%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--brand) 40%, transparent) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(700px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 70%); mask-image: linear-gradient(to top, #000 0%, transparent 70%);
  animation: floor 6s linear infinite;
}
@keyframes floor { to { background-position: 0 64px; } }
.step .node {
  position: relative; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink);
}
.step .node svg { width: 26px; height: 26px; }
.step.guard .node { background: var(--brand-wash); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand-ink); }
.step h4 { font-family: var(--font-text); font-weight: 800; font-size: .95rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.step p { font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 980px) {
  .pipeline { grid-template-columns: 1fr; gap: 0; }
  .pipeline::before { left: 33px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 8px, transparent 8px 14px); }
  .step { display: grid; grid-template-columns: 68px 1fr; gap: 0 18px; text-align: left; padding: 10px 0; }
  .step .node { margin: 0; grid-row: span 2; }
  .pipeline::after { display: none; }
  .step h4 { align-self: end; margin: 0; }
}
.pipeline-note { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pipeline-note .pill { background: var(--surface); border: 1px solid var(--line); }

/* ---------- Principles ---------- */
.principle { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.principle .num { font-family: var(--font-display); font-style: italic; color: var(--brand-ink); font-size: 1.2rem; min-width: 34px; }
.principle h3 { margin-bottom: 8px; }
.principle p { color: var(--ink-2); }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .sticky { position: sticky; top: 110px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split .sticky { position: static; } }

/* ---------- Company / about ---------- */
.about-band { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(32px, 6vw, 72px); position: relative; overflow: hidden; }
.about-band::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 45%, transparent), transparent);
  opacity: .55; pointer-events: none;
}
.about-band h2 { color: var(--bg); max-width: 18ch; }
.about-band .eyebrow { color: var(--brand); }
.about-band p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); position: relative; z-index: 1; }
.about-grid dl { margin: 0; display: grid; gap: 0; align-self: end; }
.about-grid dl div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--bg) 16%, transparent); }
.about-grid dt { color: color-mix(in srgb, var(--bg) 60%, transparent); font-size: .86rem; font-weight: 600; }
.about-grid dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid dl div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Contact CTA ---------- */
.cta { text-align: center; display: grid; justify-items: center; gap: 22px; }
.cta h2 { max-width: 20ch; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; max-width: 900px; margin-top: 14px; }
.contact-grid a { display: block; text-decoration: none; text-align: left; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .2s, transform .2s; }
.contact-grid a:hover { border-color: var(--brand); transform: translateY(-2px); }
.contact-grid small { display: block; color: var(--muted); font-weight: 600; font-size: .82rem; margin-bottom: 4px; }
.contact-grid b { font-weight: 700; word-break: break-word; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 64px 0 36px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h5 { font: 800 .78rem/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about .brand { color: var(--ink); }
.footer-about .brand:hover { text-decoration: none; }
.footer-about p { color: var(--ink-2); margin-top: 14px; max-width: 38ch; }
.legal-line { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; }
.legal-line address { font-style: normal; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: perspective(900px) translateY(28px) rotateX(14deg); transform-origin: 50% 0; filter: blur(6px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1), filter .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  * { animation: none !important; }
}
.no-js .reveal { opacity: 1; transform: none; filter: none; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 18px 0 16px; }
.legal-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.legal-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(36px, 5vw, 64px) 0 clamp(72px, 9vw, 120px); }
.toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; padding-right: 8px; }
.toc h5 { font: 800 .76rem/1 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .88rem; line-height: 1.4; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); background: var(--bg-2); }
.toc a.active { color: var(--brand-ink); border-left-color: var(--brand); background: var(--brand-wash); border-radius: 0 8px 8px 0; }
@media (max-width: 960px) {
  .legal-wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); }
}
.prose { max-width: 760px; font-size: 1.01rem; color: var(--ink-2); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); color: var(--ink); margin-top: 2.4em; padding-top: .2em; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-text); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); margin-top: 1.8em; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brand-ink); }
.prose .summary-box { background: var(--brand-wash); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); border-radius: var(--radius); padding: 22px 24px; color: var(--ink); }
.prose .summary-box h3 { margin-top: 0; }
.prose .summary-box ul { margin: .6em 0 0; }
.prose .note { border-left: 3px solid var(--brand); padding: 4px 0 4px 18px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 800; background: var(--bg-2); font-size: .82rem; letter-spacing: .02em; }
.prose tr:last-child td { border-bottom: 0; }
.officer-card { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); color: var(--ink); }
.officer-card .role { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); }
.officer-card .name { font-family: var(--font-display); font-size: 1.4rem; }
.officer-card div { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 700; font-size: 1.06rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 70ch; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(4rem, 14vw, 9rem); color: var(--brand-ink); }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip:focus { left: 16px; color: var(--bg); }

/* ---------- Short legal pages ---------- */
.legal-single { padding-block: clamp(36px, 5vw, 64px) clamp(72px, 9vw, 120px); }
.legal-single .prose { margin-inline: auto; }
.legal-single .prose h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 2em; }

/* ---------- Hero 3D canvas ---------- */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--brand-ink) 0%, #7b5ce0 35%, var(--brand) 60%, var(--brand-ink) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s ease-in-out infinite; padding-right: .06em;
}
@keyframes shimmer { 50% { background-position: 100% 0; } }

/* ---------- Tilt + spotlight cards ---------- */
[data-tilt] { transform-style: preserve-3d; will-change: transform; position: relative; }
[data-tilt].tilting { transition: transform .12s ease-out, box-shadow .3s ease; box-shadow: var(--shadow-md); }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 16%, transparent), transparent 45%);
}
[data-tilt].tilting::after { opacity: 1; }
.product-hero[data-tilt]::after { z-index: 2; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 45%); }

/* ---------- Animated glow in the company band ---------- */
.about-band::after { animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-260px, -140px) scale(1.25); } }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--brand), #7b5ce0, var(--brand-2)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

@media (prefers-reduced-motion: reduce) {
  .stack { transform: none; }
  [data-tilt] { transform: none !important; }
}
@media (max-width: 520px) {
  .stack .tag { font-size: .74rem; padding: 8px 10px; gap: 8px; }
  .stack .tag .sw { width: 24px; height: 24px; }
}

/* =====================================================================
   AI look: deeper dark palette, aurora, glow borders
   ===================================================================== */
:root[data-theme="dark"] {
  --bg: #070b10; --bg-2: #0b1118; --surface: #0f171f; --ink: #eef5f6; --ink-2: #aab8bd; --muted: #7d8c93;
  --line: #1b2731; --line-2: #26343f; --brand: #2be0c8; --brand-2: #38c8ff; --brand-ink: #5cf0dc; --brand-wash: #0d2a2a;
  --violet: #8b6cff;
}
:root { --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; --violet: #7b5ce0; }

.eyebrow { font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: .74rem; }
.eyebrow::before { width: 8px; height: 8px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 12px var(--brand); }

/* Primary buttons glow */
.btn-brand { background: linear-gradient(120deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent), 0 8px 30px -10px var(--brand); }
.btn-brand:hover { box-shadow: 0 0 0 1px var(--brand), 0 12px 40px -8px var(--brand); }

/* Aurora behind the hero */
.aurora { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; mix-blend-mode: screen; animation: aurora 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: 40%; top: -20%; background: radial-gradient(circle, var(--brand) 0%, transparent 65%); }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; left: 62%; top: 30%; background: radial-gradient(circle, var(--violet) 0%, transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: -8%; top: 45%; background: radial-gradient(circle, var(--brand-2) 0%, transparent 65%); opacity: .22; animation-duration: 26s; }
@keyframes aurora { 33% { transform: translate(-6vw, 4vw) scale(1.1); } 66% { transform: translate(4vw, -3vw) scale(.92); } 100% { transform: translate(-2vw, 6vw) scale(1.05); } }
:root:not([data-theme="dark"]) .aurora i { mix-blend-mode: multiply; opacity: .18; }
.hero::before { display: none; }
/* Faint dot grid over the hero, fading out */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 80%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 80%);
}

/* Rotating headline word */
.hero h1 .accent { display: inline-block; white-space: nowrap; }
.hero h1 .accent { transition: opacity .45s ease, filter .45s ease, transform .45s ease; }
.hero h1 .accent.out { opacity: 0; filter: blur(10px); transform: translateY(.12em); }

/* Rotating gradient borders */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.glow-border { border: 1px solid transparent !important; animation: rotate-border 8s linear infinite; }
.product-hero.glow-border {
  background: linear-gradient(140deg, #fff3e8 0%, #fde3d6 45%, #efe2fb 100%) padding-box,
              conic-gradient(from var(--angle), transparent 0 60%, var(--brand) 75%, var(--violet) 85%, transparent 95%) border-box;
}
.lab-card.glow-border {
  border-style: solid !important;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--angle), var(--line-2) 0 60%, #3b7bff 75%, var(--brand-2) 85%, var(--line-2) 95%) border-box;
}
.product-hero.glow-border { box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--violet) 55%, transparent); }
@keyframes rotate-border { to { --angle: 360deg; } }

/* Cursor glow that follows the pointer across the page */
.cursor-glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 9%, transparent), transparent 65%); transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0); transition: opacity .4s; }
main, .site-footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }
@media (max-width: 520px) { .stack .t2 { display: none; } }
