/* ============================================================
   100x Team — AI Transformation for Financial Firms
   Design tokens, layout, components, responsive + motion.
   ============================================================ */

:root {
  /* Brand */
  --accent: #E0100A;
  --accent-bright: #FF3B30;
  --accent-soft: #FF8A7E;
  --accent-warm: #FF6B5E;

  /* Surfaces */
  --bg: #F7F4F3;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.85);

  /* Ink (on light) */
  --ink: #1A1315;
  --ink-2: #241A1B;
  --ink-muted: #6E5F60;
  --ink-soft: #867A7A;
  --ink-faint: #9C8E8E;

  /* On dark */
  --d-bg-1: #120E0F;
  --d-bg-2: #241618;
  --d-bg-3: #3A1618;
  --d-ink: #FAF6F5;
  --d-ink-2: #C0B0AF;
  --d-ink-3: #DACFCE;
  --d-ink-4: #C7B7B6;

  /* Hairlines */
  --line: rgba(60, 28, 28, 0.09);
  --line-2: rgba(60, 28, 28, 0.08);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 74px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; } /* JS drives the eased scroll */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
canvas { display: block; }

/* Ambient page glow */
.page {
  position: relative;
  overflow-x: clip; /* clip (not hidden) so it doesn't become a scroll container and break the sticky header */
  background:
    radial-gradient(1200px 760px at 50% -14%, rgba(224, 16, 10, 0.14), transparent 58%),
    radial-gradient(1000px 820px at 98% 6%, rgba(224, 16, 10, 0.08), transparent 55%),
    radial-gradient(950px 900px at 2% 42%, rgba(224, 16, 10, 0.06), transparent 55%),
    var(--bg);
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 48px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.is-scrolled {
  background: rgba(247, 244, 243, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(60, 28, 28, 0.1);
}

/* Wordmark logo (rebuilt as crisp, themeable type) */
.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  gap: 5px;
}
/* Real 100x mark — colours driven by CSS vars so it flips light↔dark with the header */
.brand-logo {
  height: 23px;
  width: auto;
  display: block;
  --logo-neutral: #F2ECEB;   /* over the dark hero */
  --logo-red: #FF3B30;
}
.is-scrolled .brand-logo {   /* over the light, scrolled header */
  --logo-neutral: #47484A;
  --logo-red: var(--accent);
}
.brand-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 8.5px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--d-ink-4);
  transition: color 0.35s ease;
  padding-left: 2px;
}
.is-scrolled .brand-sub { color: var(--ink-soft); }

/* Nav */
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav-link {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--d-ink-3);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--accent-bright); }
.is-scrolled .nav-link { color: var(--ink-muted); }
.is-scrolled .nav-link:hover { color: var(--accent); }

.btn {
  font-family: var(--font-display);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 8px;
  transition: filter 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent));
  box-shadow: 0 8px 22px rgba(224, 16, 10, 0.32);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.header-cta { font-size: 14px; padding: 10px 20px; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--d-ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease, background 0.35s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.is-scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Sections
   ============================================================ */
.section { position: relative; padding: clamp(88px, 12vh, 150px) 0; }
.section--line { border-top: 1px solid var(--line-2); }
.section--glow { background: radial-gradient(900px 500px at 50% 0%, rgba(224, 16, 10, 0.06), transparent 60%); }
.anchor { scroll-margin-top: 70px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(224, 16, 10, 0.6);
}
.eyebrow span:last-child {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.lead {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.62;
  color: var(--ink-muted);
}
.accent-text { color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: min(900px, 100vh);
  display: flex;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  background: linear-gradient(172deg, var(--d-bg-1) 0%, var(--d-bg-2) 52%, var(--d-bg-3) 100%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px clamp(20px, 5vw, 56px) 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.0;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 940px;
  color: var(--d-ink);
}
.hero h1 .grad {
  background: linear-gradient(115deg, var(--accent-soft), var(--accent-bright) 55%, var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 30px 0 0;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.6;
  color: var(--d-ink-2);
  max-width: 600px;
}
.hero-cta {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}
.btn-hero { font-size: 15px; padding: 16px 32px; box-shadow: 0 16px 40px rgba(224, 16, 10, 0.42); }
.btn-ghost {
  font-family: var(--font-display);
  font-size: 15px;
  color: #FAF0EE;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 90, 0.3);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.btn-ghost:hover { background: rgba(255, 120, 90, 0.1); border-color: rgba(255, 120, 90, 0.5); }
.btn-ghost .arrow { color: var(--accent-bright); transition: transform 0.25s var(--ease); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

.stats {
  margin-top: clamp(56px, 9vh, 104px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(24px, 4vw, 52px);
  border-top: 1px solid rgba(120, 80, 80, 0.18);
  padding-top: 38px;
  max-width: 1000px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--d-ink);
  line-height: 1;
}
.stat-label { margin-top: 8px; font-size: 14.5px; color: #AD9C9B; }

/* ============================================================
   Statement
   ============================================================ */
.statement { max-width: 820px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); text-align: center; }
.statement-lead {
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 740px;
  color: var(--ink-2);
}
.statement-sub { margin: 22px auto 0; font-size: clamp(15px, 1.7vw, 17px); line-height: 1.6; color: var(--ink-soft); max-width: 480px; }

/* ============================================================
   Cards
   ============================================================ */
.cards {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(60, 28, 28, 0.05);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(60, 28, 28, 0.1);
  border-color: rgba(224, 16, 10, 0.22);
}
.card .topline {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 16, 10, 0.55), transparent);
}
.card .topline--strong { height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.card-index {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, #FF5A48, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-index--mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: #B89A9A; background: none; -webkit-text-fill-color: initial; }
.card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}
.card p { margin: 0; font-size: 15.5px; line-height: 1.56; color: var(--ink-muted); }

.section-head { max-width: 840px; }
.section-head .lead { margin: 26px 0 0; max-width: 680px; }

/* ============================================================
   Open source (homepage section)
   ============================================================ */
.os-grid { margin-top: 8px; display: flex; flex-wrap: wrap; gap: clamp(30px, 5vw, 64px); align-items: center; }
.os-copy { flex: 1 1 380px; min-width: 0; }
.os-copy .lead { margin: 26px 0 0; max-width: 560px; }
.os-illustration { flex: 1 1 320px; min-width: 0; max-width: 560px; margin: 0 auto; }
.os-illustration canvas { display: block; width: 100%; height: clamp(300px, 32vw, 368px); }

.btn-outline {
  margin-top: 34px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid rgba(60, 28, 28, 0.16);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.btn-outline:hover { border-color: rgba(224, 16, 10, 0.4); color: var(--accent); }
.btn-outline .arrow { color: var(--accent); }

/* Current-page nav state (used on the open source page) */
.nav-link.is-current,
.is-scrolled .nav-link.is-current {
  color: var(--accent-warm);
  border-bottom-color: rgba(255, 107, 94, 0.5);
}

/* ============================================================
   Open source invite card (floating)
   ============================================================ */
.os-invite {
  position: fixed;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 70;
  width: min(340px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(60, 28, 28, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(60, 28, 28, 0.14);
  padding: 20px 22px 18px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
}
.os-invite.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.os-invite-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: #A8999A;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.os-invite-close:hover { color: var(--ink); background: rgba(60, 28, 28, 0.05); }
.os-invite-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.os-invite-dot { width: 5px; height: 5px; background: #A8999A; border-radius: 50%; }
.os-invite-meta span:last-child { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-faint); }
.os-invite-title { margin: 0; padding-right: 14px; font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); }
.os-invite-body { margin: 9px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); }
.os-invite-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  color: #4C3F40;
  text-decoration: none;
  border-bottom: 1px solid rgba(60, 28, 28, 0.2);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.os-invite-link:hover { color: var(--accent); border-color: rgba(224, 16, 10, 0.5); }

/* ============================================================
   Open source page
   ============================================================ */

/* Hero variant */
.hero--os {
  min-height: 0;
  display: block;
  background: linear-gradient(172deg, #0D0B0C 0%, #1B1214 48%, #33161A 100%);
}
.os-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(150px, 20vh, 206px) clamp(20px, 5vw, 56px) clamp(76px, 11vh, 116px);
}
.hero--os .eyebrow .dot { background: var(--accent-bright); box-shadow: 0 0 10px rgba(255, 70, 58, 0.9); }
.hero--os .eyebrow span:last-child { letter-spacing: 0.26em; color: var(--d-ink-4); }
.hero--os h1 { font-size: clamp(38px, 6.2vw, 74px); line-height: 1.03; letter-spacing: -0.032em; max-width: 900px; }
.hero--os .hero-sub { max-width: 660px; line-height: 1.62; }
.os-hero-cta { margin-top: 42px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn-github {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: #0D0B0C;
  background: #FAF0EE;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.btn-github:hover { background: #fff; }
.repo-path { font-family: var(--font-mono); font-size: 12.5px; color: #8E7B7B; }

/* Positioning statement */
.os-position { padding: clamp(72px, 10vh, 120px) 0; }
.os-position-lead {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.7vw, 30px);
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 840px;
  color: var(--ink-2);
}
.os-position-body { margin: 22px 0 0; font-size: clamp(15px, 1.7vw, 17px); line-height: 1.65; color: var(--ink-muted); max-width: 640px; }

/* Tool meta row + subhead/body */
.tool-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.tool-meta-index { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-faint); }
.tool-meta-line { width: 26px; height: 1px; background: rgba(60, 28, 28, 0.2); }
.tool-meta-label { font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: var(--accent); }
.tool-subhead {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 27px);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink-2);
  max-width: 820px;
}
.tool-body { margin: 24px 0 0; font-size: clamp(15px, 1.7vw, 17px); line-height: 1.68; color: var(--ink-muted); max-width: 660px; }

/* Demo panel */
.demo-panel {
  margin-top: clamp(40px, 5vh, 56px);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(168deg, #141011 0%, #1C1315 100%);
  border: 1px solid rgba(255, 120, 90, 0.16);
  box-shadow: 0 20px 54px rgba(30, 12, 12, 0.26);
}
.demo-titlebar { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-bottom: 1px solid rgba(255, 120, 90, 0.12); }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; }
.demo-dot--a { background: var(--accent); }
.demo-dot--b { background: rgba(255, 140, 120, 0.35); }
.demo-dot--c { background: rgba(255, 140, 120, 0.18); }
.demo-label { margin-left: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: #8E7B7B; white-space: nowrap; }
.demo-grid { display: flex; flex-wrap: wrap; }
.demo-left { flex: 1 1 420px; min-width: 0; padding: clamp(14px, 1.8vw, 20px); }
.demo-left canvas { display: block; width: 100%; height: clamp(200px, 20vw, 250px); }
.demo-right { flex: 1 1 300px; min-width: 0; border-left: 1px solid rgba(255, 120, 90, 0.12); padding: clamp(16px, 2vw, 24px); }
.pr-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: #8E7B7B; margin-bottom: 16px; }
.pr-label .caret { animation: osBlink 1.1s steps(1) infinite; color: var(--accent-warm); margin-left: 6px; }
.pr-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--d-ink); }
.pr-list { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; font-family: var(--font-mono); font-size: 12px; color: var(--accent-soft); }
.pr-footnote { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 120, 90, 0.12); font-family: var(--font-mono); font-size: 11.5px; color: #8E7B7B; }
@keyframes osBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.15; } }

/* Explainer cards */
.explainer-cards { margin-top: clamp(40px, 5vh, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.explainer-card { background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; }
.explainer-card h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.explainer-card p { margin: 12px 0 0; font-size: 15px; line-height: 1.58; color: var(--ink-muted); }

/* Repo callout */
.repo-callout {
  margin-top: clamp(34px, 4vh, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 16, 17, 0.04);
  border: 1px solid rgba(60, 28, 28, 0.1);
  border-radius: 14px;
  padding: 24px clamp(22px, 3vw, 30px);
}
.repo-callout-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.repo-callout p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-muted); max-width: 520px; }

/* Closing CTA band */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--d-bg-2) 0%, var(--d-bg-1) 100%); }
.cta-inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: clamp(90px, 14vh, 150px) clamp(20px, 5vw, 48px); text-align: center; }
.cta-inner h2 {
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.8vw, 56px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 760px;
  color: var(--d-ink);
}
.cta-inner p { margin: 26px auto 0; font-size: clamp(16px, 1.9vw, 19px); line-height: 1.6; color: var(--d-ink-2); max-width: 560px; }
.cta-band-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ============================================================
   What we do — layered system
   ============================================================ */
.layers {
  margin-top: 56px;
  position: relative;
  background: var(--surface-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(60, 28, 28, 0.08);
  border: 1px solid var(--line);
}
.layers::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent-warm) 60%, transparent);
  z-index: 2;
}
.layers-grid { display: flex; flex-wrap: wrap; }

/* Isometric visual (desktop) */
.layers-visual { flex: 1 1 340px; padding: clamp(28px, 3.4vw, 44px); display: flex; align-items: center; }
.iso {
  position: relative;
  width: 100%;
  height: 392px;
}
.iso .spine {
  position: absolute; left: 28%; top: 44px; bottom: 34px; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(60, 28, 28, 0.18), transparent);
}
.layer {
  position: absolute;
  left: 0; right: 0;
  height: 180px;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  transition: transform 0.35s var(--ease);
}
.layer:hover, .layer:focus-visible { transform: translateY(-8px); outline: none; }
#layer-2 { top: 0; z-index: 3; }
#layer-1 { top: 100px; z-index: 2; }
#layer-0 { top: 200px; z-index: 1; }

.plane-wrap { width: 56%; display: flex; justify-content: center; }
.plane {
  position: relative;
  width: min(150px, 36vw);
  aspect-ratio: 1;
  transform: scaleY(0.5) rotate(45deg);
  background: linear-gradient(135deg, rgba(26, 19, 21, 0.06), rgba(26, 19, 21, 0.015));
  border: 1px solid rgba(26, 19, 21, 0.22);
  border-radius: 12px;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.plane::after {
  content: "";
  position: absolute; inset: 15px;
  border: 1px solid rgba(26, 19, 21, 0.08);
  border-radius: 8px;
  transition: border-color 0.35s ease;
}
.layer.is-active .plane {
  background: linear-gradient(135deg, rgba(224, 16, 10, 0.13), rgba(224, 16, 10, 0.03));
  border-color: var(--accent);
  box-shadow: 0 18px 40px -18px rgba(224, 16, 10, 0.4);
}
.layer.is-active .plane::after { border-color: rgba(224, 16, 10, 0.18); }

.layer-label { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.layer-label .tick { flex: none; width: 30px; height: 1px; background: rgba(60, 28, 28, 0.2); }
.layer-label > span:last-child { min-width: 0; }
.lyr-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 5px;
  transition: color 0.3s ease;
}
.lyr-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
  transition: color 0.3s ease;
}
.layer.is-active .lyr-num { color: var(--accent); }
.layer.is-active .lyr-name { color: var(--ink); }

/* Detail column */
.layers-detail {
  flex: 1.15 1 380px;
  border-left: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.detail { padding: clamp(34px, 4vw, 52px); }
.detail-head-btn { display: none; } /* accordion header — mobile only */
.detail-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 20px;
}
.detail h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.detail p { margin: 24px 0 0; font-size: clamp(15px, 1.7vw, 17px); line-height: 1.62; color: var(--ink-muted); max-width: 540px; }
.produces {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(224, 16, 10, 0.05);
  border: 1px solid rgba(224, 16, 10, 0.18);
}
.produces .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-faint); }
.produces .v { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink); }

/* Desktop: only the active detail shows */
.detail:not(.is-active) { display: none; }

/* ============================================================
   Trust row
   ============================================================ */
.trust {
  margin: 56px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  max-width: 860px;
}
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-item .txt { font-family: var(--font-display); font-size: 14px; font-weight: 500; color: #4C3F40; max-width: 150px; line-height: 1.35; }
.trust-flag { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 14px; font-weight: 500; color: #4C3F40; }
.trust-flag .check { color: var(--accent); }
.trust-divider { width: 1px; height: 34px; background: rgba(60, 28, 28, 0.14); }

/* SOC 2 seal (inline SVG sizing) */
.soc2-seal { width: 60px; height: 60px; flex: none; }

/* ============================================================
   Contact
   ============================================================ */
.contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--d-bg-2) 0%, var(--d-bg-1) 100%);
}
.contact-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(100px, 16vh, 180px) clamp(20px, 5vw, 48px);
  text-align: center;
}
.contact .eyebrow { margin-bottom: 30px; }
.contact .eyebrow .dot { background: var(--accent-bright); box-shadow: 0 0 10px rgba(255, 70, 58, 0.9); }
.contact .eyebrow span:last-child { letter-spacing: 0.26em; color: var(--d-ink-4); }
.contact h2 {
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 800px;
  color: var(--d-ink);
}
.contact-sub { margin: 28px auto 0; font-size: clamp(16px, 1.9vw, 19px); line-height: 1.6; color: var(--d-ink-2); max-width: 520px; }

.lead-form { margin: 44px auto 0; max-width: 520px; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--half { flex: 1 1 200px; }
.field label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--d-ink-4);
}
.field input {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--d-ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 120, 90, 0.24);
  border-radius: 9px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input::placeholder { color: #7C6C6B; }
.field input:focus { border-color: var(--accent-bright); background: rgba(255, 255, 255, 0.06); }
.field input.invalid { border-color: var(--accent-bright); }
.form-error { font-family: var(--font-display); font-size: 13px; color: var(--accent-soft); min-height: 1px; }
.btn-submit { margin-top: 6px; font-size: 15px; padding: 16px 30px; box-shadow: 0 16px 40px rgba(224, 16, 10, 0.38); }

.form-success {
  margin: 44px auto 0;
  max-width: 460px;
  background: rgba(255, 120, 90, 0.07);
  border: 1px solid rgba(255, 120, 90, 0.28);
  border-radius: 14px;
  padding: 36px 32px;
  animation: fadeUp 0.5s var(--ease) both;
}
.form-success .badge {
  width: 48px; height: 48px; margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.form-success h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--d-ink); }
.form-success p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--d-ink-2); }
[hidden] { display: none !important; }

/* Spam honeypot — hidden from users, left empty by humans */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { position: relative; background: var(--d-bg-1); border-top: 1px solid rgba(120, 80, 80, 0.1); }
.footer-top {
  max-width: 1160px; margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 48px) 40px;
  display: flex; flex-wrap: wrap; gap: 40px;
  justify-content: space-between; align-items: flex-start;
}
.footer-brand { max-width: 280px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-logo { --logo-neutral: #F2ECEB; --logo-red: #FF3B30; }
.footer-brand .brand-sub { color: var(--d-ink-4); }
.footer-brand p { margin: 0; font-size: 14px; line-height: 1.55; color: #9C8A89; }
.footer-brand address { margin: 18px 0 0; font-style: normal; font-size: 13.5px; line-height: 1.55; color: #836F6E; }
.footer-cols { display: flex; flex-wrap: wrap; gap: clamp(36px, 6vw, 72px); }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .col-title { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em; color: #836F6E; }
.footer-col a { font-size: 14px; color: var(--d-ink-4); text-decoration: none; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bar { border-top: 1px solid rgba(120, 80, 80, 0.1); }
.footer-bar-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 48px);
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  font-size: 12.5px; color: #9C8A89;
}
.footer-bar-inner .meta { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--font-display); }

/* ============================================================
   Scroll reveal
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  /* What-we-do becomes a clean vertical accordion */
  .layers-grid { flex-direction: column; }
  .layers-visual { display: none; }
  .layers-detail { border-left: none; }
  .detail:not(.is-active) { display: block; }         /* all rows present */
  .detail { padding: 0; border-top: 1px solid var(--line-2); }
  .detail:first-child { border-top: none; }
  .detail-head-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 24px clamp(22px, 5vw, 32px);
    text-align: left;
    font-family: var(--font-display);
  }
  .detail-head-btn .idx { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--ink-faint); transition: color 0.3s ease; }
  .detail-head-btn .name { flex: 1; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-muted); transition: color 0.3s ease; }
  .detail-head-btn .chev {
    width: 12px; height: 12px; flex: none;
    border-right: 2px solid var(--ink-faint);
    border-bottom: 2px solid var(--ink-faint);
    transform: rotate(45deg);
    transition: transform 0.35s var(--ease), border-color 0.3s ease;
  }
  .detail.is-active .detail-head-btn .idx,
  .detail.is-active .detail-head-btn .name { color: var(--accent); }
  .detail.is-active .detail-head-btn .name { color: var(--ink); }
  .detail.is-active .detail-head-btn .chev { transform: rotate(-135deg); border-color: var(--accent); }

  .detail-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s var(--ease), opacity 0.35s ease;
    opacity: 0;
  }
  .detail-body > .inner { overflow: hidden; padding: 0 clamp(22px, 5vw, 32px); }
  .detail.is-active .detail-body { grid-template-rows: 1fr; opacity: 1; }
  .detail.is-active .detail-body > .inner { padding-bottom: 30px; }
  .detail h3 { font-size: clamp(22px, 6vw, 28px); }
  .detail p { margin-top: 16px; }
  .produces { margin-top: 22px; }
}

@media (min-width: 861px) {
  /* Desktop keeps single-detail behaviour; body always visible */
  .detail-body { display: block !important; opacity: 1 !important; }
  .detail-body > .inner { overflow: visible; padding: 0; }
}

@media (max-width: 760px) {
  :root { --header-h: 66px; }
  .site-header { padding: 12px 18px; }

  /* Mobile nav */
  .nav-toggle { display: block; z-index: 70; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 32px;
    background: rgba(18, 14, 15, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
  }
  .nav-links .nav-link { color: var(--d-ink); font-size: 20px; }
  .nav-links.is-open { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-scrim {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 55;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }

  .trust-divider { display: none; }
  .hero-inner { padding-top: 130px; }
  .stats { gap: 26px; }
  .footer-top { gap: 32px; }
}

@media (max-width: 420px) {
  .hero-cta { gap: 14px; }
  .hero-cta .btn-hero, .hero-cta .btn-ghost { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .form-success { animation: none; }
  * { scroll-behavior: auto !important; }
}
