/* 3STAC · Trace Interact — shared styles */

:root {
  --bg: #0D0D0D;
  --bg-elev: #141414;
  --bg-elev-2: #1A1A1A;
  --line: #262626;
  --line-soft: #1F1F1F;
  --fg: #FFFFFF;
  --fg-2: #AAAAAA;
  --fg-3: #6B6B6B;
  --accent: #FF4500;
  --accent-soft: rgba(255, 69, 0, 0.12);
  --gold: #C8A800;

  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  --max: 1440px;
  --pad: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* —— TYPE —— */
.mono { font-family: var(--font-mono); font-feature-settings: "zero", "ss01"; }
.serif { font-family: var(--font-serif); font-style: normal; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.no-dot::before { display: none; }

.display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.92;
  font-size: clamp(56px, 11vw, 200px);
  margin: 0;
}
.display em {
  font-style: italic;
  color: var(--fg-2);
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.h2 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.h3 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* —— LAYOUT —— */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
section { position: relative; }

.rule { border-top: 1px solid var(--line); }
.rule-soft { border-top: 1px solid var(--line-soft); }

/* —— NAV —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.brand-mark {
  width: 22px; height: 22px;
  position: relative;
  display: inline-block;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute; inset: 0;
  border: 1.5px solid var(--fg);
}
.brand-mark::after {
  transform: translate(4px, 4px);
  border-color: var(--accent);
  mix-blend-mode: normal;
}
.brand .sep { color: var(--fg-3); margin: 0 2px; }
.brand .co { color: var(--fg-2); }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--fg-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -16px;
  height: 1px;
  background: var(--accent);
}

.nav-aux {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  padding: 6px 12px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: all 0.2s;
}
.lang-toggle button.on {
  background: var(--fg);
  color: var(--bg);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: filter 0.2s;
}
.cta-btn:hover { filter: brightness(1.1); }
.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.cta-ghost:hover { border-color: var(--fg); }

/* —— SYSTEM TICKER (top status strip) —— */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  overflow: hidden;
}
.ticker-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  white-space: nowrap;
  overflow: hidden;
}
.ticker .live {
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.ticker .live::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%, 60% { opacity: 1; } 80%, 100% { opacity: 0.2; } }
.ticker .group { display: flex; gap: 18px; }
.ticker .group span { color: var(--fg-3); }
.ticker .group b { color: var(--fg-2); font-weight: 400; }

/* —— HERO —— */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 180px) 0 clamp(80px, 12vw, 160px);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
.hero-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 64px;
}
.hero-meta-row .left, .hero-meta-row .right {
  display: flex; gap: 24px;
}
.hero-meta-row .right { color: var(--fg-2); }

.hero h1.display {
  text-align: center;
}
.hero-sub {
  margin: 48px auto 0;
  max-width: 720px;
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.55;
}
.hero-cta-row {
  margin-top: 48px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* corner brackets on hero */
.bracket {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
}
.bracket.tl { top: 32px; left: 32px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.bracket.tr { top: 32px; right: 32px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.bracket.bl { bottom: 32px; left: 32px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.bracket.br { bottom: 32px; right: 32px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

/* —— SECTION HEADER —— */
.section-pad { padding: clamp(80px, 10vw, 160px) 0; }
.section-pad-sm { padding: clamp(56px, 7vw, 100px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .meta {
  display: flex; flex-direction: column; gap: 8px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* —— PROBLEM CARDS —— */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.problem-grid > * {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 28px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg);
  transition: background 0.3s;
}
.problem-grid > *:hover { background: var(--bg-elev); }
.problem-grid .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.problem-grid h4 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.problem-grid p {
  margin: 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 1000px) { .problem-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .problem-grid { grid-template-columns: 1fr; } }

/* —— ARCHITECTURE LAYERS (vertical stack expandable) —— */
.layers {
  border-top: 1px solid var(--line);
}
.layer {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.layer-head {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 32px var(--pad);
  cursor: pointer;
  transition: background 0.25s;
  max-width: var(--max);
  margin: 0 auto;
}
.layer-head:hover { background: var(--bg-elev); }
.layer-head .lnum {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.layer-head .ltitle {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.layer-head .ltitle small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 12px;
}
.layer-head .ltag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.layer-head .lplus {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.layer-head .lplus::before, .layer-head .lplus::after {
  content: "";
  position: absolute;
  background: var(--fg);
  transition: transform 0.3s;
}
.layer-head .lplus::before {
  left: 25%; right: 25%; top: 50%; height: 1px;
}
.layer-head .lplus::after {
  top: 25%; bottom: 25%; left: 50%; width: 1px;
}
.layer.open .lplus { background: var(--accent); border-color: var(--accent); }
.layer.open .lplus::after { transform: scaleY(0); }

.layer-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.layer.open .layer-body { max-height: 800px; }
.layer-body-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 56px calc(var(--pad) + 80px + 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.layer-body-inner p {
  margin: 0 0 16px;
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.6;
  max-width: 56ch;
}
.layer-body-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.layer-body-inner li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.layer-body-inner li::before {
  content: "→";
  color: var(--accent);
}
@media (max-width: 800px) {
  .layer-head { grid-template-columns: 50px 1fr auto; gap: 16px; padding: 24px var(--pad); }
  .layer-head .ltag { display: none; }
  .layer-head .ltitle { font-size: 28px; }
  .layer-body-inner { grid-template-columns: 1fr; padding-left: var(--pad); gap: 24px; }
}

/* —— PRODUCT CARDS (5-up) —— */
.products {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.product-card {
  background: var(--bg);
  padding: 32px 28px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.product-card:hover { background: var(--bg-elev); }
.product-card.span-6 { grid-column: span 6; }
.product-card.span-4 { grid-column: span 4; }
.product-card.span-12 { grid-column: span 12; }

.product-card .pnum {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.product-card .pcat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 4px;
}
.product-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-top: 16px;
}
.product-card .pdesc {
  margin-top: 16px;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 48ch;
}
.product-card .pkw {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 24px;
}
.product-card .pkw span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line);
  padding: 6px 10px;
}
.product-card .placeholder {
  margin-top: 24px;
  height: 140px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.product-card .placeholder .stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--line-soft) 0,
    var(--line-soft) 10px,
    var(--bg-elev) 10px,
    var(--bg-elev) 20px
  );
  opacity: 0.6;
}
.product-card .placeholder .label {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.product-card .reveal {
  position: absolute;
  inset: 0;
  background: var(--bg-elev-2);
  padding: 32px 28px;
  display: flex; flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  border-left: 2px solid var(--accent);
}
.product-card:hover .reveal { opacity: 1; transform: translateY(0); pointer-events: auto; }
.product-card .reveal h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.product-card .reveal ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: cap;
}
.product-card .reveal ol li {
  counter-increment: cap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.4;
}
.product-card .reveal ol li::before {
  content: counter(cap, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 2px;
}

@media (max-width: 1100px) {
  .product-card.span-4, .product-card.span-6 { grid-column: span 6; }
}
@media (max-width: 720px) {
  .product-card.span-4, .product-card.span-6, .product-card.span-12 { grid-column: span 12; }
}

/* —— MARQUEE / BANNER STRIP —— */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--accent);
  color: var(--bg);
  overflow: hidden;
  padding: 18px 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: scroll 30s linear infinite;
  width: max-content;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 56px; }
.marquee-track em { font-style: italic; opacity: 0.7; }
.marquee-track .dot {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--bg);
  border-radius: 50%;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* —— AI MODULES —— */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.ai-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 28px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.ai-card .kid {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ai-card h4 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 24px;
}
.ai-card p {
  margin: 16px 0 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}
.ai-card .status {
  position: absolute;
  top: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-card .status::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}
@media (max-width: 1000px) { .ai-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ai-grid { grid-template-columns: 1fr; } }

/* —— DIFFERENTIATION TABLE —— */
.diff-table {
  border: 1px solid var(--line);
  background: var(--bg);
}
.diff-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.diff-row:last-child { border-bottom: 0; }
.diff-cell {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  font-size: 16px;
  line-height: 1.4;
}
.diff-cell.them {
  border-right: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.15);
}
.diff-cell.us {
  background: var(--bg-elev);
  color: var(--fg);
}
.diff-cell .icon {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  display: inline-block;
}
.diff-cell.them .icon {
  border: 1px solid var(--fg-3);
  position: relative;
}
.diff-cell.them .icon::before, .diff-cell.them .icon::after {
  content: ""; position: absolute;
  left: 3px; right: 3px; top: 50%; height: 1px;
  background: var(--fg-3);
}
.diff-cell.them .icon::before { transform: rotate(45deg); }
.diff-cell.them .icon::after { transform: rotate(-45deg); }
.diff-cell.us .icon {
  background: var(--accent);
  position: relative;
}
.diff-cell.us .icon::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 4px; height: 8px;
  border-right: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  transform: rotate(45deg);
}
.diff-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.diff-head > div { padding: 16px 32px; }
.diff-head > div:first-child { border-right: 1px solid var(--line); }
.diff-head .us-h { color: var(--accent); }
@media (max-width: 720px) {
  .diff-row, .diff-head { grid-template-columns: 1fr; }
  .diff-cell.them { border-right: 0; border-bottom: 1px solid var(--line); }
  .diff-head > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* —— AUDIENCE COLUMNS —— */
.audience {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.audience > div {
  background: var(--bg);
  padding: 40px 32px;
  min-height: 280px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.audience h4 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.audience p {
  margin: 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 820px) { .audience { grid-template-columns: 1fr; } }

/* —— TIMELINE / PHASES —— */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.timeline > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 24px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline .period {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.timeline h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
}
.timeline p {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 820px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

/* —— FOOTER —— */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 80px 0 32px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.footer-headline {
  font-family: var(--font-serif);
  font-size: clamp(48px, 9vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 64px;
}
.footer-headline em { color: var(--accent); font-style: italic; }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.footer-cols h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 16px;
}
.footer-cols ul {
  list-style: none;
  margin: 0; padding: 0;
}
.footer-cols ul li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--fg);
}
.footer-cols ul li a:hover { color: var(--accent); }
.footer-cols .addr {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  line-height: 1.7;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
@media (max-width: 800px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* —— PAGE HEADER (sub-pages) —— */
.page-head {
  padding: clamp(80px, 10vw, 140px) 0 clamp(64px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-head .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at top right, black 10%, transparent 60%);
  opacity: 0.5;
}
.page-head .inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.page-head .crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 32px;
  display: flex; gap: 8px;
}
.page-head .crumb b { color: var(--accent); font-weight: 400; }
.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.page-head h1 em { color: var(--fg-2); font-style: italic; }
.page-head .desc {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.55;
  max-width: 48ch;
}
@media (max-width: 800px) {
  .page-head .inner { grid-template-columns: 1fr; }
}

/* —— TWEAKS PANEL —— */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 320px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  display: none;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.tweaks.on { display: block; }
.tweaks-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.tweaks-head button { color: var(--fg-3); font-size: 18px; line-height: 1; }
.tweaks-section { padding: 16px; border-bottom: 1px solid var(--line); }
.tweaks-section:last-child { border-bottom: 0; }
.tweaks-label {
  text-transform: uppercase;
  color: var(--fg-3);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.tweaks-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tweaks-row button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.tweaks-row button.on { border-color: var(--accent); color: var(--accent); }
.tweaks-swatch {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0;
}
.tweaks-swatch.on { outline: 2px solid var(--fg); outline-offset: 2px; }

/* —— SCROLL REVEAL —— */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* —— MAP / GEOGRAPHY —— */
.geo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.geo > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 24px;
  min-height: 200px;
  display: flex; flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.geo .flag {
  font-size: 32px;
  font-family: var(--font-serif);
  line-height: 1;
}
.geo h4 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
}
.geo .region {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.geo .ref {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
@media (max-width: 1000px) { .geo { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .geo { grid-template-columns: repeat(2, 1fr); } }

/* —— CONTACT FORM —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-info dl {
  margin: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 32px;
}
.contact-info dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 4px;
}
.contact-info dd {
  margin: 0;
  font-size: 18px;
  color: var(--fg);
}
.contact-info dd a:hover { color: var(--accent); }

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.form-row label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.form-row input, .form-row textarea, .form-row select {
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 4px 0;
  outline: none;
}
.form-row textarea { min-height: 100px; resize: vertical; }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--fg-3); }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-info dl { grid-template-columns: 1fr; }
  .contact-info dt { padding-top: 0; }
}

/* —— COMPARE 3STAC · MATRIX —— */
.matrix {
  border: 1px solid var(--line);
  background: var(--bg);
  overflow-x: auto;
  font-family: var(--font-mono);
}
.matrix-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.matrix-table thead th {
  text-align: left;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 400;
  vertical-align: bottom;
  background: var(--bg);
  white-space: nowrap;
}
.matrix-table thead th:last-child { border-right: 0; }
.matrix-table thead th.us {
  background: var(--accent);
  color: var(--bg);
  border-bottom-color: var(--accent);
}
.matrix-table thead th .col-num {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.matrix-table thead th.us .col-num { color: var(--bg); opacity: 0.7; }
.matrix-table thead th .col-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: normal;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  line-height: 1.15;
  max-width: 12ch;
}
.matrix-table thead th.us .col-name { color: var(--bg); }
.matrix-table tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  vertical-align: middle;
  text-align: center;
  color: var(--fg-2);
}
.matrix-table tbody td:last-child { border-right: 0; }
.matrix-table tbody td.label {
  text-align: left;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  border-right: 1px solid var(--line);
  min-width: 220px;
}
.matrix-table tbody td.label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 4px;
}
.matrix-table tbody tr:hover td { background: var(--bg-elev); }
.matrix-table tbody tr:hover td.label { background: var(--bg-elev); }
.matrix-table tbody td.us {
  background: rgba(255, 69, 0, 0.06);
  border-right-color: var(--accent-soft);
}
.matrix-table tbody tr:hover td.us { background: rgba(255, 69, 0, 0.12); }

/* matrix indicators */
.mx-yes, .mx-no, .mx-partial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  position: relative;
}
.mx-yes {
  background: var(--accent);
  color: var(--bg);
}
.mx-yes::after {
  content: "";
  width: 5px; height: 9px;
  border-right: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  transform: rotate(45deg) translate(-1px, -1px);
}
.mx-no {
  border: 1px solid var(--line);
  background: transparent;
}
.mx-no::after {
  content: "";
  width: 9px; height: 1px;
  background: var(--fg-3);
}
.mx-partial {
  border: 1px solid var(--gold);
  background: transparent;
}
.mx-partial::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

.matrix-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* —— COMPARE 3STAC · BATTLE CARD CAROUSEL —— */
.bc-stage {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.bc-track-wrap {
  overflow: hidden;
}
.bc-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(.7,.05,.2,1);
  will-change: transform;
}
.bc-card {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border-right: 1px solid var(--line);
}
.bc-card:last-child { border-right: 0; }

.bc-avatar {
  border-right: 1px solid var(--line);
  padding: 40px 32px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 520px;
}
.bc-avatar .av-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.bc-avatar .av-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}
.bc-avatar .av-art svg {
  width: 100%;
  max-width: 200px;
  height: auto;
}
.bc-avatar .av-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bc-avatar .av-tag {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--fg-3);
}
.bc-avatar .av-tag b { color: var(--fg); font-weight: 400; }
.bc-avatar .av-tag.dpp-no b { color: var(--fg-3); }
.bc-avatar .av-tag.dpp-roadmap b { color: var(--gold); }
.bc-avatar .av-tag.dpp-yes b { color: var(--accent); }
.bc-avatar .av-tag.type-direct b { color: var(--accent); }
.bc-avatar .av-tag.type-adjacent b { color: var(--gold); }

.bc-body {
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 520px;
}
.bc-body .bc-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.bc-body h3 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.bc-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.bc-row .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 4px;
}
.bc-row .v {
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.5;
}
.bc-positioning {
  margin-top: 8px;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  background: var(--bg-elev);
  font-family: var(--font-serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--fg);
  max-width: 60ch;
}
.bc-win {
  margin-top: auto;
  padding: 22px 24px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  border: 1px solid var(--accent);
}
.bc-win .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0.75;
  padding-top: 4px;
}
.bc-win .v {
  font-size: 15px;
  line-height: 1.5;
  color: var(--bg);
  font-weight: 500;
}

/* carousel chrome */
.bc-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.bc-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bc-counter b { color: var(--accent); font-weight: 400; }
.bc-dots {
  display: flex;
  gap: 8px;
}
.bc-dot {
  width: 28px; height: 4px;
  background: var(--line);
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}
.bc-dot.on { background: var(--accent); }
.bc-dot:hover:not(.on) { background: var(--fg-3); }
.bc-arrows { display: flex; gap: 8px; }
.bc-arrow {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.bc-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.bc-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .bc-card { grid-template-columns: 1fr; }
  .bc-avatar { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .bc-body { min-height: auto; padding: 32px 24px; }
  .bc-row { grid-template-columns: 100px 1fr; gap: 16px; }
  .bc-win { grid-template-columns: 1fr; gap: 8px; }
}

/* —— COMPARE 3STAC · PILLARS (How we win) —— */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pillars > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 24px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
  transition: background 0.3s;
}
.pillars > div:hover { background: var(--bg-elev); }
.pillars .pnum {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.pillars h4 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.pillars p {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}
@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* —— DPP CHAIN VISUAL —— */
.chain {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 32px 0;
}
.chain .node {
  border: 1px solid var(--line);
  padding: 18px 12px;
  text-align: center;
  color: var(--fg);
  background: var(--bg-elev);
  min-height: 80px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.chain .node small { color: var(--fg-3); font-size: 9px; letter-spacing: 0.16em; }
.chain .arr {
  text-align: center;
  color: var(--accent);
  font-size: 14px;
}
.chain .endpoint {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.chain .endpoint small { color: var(--bg); opacity: 0.7; }
@media (max-width: 900px) {
  .chain { grid-template-columns: 1fr; gap: 8px; }
  .chain .arr { transform: rotate(90deg); }
}

/* lang visibility — scoped to body descendants; toggle buttons (data-lang-btn) are excluded so users can always switch */
body [data-lang]:not([data-lang-btn]) { display: none; }
html[data-lang="de"] body [data-lang="de"]:not([data-lang-btn]) { display: revert; }
html[data-lang="en"] body [data-lang="en"]:not([data-lang-btn]) { display: revert; }

/* hero variants */
html[data-hero="split"] .hero-inner { text-align: left; }
html[data-hero="split"] .hero-inner h1.display { text-align: left; max-width: 14ch; }
html[data-hero="split"] .hero-meta-row { justify-content: space-between; }

html[data-hero="bracketed"] .hero { padding-top: clamp(120px, 16vw, 220px); }
html[data-hero="bracketed"] .bracket { display: block; }
html:not([data-hero="bracketed"]) .bracket { display: none; }
