/* ========================================================
   DATALOGZ — BI COST & CAPACITY OPTIMIZATION
   Tokens derived from the brand mark (slate / green / blue)
   ======================================================== */

:root {
  /* ========== FLIGHTDECK.OPS TOKENS ========== */

  /* Brand — primary (blue) */
  --primary-0:   #E5EDFF;
  --primary-10:  #CDDDFF;
  --primary-20:  #9CBDFF;
  --primary-50:  #3B7DFF;
  --primary-60:  #3264C8;
  --primary-70:  #2E58AC;
  --primary-90:  #203258;

  /* Brand — secondary (green) */
  --secondary-0:  #E0F9F2;
  --secondary-30: #4FE4B0;
  --secondary-50: #15DB95;
  --secondary-60: #16C387;
  --secondary-70: #16AB78;
  --secondary-90: #164A3E;

  /* Surface scale (blue-grey neutrals) */
  --surface-0:   #FDFDFF;  /* page */
  --surface-10:  #FAFAFC;  /* subtle */
  --surface-20:  #F4F5F8;  /* default card */
  --surface-30:  #EFF0F5;  /* raised / divider */
  --surface-40:  #E9EBF1;
  --surface-50:  #DEE1EA;  /* border default */
  --surface-70:  #C8CDDB;  /* border strong */
  --surface-100: #909AB8;
  --surface-120: #6B758F;  /* content tertiary */
  --surface-140: #454F66;  /* content secondary */
  --surface-160: #272D3A;  /* content primary, inverse bg */
  --surface-170: #212631;
  --surface-180: #1B1F28;

  /* Semantic aliases */
  --ink:        var(--surface-160);     /* primary text */
  --ink-2:      var(--surface-160);
  --ink-3:      var(--surface-140);     /* secondary text */
  --ink-mute:   var(--surface-120);     /* tertiary text */
  --paper:      var(--surface-0);
  --paper-2:    #FFFFFF;
  --paper-3:    var(--surface-20);
  --line:       var(--surface-50);
  --line-soft:  var(--surface-30);

  /* Status accents */
  --success-50: #00C853;
  --success-70: #069D47;
  --warning-50: #FFB020;
  --warning-70: #C58B20;
  --danger-50:  #D64545;
  --danger-70:  #A63A3C;

  /* BI tool tints (used in chips) */
  --pbi-50:     #E8A800;
  --tableau-50: #3575CC;
  --qlik-50:    #0DB858;
  --sigma-50:   #7030E8;
  --spotfire-50:#E8305C;

  /* Existing aliases mapped to tokens */
  --slate:        var(--surface-100);
  --slate-soft:   var(--surface-70);
  --green:        var(--secondary-50);
  --green-deep:   var(--secondary-70);
  --blue:         var(--primary-50);
  --blue-deep:    var(--primary-60);

  /* Dark section (inverse) */
  --night:       var(--surface-160);
  --night-2:     var(--surface-170);
  --night-line:  rgba(255, 255, 255, 0.08);
  --night-mute:  rgba(255, 255, 255, 0.60);

  /* =========================================================
     TYPOGRAPHY — Flightdeck.Comms.Website tokens (Ruben's spec)
     ---------------------------------------------------------
     Funnel Display: all display + heading levels
     Inter:          body, labels, lead
     IBM Plex Sans:  eyebrows
     JetBrains Mono: prod-shot URL chrome and inline code
     Instrument Serif: preserved for Logan's italic .accent
     ========================================================= */
  --font-display: "Funnel Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-eyebrow: "IBM Plex Sans", "Inter", -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif:   "Instrument Serif", "Source Serif Pro", Georgia, serif;

  /* fd-* size tokens — clamp() scales fluidly across the 5 breakpoints.
     min = Mobile (375), max = Wide (1920). */
  --fd-display-2xl: clamp(48px, 5.4vw, 88px);   /* hero h1 */
  --fd-display-xl:  clamp(40px, 4.4vw, 72px);
  --fd-display-lg:  clamp(32px, 3.2vw, 56px);
  --fd-display-md:  clamp(28px, 2.6vw, 48px);
  --fd-display-sm:  clamp(24px, 2.2vw, 40px);
  --fd-h1: clamp(28px, 2.6vw, 40px);
  --fd-h2: clamp(24px, 2.2vw, 32px);
  --fd-h3: clamp(20px, 1.8vw, 28px);
  --fd-h4: clamp(18px, 1.5vw, 22px);
  --fd-h5: clamp(16px, 1.3vw, 20px);
  --fd-body-xl: clamp(17px, 1.4vw, 22px);
  --fd-body-lg: clamp(16px, 1.2vw, 18px);
  --fd-body-md: 16px;
  --fd-body-sm: 14px;
  --fd-body-xs: 12px;
  --fd-label-lg: 15px;
  --fd-label-md: 14px;
  --fd-label-sm: 13px;
  --fd-eyebrow:  12.5px;
  --fd-caption:  12px;

  /* Letter spacing tokens */
  --fd-tighter: -0.5px;
  --fd-tight:   -0.25px;
  --fd-normal:  0;
  --fd-wide:    0.25px;
  --fd-wider:   0.5px;
  --fd-widest:  1px;

  /* Backwards-compat aliases for older --t-* references in this file */
  --t-display: var(--fd-display-2xl);
  --t-h1:      var(--fd-display-2xl);
  --t-h2:      var(--fd-display-lg);
  --t-h3:      var(--fd-h3);
  --t-lead:    var(--fd-body-xl);
  --t-body:    17px;
  --t-small:   var(--fd-body-sm);
  --t-eyebrow: var(--fd-eyebrow);

  /* =========================================================
     LAYOUT — Flightdeck.Comms.Website breakpoints + 12-col grid
     ---------------------------------------------------------
     5 canonical breakpoints, each with its own column count,
     gutter (between columns), and margin (screen edge padding).
     Mobile           375  · 4 col  · 16px gutter · 16px margin
     Mobile Landscape 480  · 8 col  · 20px gutter · 24px margin
     Tablet           768  · 12 col · 24px gutter · 32px margin
     Desktop          1280 · 12 col · 24px gutter · 48px margin
     Wide             1920 · 12 col · 32px gutter · 80px margin
     ========================================================= */
  --max-w: 1360px;
  --r: 8px;
  --r-lg: 12px;

  /* Default to Mobile values; media queries override below */
  --cols: 4;
  --col-gap: 16px;
  --gutter: 16px;           /* page-edge margin (kept name for backwards compat) */
  --layout-margin: 16px;    /* alias of --gutter, more semantic */
}

@media (min-width: 480px) {
  :root {
    --cols: 8;
    --col-gap: 20px;
    --gutter: 24px;
    --layout-margin: 24px;
  }
}

@media (min-width: 768px) {
  :root {
    --cols: 12;
    --col-gap: 24px;
    --gutter: 32px;
    --layout-margin: 32px;
  }
}

@media (min-width: 1280px) {
  :root {
    --cols: 12;
    --col-gap: 24px;
    --gutter: 48px;
    --layout-margin: 48px;
  }
}

@media (min-width: 1920px) {
  :root {
    --cols: 12;
    --col-gap: 32px;
    --gutter: 80px;
    --layout-margin: 80px;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--green); color: var(--ink); }

/* ===== Layout primitives ===== */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--narrow { max-width: 980px; }

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fd-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 219, 149, 0.18);
}
.eyebrow--on-dark { color: rgba(255,255,255,0.65); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--fd-tight);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fd-display-2xl); line-height: 1.05; letter-spacing: var(--fd-tighter); }
h2 { font-size: var(--fd-display-lg); line-height: 1.08; letter-spacing: var(--fd-tighter); }
h3 { font-size: var(--fd-h3); line-height: 1.18; }
h4 { font-size: var(--fd-h4); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-3); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 120ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}
.btn .arr {
  width: 18px; height: 18px;
  transition: transform 200ms ease;
}
.btn:hover .arr { transform: translateX(3px); }
.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover { background: #000; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn--green {
  background: var(--green);
  color: var(--ink);
}
.btn--green:hover { background: var(--green-deep); color: #fff; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 246, 241, 0.78);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo svg { height: 28px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14.5px;
  color: var(--ink-3);
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-links a.active::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 767px) {
  .nav-links { display: none; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 1279px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 .accent {
  color: var(--green-deep);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero h1 .accent-num {
  display: inline-block;
  background: var(--ink);
  color: var(--green);
  padding: 0 0.18em;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.hero-sub {
  max-width: 580px;
  margin-top: 28px;
  font-size: 19px;
  color: var(--ink-3);
}
.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  color: var(--ink-mute);
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta-item svg {
  width: 14px; height: 14px;
  color: var(--green-deep);
}
.hero-ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Hero dashboard mock ===== */
.dash {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 0 rgba(14, 19, 32, 0.04),
    0 24px 40px -24px rgba(14, 19, 32, 0.20),
    0 60px 100px -40px rgba(14, 19, 32, 0.10);
  overflow: hidden;
  transform: translateZ(0);
}
.dash::before {
  /* faint diagonal sheen */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 60%, rgba(21,219,149,0.04) 100%);
  pointer-events: none;
}
.dash-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #FBFAF5;
}
.dash-chrome .dot-r { width: 11px; height: 11px; border-radius: 50%; background: #E5E3DA; }
.dash-chrome .dash-url {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 14px;
}
.dash-chrome .dash-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}
.dash-chrome .dash-pill .live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(21,219,149,0.2);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.dash-body { padding: 22px; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: #FBFAF5;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.kpi-value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.kpi-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
}
.kpi-delta.up { color: var(--green-deep); }
.kpi-delta.down { color: #C8553D; }

.dash-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}
.dash-card {
  background: #FBFAF5;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px;
}
.dash-card h4 {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 12px;
}

/* Capacity rows */
.cap-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 12px;
  border-top: 1px solid var(--line-soft);
}
.cap-row:first-of-type { border-top: 0; }
.cap-name { font-family: var(--font-mono); color: var(--ink); }
.cap-bar {
  height: 6px;
  border-radius: 999px;
  background: #EDECE4;
  position: relative;
  overflow: hidden;
}
.cap-bar > i {
  display: block; height: 100%;
  border-radius: 999px;
  background: var(--ink-3);
}
.cap-bar > i.warn { background: linear-gradient(90deg, var(--green) 0%, #E2A03F 70%, #C8553D 100%); }
.cap-bar > i.ok { background: var(--green); }
.cap-bar > i.low { background: var(--slate); }
.cap-num { text-align: right; font-family: var(--font-mono); color: var(--ink-mute); }

/* Donut */
.dash-donut-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
}
.dash-donut svg { width: 100%; height: auto; max-width: 120px; }
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
}
.donut-legend i {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: 1px;
}

/* Tiny floating annotation */
.dash-tag {
  position: absolute;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 8px 22px -10px rgba(14,19,32,0.5);
  white-space: nowrap;
  z-index: 2;
}
.dash-tag::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  background: var(--ink);
  transform: rotate(45deg);
}
.dash-tag--savings {
  top: 14%;
  right: -28px;
}
.dash-tag--savings::after {
  left: -4px;
  top: 50%;
  margin-top: -5px;
}
.dash-tag--savings .v { color: var(--green); }

.dash-tag--alert {
  bottom: 18%;
  left: -38px;
}
.dash-tag--alert::after {
  right: -4px;
  top: 50%;
  margin-top: -5px;
}

@media (max-width: 1279px) {
  .dash-tag { display: none; }
}

/* ===== Integration strip ===== */
.logo-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  background: rgba(255, 255, 255, 0.45);
}
.logo-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.logo-strip-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.logo-strip-items {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  flex-wrap: wrap;
}
.logo-strip-items span {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.01em;
  opacity: 0.78;
  transition: opacity 160ms ease;
}
.logo-strip-items span:hover { opacity: 1; }

/* ===== Section frame ===== */
section { position: relative; }
.section { padding: clamp(96px, 12vw, 160px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head h2 { max-width: 14ch; }
@media (max-width: 767px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== Problem section ===== */
.problem {
  background: var(--paper);
}
.problem-narrative {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 1279px) {
  .problem-narrative { grid-template-columns: 1fr; gap: 48px; }
}
.problem-narrative p { margin-bottom: 22px; color: var(--ink-3); font-size: 18px; line-height: 1.6; }
.problem-narrative .first {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 28px;
}

.problem-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.problem-list li {
  position: relative;
  padding: 22px 0 22px 44px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.5;
}
.problem-list li:last-child { border-bottom: 1px solid var(--line); }
.problem-list li .pl-num {
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

/* ===== Pull quote ===== */
.pullquote {
  margin: 96px auto 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 36px;
  padding: 56px 56px 56px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.pullquote .mark {
  font-family: var(--font-serif);
  font-size: 120px;
  line-height: 0.6;
  color: var(--green-deep);
  font-style: italic;
}
.pullquote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.pullquote cite {
  display: block;
  margin-top: 24px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
@media (max-width: 767px) {
  .pullquote { grid-template-columns: 1fr; padding: 36px 0; }
  .pullquote .mark { font-size: 64px; }
}

/* ===== How it works ===== */
.how {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.three-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
}
.three-step {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
}
.three-step:last-child { border-right: 0; }
.three-step .ts-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.three-step .ts-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.three-step .ts-title .punct { color: var(--green-deep); }
@media (max-width: 767px) {
  .three-steps { grid-template-columns: 1fr; }
  .three-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .three-step:last-child { border-bottom: 0; }
}

.four-things {
  margin-top: 96px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 1279px) {
  .four-things { grid-template-columns: 1fr; gap: 36px; }
}
.four-things-aside h3 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.four-things-aside p {
  font-size: 16px;
  color: var(--ink-mute);
}

.four-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.four-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 28px 28px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.four-item:last-child { border-bottom: 1px solid var(--line); }
.four-item .fi-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-mute);
  padding-top: 4px;
}
.four-item h4 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
}
.four-item p {
  font-size: 16px;
  color: var(--ink-3);
  line-height: 1.55;
}

.automate-card {
  margin-top: 56px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.automate-card h3 {
  color: #fff;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.automate-card h3 .em { color: var(--green); }
.automate-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.55;
}
.automate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.automate-actions .pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.automate-actions .pill .check {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}
@media (max-width: 767px) {
  .automate-card { grid-template-columns: 1fr; padding: 32px; }
  .automate-actions { grid-template-columns: 1fr; }
}

/* ===== Case study (dark) ===== */
.case {
  background: var(--night);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.case::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 12% 18%, rgba(21,219,149,0.10), transparent 60%),
    radial-gradient(700px 360px at 92% 88%, rgba(59,125,255,0.10), transparent 60%);
  pointer-events: none;
}
.case .wrap { position: relative; z-index: 2; }
.case h2 { color: #fff; }
.case .lead { color: rgba(255,255,255,0.72); }
.case .eyebrow { color: rgba(255,255,255,0.55); }
.case .eyebrow .dot { background: var(--green); }

.case-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 72px;
}
@media (max-width: 767px) {
  .case-intro { grid-template-columns: 1fr; gap: 36px; }
}
.case-intro p {
  color: rgba(255,255,255,0.72);
  font-size: 18px;
  line-height: 1.6;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--night-line);
  border-left: 1px solid var(--night-line);
}
.case-stat {
  padding: 36px;
  border-right: 1px solid var(--night-line);
  border-bottom: 1px solid var(--night-line);
}
.case-stat .stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}
.case-stat .stat-num {
  font-family: var(--font-sans);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.case-stat .stat-num .em { color: var(--green); }
.case-stat .stat-desc {
  color: rgba(255,255,255,0.7);
  font-size: 15.5px;
  line-height: 1.5;
  max-width: 38ch;
}
@media (max-width: 767px) {
  .case-stats { grid-template-columns: 1fr; }
}

.case-progress {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--night-line);
}
.case-progress .cp-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.case-progress-track {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
}
.cp-bar {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.cp-bar .cp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 56%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 999px;
}
.cp-bar .cp-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.6s linear infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.cp-mark {
  position: absolute;
  top: -6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}
.cp-mark::after {
  content: "";
  display: block;
  margin: 6px auto 0;
  width: 1px; height: 36px;
  background: rgba(255,255,255,0.18);
}
@media (max-width: 767px) {
  .case-progress { grid-template-columns: 1fr; }
}

/* ===== Outcomes (light) ===== */
.outcomes {
  background: var(--paper);
}
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
}
.outcome {
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.outcome:nth-child(odd) { padding-right: 40px; border-right: 1px solid var(--line); }
.outcome:nth-child(even) { padding-left: 40px; }
.outcome-num {
  font-family: var(--font-sans);
  font-size: clamp(56px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--ink);
}
.outcome-num .em { color: var(--green-deep); }
.outcome p {
  font-size: 17px;
  color: var(--ink-3);
  line-height: 1.5;
}
.outcome .outcome-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
@media (max-width: 767px) {
  .outcomes-grid { grid-template-columns: 1fr; }
  .outcome { grid-template-columns: 1fr; gap: 16px; padding: 36px 0; }
  .outcome:nth-child(odd) { padding-right: 0; border-right: 0; }
  .outcome:nth-child(even) { padding-left: 0; }
}

/* ===== Final CTA ===== */
.final {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(21,219,149,0.12), transparent 60%);
  pointer-events: none;
}
.final-inner {
  position: relative;
  z-index: 2;
  padding: 120px 0 100px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: end;
}
.final h2 {
  color: #fff;
  font-size: clamp(48px, 5.6vw, 88px);
  letter-spacing: -0.028em;
  line-height: 1;
}
.final h2 .em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--green);
  font-weight: 400;
}
.final-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.final-right p {
  color: rgba(255,255,255,0.72);
  font-size: 18px;
}
@media (max-width: 767px) {
  .final-inner { grid-template-columns: 1fr; gap: 36px; padding: 72px 0; }
}

/* ===== Footer ===== */
.foot {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 32px 0;
  font-size: 13.5px;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot a { color: rgba(255,255,255,0.7); margin-right: 24px; }
.foot a:last-child { margin-right: 0; }
.foot a:hover { color: #fff; }

/* ===== Anchored reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Variant: dark hero override */
body.var-dark-hero .hero { background: var(--ink); color: #fff; }
body.var-dark-hero .hero h1 { color: #fff; }
body.var-dark-hero .hero .lead, body.var-dark-hero .hero-sub { color: rgba(255,255,255,0.72); }
body.var-dark-hero .hero-meta { color: rgba(255,255,255,0.55); }
body.var-dark-hero .hero-eyebrow-row .eyebrow { color: rgba(255,255,255,0.6); }
body.var-dark-hero .btn--primary { background: var(--green); color: var(--ink); }
body.var-dark-hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.2); }
body.var-dark-hero .nav { background: rgba(14,19,32,0.85); border-bottom-color: rgba(255,255,255,0.08); }
body.var-dark-hero .nav-links a { color: rgba(255,255,255,0.7); }
body.var-dark-hero .nav-links a:hover, body.var-dark-hero .nav-links a.active { color: #fff; }

/* Accent palette switches */
body.accent-blue {
  --green: #3B7DFF;
  --green-deep: #2456C7;
}
body.accent-mono {
  --green: #0E1320;
  --green-deep: #0E1320;
}

/* =========================================================
   PRODUCT SHOTS (real screenshots)
   ========================================================= */
.prod-shot {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 0 rgba(39, 45, 58, 0.04),
    0 20px 40px -24px rgba(39, 45, 58, 0.18),
    0 60px 100px -40px rgba(39, 45, 58, 0.10);
  /* overflow:visible lets the .prod-tag callouts float past edges.
     The chrome and image are individually rounded so corners still match. */
  overflow: visible;
  margin: 0;
  transform: translateZ(0);
  isolation: isolate;
}
.prod-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.prod-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-10);
  border-bottom: 1px solid var(--line-soft);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.dot-r {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-50);
}
.dot-r--red { background: #FF6058; }
.dot-r--yel { background: #FEBC2E; }
.dot-r--grn { background: #28C840; }
.prod-url {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 12px;
}
.prod-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--secondary-50);
  box-shadow: 0 0 0 3px rgba(21,219,149,0.2);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Floating callout tags */
.prod-tag {
  position: absolute;
  background: var(--surface-160);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 12px 30px -10px rgba(39,45,58,0.55);
  white-space: nowrap;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.prod-tag::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  background: var(--surface-160);
  transform: rotate(45deg);
}
.prod-tag .v { color: var(--secondary-50); }
.warn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warning-50);
  box-shadow: 0 0 0 3px rgba(255,176,32,0.2);
}
.prod-tag--savings {
  top: 18%;
  right: -28px;
  transform: translateX(0);
}
.prod-tag--savings::after {
  left: -4px;
  top: 50%;
  margin-top: -5px;
}
.prod-tag--alert {
  bottom: 14%;
  left: -40px;
}
.prod-tag--alert::after {
  right: -4px;
  top: 50%;
  margin-top: -5px;
}
@media (max-width: 1279px) {
  .prod-tag { display: none; }
}

/* =========================================================
   PRODUCT SHOWCASE SECTION
   ========================================================= */
.showcase {
  background: var(--surface-10);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.showcase-stage {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1279px) {
  .showcase-stage { grid-template-columns: 1fr; gap: 32px; }
}
.showcase-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
}
.showcase-tab {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 22px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  text-align: left;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  font: inherit;
  color: inherit;
}
.showcase-tab:hover { background: var(--surface-20); }
.showcase-tab[aria-selected="true"] {
  background: #fff;
  border-left-color: var(--primary-50);
}
.showcase-tab .st-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  padding-top: 2px;
}
.showcase-tab .st-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.showcase-tab[aria-selected="true"] .st-title { color: var(--primary-60); }
.showcase-tab .st-desc {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}
@media (max-width: 1279px) {
  .showcase-tabs { flex-direction: row; overflow-x: auto; border-left: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
  .showcase-tab { flex: 1 0 220px; border-left: none; border-bottom: 2px solid transparent; margin-left: 0; margin-bottom: -1px; }
  .showcase-tab[aria-selected="true"] { border-left-color: transparent; border-bottom-color: var(--primary-50); }
}

.showcase-panels {
  position: relative;
}
.showcase-panel {
  display: none;
  animation: panelFade 350ms ease both;
}
.showcase-panel.active { display: block; }
@keyframes panelFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.showcase-panel .prod-shot { max-width: 920px; margin-left: auto; }
.showcase-panel .panel-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.showcase-panel .panel-meta .chip {
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-3);
}
