/* =========================================================
   AI for Humanity — mistral-inspired design system
   Warm editorial, big serif, small-caps labels, motion
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Warm editorial palette */
  --cream:      #F3EEE3;
  --cream-2:    #EBE4D4;
  --cream-3:    #E1D8C3;
  --paper:      #FBF8F1;
  --ink:        #1A1A18;
  --ink-2:      #2B2B27;
  --muted:      #6B6A63;
  --line:       #D9D1BF;
  --line-2:     #C9C0AB;

  /* Accent — warm flame, mistral-ish */
  --flame-500:  #FA500F;
  --flame-600:  #E34608;
  --flame-100:  #FFD9C7;
  --amber:      #F0B429;
  --rose:       #E5484D;
  --sky:        #4C82FF;
  --moss:       #4B7B4B;

  /* Roles */
  --bg:         var(--cream);
  --bg-alt:     var(--cream-2);
  --surface:    var(--paper);
  --border:     var(--line);
  --text:       var(--ink);
  --text-muted: var(--muted);
  --heading:    var(--ink);
  --accent:     var(--flame-500);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-full: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:"Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 44px);
  --nav-h: 68px;
}

/* Dark mode */
:root[data-theme="dark"] {
  --bg:       #131210;
  --bg-alt:   #1A1815;
  --surface:  #1F1D1A;
  --border:   #2E2A24;
  --line:     #2E2A24;
  --line-2:   #3A342B;
  --text:     #EFEAD9;
  --text-muted:#A39C89;
  --heading:  #F5F1E4;
  --paper:    #1F1D1A;
  --cream:    #131210;
  --cream-2:  #1A1815;
  --cream-3:  #211E1A;
  --flame-500:#FF6A2C;
  --flame-600:#FF854C;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--flame-500); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--cream);
  padding: 10px 14px; border-radius: var(--r-sm);
  z-index: 999;
}
.skip-link:focus { left: 12px; color: var(--cream); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--heading);
  letter-spacing: -0.022em;
  line-height: 1.02;
  margin: 0 0 .5em;
  font-weight: 400;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 350; letter-spacing: -0.035em; line-height: 1; }
h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 380; letter-spacing: -0.028em; line-height: 1.05; }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 420; letter-spacing: -0.02em; line-height: 1.15; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.55;
}
.label,
.label-num {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}
:root[data-theme="dark"] .label,
:root[data-theme="dark"] .label-num { color: var(--heading); }
.label-num::before {
  content: attr(data-num);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}
:root[data-theme="dark"] .label-num::before { color: var(--text-muted); border-color: var(--line); }
.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: 1380px; }
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: var(--cream); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--cream); }
.section--dark .label,
.section--dark .label-num { color: var(--cream); }
.section--dark .lead,
.section--dark p { color: rgba(243, 238, 227, .72); }
.section--dark .label-num::before { color: rgba(243, 238, 227, .55); border-color: rgba(243, 238, 227, .2); }
.section--dark .divider { background: rgba(243, 238, 227, .15); }

.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.divider { border: 0; height: 1px; background: var(--line); margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-h);
  background: transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
body { padding-top: var(--nav-h); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--nav-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--heading);
  font-size: .98rem; letter-spacing: -.01em;
}
.brand:hover { color: var(--heading); }
.brand-mark { width: 30px; height: 30px; }
.brand-name em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); padding-left: 4px; }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 500;
  font-size: .93rem;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  --sz: 40px;
  width: var(--sz); height: var(--sz);
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--text); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-toggle { display: none; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch .lang-toggle {
  width: auto; padding: 0 12px; gap: 6px;
  font-family: var(--font-sans);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.lang-switch .lang-toggle svg { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.lang-switch.is-open .lang-toggle svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .18), 0 4px 10px -6px rgba(0, 0, 0, .10);
  padding: 6px; margin: 0;
  list-style: none;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 70;
}
.lang-switch.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: .92rem; color: var(--text); font-weight: 500;
}
.lang-menu a:hover { background: var(--bg-alt); color: var(--accent); }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.lang-menu a[aria-current="true"]::after {
  content: ""; width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FA500F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}
.lang-menu .lang-code {
  font-family: var(--font-mono); font-size: .74rem;
  color: var(--muted); letter-spacing: .06em;
}
.lang-menu a[aria-current="true"] .lang-code { color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    gap: 0; padding: 16px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility .25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 18px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-actions .btn { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 12px;
  --pad-x: 20px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--r-full);
  font-weight: 600; font-size: .93rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--flame-500); color: #fff; }
:root[data-theme="dark"] .btn--primary { background: var(--cream); color: var(--ink); }
:root[data-theme="dark"] .btn--primary:hover { background: var(--flame-500); color: #fff; }

.btn--accent { background: var(--flame-500); color: #fff; }
.btn--accent:hover { background: var(--flame-600); color: #fff; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }

.btn--outline { background: transparent; color: var(--cream); border-color: rgba(243, 238, 227, .35); }
.btn--outline:hover { background: rgba(243, 238, 227, .1); color: var(--cream); border-color: var(--cream); }

.btn--lg { --pad-y: 16px; --pad-x: 24px; font-size: 1rem; }

/* ---------- News pill ---------- */
.news-pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: .82rem; color: var(--text);
}
.news-pill .tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
  flex-shrink: 0;
}
.news-pill .news-arr {
  width: 26px; height: 26px; display: inline-grid; place-items: center;
  background: var(--ink); color: var(--cream);
  border-radius: 50%; transition: transform .25s var(--ease);
}
.news-pill:hover { color: var(--text); border-color: var(--ink); }
.news-pill:hover .news-arr { transform: translate(3px, -3px); }
:root[data-theme="dark"] .news-pill .news-arr { background: var(--cream); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 96px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-canvas::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: .18;
  mix-blend-mode: multiply;
  pointer-events: none;
}
:root[data-theme="dark"] .hero-canvas::after { mix-blend-mode: screen; opacity: .08; }

.hero-inner {
  width: 100%;
  display: grid; gap: clamp(24px, 4vw, 40px);
  padding-top: 24px;
}
.hero h1 { max-width: 15ch; }
.hero .headline .word {
  display: inline-block;
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}
.hero .headline .word.is-in { opacity: 1; transform: none; }
.hero .headline em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero .hero-sub {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  color: var(--text-muted);
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px;
}
.hero-foot {
  display: flex; align-items: end; justify-content: space-between; gap: 32px;
  padding-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
  flex-wrap: wrap;
}
.hero-foot .meta {
  display: grid; gap: 4px; font-size: .88rem; color: var(--text-muted);
  max-width: 22ch;
}
.hero-foot .meta strong {
  color: var(--heading);
  font-family: var(--font-serif); font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

/* Simplified page hero (about/projects/contact) */
.page-hero {
  position: relative;
  padding: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.page-hero .hero-canvas { position: absolute; inset: 0; z-index: -1; }
.page-hero h1 { max-width: 18ch; margin-top: 20px; }
.page-hero .lead { margin-top: 24px; }

/* ---------- Featured strip ---------- */
.featured-strip {
  padding: clamp(48px, 5vw, 72px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.featured-strip .strip-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 24px; flex-wrap: wrap;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
@media (max-width: 900px) { .strip-grid { grid-template-columns: 1fr; } }
.story-card {
  display: block;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .4s var(--ease);
  color: var(--text);
}
.story-card:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--text); }
.story-card .story-tag {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.story-card h3 {
  margin: 12px 0 0;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  max-width: 20ch;
  position: relative;
}
.story-card .story-arr {
  position: absolute; right: 20px; bottom: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  display: inline-grid; place-items: center;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.story-card:hover .story-arr { transform: translate(4px, -4px); background: var(--accent); }
:root[data-theme="dark"] .story-card .story-arr { background: var(--cream); color: var(--ink); }
.story-card .story-shape {
  position: absolute; inset: auto -20% -30% auto;
  width: 60%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--flame-100), transparent 70%);
  opacity: .8; pointer-events: none;
}
.story-card--dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.story-card--dark .story-tag { color: rgba(243,238,227,.55); }
.story-card--dark:hover { color: var(--cream); border-color: var(--accent); }
.story-card--dark .story-arr { background: var(--cream); color: var(--ink); }
.story-card--dark .story-shape { background: radial-gradient(circle at 30% 30%, rgba(250,80,15,.55), transparent 70%); mix-blend-mode: screen; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 56px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-serif); font-size: clamp(1.4rem, 2vw, 1.9rem);
  color: var(--text); font-weight: 400;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.marquee-item::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.marquee-item em { font-style: italic; color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Statement ---------- */
.statement {
  padding: clamp(96px, 14vw, 200px) 0;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.statement h2 {
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  max-width: 22ch;
  font-weight: 350;
  letter-spacing: -.028em;
}
.statement .word {
  display: inline-block;
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}
.statement .word.is-in { opacity: 1; transform: none; }
.statement em { font-style: italic; color: var(--accent); }
.statement .kicker {
  margin-top: 40px; max-width: 44ch;
  color: var(--text-muted); font-size: 1.05rem;
}

/* ---------- Sticky showcase ---------- */
.showcase { padding: clamp(72px, 10vw, 140px) 0; }
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .showcase-grid { grid-template-columns: 1fr; } }
.showcase-side { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; }
.showcase-side h2 { margin-top: 16px; }
.showcase-side .side-list {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid; gap: 0;
}
.showcase-side .side-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--text-muted);
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.showcase-side .side-list li.is-active { color: var(--text); padding-left: 12px; }
.showcase-side .side-list li.is-active::before {
  content: ""; width: 20px; height: 1px; background: var(--accent);
  margin-right: 6px;
}
.showcase-side .side-list li:last-child { border-bottom: 1px solid var(--line); }

.showcase-panels { display: grid; gap: clamp(20px, 3vw, 32px); }
.panel {
  padding: clamp(28px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  min-height: 380px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.panel .panel-num {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
}
.panel h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  margin: 14px 0 12px;
  max-width: 22ch;
}
.panel .panel-desc { color: var(--text-muted); max-width: 48ch; margin-bottom: 0; }
.panel .panel-caps {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; gap: 0;
}
.panel .panel-caps li {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); font-weight: 600;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.panel .panel-caps li:last-child { border-bottom: 1px solid var(--line); }
.panel-shape {
  position: absolute; top: -30%; right: -20%;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 45%, transparent), transparent 70%);
  filter: blur(30px);
  opacity: .55;
  pointer-events: none;
}
.panel:nth-child(2) .panel-shape { background: radial-gradient(circle, color-mix(in oklab, var(--sky) 55%, transparent), transparent 70%); }
.panel:nth-child(3) .panel-shape { background: radial-gradient(circle, color-mix(in oklab, var(--moss) 55%, transparent), transparent 70%); }
.panel:nth-child(4) .panel-shape { background: radial-gradient(circle, color-mix(in oklab, var(--amber) 55%, transparent), transparent 70%); }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: clamp(16px, 2vw, 24px);
}
.bento-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative; overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--text);
}
.bento-item:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--text); }
.bento-item .b-tag {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.bento-item h3 { margin: 12px 0 0; font-size: clamp(1.15rem, 1.5vw, 1.5rem); max-width: 22ch; }
.bento-item .b-cta {
  margin-top: 16px;
  font-size: .88rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text);
}
.bento-item:hover .b-cta { color: var(--accent); }
.bento-item .b-cta .arrow { transition: transform .25s var(--ease); }
.bento-item:hover .b-cta .arrow { transform: translate(3px, -3px); }

.b-hero { grid-column: span 4; grid-row: span 2; background: var(--ink); color: var(--cream); border-color: var(--ink); }
.b-hero:hover { color: var(--cream); }
.b-hero .b-tag { color: rgba(243,238,227,.6); }
.b-hero h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); max-width: 20ch; }
.b-hero .b-cta { color: var(--cream); }
.b-hero .b-shape {
  position: absolute; inset: -20% -10% auto auto; width: 60%; height: 90%;
  background: radial-gradient(circle at 30% 30%, rgba(250,80,15,.7), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.b-tall { grid-column: span 2; grid-row: span 2; }
.b-wide { grid-column: span 3; }
.b-half { grid-column: span 3; }
.b-third { grid-column: span 2; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(180px, auto); }
  .b-hero, .b-tall, .b-wide, .b-half, .b-third { grid-column: span 2; grid-row: auto; }
}

/* ---------- Stats ---------- */
.stat-card {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.stat-card .num {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--heading);
  line-height: 1;
  letter-spacing: -.03em;
}
.stat-card .num em { color: var(--accent); font-style: italic; }
.stat-card .label-text { color: var(--text-muted); margin-top: 14px; font-size: .95rem; max-width: 30ch; }

/* ---------- Deployment ---------- */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 900px) { .deploy-grid { grid-template-columns: 1fr; } }
.deploy-card {
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--r-xl);
  border: 1px solid rgba(243,238,227,.15);
  background: rgba(243,238,227,.04);
  color: var(--cream);
  transition: background .3s var(--ease), border-color .3s var(--ease);
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.deploy-card:hover { background: rgba(243,238,227,.08); border-color: rgba(243,238,227,.35); color: var(--cream); }
.deploy-card .d-ic {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(243,238,227,.3); border-radius: 50%;
  color: var(--cream);
  margin-bottom: 24px;
}
.deploy-card h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); color: var(--cream); font-weight: 380; }
.deploy-card p { color: rgba(243,238,227,.72); font-size: .95rem; margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  color: var(--heading);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; letter-spacing: -.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 20px; height: 20px; flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A18' stroke-width='2'><path d='M12 5v14M5 12h14'/></svg>") center/contain no-repeat;
  transition: transform .3s var(--ease);
}
:root[data-theme="dark"] .faq summary::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5F1E4' stroke-width='2'><path d='M12 5v14M5 12h14'/></svg>"); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 14px; color: var(--text-muted); max-width: 70ch; }

/* ---------- Forms ---------- */
.form {
  display: grid; gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.form-row { display: grid; gap: 6px; }
.form label {
  font-family: var(--font-sans);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text);
}
.form label .req { color: var(--accent); }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text); font: inherit;
  transition: border-color .2s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--ink);
}
:root[data-theme="dark"] .form input:focus,
:root[data-theme="dark"] .form textarea:focus,
:root[data-theme="dark"] .form select:focus { border-color: var(--cream); }
.form textarea { min-height: 140px; resize: vertical; }
.form .form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-note { font-size: .82rem; color: var(--text-muted); }
.form-status {
  padding: 12px 16px; border-radius: var(--r-md);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--flame-600); font-size: .92rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error {
  background: color-mix(in oklab, #d64545 14%, transparent);
  color: #a32c2c;
}
:root[data-theme="dark"] .form-status { color: var(--flame-500); }
:root[data-theme="dark"] .form-status.is-error { color: #ff9c9c; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-grid {
  display: grid; gap: clamp(28px, 5vw, 72px);
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 0; }
.info-list li {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.info-list li:last-child { border-bottom: 1px solid var(--line); }
.info-list .info-num {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--muted); padding-top: 6px; min-width: 28px;
}
.info-list strong {
  display: block; font-family: var(--font-serif); font-weight: 400;
  font-size: 1.35rem; color: var(--heading); letter-spacing: -.02em;
  margin-bottom: 4px;
}
.info-list span, .info-list a { color: var(--text-muted); font-size: .95rem; }
.info-list a:hover { color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-item time {
  font-family: var(--font-mono); font-size: .82rem;
  color: var(--muted); letter-spacing: .08em;
  padding-top: 8px;
}
.timeline-item h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); margin: 0 0 8px; }
.timeline-item p { color: var(--text-muted); margin: 0; max-width: 55ch; }
@media (max-width: 640px) { .timeline-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Values grid ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr; } }
.value-item {
  padding: clamp(24px, 3vw, 40px) clamp(0px, 2vw, 32px) clamp(24px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.value-item:nth-child(3n) { border-right: 0; padding-right: 0; }
.value-item:nth-child(3n+1) { padding-left: 0; }
.value-item:nth-child(3n+2) { padding-left: clamp(0px, 2vw, 32px); padding-right: clamp(0px, 2vw, 32px); }
.value-item:nth-child(3n+3) { padding-left: clamp(0px, 2vw, 32px); }
@media (max-width: 900px) {
  .value-item { border-right: 0; padding: 24px 0 !important; }
}
.value-item .v-num {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--muted); display: block; margin-bottom: 20px;
}
.value-item h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin-bottom: 12px; }
.value-item p { color: var(--text-muted); margin: 0; max-width: 35ch; }

/* ---------- CTA ---------- */
.cta-final {
  padding: clamp(96px, 14vw, 200px) 0;
  text-align: center;
  background: var(--bg-alt);
  position: relative; overflow: hidden;
}
.cta-final h2 {
  font-size: clamp(2.4rem, 7vw, 6rem);
  max-width: 18ch;
  margin-inline: auto;
  font-weight: 350;
}
.cta-final em { color: var(--accent); font-style: italic; }
.cta-final .hero-actions { justify-content: center; margin-top: 40px; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(64px, 8vw, 96px) 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(243,238,227,.15);
}
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand p { color: rgba(243,238,227,.72); max-width: 32ch; margin-top: 16px; font-size: .95rem; }
.footer-brand .brand { color: var(--cream); }
.footer-brand .brand-name em { color: var(--accent); }
.footer-col h4 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
  color: rgba(243,238,227,.5); font-weight: 600; margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-col a { color: var(--cream); font-size: .95rem; opacity: .82; }
.footer-col a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  padding-top: 24px; margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  color: rgba(243,238,227,.55); font-size: .84rem;
}
.socials { display: flex; gap: 8px; }
.socials a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(243,238,227,.2);
  color: var(--cream); opacity: .85;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.socials svg { width: 15px; height: 15px; }

/* ---------- Utilities ---------- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.center-text { text-align: center; }
@media (max-width: 640px) { .hide-sm { display: none; } }
@media (max-width: 900px) { .hide-md { display: none; } }

@media print {
  .site-header, .site-footer, .cta-final, .hero-canvas, .marquee { display: none !important; }
  body { background: #fff; color: #000; padding-top: 0; }
}
