/* =========================================================
   Brade AI — Landing v2
   ========================================================= */

:root {
  /* PALETTE — Electric Blue (default) */
  --brand-primary: #084fad;
  --brand-primary-deep: #063d87;
  --brand-primary-glow: rgba(8, 79, 173, 0.16);
  --brand-ink: #0a1520;
  --brand-ink-soft: #18293a;

  /* Neutral surfaces — warm off-white */
  --surface: #faf8f5;
  --surface-elevated: #ffffff;
  --surface-sunken: #f1ede6;
  --surface-dark: #0a1520;
  --surface-dark-elevated: #131f2c;

  /* Text */
  --text: #0a1520;
  --text-soft: #3a4a5a;
  --text-muted: #6b7785;
  --text-on-dark: #f4efe7;
  --text-on-dark-soft: #a8b3c0;
  --text-on-dark-muted: #6b7785;

  /* Borders */
  --hair: rgba(10, 21, 32, 0.08);
  --hair-strong: rgba(10, 21, 32, 0.15);
  --hair-dark: rgba(244, 239, 231, 0.08);
  --hair-dark-strong: rgba(244, 239, 231, 0.18);

  /* Accents */
  --success: #059669;
  --success-soft: #d1fae5;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;

  /* Shape */
  --radius: 6px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  /* Type */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Density */
  --density-y: 140px;
  --density-gap: 48px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.32, 0.64, 1);
}

/* ---------- PALETTE VARIANTS ---------- */
[data-palette="teal"] {
  --brand-primary: #164e5c;
  --brand-primary-deep: #0f3a45;
  --brand-primary-glow: rgba(22, 78, 92, 0.16);
  --brand-ink: #081e24;
  --brand-ink-soft: #0f3a45;
  --surface-dark: #081e24;
  --surface-dark-elevated: #0f3a45;
}
[data-palette="dark"] {
  --surface: #0a1520;
  --surface-elevated: #131f2c;
  --surface-sunken: #050b11;
  --text: #f4efe7;
  --text-soft: #c0cad4;
  --text-muted: #8894a3;
  --hair: rgba(244, 239, 231, 0.08);
  --hair-strong: rgba(244, 239, 231, 0.18);
}

/* ---------- SHAPE VARIANTS ---------- */
[data-shape="sharp"] {
  --radius: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
}
[data-shape="pill"] {
  --radius: 999px;
  --radius-lg: 28px;
  --radius-xl: 40px;
}

/* ---------- FONT VARIANTS ---------- */
[data-fonts="editorial"] {
  --font-sans: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}
[data-fonts="technical"] {
  --font-sans: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --font-display: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- DENSITY ---------- */
[data-density="compact"] {
  --density-y: 88px;
  --density-gap: 28px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-sm { max-width: 960px; }
.wrap-xs { max-width: 720px; }

.section { padding: var(--density-y) 0; }
.section-dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.section-sunken { background: var(--surface-sunken); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.on-dark { color: var(--text-on-dark-soft); }

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(56px, 7.2vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.display-sm {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--text-soft);
  font-weight: 400;
  max-width: 58ch;
}
.micro {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.btn-primary {
  background: var(--brand-primary);
  color: var(--text-on-dark);
}
.btn-primary:hover {
  background: var(--brand-primary-deep);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
}
.btn-outline:hover {
  background: var(--brand-ink);
  color: var(--text-on-dark);
  box-shadow: none;
}
.btn-light {
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.btn-light:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.btn-ghost {
  color: inherit;
  padding: 14px 8px;
}
.btn-ghost:hover { color: var(--brand-primary); }
.btn .arrow {
  transition: transform 0.3s var(--ease);
  display: inline-block;
}
.btn:hover .arrow { transform: translate(3px, -3px); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom-color: var(--hair);
}

/* Sunken theme - off-white sections (how, testimonials) */
.nav[data-theme="sunken"] {
  background: color-mix(in srgb, var(--surface-sunken) 82%, transparent);
}
.nav.scrolled[data-theme="sunken"] {
  background: color-mix(in srgb, var(--surface-sunken) 94%, transparent);
  border-bottom-color: var(--hair);
}

/* Dark theme - navy sections (final CTA, footer) */
.nav[data-theme="dark"] {
  background: color-mix(in srgb, var(--surface-dark) 70%, transparent);
}
.nav.scrolled[data-theme="dark"] {
  background: color-mix(in srgb, var(--surface-dark) 88%, transparent);
  border-bottom-color: var(--hair-dark-strong);
}
.nav[data-theme="dark"] .nav-brand { color: var(--text-on-dark); }
.nav[data-theme="dark"] .nav-links a { color: var(--text-on-dark-soft); }
.nav[data-theme="dark"] .nav-links a:hover { color: var(--text-on-dark); }

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 17px;
  transition: color 0.35s var(--ease);
}
.nav-brand img {
  width: 28px; height: 28px;
  border-radius: 6px;
}
.nav-links {
  display: flex; align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-soft);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}
@property --hero-ripple {
  syntax: "<length>";
  initial-value: 0px;
  inherits: false;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--brand-primary) 40%, transparent) 1.2px,
    transparent 1.4px
  );
  background-size: 22px 22px;
  background-position: 0 0;
  -webkit-mask-image: repeating-radial-gradient(
    circle at 50% 40%,
    rgba(0, 0, 0, 1) calc(0px + var(--hero-ripple)),
    rgba(0, 0, 0, 0.12) calc(70px + var(--hero-ripple)),
    rgba(0, 0, 0, 1) calc(140px + var(--hero-ripple))
  );
          mask-image: repeating-radial-gradient(
    circle at 50% 40%,
    rgba(0, 0, 0, 1) calc(0px + var(--hero-ripple)),
    rgba(0, 0, 0, 0.12) calc(70px + var(--hero-ripple)),
    rgba(0, 0, 0, 1) calc(140px + var(--hero-ripple))
  );
  pointer-events: none;
  z-index: 0;
  animation: hero-ripple 6s linear infinite;
}
@keyframes hero-ripple {
  from { --hero-ripple: 0px; }
  to   { --hero-ripple: 140px; }
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px;
}
.hero-grid--split {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 56px;
  max-width: 1480px;
}
.hero-copy { max-width: 900px; }
.hero--split .hero-title { font-size: clamp(38px, 4vw, 64px); }
.hero--split .hero-sub { max-width: 46ch; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7.5vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.hero-title .serif-italic {
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero-title .underline-sweep {
  position: relative;
  white-space: nowrap;
}
.hero-title .underline-sweep::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  height: 0.18em;
  background: var(--brand-primary);
  transform: scaleX(0);
  transform-origin: left;
  animation: sweep 1.4s 0.7s var(--ease) forwards;
}
@keyframes sweep { to { transform: scaleX(1); } }

.hero-sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.35vw, 21px);
  color: var(--text-soft);
  max-width: 58ch;
  line-height: 1.5;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}
.hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Hero product shot */
.product-stage {
  margin-top: 80px;
  position: relative;
}
.hero-grid--split .product-stage { margin-top: 0; }
.demo-video-wrap {
  position: relative;
  border-radius: var(--radius-lg, 18px);
  overflow: hidden;
  background: #0a1520;
  box-shadow: 0 40px 100px -30px rgba(10, 21, 32, 0.35);
}
.demo-video {
  display: block;
  width: 100%;
  height: auto;
}
.demo-video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1520;
  z-index: 2;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.demo-video-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.demo-loader-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.demo-loader-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transform-origin: center;
  animation: demo-loader-logo 3.2s ease-in-out infinite;
}
.demo-loader-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f4efe7;
  clip-path: inset(0 100% 0 0);
  animation: demo-loader-text 3.2s ease-in-out infinite;
}
@keyframes demo-loader-text {
  0%, 6%    { clip-path: inset(0 100% 0 0); }
  28%       { clip-path: inset(0 0 0 0); }
  60%       { clip-path: inset(0 0 0 0); }
  78%       { clip-path: inset(0 100% 0 0); }
  100%      { clip-path: inset(0 100% 0 0); }
}
@keyframes demo-loader-logo {
  0%, 78%   { transform: rotate(0deg); }
  82%       { transform: rotate(-10deg); }
  86%       { transform: rotate(10deg); }
  90%       { transform: rotate(-6deg); }
  94%       { transform: rotate(4deg); }
  98%, 100% { transform: rotate(0deg); }
}
.demo-video-audio {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(10, 21, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}
.demo-video-wrap:hover .demo-video-audio,
.demo-video-audio:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.demo-video-audio:hover {
  background: rgba(10, 21, 32, 0.75);
  border-color: rgba(255, 255, 255, 0.3);
}
.demo-video-audio:active { transform: translateY(0) scale(0.98); }
.demo-video-audio .demo-video-audio-icon { display: inline-flex; }
.demo-video-audio .icon-unmuted { display: none; }
.demo-video-audio.is-on .icon-muted { display: none; }
.demo-video-audio.is-on .icon-unmuted { display: inline-flex; }

/* =========================================================
   TICKER
   ========================================================= */
.ticker {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  padding: 18px 0;
  background: var(--surface);
}
.ticker-track {
  display: flex;
  gap: 56px;
  animation: ticker 60s linear infinite;
  width: max-content;
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ticker-item strong {
  color: var(--text);
  font-weight: 500;
}
.ticker-item .sep { color: var(--hair-strong); }
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* =========================================================
   PROBLEM/SOLUTION SPLIT
   ========================================================= */
.ps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  border-top: 1px solid var(--hair-dark);
}
.ps-cell {
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  position: relative;
}
.ps-cell.dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.ps-cell.light {
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--hair);
}
.ps-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ps-label.good { color: var(--success); }
.ps-label::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.ps-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 22ch;
}
.ps-body {
  max-width: 42ch;
  color: var(--text-on-dark-soft);
  font-size: 15px;
  line-height: 1.55;
}
.ps-cell.light .ps-body { color: var(--text-soft); }
.ps-stat {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hair-dark);
}
.ps-cell.light .ps-stat { border-top-color: var(--hair); }
.ps-stat-num {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--danger);
}
.ps-label.good ~ .ps-stat .ps-stat-num,
.ps-cell.light .ps-stat-num { color: var(--success); }
.ps-stat-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how {
  background: var(--surface-sunken);
  padding: var(--density-y) 0;
}
.how-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--density-gap);
  margin-bottom: 72px;
  align-items: end;
}
.how-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}
.how-step {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative;
  min-width: 0;
}
.how-step:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 35%, var(--hair));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(10, 21, 32, 0.12);
}
.how-step--accent {
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand-primary) 3%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--brand-primary) 18%, var(--hair));
}
.how-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.how-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  font-weight: 500;
}
.how-step-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.how-step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 600;
}
.how-step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text);
}
.how-step-sub {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.how-step-sub-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
}
.how-connector {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--brand-primary) 50%, var(--text-muted));
  padding: 0 14px;
}
.how-connector svg { display: block; }

/* =========================================================
   USE CASES
   ========================================================= */
.usecases { padding: var(--density-y) 0; }
.uc-head {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--density-gap);
  margin-bottom: 56px;
  align-items: end;
}
.uc-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.uc-tile {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.uc-tile:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 35%, var(--hair));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(10, 21, 32, 0.12);
}
.uc-tile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uc-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.uc-tile-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
}
.uc-tile-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
  margin-top: auto;
}

/* Custom workflow panel (hero moment) */
.uc-custom {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  position: relative;
  overflow: hidden;
}
.uc-custom::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand-primary) 28%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--brand-primary) 18%, transparent) 0%, transparent 50%);
  pointer-events: none;
}
.uc-custom-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.uc-custom-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding-top: 6px;
}
.uc-custom-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-primary) 70%, #fff);
  font-weight: 600;
}
.uc-custom h3 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-on-dark);
}
.uc-custom p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-on-dark-soft);
}
.uc-custom-cta {
  margin-top: 0;
}

/* Inline code-like visual */
.uc-vis {
  background: var(--surface-dark);
  border-radius: var(--radius);
  padding: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-on-dark-soft);
  min-height: 340px;
  position: relative;
}
.uc-vis-header {
  display: flex; justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hair-dark-strong);
}
.uc-vis-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.uc-vis-dots { display: flex; gap: 6px; }
.uc-vis-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--hair-dark-strong); }
.uc-vis-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--hair-dark);
}
.uc-vis-row:last-child { border-bottom: none; }
.uc-vis-row .tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.tag-ok { background: color-mix(in srgb, var(--success) 20%, transparent); color: #6ee7b7; }
.tag-pending { background: color-mix(in srgb, var(--brand-primary) 20%, transparent); color: #93c5fd; }
.tag-warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: #fcd34d; }
.bullet {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-primary);
}
.bullet.g { background: var(--success); }
.bullet.w { background: var(--warn); }

/* =========================================================
   STATS STRIP
   ========================================================= */
.stats {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: var(--density-y) 0;
  position: relative;
  overflow: hidden;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--hair-dark-strong);
  border-top: 1px solid var(--hair-dark-strong);
  border-bottom: 1px solid var(--hair-dark-strong);
}
.stat-cell {
  background: var(--surface-dark);
  padding: 64px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-cell .num {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.stat-cell .num span { color: var(--brand-primary); }
.stat-cell .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.stat-cell .desc {
  font-size: 14px;
  color: var(--text-on-dark-soft);
  max-width: 32ch;
  line-height: 1.5;
  margin-top: 10px;
}
.stats-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--density-gap);
  margin-bottom: 56px;
  align-items: end;
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials { padding: var(--density-y) 0; background: var(--surface-sunken); }
.tm-head { margin-bottom: 64px; max-width: 720px; }
.tm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tm-card {
  background: var(--surface);
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 320px;
}
.tm-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 500;
  flex-grow: 1;
}
.tm-quote .serif-italic {
  display: block;
  color: var(--brand-primary);
  font-weight: 400;
  font-size: 1.1em;
  margin-bottom: 14px;
}
.tm-author {
  display: flex; align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}
.tm-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: var(--text-on-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.tm-name { font-weight: 600; font-size: 14px; }
.tm-role { font-size: 13px; color: var(--text-muted); }
.tm-placeholder-note {
  display: inline-flex;
  padding: 4px 8px;
  background: var(--warn-soft);
  color: #92400e;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
}

/* =========================================================
   SECURITY
   ========================================================= */
.security { padding: var(--density-y) 0; }
.sec-head {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--density-gap);
  align-items: end;
  margin-bottom: 56px;
}
.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.sec-card {
  background: var(--surface-elevated);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all 0.25s var(--ease);
}
.sec-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px var(--brand-primary-glow);
}
.sec-card .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.sec-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sec-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}
.sec-integrations {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center;
  padding: 28px 32px;
  background: var(--surface-elevated);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
}
.sec-integrations .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 8px;
}
.sec-pill {
  padding: 8px 14px;
  background: var(--surface-sunken);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  border: 1px solid var(--hair);
}

/* =========================================================
   MORE UNDER THE HOOD
   ========================================================= */
.more-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}
.more-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.more-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: var(--surface-elevated);
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.more-pill:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--brand-primary-glow);
}
.more-pill-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   WHY BRADE
   ========================================================= */
.why-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  padding: 32px;
  background: var(--surface-elevated);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px var(--brand-primary-glow);
}
.why-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: 18px;
}
.why-card h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin-bottom: 12px;
}
.why-card > p {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 18px;
}
.why-list { border-top: 1px solid var(--hair); padding-top: 14px; }
.why-list li {
  font-size: 13px;
  color: var(--text-soft);
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.5;
}
.why-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 13px;
  width: 10px; height: 1px;
  background: var(--brand-primary);
}

/* =========================================================
   CTA
   ========================================================= */
.final-cta {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: calc(var(--density-y) * 1.2) 0;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, var(--brand-primary-glow), transparent 70%);
  pointer-events: none;
}
.cta-inner {
  max-width: 780px; margin: 0 auto;
  text-align: center;
  position: relative;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 24px;
}
.cta-inner h2 .serif-italic { color: var(--brand-primary); }
.cta-inner p { color: var(--text-on-dark-soft); font-size: 17px; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-soft);
  padding: 72px 0 32px;
  border-top: 1px solid var(--hair-dark);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hair-dark);
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-on-dark); margin-bottom: 18px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 6px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--text-on-dark); }
.footer-blurb { color: var(--text-on-dark-muted); font-size: 13px; max-width: 28ch; line-height: 1.55; }
.footer-bottom {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  padding-top: 32px;
}

/* Slim footer variant */
.footer--slim {
  padding: 20px 0;
  border-top: 1px solid var(--hair-dark);
}
.footer-slim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer--slim .footer-brand {
  margin-bottom: 0;
  font-size: 14px;
}
.footer--slim .footer-brand img {
  width: 22px;
  height: 22px;
}
.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-on-dark-muted);
}
.footer-meta a {
  color: var(--text-on-dark-soft);
  transition: color 0.2s;
}
.footer-meta a:hover { color: var(--text-on-dark); }
.footer-sep { color: var(--text-on-dark-muted); opacity: 0.6; }

/* =========================================================
   REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Pop variant — scale up with a small overshoot instead of sliding up. */
.reveal.reveal-pop {
  transform: scale(0.82);
  transition:
    opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.reveal-pop.in {
  transform: scale(1);
}

/* Horizontal slide-in variants — used to make paired cards meet in the middle. */
.reveal.reveal-from-left  { transform: translate3d(-80px, 0, 0); }
.reveal.reveal-from-right { transform: translate3d(80px, 0, 0); }
.reveal.reveal-from-left.in,
.reveal.reveal-from-right.in { transform: none; }

/* Marker class for containers whose direct .reveal children stagger. */
.reveal-stagger {}
.hero-line { display: block; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.reveal-pop,
  .reveal.reveal-from-left,
  .reveal.reveal-from-right {
    transform: none;
    transition: opacity 0.3s ease;
    animation: none;
  }
}

/* =========================================================
   TWEAKS PANEL
   ========================================================= */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 300px;
  background: var(--surface-elevated);
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  z-index: 200;
  display: none;
  font-family: var(--font-sans);
  color: var(--text);
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.tweaks-panel .tw-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.tw-group { margin-bottom: 18px; }
.tw-group:last-child { margin-bottom: 0; }
.tw-opts {
  display: flex; gap: 4px; margin-top: 6px;
  background: var(--surface-sunken);
  padding: 3px;
  border-radius: 8px;
}
.tw-opts button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.tw-opts button.on {
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .hero { padding-top: 100px; }
  .hero-grid--split { grid-template-columns: 1fr; gap: 48px; }
  .hero-grid--split .product-stage { margin-top: 16px; }
  .ps-row { grid-template-columns: 1fr; }
  .ps-cell.light { border-left: none; border-top: 1px solid var(--hair); }
  .ps-cell { padding: 48px 28px; }
  .how-head, .uc-head, .stats-head, .sec-head, .more-head, .why-head { grid-template-columns: 1fr; gap: 24px; }
  .why-grid { grid-template-columns: 1fr; }
  .how-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .how-connector {
    padding: 6px 0;
    transform: rotate(90deg);
    margin: 0 auto;
  }
  .uc-tiles { grid-template-columns: repeat(2, 1fr); }
  .uc-custom {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 28px;
  }
  .uc-custom h3 { font-size: 28px; }
  .uc-custom-body { padding-top: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
  .tm-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-slim-row { justify-content: center; text-align: center; }
  .footer-meta { justify-content: center; }
  .tweaks-panel { left: 16px; right: 16px; width: auto; }
}
