/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

:root {
  --bg: #0A0B0D;
  --bg-alt: #111318;
  --line: #22262E;
  --text: #F5F4F0;
  --text-dim: #9AA0A8;
  --accent: #1F6F54;
  --accent-soft: rgba(31, 111, 84, 0.16);
  --accent-bright: #2C9270;
  --radius: 4px;
  --font-head: "Spectral", Georgia, serif;
  --font-body: "Onest", -apple-system, sans-serif;
  --container: 1180px;
}

html[data-theme="light"] {
  --bg: #FAF9F6;
  --bg-alt: #F1EFE9;
  --line: #DDD9CF;
  --text: #14171A;
  --text-dim: #5B6169;
  --accent: #1F6F54;
  --accent-soft: rgba(31, 111, 84, 0.10);
  --accent-bright: #1A5E46;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 12px 20px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .site-header { background: rgba(250, 249, 246, 0.86); }

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

.brand { display: flex; align-items: baseline; gap: 8px; letter-spacing: 0.02em; }
.brand-mark { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--accent-bright); }
.brand-name { font-size: 13px; letter-spacing: 0.18em; color: var(--text-dim); font-weight: 500; }

.main-nav { display: flex; gap: 28px; }
.main-nav a { font-size: 14px; color: var(--text-dim); transition: color 0.2s ease; white-space: nowrap; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-btn { padding: 6px 12px; font-size: 12px; letter-spacing: 0.06em; color: var(--text-dim); transition: background 0.2s ease, color 0.2s ease; }
.lang-btn.is-active { background: var(--accent-soft); color: var(--accent-bright); }
.lang-btn:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; transition: all 0.2s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

.burger { display: none; flex-direction: column; gap: 5px; width: 24px; padding: 4px; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-bright); font-weight: 600; margin-bottom: 16px;
}
.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; letter-spacing: -0.01em; }
.section-lede { max-width: 640px; color: var(--text-dim); font-size: 17px; margin-bottom: 48px; }

/* ===== Hero ===== */
.hero { position: relative; padding: 160px 0 100px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-lines { width: 100%; height: 100%; }
.hero-lines line { stroke: var(--line); stroke-width: 1; }
.hero-lines circle { fill: none; stroke: var(--accent); stroke-opacity: 0.14; stroke-width: 1; }
.hero-inner { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.06; letter-spacing: -0.02em;
  max-width: 15ch; margin-bottom: 28px;
}
.hero-subtitle { max-width: 620px; font-size: 18px; color: var(--text-dim); margin-bottom: 40px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 72px; }

.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); padding-top: 36px; margin: 0;
}
.stat dt { font-family: var(--font-head); font-size: clamp(28px, 3.2vw, 40px); color: var(--accent-bright); font-weight: 600; }
.stat dd { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }

/* ===== Manifesto ===== */
.manifesto {
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 3vw, 34px); line-height: 1.4; letter-spacing: -0.01em;
  max-width: 900px; margin: 0 0 56px; padding-left: 28px;
  border-left: 2px solid var(--accent);
}

.card-grid { display: grid; gap: 24px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 56px; }

.card {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-index { font-family: var(--font-head); color: var(--accent-bright); font-size: 13px; letter-spacing: 0.1em; }
.card h3 { font-size: 19px; margin: 14px 0 10px; }
.card p { color: var(--text-dim); font-size: 15px; }

.card-quiet { background: transparent; padding: 24px; }
.card-quiet h3 { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--text-dim); line-height: 1.5; }

/* ===== Org chart ===== */
.org-chart { position: relative; margin-bottom: 32px; padding: 4px 0; }

.org-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.org-connector { stroke: var(--line); stroke-width: 1; fill: none; }

.org-row-root { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: 68px; }

.org-branches { position: relative; z-index: 1; display: flex; justify-content: center; gap: 80px; flex-wrap: wrap; }
.org-branch { display: flex; flex-direction: column; align-items: center; }

.org-node {
  border: 1px solid var(--line); background: var(--bg-alt); border-radius: var(--radius);
  padding: 16px 22px; font-family: var(--font-head); font-size: 15px; text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; gap: 2px; align-items: center; line-height: 1.3;
}
.org-node:hover { border-color: var(--accent); transform: translateY(-2px); }
.org-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.org-node.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-bright); }

.org-node-root { font-size: 20px; font-weight: 700; padding: 20px 40px; }
.org-node-sub { font-family: var(--font-body); font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; font-weight: 400; }
.org-node.is-active .org-node-sub { color: var(--accent-bright); }

.org-node-mid { font-size: 14.5px; padding: 13px 20px; margin-bottom: 52px; }

.org-branch-leaves {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  gap: 12px 10px;
}
.org-node-leaf { font-family: var(--font-body); font-size: 12.5px; padding: 9px 14px; white-space: nowrap; }

.org-desc {
  max-width: 720px; margin: 40px auto 0; text-align: center;
  color: var(--text-dim); font-size: 15px; min-height: 48px;
  padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt);
}

@media (max-width: 859px) {
  .org-svg { display: none; }
  .org-row-root { margin-bottom: 40px; }
  .org-branches { flex-direction: column; align-items: center; gap: 44px; }
  .org-branch { width: 100%; max-width: 420px; }
  .org-node-mid { margin-bottom: 22px; }
  .org-branch-leaves { max-width: 100%; }
}

/* ===== Accordion ===== */
.accordion { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.acc-item {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt);
  overflow: hidden;
}
.acc-item summary {
  list-style: none; cursor: pointer; padding: 22px 26px;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-head); font-size: 18px; font-weight: 600;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-title { flex: 1; }
.acc-caret {
  width: 10px; height: 10px; border-right: 1px solid var(--text-dim); border-bottom: 1px solid var(--text-dim);
  transform: rotate(-45deg); transition: transform 0.25s ease; flex-shrink: 0;
}
.acc-item[open] .acc-caret { transform: rotate(45deg); }
.acc-body { padding: 0 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.acc-body p { color: var(--text-dim); font-size: 15px; max-width: 860px; }
.acc-body strong { color: var(--text); font-weight: 600; }

.badge {
  font-size: 11px; letter-spacing: 0.04em; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-dim); flex-shrink: 0;
}
.badge-live { border-color: var(--accent); color: var(--accent-bright); }
.badge-pilot { border-color: #8a7a2e; color: #c9ac3a; }
.badge-rd { color: var(--text-dim); }

.tag-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tag-list li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--text-dim); }
.tag-status {
  flex-shrink: 0; font-size: 10.5px; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); white-space: nowrap;
}
.tag-live { border-color: var(--accent); color: var(--accent-bright); }
.tag-pilot { border-color: #8a7a2e; color: #c9ac3a; }
.tag-rd { color: var(--text-dim); }
.tag-talks { border-color: #4a6f9e; color: #6f9bd6; }
.tag-idea { color: var(--text-dim); font-style: italic; }

.ideas-strip {
  border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; color: var(--text-dim);
}
.ideas-label { color: var(--text); font-weight: 600; margin-right: 8px; }

/* ===== Tech strip ===== */
.section-tech { padding: 72px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-claim { font-family: var(--font-head); font-size: clamp(18px, 2.2vw, 24px); max-width: 700px; margin-bottom: 32px; }
.tech-strip { display: flex; gap: 40px; flex-wrap: wrap; font-family: var(--font-head); font-size: 15px; color: var(--text-dim); }
.tech-strip li { position: relative; padding-left: 18px; }
.tech-strip li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ===== Geography ===== */
.geo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.geo-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; background: var(--bg-alt); }
.geo-code { font-family: var(--font-head); color: var(--accent-bright); font-size: 13px; letter-spacing: 0.08em; }
.geo-item h3 { font-size: 15px; margin: 12px 0 8px; }
.geo-item p { font-size: 13.5px; color: var(--text-dim); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 28px; margin-bottom: 32px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -28px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline-item h4 { font-size: 17px; margin-bottom: 6px; }
.timeline-item p { color: var(--text-dim); font-size: 14.5px; max-width: 560px; }

.forward-looking { font-size: 12.5px; color: var(--text-dim); font-style: italic; max-width: 640px; }

/* ===== Contact ===== */
.section-contact { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.section-contact .section-lede { margin-left: auto; margin-right: auto; }
.section-contact .hero-cta { justify-content: center; margin-bottom: 0; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { display: flex; gap: 8px; align-items: baseline; }
.footer-copy, .footer-disclaimer { font-size: 12.5px; color: var(--text-dim); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .geo-grid { grid-template-columns: repeat(3, 1fr); }
  .org-branch-children-grid { max-width: 320px; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column; padding: 32px 24px; gap: 4px;
    transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .burger { display: flex; }
  .header-actions .btn-sm { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr; }
  .geo-grid { grid-template-columns: repeat(2, 1fr); }
  .org-level-2 { flex-direction: column; align-items: center; gap: 40px; }
  .org-branch::before, .org-level-2::before { height: 40px; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .hero { padding: 128px 0 64px; }
  .geo-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
  .lang-switch { display: none; }
}
