/* ==========================================================================
   Nataraya — AI-Powered Construction Project Intelligence
   Landing page stylesheet
   Structure: 1) Tokens            2) Reset & base     3) Layout helpers
              4) Typography/eyebrow 5) Buttons         6) Topbar & header
              7) Hero + product mock 8) Problem       9) Pillars
              10) Capability grids  11) Cost ledger    12) AI flow
              13) Agents            14) Human + AI     15) Lifecycle
              16) Why / Vision      17) CTA + form     18) Footer
              19) Utilities         20) Reveal         21) Responsive
              22) Reduced motion
   ========================================================================== */

/* ==========================================================================
   1) DESIGN TOKENS
   ========================================================================== */
:root {
  /* Dark (default) surface set */
  --bg: #0A0E14;
  --bg-alt: #0D121A;
  --surface: #111823;
  --surface-2: #161F2C;
  --surface-3: #1C2635;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --line-accent: rgba(245, 165, 36, .42);
  --text: #E9EEF6;
  --text-muted: #95A3B7;
  --text-dim: #6C7A8E;

  /* Fixed brand ramp */
  --amber-300: #FFD27A;
  --amber-400: #FFC24B;
  --amber-500: #F5A524;
  --amber-600: #D98A11;
  --amber-700: #B36F08;
  --teal-400: #4FD1C5;
  --teal-600: #0F9C93;

  /* Semantic (dark) */
  --accent: var(--amber-500);
  --accent-text: var(--amber-300);
  --accent-soft: rgba(245, 165, 36, .13);
  --accent-ink: #1A1204;
  --data: var(--teal-400);
  --warn: #F5874B;
  --shadow-sm: 0 10px 26px -18px rgba(0, 0, 0, .8);
  --shadow-md: 0 28px 60px -32px rgba(0, 0, 0, .85);
  --shadow-lg: 0 44px 90px -40px rgba(0, 0, 0, .9);
  --bar-bg: rgba(255, 255, 255, .1);

  /* Type */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Rhythm */
  --container: 1180px;
  --gutter: 24px;
  --section-y: clamp(72px, 8.5vw, 128px);
}

/* Light ("paper") surface set — applied to whole sections */
.theme-light,
.vision {
  --bg: #F6F5F1;
  --bg-alt: #EFEDE7;
  --surface: #FFFFFF;
  --surface-2: #FBFBF9;
  --surface-3: #F2F0EA;
  --line: #E4E1D9;
  --line-strong: #D3CFC4;
  --line-accent: rgba(200, 122, 10, .38);
  --text: #0E141C;
  --text-muted: #5A6577;
  --text-dim: #7E8899;
  --accent: #C87A0A;
  --accent-text: #A9630A;
  --accent-soft: rgba(200, 122, 10, .1);
  --accent-ink: #FFFFFF;
  --data: #0F8B82;
  --shadow-sm: 0 10px 26px -20px rgba(14, 20, 28, .35);
  --shadow-md: 0 26px 55px -34px rgba(14, 20, 28, .3);
  --shadow-lg: 0 40px 80px -44px rgba(14, 20, 28, .32);
  --bar-bg: rgba(14, 20, 28, .1);
}

/* ==========================================================================
   2) RESET & BASE
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.022em;
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.032em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
h4 { font-size: .9rem; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

::selection { background: var(--amber-500); color: #1A1204; }

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

/* ==========================================================================
   3) LAYOUT HELPERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  background: var(--bg);
  color: var(--text);
  padding: var(--section-y) 0;
}

.sec-head { max-width: 780px; }
.sec-head--center { margin: 0 auto; text-align: center; }
.sec-head h2 { margin-bottom: 16px; }

.lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.15vw, 1.0625rem);
  max-width: 68ch;
}
.sec-head--center .lead { margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--amber-500);
  color: #1A1204;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 14px; }

/* ==========================================================================
   4) TYPOGRAPHY DETAILS
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.eyebrow__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--line-accent);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 165, 36, .5); }
  70%  { box-shadow: 0 0 0 12px rgba(245, 165, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0); }
}

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

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s ease, gap .2s ease;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s ease; }
.link-arrow:hover { border-color: var(--line-accent); }
.link-arrow:hover svg { transform: translateX(4px); }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}
.dot--amber { background: var(--amber-500); }
.dot--teal { background: var(--data); }
.dot--muted { background: var(--text-dim); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.chip--live { color: var(--teal-400); border-color: rgba(79, 209, 197, .35); }
.chip--live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }

/* ==========================================================================
   5) BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}

.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }

.btn--primary {
  background: linear-gradient(180deg, var(--amber-400), var(--amber-600));
  color: #1A1204;
  box-shadow: 0 16px 34px -18px rgba(245, 165, 36, .85);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px -18px rgba(245, 165, 36, .95);
}
.btn--primary:hover svg { transform: translateX(4px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  transform: translateY(-2px);
}

.btn--sm { padding: 11px 20px; font-size: .875rem; }
.btn--block { width: 100%; }

/* ==========================================================================
   6) TOPBAR & HEADER
   ========================================================================== */
.topbar {
  background: #070A0F;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--text-dim);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
}

.topbar__note { display: inline-flex; align-items: center; gap: 9px; }

.topbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(79, 209, 197, .16);
}

.topbar__list { display: flex; align-items: center; gap: 22px; }
.topbar__list li { display: inline-flex; align-items: center; gap: 8px; }
.topbar__list svg { width: 15px; height: 15px; color: var(--text-dim); }
.topbar__list a:hover { color: var(--amber-400); }

.header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(10, 14, 20, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(8, 11, 16, .92);
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; }

.logo__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--surface-3), #0C1118);
  border: 1px solid var(--line-strong);
  color: var(--amber-500);
  flex: none;
}
.logo__mark svg { width: 24px; height: 24px; }

.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text strong {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .13em;
  color: #F2F5FA;
}
.logo__text small {
  font-family: var(--font-mono);
  font-size: .5rem;
  letter-spacing: .19em;
  color: var(--text-dim);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 30px; }

.nav__list { display: flex; align-items: center; gap: 25px; }

.nav__link {
  position: relative;
  font-size: .875rem;
  font-weight: 500;
  color: #C3CDDB;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--amber-500);
  transition: width .25s ease;
}
.nav__link:hover { color: #FFFFFF; }
.nav__link:hover::after,
.nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: #FFFFFF; }

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.hamburger span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.is-active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(4, 6, 10, .62);
  backdrop-filter: blur(2px);
}

/* ==========================================================================
   7) HERO + PRODUCT MOCK
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 110px);
  background: var(--bg);
  overflow: hidden;
}

.hero__grid-lines {
  position: absolute;
  inset: -10% -5% 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(120% 78% at 62% 8%, #000 12%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 78% at 62% 8%, #000 12%, transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle, rgba(245, 165, 36, .17), transparent 62%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(36px, 5vw, 68px);
  align-items: center;
}

.hero__title { margin-bottom: 18px; }

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.7vw, 1.375rem);
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 18px;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__stats li { display: flex; flex-direction: column; gap: 2px; }
.hero__stats strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--amber-400);
  line-height: 1;
}
.hero__stats span { font-size: .8125rem; color: var(--text-dim); }

/* --- product mock --- */
.mock {
  position: relative;
  background: linear-gradient(180deg, var(--surface), #0D1420);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 165, 36, .55), transparent);
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}

.mock__dots { display: inline-flex; gap: 6px; }
.mock__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
}
.mock__dots i:first-child { background: rgba(245, 165, 36, .55); }

.mock__title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .02em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock__body { padding: 20px; }

.mock__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .022);
}
.kpi__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.kpi__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}
.kpi__meta { display: block; font-size: .7rem; color: var(--text-dim); margin-top: 4px; }

.kpi--alert {
  border-color: var(--line-accent);
  background: linear-gradient(180deg, rgba(245, 165, 36, .1), rgba(245, 165, 36, .03));
}
.kpi--alert .kpi__value { color: var(--amber-300); }
.kpi--alert .kpi__meta { color: var(--amber-400); }

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

.mock__row {
  display: grid;
  grid-template-columns: 1.75fr .78fr .78fr 1.12fr;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
}
.mock__row:last-child { border-bottom: 0; }

.mock__row--head {
  border-bottom-color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 8px;
}

.mock__item { color: #D6DEEA; }
.mock__num {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.mock__row span:last-child { display: flex; align-items: center; gap: 9px; }
.mock__row em {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-style: normal;
  color: var(--text-muted);
  min-width: 30px;
}

.bar {
  position: relative;
  display: block;
  flex: 1;
  min-width: 34px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--bar-bg);
  overflow: hidden;
}
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-400), var(--amber-500));
}

/* animate bars when the mock reveals */
.mock[data-reveal] .bar i { width: 0; transition: width 1.05s cubic-bezier(.22, .8, .28, 1); }
.mock.is-in .bar i { width: var(--v); }
.mock.is-in .mock__row:nth-child(2) .bar i { transition-delay: .18s; }
.mock.is-in .mock__row:nth-child(3) .bar i { transition-delay: .28s; }
.mock.is-in .mock__row:nth-child(4) .bar i { transition-delay: .38s; }
.mock.is-in .mock__row:nth-child(5) .bar i { transition-delay: .48s; }

.mock__insight {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line-accent);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(245, 165, 36, .11), rgba(245, 165, 36, .02));
  font-size: .8125rem;
  line-height: 1.55;
  color: #DCE4EE;
}
.mock__insight strong { color: var(--amber-300); }
.mock__insight em { font-style: normal; color: var(--amber-300); }
.mock__insight-icon { flex: none; color: var(--amber-400); }
.mock__insight-icon svg { width: 20px; height: 20px; }

.mock__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}
.mock__foot-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .05em;
  color: var(--text-dim);
}

/* ==========================================================================
   8) PROBLEM SECTION
   ========================================================================== */
.fragments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 44px auto 0;
  max-width: 900px;
}

.fragment {
  padding: 11px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: transform .3s ease, border-color .3s ease, color .3s ease;
}
.fragment:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  border-style: solid;
  color: var(--text);
}

.fragments__note {
  max-width: 62ch;
  margin: 44px auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.risks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
}

.risk {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.risk:hover { transform: translateY(-4px); border-color: var(--line-accent); box-shadow: var(--shadow-md); }

.risk__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.risk__icon svg { width: 21px; height: 21px; }

.risk strong { font-size: .9375rem; font-weight: 600; line-height: 1.35; }

.fragments__resolve {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent-text);
}

.fragments__resolve-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, transparent, var(--accent));
}

/* ==========================================================================
   9) PILLARS
   ========================================================================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.pillar {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .28s ease, border-color .28s ease, background .28s ease, box-shadow .28s ease;
}
.pillar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber-500), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.pillar:hover {
  transform: translateY(-5px);
  border-color: var(--line-accent);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}
.pillar:hover::after { transform: scaleX(1); }

.pillar__no {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--text-dim);
}

.pillar__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--line-accent);
  color: var(--accent);
}
.pillar__icon svg { width: 23px; height: 23px; }

.pillar h3 { margin-bottom: 10px; }
.pillar p { font-size: .9rem; color: var(--text-muted); }

/* ==========================================================================
   10) CAPABILITY GRIDS
   ========================================================================== */
.capability {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.28fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
}

.capability__intro { position: sticky; top: 120px; }
.capability__intro h2 { margin-bottom: 10px; }
.capability__sub {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 16px;
}
.capability__intro .lead { font-size: 1rem; }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.cap-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.capability .cap-grid { margin-top: 0; }

.cap {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.cap:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  box-shadow: var(--shadow-sm);
}

.cap__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--accent);
  transition: background .25s ease, color .25s ease;
}
.cap__icon svg { width: 20px; height: 20px; }
.cap:hover .cap__icon { background: var(--accent-soft); }

.cap h3 { font-size: 1rem; margin-bottom: 8px; }
.cap p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

.cap--accent {
  border-color: var(--line-accent);
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 62%);
}
.cap--accent .cap__icon { background: var(--accent); color: var(--accent-ink); }

/* ==========================================================================
   11) COST LEDGER
   ========================================================================== */
.ledger {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 54px;
}

.ledger__node {
  position: relative;
  z-index: 1;
  padding: 22px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  opacity: .5;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.ledger__node.is-on {
  opacity: 1;
  transform: none;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.ledger__node--alert.is-on {
  border-color: var(--line-accent);
  background: linear-gradient(165deg, var(--accent-soft), var(--surface) 68%);
}

.ledger__step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
  transition: background .4s ease, color .4s ease, border-color .4s ease;
}
.ledger__node.is-on .ledger__step {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.ledger__label {
  display: block;
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.ledger__value {
  display: block;
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--accent-text);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.ledger__desc { display: block; font-size: .8125rem; color: var(--text-muted); line-height: 1.55; }

.ledger__progress {
  position: absolute;
  top: 39px;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  z-index: 0;
}
.ledger__progress i {
  display: block;
  height: 100%;
  width: calc(var(--progress, 0) * 100%);
  background: linear-gradient(90deg, var(--teal-400), var(--amber-500));
  transition: width .18s linear;
}

.ledger__note {
  max-width: 66ch;
  margin: 44px auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
}

/* ==========================================================================
   12) NATARAYA AI FLOW
   ========================================================================== */
.flow3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.18fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 56px;
}

.flow3__panel {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.flow3__panel:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.flow3__panel--core {
  border-color: var(--line-accent);
  background: linear-gradient(165deg, rgba(245, 165, 36, .1), var(--surface) 55%);
  box-shadow: var(--shadow-md);
}

.flow3__head { margin-bottom: 18px; }
.flow3__no {
  display: block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.flow3__panel h3 { font-size: 1.125rem; }

.flow3__panel p { font-size: .9rem; color: var(--text-muted); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: .78rem;
  color: var(--text-muted);
}

.core-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.core-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8125rem;
  color: var(--text-muted);
}

.flow3__arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent);
}
.flow3__arrow span {
  flex: 1;
  width: 1px;
  min-height: 24px;
  background: repeating-linear-gradient(180deg, var(--line-accent) 0 5px, transparent 5px 10px);
}
.flow3__arrow svg { width: 20px; height: 20px; flex: none; }

/* ==========================================================================
   13) AGENTS
   ========================================================================== */
.section--agents { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }

.agents {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  margin-top: 52px;
  align-items: start;
}

.agents__tabs { display: flex; flex-direction: column; gap: 8px; }

.agents__tab {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color .22s ease, background .22s ease, color .22s ease, transform .22s ease;
}
.agents__tab:hover { transform: translateX(4px); border-color: var(--line-strong); color: var(--text); }
.agents__tab.is-active {
  border-color: var(--line-accent);
  background: linear-gradient(100deg, var(--accent-soft), var(--surface) 70%);
  color: var(--text);
}
.agents__tab.is-active .agents__tab-icon { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.agents__tab-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--accent);
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.agents__tab-icon svg { width: 19px; height: 19px; }

.agents__stage {
  position: relative;
  min-height: 480px;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface), #0D1420);
  box-shadow: var(--shadow-lg);
}

.agent-panel { display: none; }
.agent-panel.is-active { display: block; animation: panelIn .38s ease both; }

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

.agent-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.asks { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 22px; }

.ask {
  position: relative;
  align-self: flex-end;
  max-width: 84%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-bottom-right-radius: 4px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: .875rem;
  color: #D8E0EB;
}
.ask::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}

.answer {
  padding: 18px 20px;
  border: 1px solid var(--line-accent);
  border-radius: var(--r-md);
  background: linear-gradient(150deg, rgba(245, 165, 36, .1), rgba(245, 165, 36, .015));
}

.answer__label {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: 10px;
}

.answer__text { font-size: .9375rem; color: #DCE4EE; line-height: 1.65; }
.answer__text strong { color: var(--amber-300); }

.answer__sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.answer__sources li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .03);
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--text-muted);
}
.answer__sources li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--data);
}

/* ==========================================================================
   14) HUMAN + AI
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.split__col {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.split__col--accent {
  border-color: var(--line-accent);
  background: linear-gradient(155deg, var(--accent-soft), var(--surface) 60%);
}

.split__col h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.0625rem;
  margin-bottom: 20px;
}

.split__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--accent);
}
.split__icon svg { width: 20px; height: 20px; }

.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: .9375rem;
  color: var(--text-muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 15px;
  height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}
.check-list--teal li::before { border-color: var(--data); }

.split__banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 42px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  box-shadow: var(--shadow-sm);
}
.split__plus { color: var(--text-dim); font-weight: 500; }

/* ==========================================================================
   15) LIFECYCLE TIMELINE
   ========================================================================== */
.section--lifecycle { background: var(--bg-alt); }

.lifecycle__inner {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.lifecycle__copy { position: sticky; top: 130px; }
.lifecycle__copy h2 { margin-bottom: 18px; }

.timeline {
  position: relative;
  padding-left: 42px;
}

.timeline__step {
  position: relative;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline__step:last-of-type { border-bottom: 0; }

.timeline__step::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--bg-alt);
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.timeline__step.is-on::before {
  border-color: var(--amber-500);
  background: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, .16);
}

.timeline__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .4s ease, transform .4s ease;
}
.timeline__step.is-on .timeline__label { color: var(--text); }
.timeline__step--final.is-on .timeline__label { color: var(--amber-400); }

.timeline__progress {
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.timeline__progress i {
  display: block;
  width: 100%;
  height: calc(var(--progress, 0) * 100%);
  background: linear-gradient(180deg, var(--teal-400), var(--amber-500));
  transition: height .18s linear;
}

/* ==========================================================================
   16) WHY / VISION
   ========================================================================== */
.why {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.why__card {
  grid-column: span 2;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .26s ease, border-color .26s ease, box-shadow .26s ease;
}
.why__card:nth-child(4) { grid-column: 2 / span 2; }
.why__card:nth-child(5) { grid-column: 4 / span 2; }
.why__card:hover {
  transform: translateY(-5px);
  border-color: var(--line-accent);
  box-shadow: var(--shadow-md);
}

.why__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid var(--line-accent);
  color: var(--accent);
}
.why__icon svg { width: 22px; height: 22px; }

.why__card h3 { font-size: 1.0625rem; margin-bottom: 9px; }
.why__card p { font-size: .9rem; color: var(--text-muted); }

.vision { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vision__inner { max-width: 880px; text-align: center; }
.vision__inner .eyebrow { justify-content: center; }
.vision h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); margin-bottom: 22px; }

.vision__lead {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1.8vw, 1.3rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.vision__body { color: var(--text-muted); font-size: 1.0625rem; max-width: 68ch; margin-inline: auto; }

/* ==========================================================================
   17) CTA + FORM
   ========================================================================== */
.cta {
  position: relative;
  background: #080B11;
  color: #E9EEF6;
  padding: var(--section-y) 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.cta__glow {
  position: absolute;
  left: -10%;
  bottom: -40%;
  width: 820px;
  height: 820px;
  background: radial-gradient(circle, rgba(245, 165, 36, .2), transparent 62%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}

.cta__title { font-size: clamp(2rem, 4.6vw, 3.5rem); margin-bottom: 22px; }

.cta__brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.cta__sub { color: #95A3B7; font-size: 1rem; margin-bottom: 26px; }

.cta__caps { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.cta__caps li {
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .035);
  font-size: .8125rem;
  color: #C3CDDB;
}

.cta__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.cta__meta li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .875rem;
  color: #95A3B7;
}
.cta__meta svg { width: 17px; height: 17px; color: var(--amber-500); }
.cta__meta a:hover { color: var(--amber-400); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}

.form__title { grid-column: 1 / -1; font-size: 1.25rem; }
.form__note {
  grid-column: 1 / -1;
  font-size: .875rem;
  color: #95A3B7;
  margin-bottom: 6px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #8C9AAE;
}
.field__opt { color: #5E6A7C; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-sm);
  background: rgba(6, 9, 13, .6);
  color: #E9EEF6;
  font-family: var(--font-body);
  font-size: .9375rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%238C9AAE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 17px;
  padding-right: 38px;
}
.field select option { background: #0D121A; color: #E9EEF6; }

.field input::placeholder,
.field textarea::placeholder { color: #5E6A7C; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber-500);
  background: rgba(6, 9, 13, .85);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .17);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #E2685C; }

.field__error {
  font-size: .75rem;
  color: #F09A90;
  min-height: 0;
}

.form .btn--block { grid-column: 1 / -1; margin-top: 4px; }

.form__status {
  grid-column: 1 / -1;
  font-size: .875rem;
  min-height: 1.2em;
  color: var(--amber-300);
}

/* ==========================================================================
   18) FOOTER
   ========================================================================== */
.footer {
  background: #06090D;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: clamp(48px, 6vw, 72px) 0 28px;
  color: #95A3B7;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 70px);
}

.footer__brand p { font-size: .9rem; max-width: 40ch; margin-top: 18px; }
.logo--footer .logo__text strong { font-size: 1rem; }

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #E9EEF6;
  margin-bottom: 15px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: .875rem; transition: color .2s ease; }
.footer__col a:hover { color: var(--amber-400); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .8125rem;
  color: #6C7A8E;
}
.footer__fine { font-family: var(--font-mono); font-size: .7rem; }

/* ==========================================================================
   19) UTILITIES
   ========================================================================== */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(17, 24, 35, .92);
  color: var(--amber-400);
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  transition: transform .22s ease, border-color .22s ease;
}
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { transform: translateY(-4px); border-color: var(--accent); }
.to-top[hidden] { display: none; }

/* ==========================================================================
   20) REVEAL ANIMATIONS
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .7s cubic-bezier(.22, .75, .3, 1),
    transform .7s cubic-bezier(.22, .75, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   21) RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  .why { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .why__card { grid-column: span 2; }
  .why__card:nth-child(4) { grid-column: span 2; }
  .why__card:nth-child(5) { grid-column: 2 / span 2; }
}

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero::after { width: 560px; height: 560px; right: -20%; }
  .mock { max-width: 700px; }

  .capability { grid-template-columns: 1fr; }
  .capability__intro { position: static; }
  .capability .cap-grid { margin-top: 34px; }
  .lifecycle__inner { grid-template-columns: 1fr; }
  .lifecycle__copy { position: static; }
  .cta__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    width: min(370px, 88vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 26px;
    padding: 96px 26px 40px;
    background: #0B1017;
    border-left: 1px solid var(--line-strong);
    transform: translateX(102%);
    transition: transform .34s cubic-bezier(.3, .8, .3, 1);
    overflow-y: auto;
    box-shadow: -30px 0 70px -40px rgba(0, 0, 0, 1);
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link {
    display: block;
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__actions { margin-top: 6px; }
  .nav__actions .btn { width: 100%; }
  .hamburger { display: block; }
  .nav-backdrop { display: block; }
}

@media (max-width: 900px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .flow3 { grid-template-columns: 1fr; }
  .flow3__arrow { flex-direction: row; }
  .flow3__arrow span { width: auto; height: 1px; min-height: 0; flex: 1;
    background: repeating-linear-gradient(90deg, var(--line-accent) 0 5px, transparent 5px 10px); }
  .flow3__arrow svg { transform: rotate(90deg); }

  .agents { grid-template-columns: 1fr; }
  .agents__tabs { flex-direction: row; flex-wrap: wrap; }
  .agents__tab { width: auto; flex: 1 1 auto; }
  .agents__stage { min-height: 0; }

  .cap-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ledger becomes a vertical stack with a left rail */
  .ledger { grid-template-columns: 1fr; gap: 14px; }
  .ledger__progress {
    top: 22px;
    bottom: 22px;
    left: 22px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .ledger__progress i { width: 100%; height: calc(var(--progress, 0) * 100%); transition: height .18s linear; }
}

@media (max-width: 780px) {
  :root { --gutter: 18px; --section-y: clamp(60px, 9vw, 88px); }

  .topbar__list li:first-child { display: none; }
  .topbar__inner { min-height: 38px; }

  .header__inner { min-height: 66px; }
  .logo__text small { display: none; }

  .hero__stats { gap: 16px 28px; }
  .mock__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock__row { grid-template-columns: 1.5fr .8fr .8fr; }
  .mock__row > span:nth-child(3) { display: none; }
  .mock__row--head > span:nth-child(3) { display: none; }

  .cap-grid { grid-template-columns: 1fr; }
  .cap-grid--4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: 1fr; gap: 28px; }
  .form { grid-template-columns: 1fr; }

  .ask { max-width: 100%; }
}

@media (max-width: 520px) {
  .pillars { grid-template-columns: 1fr; }
  .risks { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr; }
  .why__card,
  .why__card:nth-child(4),
  .why__card:nth-child(5) { grid-column: auto; }
  .hero__actions .btn { width: 100%; }
  .mock__foot { gap: 8px 14px; }
}

/* ==========================================================================
   22) REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .ledger__node { opacity: 1; transform: none; }
  .mock[data-reveal] .bar i { width: var(--v); }
  .ledger__progress i { width: 100%; }
  .timeline__progress i { height: 100%; }
}
