:root {
  --paper: #0c1a0d;
  --paper-alt: #111f12;
  --ink: #f0e8d2;
  --body: #c5bda7;
  --muted: #7d9679;
  --accent: #c4a84f;
  --dark-muted: #8fa88d;
  --dark-faint: #4d6a4b;
  --line: rgba(240, 232, 210, 0.1);
  --line-strong: rgba(240, 232, 210, 0.13);
  --line-dark: rgba(240, 232, 210, 0.1);
  --max: 1280px;
  --pad: clamp(22px, 5vw, 64px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(12, 26, 13, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(150px, 18vw, 210px);
  height: auto;
  filter: brightness(0) invert(0.92) sepia(0.2);
}

.footer-logo {
  filter: brightness(0) invert(0.92) sepia(0.2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}

.site-nav a {
  text-decoration: none;
  color: var(--dark-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.25s;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav .nav-cta {
  padding: 11px 20px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1;
  transition: background 0.25s;
}

.site-nav .nav-cta:hover {
  background: var(--accent);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(560px, 68vw, 760px);
  padding: clamp(76px, 11vw, 142px) var(--pad) clamp(64px, 8vw, 104px);
  background: radial-gradient(ellipse 55% 70% at 25% 55%, #162e17 0%, var(--paper) 68%);
}


.hero-grid {
  position: relative;
  z-index: 3;
  max-width: var(--max);
  margin: 0 auto;
  display: block;
  pointer-events: none;
}

.hero-grid a,
.hero-grid button {
  pointer-events: auto;
}

#neural-net {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: all;
  cursor: crosshair;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.tick {
  width: 24px;
  height: 1px;
  flex: 0 0 24px;
  background: var(--accent);
}

.mono {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1, h2, h3 {
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(40px, 6.6vw, 108px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.012em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
}

.hero-copy {
  max-width: 54ch;
  margin-top: clamp(28px, 4vw, 48px);
}

.lede {
  margin-bottom: 28px;
  color: var(--body);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 15px 28px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, filter 0.25s;
}

.button:hover {
  background: var(--accent);
}

.button.accent {
  background: var(--accent);
}

.button.accent:hover {
  filter: brightness(1.08);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(240, 232, 210, 0.3);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.25s, border-color 0.25s;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.scroll-hint {
  position: absolute;
  bottom: clamp(24px, 3vw, 40px);
  left: var(--pad);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
}

.scroll-hint .mono {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.22em;
}

.scroll-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--muted);
  opacity: 0.5;
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.6); transform-origin: left; }
  50% { opacity: 0.7; transform: scaleX(1); }
}

.language-marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(20px, 2.6vw, 30px) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: baseline;
  gap: clamp(36px, 5vw, 64px);
  padding-right: clamp(36px, 5vw, 64px);
}

.language-item {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.language-native {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
}

.language-label {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.section {
  scroll-margin-top: 84px;
}

.panel {
  background: var(--paper-alt);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--pad);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section h2,
.page-hero h1 {
  max-width: 16ch;
  margin-bottom: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(32px, 4.6vw, 62px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.section-header p {
  max-width: 38ch;
  margin-bottom: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.hairline-grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line-strong);
}

.pillar-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cell {
  background: var(--paper-alt);
  padding: clamp(28px, 3vw, 40px);
}

.cell-kicker {
  margin-bottom: clamp(32px, 4vw, 52px);
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cell h3 {
  margin-bottom: 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cell p {
  margin-bottom: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.trust-copy h2 {
  max-width: 18ch;
  margin-bottom: 24px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.06;
}

.trust-copy p {
  max-width: 50ch;
  margin-bottom: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.stat-grid {
  grid-template-columns: 1fr 1fr;
}

.stat {
  background: var(--paper-alt);
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line-strong);
}

.stat.wide {
  grid-column: 1 / -1;
}

.stat-number {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-number span {
  color: var(--accent);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
}

.stat-label {
  margin-top: 14px;
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lineage {
  margin-top: clamp(56px, 7vw, 96px);
}

.lineage-label {
  margin-bottom: 24px;
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.logo-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-color: var(--line);
  background: var(--line);
}

.logo-cell {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(45deg, rgba(240, 232, 210, 0.04) 0, rgba(240, 232, 210, 0.04) 1px, transparent 1px, transparent 9px);
}

.logo-cell span {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.18em;
}

.dark-section {
  background: #050d05;
  color: var(--ink);
}

.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 160px) var(--pad) clamp(56px, 7vw, 96px);
}

.dark-section h2 {
  max-width: 14ch;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.012em;
}

.dark-section .actions {
  margin-top: clamp(36px, 5vw, 56px);
}

.dark-section .text-link {
  color: var(--ink);
  border-bottom-color: rgba(240, 232, 210, 0.35);
}

.dark-section .text-link:hover {
  border-color: var(--ink);
}

.caption {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--dark-muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.footer {
  border-top: 1px solid var(--line-dark);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  display: block;
  width: 150px;
  height: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.footer-links a {
  color: var(--dark-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--ink);
}

.copyright {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--dark-muted);
  font-size: 11.5px;
  letter-spacing: 0.12em;
}

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 132px) var(--pad) clamp(48px, 7vw, 84px);
}

.page-hero h1 {
  max-width: 14ch;
  margin-bottom: 28px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 2.8vw, 42px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.012em;
}

.page-hero p {
  max-width: 50ch;
  margin-bottom: 0;
  color: var(--body);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 6vw, 92px);
}

.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.compact-list li {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}

.compact-list strong {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.compact-list span {
  color: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

.quote-panel {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: clamp(32px, 5vw, 56px) 0;
}

.quote-panel p {
  max-width: 18ch;
  margin-bottom: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 14px 15px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.form-note {
  min-height: 20px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

.ink-panel {
  background: #080f08;
}

.ink-panel .section-inner {
  border-top: 1px solid rgba(240, 232, 210, 0.1);
}

.ink-panel .section-kicker .mono {
  color: var(--dark-muted);
}

.ink-panel .section-header {
  border-bottom: none;
}

.ink-panel h2 {
  color: var(--ink);
}

.ink-panel .section-header p {
  color: var(--dark-muted);
}

.ink-panel .hairline-grid {
  background: rgba(240, 232, 210, 0.07);
  border-color: rgba(240, 232, 210, 0.07);
}

.ink-panel .cell {
  background: transparent;
  border: none;
  position: relative;
}

.ink-panel .cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(240, 232, 210, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 232, 210, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.ink-panel .cell-kicker {
  color: var(--accent);
  opacity: 1;
}

.ink-panel .cell h3 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
}

.ink-panel .cell p {
  color: rgba(240, 232, 210, 0.7);
  font-size: 17px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
  }

  .site-nav a {
    font-size: 14px;
  }

  .site-nav .nav-cta {
    padding: 10px 14px;
  }

  .hero-grid {
    display: block;
  }

  #neural-net {
    display: none;
  }

  .scroll-hint {
    display: none;
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .compact-list li {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .brand-logo {
    width: 150px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Chat widget ──────────────────────────────────────── */

.chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}

.chat-toggle {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0c1a0d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s, opacity 0.18s;
  margin-left: auto;
}
.chat-toggle:hover { transform: scale(1.08); }
.chat-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 50%;
}

.chat-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid var(--paper);
  display: none;
  pointer-events: none;
}
.chat-badge.visible { display: block; }

.chat-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: clamp(300px, 88vw, 360px);
  height: 460px;
  background: #111f12;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  overflow: hidden;
}
.chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
.chat-dot.online { background: #4caf50; }
.chat-head-info { flex: 1; min-width: 0; }
.chat-head-title {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}
.chat-head-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-track { background: transparent; }
.chat-msgs::-webkit-scrollbar-thumb {
  background: rgba(240, 232, 210, 0.1);
  border-radius: 2px;
}

.chat-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble.out {
  background: rgba(196, 168, 79, 0.18);
  color: var(--ink);
  align-self: flex-end;
  border: 1px solid rgba(196, 168, 79, 0.3);
  border-bottom-right-radius: 3px;
}
.chat-bubble.in {
  background: rgba(240, 232, 210, 0.07);
  color: var(--body);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.chat-bubble.sys {
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  align-self: center;
  text-align: center;
  padding: 3px 6px;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  max-width: 100%;
}

.chat-form {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(240, 232, 210, 0.05);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: 13.5px "Hanken Grotesk", system-ui, sans-serif;
  padding: 9px 11px;
  resize: none;
  min-height: 38px;
  max-height: 90px;
  line-height: 1.4;
  transition: border-color 0.2s;
}
.chat-input::placeholder { color: var(--muted); }
.chat-input:focus {
  outline: none;
  border-color: rgba(196, 168, 79, 0.4);
}

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #0c1a0d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.18s;
}
.chat-send:disabled { opacity: 0.35; cursor: not-allowed; }
.chat-send:not(:disabled):hover { opacity: 0.82; }

@media (max-width: 420px) {
  .chat-widget { bottom: 16px; right: 16px; }
  .chat-panel { width: calc(100vw - 32px); right: -16px; }
}
