/* =============================================================
   TransRisk v3 — Custom CSS Component Library
   Companion to Tailwind CSS CDN
============================================================= */

/* ========================
   DESIGN TOKENS
======================== */

:root {
  --color-navy:        #0f1f2e;
  --color-navy-light:  #1a3048;
  --color-navy-border: rgba(255, 255, 255, 0.08);

  --color-green:       #2d7a3a;
  --color-green-dark:  #22602c;
  --color-green-light: #3a9e4a;
  --color-green-glow:  rgba(45, 122, 58, 0.15);

  --color-light:       #f8f9fa;
  --color-text:        #1a1a2e;
  --color-muted:       #6b7280;
  --color-border:      #e5e7eb;
  --color-white:       #ffffff;

  --font:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm:         4px;
  --radius-md:         8px;
  --radius-lg:         12px;
  --radius-xl:         20px;

  --shadow-sm:         0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:         0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg:         0 12px 40px rgba(0, 0, 0, 0.10);
  --shadow-xl:         0 24px 64px rgba(0, 0, 0, 0.12);

  --transition:        0.18s ease;
  --nav-h:             68px;
}

/* ========================
   BASE RESET
======================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

/* ========================
   LAYOUT UTILITIES
======================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad   { padding: 96px 0; }
.section-pad-sm { padding: 64px 0; }

/* Offset for sticky nav on hash/anchor navigation */
section[id],
[id].section-pad,
span[id][aria-hidden="true"] + section,
div.ind-panel[id],
details[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
/* Invisible anchor shims placed before sections */
span[id][aria-hidden="true"] {
  display: block;
  height: 0;
  visibility: hidden;
}

/* ========================
   COMPONENT: BUTTONS
======================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: #22c55e;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid #22c55e;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.15s ease;
  -webkit-appearance: none;
}

.btn-primary:hover {
  background: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.40);
  transform: scale(1.02);
}

.btn-primary:active { transform: scale(0.98); }

.btn-primary.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* ── Secondary (on light backgrounds) ── */

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: transparent;
  color: var(--color-navy);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  -webkit-appearance: none;
}

.btn-secondary:hover {
  border-color: var(--color-navy);
  background: rgba(15, 31, 46, 0.04);
}

.btn-secondary.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* ── Ghost white (on dark/navy backgrounds) ── */

.btn-ghost-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
}

.btn-ghost-white:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost-white.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* ========================
   COMPONENT: TEXT LINK
======================== */

.text-link {
  color: #2d7a3a;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.text-link:hover {
  color: #1f5a2a;
}

/* ========================
   COMPONENT: CARD
======================== */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-flat {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card-dark {
  background: var(--color-navy-light);
  border: 1px solid var(--color-navy-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card-accent {
  background: var(--color-green-glow);
  border: 1px solid rgba(45, 122, 58, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* ========================
   COMPONENT: SECTION TYPOGRAPHY
======================== */

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 12px;
}

.section-eyebrow-white {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(74, 222, 128, 0.9);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.section-title-white {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.section-subtitle {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 620px;
}

.section-subtitle-white {
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  max-width: 620px;
}

/* ========================
   COMPONENT: BADGE
======================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.badge-green {
  background: var(--color-green-glow);
  color: var(--color-green);
}

.badge-navy {
  background: rgba(15, 31, 46, 0.07);
  color: var(--color-navy);
}

.badge-white {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge-muted {
  background: #f1f3f5;
  color: var(--color-muted);
}

/* NEW pill — shared by sidebar, arch diagram, footer links etc. */
.badge-new {
  display: inline-block;
  background: #4ade80;
  color: #0f1f2e;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 100px;
  line-height: 1.7;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ========================
   COMPONENT: METRIC STRIP
======================== */

.metric-strip {
  background: var(--color-navy);
  display: flex;
  flex-wrap: wrap;
}

.metric-item {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 32px;
  border-right: 1px solid var(--color-navy-border);
}

.metric-item:last-child {
  border-right: none;
}

.metric-value {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-value em {
  font-style: normal;
  color: #4ade80;
}

.metric-label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.01em;
}

/* ========================
   FOOTER
======================== */

/* ── Two-tone wrapper ── */
.footer-upper {
  background: var(--color-navy); /* #0f1f2e */
}

.footer-lower {
  background: #0a1520; /* slightly darker */
}

/* ── Upper grid ── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.1fr 1.35fr;
  gap: 48px;
  padding: 72px 0 64px;
}

/* ── Brand column ── */
.footer-tagline {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-green-light);
  margin-top: 16px;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.45);
  max-width: 280px;
  margin-top: 12px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.50);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social-link:hover {
  color: var(--color-green-light);
  border-color: var(--color-green);
  background: rgba(45, 122, 58, 0.12);
}

/* ── Column headings ── */
.footer-col h5 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.30);
  margin-bottom: 20px;
}

/* ── Nav link list ── */
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col ul a:hover { color: var(--color-green-light); }

/* NEW badge inside footer links */
.footer-col ul a .badge-new {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(45, 122, 58, 0.28);
  color: #6ee87a;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.6;
}

/* ── CTA column ── */
.footer-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.footer-cta-group .btn-primary {
  justify-content: center;
  text-align: center;
}

.footer-text-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-block;
}

.footer-text-link:hover { color: var(--color-green-light); }

/* ── Contact block ── */
.footer-contact-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  flex-shrink: 0;
}

.footer-contact-line svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.footer-contact-line a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-contact-line a:hover { color: var(--color-white); }

/* ── Lower bar ── */
.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
  line-height: 1.6;
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  transition: color var(--transition);
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1;
}

.footer-legal a:first-child { padding-left: 0; }
.footer-legal a:last-child  { padding-right: 0; border-right: none; }

.footer-legal a:hover { color: var(--color-green-light); }

/* ========================
   MISC UTILITIES
======================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Green underline accent for headings */
.accent-line::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-green);
  border-radius: 2px;
  margin-top: 12px;
}

/* ========================
   RESPONSIVE
======================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 48px;
    padding: 56px 0 48px;
  }

  /* Brand col takes full row on 2-col layout */
  .footer-col--brand {
    grid-column: 1 / -1;
  }

  .footer-desc { max-width: 480px; }
}

@media (max-width: 768px) {

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 40px;
  }

  .footer-col--brand { grid-column: auto; }
  .footer-desc { max-width: 100%; }

  .section-pad   { padding: 64px 0; }
  .section-pad-sm { padding: 48px 0; }

  .card { padding: 24px; }
  .card-dark { padding: 24px; }

  .metric-item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid var(--color-navy-border);
    padding: 28px 20px;
  }

  .metric-item:nth-child(odd)  { border-right: 1px solid var(--color-navy-border); }
  .metric-item:last-child,
  .metric-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .container-wide { padding: 0 16px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 8px 0;
  }

  .footer-legal a {
    padding: 2px 10px;
  }

  .metric-item { flex: 0 0 100%; border-right: none !important; }
  .metric-item:last-child { border-bottom: none; }
}


/* =============================================================
   PRODUCT MODULES SECTION
============================================================= */

.modules-section {
  background: var(--color-light);
}

/* Centered header */
.modules-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 52px;
}

.modules-subtitle {
  margin: 14px auto 0;
  text-align: center;
}

/* Desktop line-break — hidden on narrow screens */
.br-desktop { display: inline; }

/* 4-column grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Card base */
.module-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px 26px 24px; /* extra left padding clears the accent bar */
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow    var(--transition),
    transform     var(--transition),
    border-color  var(--transition);
}

/* Green left-accent bar — always visible */
.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--color-green) 0%, var(--color-green-light) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* Hover: shadow lift + green border */
.module-card:hover {
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.14), var(--shadow-md);
  transform: translateY(-3px);
  border-color: #22c55e;
}

/* Top row: icon left, NEW badge right */
.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 36px; /* keeps rows aligned whether or not badge is present */
}

/* Icon container */
.module-icon {
  width: 36px;
  height: 36px;
  background: var(--color-green-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}

.module-card:hover .module-icon {
  background: rgba(45, 122, 58, 0.14);
  transform: scale(1.06);
}

/* Title */
.module-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.28;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
}

/* NEW badge — sits top-right of card-top row */
.module-new-badge {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 9.5px;
  padding: 3px 8px;
  margin-top: 2px;
}

/* Card body */
.module-card-body {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.72;
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .br-desktop { display: none; }
}

@media (max-width: 768px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .modules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* =============================================================
   SOLUTION STRIP
============================================================= */

.solution-strip {
  background: var(--color-green);
  /* No horizontal padding — tiles bleed to edges */
}

/* Label row */
.solution-strip-header {
  padding: 36px 32px 0;
  text-align: center;
}

.solution-strip-lbl {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

/* Tile row */
.solution-tiles {
  display: flex;
  align-items: stretch;
  margin-top: 28px;
}

/* Individual tile */
.solution-tile {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 28px 36px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  transition: background var(--transition);
  min-width: 0; /* prevent flex overflow */
}

.solution-tile:last-child {
  border-right: none;
}

.solution-tile:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Icon */
.solution-tile-icon {
  color: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
  line-height: 0;
  margin-bottom: 2px;
}

/* Title */
.solution-tile-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  letter-spacing: -0.012em;
}

/* Body */
.solution-tile-body {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
  .solution-tiles {
    flex-wrap: wrap;
  }

  .solution-tile {
    flex: 1 1 calc(50% - 0px); /* two per row */
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  /* Remove right border on every second tile */
  .solution-tile:nth-child(2n) {
    border-right: none;
  }

  /* Remove bottom border on last two tiles */
  .solution-tile:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* If 5th tile is alone on its row, span full width */
  .solution-tile:last-child:nth-child(odd) {
    flex-basis: 100%;
    border-right: none;
  }
}

@media (max-width: 520px) {
  .solution-tiles {
    flex-direction: column;
  }

  .solution-tile {
    flex-basis: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 22px 24px 26px;
  }

  .solution-tile:last-child {
    border-bottom: none;
  }

  .solution-strip-header {
    padding: 28px 24px 0;
  }
}

/* =============================================================
   PROBLEM SECTION
============================================================= */

.problem-section {
  background: var(--color-white);
}

.problem-header {
  max-width: 640px;
  margin-bottom: 52px;
}

.problem-title {
  margin-top: 16px;
  line-height: 1.15;
}

/* Three-column card grid */
.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.problem-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow  var(--transition),
    transform   var(--transition),
    border-color var(--transition);
  overflow: hidden;
}

.problem-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(45, 122, 58, 0.25);
}

/* Green top-edge accent — slides in on hover */
.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-green), var(--color-green-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.problem-card:hover::before {
  transform: scaleX(1);
}

/* Icon container */
.problem-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-green-glow);
  border-radius: var(--radius-md);
  color: var(--color-green);
  margin-bottom: 22px;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}

.problem-card:hover .problem-icon {
  background: rgba(45, 122, 58, 0.14);
  transform: scale(1.06);
}

/* Card copy */
.problem-card-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.28;
  letter-spacing: -0.018em;
  margin-bottom: 12px;
}

.problem-card-body {
  font-size: 14.5px;
  color: var(--color-muted);
  line-height: 1.74;
}

/* ── Scroll-reveal (shared utility) ───────────────────────── */

@keyframes scrollRevealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.scroll-reveal {
  opacity: 0; /* hidden until JS adds .in-view */
}

.scroll-reveal.in-view {
  animation: scrollRevealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) var(--sr-delay, 0ms) forwards;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal.in-view {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* ── Problem section responsive ───────────────────────────── */

@media (max-width: 960px) {
  .problem-cards {
    grid-template-columns: 1fr 1fr;
  }

  /* Third card spans full width when two-column */
  .problem-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
  }
}

@media (max-width: 600px) {
  .problem-cards {
    grid-template-columns: 1fr;
  }

  .problem-card:last-child {
    grid-column: auto;
    max-width: 100%;
  }

  .problem-header { margin-bottom: 36px; }
}

/* =============================================================
   HERO SECTION
============================================================= */

/* ── Structure ─────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--color-navy);
  overflow: hidden;
  padding: 92px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Subtle dot-grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Soft green atmospheric glow on right half */
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 75% 50%, rgba(45,122,58,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 15% 80%, rgba(15,31,46,0.6) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* ── Copy (left) ───────────────────────────────────────────── */

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-headline {
  font-size: clamp(30px, 3.8vw, 52px);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.10;
  letter-spacing: -0.03em;
  font-style: normal;
}

.hero-headline-em {
  font-style: normal;
  color: #4ade80;
  display: block;
  margin-top: 2px;
}

.hero-sub {
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: rgba(255,255,255,0.62);
  line-height: 1.78;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Trust strip */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.36);
  line-height: 1.6;
}

.trust-dot {
  color: rgba(255,255,255,0.18);
  font-size: 15px;
  line-height: 1;
  display: inline-block;
}

/* ── Animations ────────────────────────────────────────────── */

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes chartLineDraw {
  from { stroke-dashoffset: 900; }
  to   { stroke-dashoffset: 0;   }
}

@keyframes chartDotPop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  50%       { opacity: 0.7; transform: scale(0.88); box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

/* Staggered fade-up — driven by --delay CSS custom property */
.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.68s cubic-bezier(0.22,1,0.36,1) var(--delay, 0ms) forwards;
}

/* ── Visual panel (right) ──────────────────────────────────── */

.hero-visual {
  position: relative;
  padding: 28px 28px 28px 8px; /* room for floating cards */
}

.hero-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 20px 20px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 28px 80px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Panel header row */
.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-hd-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
}

.panel-hd-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
}

.live-pulse {
  display: block;
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: livePulse 2.2s ease-in-out infinite;
}

.panel-period-badge {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

/* Chart wrapper */
.panel-chart-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}

.chart-ylabels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 14px;
  flex-shrink: 0;
  min-width: 28px;
}

.chart-ylabels span {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255,255,255,0.28);
  line-height: 1;
  font-family: var(--font);
  text-align: right;
}

.chart-svg {
  flex: 1;
  height: 190px;
  overflow: visible;
  display: block;
}

/* Line draw animation */
.chart-line {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: chartLineDraw 1.9s cubic-bezier(0.4,0,0.2,1) 0.9s forwards;
}

/* Data point pop-in */
.chart-dot {
  opacity: 0;
  transform-origin: center;
  animation: chartDotPop 0.3s ease forwards;
}
.chart-dot:nth-child(1) { animation-delay: 1.1s; }
.chart-dot:nth-child(2) { animation-delay: 1.25s; }
.chart-dot:nth-child(3) { animation-delay: 1.40s; }
.chart-dot:nth-child(4) { animation-delay: 1.55s; }
.chart-dot:nth-child(5) { animation-delay: 1.70s; }
.chart-dot:nth-child(6) { animation-delay: 1.85s; }

/* Metric cards row */
.panel-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
  gap: 0;
}

.panel-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px 0 0;
}

.panel-metric-mid {
  padding: 0 12px;
  border-left: 1px solid rgba(255,255,255,0.07);
  border-right: 1px solid rgba(255,255,255,0.07);
}

.pm-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.38);
}

.pm-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.pm-value.pm-green { color: #4ade80; }

.pm-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.32);
  line-height: 1.4;
}

.pm-up      { color: rgba(74,222,128,0.65); }
.pm-neutral { color: rgba(255,255,255,0.32); }

/* Illustrative currency caption below metric row */
.panel-metrics-caption {
  font-size: 10px;
  font-style: italic;
  color: rgba(255,255,255,0.30);
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* ── Floating overlay cards ────────────────────────────────── */

.panel-float {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: rgba(10,24,38,0.92);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  white-space: nowrap;
  opacity: 0;
}

.hero-float-animate {
  animation: heroFadeIn 0.5s ease var(--fdelay, 1200ms) forwards;
}

.panel-float--alert {
  top: 8px;
  right: 8px;
}

.panel-float--hedge {
  bottom: 72px;
  left: -12px;
}

.float-indicator {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.float-indicator--red {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248,113,113,0.55);
}

.float-indicator--green {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,0.55);
}

.float-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.40);
}

.float-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-white);
  margin-top: 2px;
}

/* ── Hero responsive ───────────────────────────────────────── */

@media (max-width: 1100px) {
  .hero-inner { gap: 48px; }
  .hero-visual { padding-right: 12px; }
}

@media (max-width: 860px) {
  .hero {
    padding: 72px 0 64px;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-copy {
    text-align: center;
    align-items: center;
  }

  .hero-sub  { max-width: 100%; }
  .hero-trust { justify-content: center; }
  .hero-headline-em { display: inline; margin-left: 4px; }

  /* Show a simplified visual on tablet */
  .hero-visual {
    padding: 0;
    max-width: 560px;
    margin: 0 auto;
  }

  .panel-float--alert { top: -14px; right: -8px; }
  .panel-float--hedge { bottom: 16px; left: -8px;  }
}

@media (max-width: 480px) {
  /* Hide the complex visual on very small phones */
  .hero-visual { display: none; }
}

@media (max-width: 600px) and (min-width: 481px) {
  /* Stack visual below copy; hide floating overlays at this size */
  .panel-float { display: none; }
  .hero-panel { font-size: 12px; }
}

/* ========================
   SOCIAL PROOF SECTION
======================== */

/* ── Part A: Metrics Strip ── */
.proof-metrics {
  display: flex;
  background: var(--color-navy);
  padding: 56px 40px;
  justify-content: center;
  gap: 0;
}

.proof-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  max-width: 260px;
  padding: 0 32px;
  position: relative;
}

/* Dividers between metrics */
.proof-metric + .proof-metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.proof-metric-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--color-green-light);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.proof-metric-label {
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
  max-width: 160px;
}

/* ── Part B: Testimonial Block ── */
.proof-testimonial-wrap {
  background: #fff;
  padding: 80px 40px 72px;
}

.proof-testimonial-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proof-quote {
  position: relative;
  text-align: left;
  margin: 0;
  padding: 32px 36px;
  background: #fff;
  border-left: 4px solid #22c55e;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

/* Oversized decorative quote mark */
.proof-quote-mark {
  display: block;
  font-size: 4rem;
  line-height: 1;
  color: #22c55e;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  margin-bottom: 12px;
  user-select: none;
  opacity: 0.7;
}

.proof-quote-text {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  font-style: italic;
  margin: 0;
}

/* Attribution row */
.proof-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.proof-attribution-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.proof-attr-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.proof-attr-role {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 400;
}

/* Company logo placeholder */
.proof-logo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-light);
  border: 1px dashed var(--color-border);
  flex-shrink: 0;
}

.proof-logo-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* More stories link */
.proof-more-link {
  margin-top: 36px;
  text-align: center;
}

.proof-more-a {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.proof-more-a:hover {
  color: var(--color-green);
  border-bottom-color: var(--color-green);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .proof-metrics {
    padding: 48px 24px;
    gap: 0;
  }

  .proof-metric {
    padding: 0 20px;
  }

  .proof-testimonial-wrap {
    padding: 64px 24px 56px;
  }
}

@media (max-width: 640px) {
  .proof-metrics {
    flex-wrap: wrap;
    padding: 40px 24px;
    gap: 36px 0;
  }

  .proof-metric {
    flex: 1 1 50%;
    max-width: none;
    padding: 0 16px;
  }

  /* Remove vertical dividers on 2-column layout */
  .proof-metric:nth-child(odd)::before {
    display: none;
  }

  /* Add a horizontal rule between rows */
  .proof-metric:nth-child(3) {
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }
  .proof-metric:nth-child(4) {
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }

  .proof-quote-mark {
    font-size: 6rem;
  }

  .proof-attribution {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .proof-attribution-text {
    text-align: left;
  }
}

/* ========================
   FINAL CTA SECTION
======================== */

.cta-final {
  position: relative;
  background: var(--color-navy);
  padding: 112px 40px;
  overflow: hidden;
  text-align: center;
}

/* Dot-grid texture — same technique as hero */
.cta-final-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Soft glow orbs */
.cta-final-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.18;
}

.cta-final-glow--left {
  background: var(--color-green);
  top: -120px;
  left: -80px;
}

.cta-final-glow--right {
  background: #1a4fa8;
  bottom: -140px;
  right: -80px;
}

/* Inner — sits above texture/glows */
.cta-final-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Copy block */
.cta-final-copy {
  max-width: 720px;
  margin-bottom: 48px;
}

.cta-final-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.625rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-final-sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto;
}

/* Button row */
.cta-final-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* Reassurance strip */
.cta-final-reassurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.40);
  letter-spacing: 0.01em;
}

.cta-sep {
  color: rgba(255, 255, 255, 0.20);
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .cta-final {
    padding: 80px 24px;
  }

  .cta-final-copy {
    margin-bottom: 36px;
  }

  .cta-final-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .cta-final-actions .btn-primary,
  .cta-final-actions .btn-ghost-white {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cta-final {
    padding: 64px 20px;
  }

  .cta-final-reassurance {
    flex-direction: column;
    gap: 6px;
  }

  .cta-sep {
    display: none;
  }
}

/* ========================
   CREDIBILITY SECTION
======================== */

.credibility-section {
  background: #f0f2f5;
}

/* Full-width title above columns */
.credibility-title {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 52px;
  max-width: 820px;
}

/* Two-column layout */
.credibility-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: start;
}

/* ── Left: body copy ── */
.credibility-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.credibility-copy p {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.8;
  margin: 0;
}

/* ── Right: 2×2 credential tiles ── */
.credibility-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cred-tile {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cred-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-green);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* For the clients tile — smaller text, still green */
.cred-value--names {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

.cred-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: lowercase;
  margin-top: 2px;
}

.cred-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.45;
  margin-top: 4px;
}

/* ── Footer divider + footnote ── */
.credibility-footer {
  margin-top: 56px;
}

.credibility-divider {
  border: none;
  border-top: 1px solid #d1d5db;
  margin-bottom: 20px;
}

.credibility-footnote {
  font-size: 0.875rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.credibility-link {
  color: var(--color-green);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}

.credibility-link:hover {
  color: var(--color-green-dark);
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .credibility-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .credibility-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 480px;
  }

  .credibility-title {
    margin-bottom: 40px;
  }
}

@media (max-width: 520px) {
  .credibility-stats {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }

  .cred-tile {
    padding: 18px 16px;
  }

  .cred-value {
    font-size: 1.625rem;
  }

  .credibility-footer {
    margin-top: 40px;
  }

  .credibility-footnote {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ========================
   INDUSTRIES SECTION
======================== */

.industries-section {
  background: var(--color-light);
}

.industries-header {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

/* ── Grid ── */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── Tile ── */
.industry-tile {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  cursor: default;
}

.industry-tile:hover {
  border-color: var(--color-green);
  box-shadow: 0 4px 20px rgba(45, 122, 58, 0.10);
  background: #f6fbf7;
}

/* ── Icon ── */
.industry-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  flex-shrink: 0;
}

.industry-icon svg {
  width: 28px;
  height: 28px;
}

/* ── Text ── */
.industry-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  margin: 0;
}

.industry-assets {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── CTA below grid ── */
.industries-cta {
  margin-top: 52px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.industries-cta-text {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 480px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .industries-header {
    margin-bottom: 40px;
  }

  .industry-tile {
    padding: 22px 18px 20px;
  }
}

@media (max-width: 420px) {
  .industries-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================
   COMPARISON TABLE SECTION
======================== */

/* ========================
   WHO BENEFITS SECTION
======================== */

.who-benefits-section {
  background: var(--color-white);
}

.who-benefits-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.role-card {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.role-card:hover {
  border-color: #22c55e;
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.10);
  transform: translateY(-2px);
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.10);
  color: #16a34a;
  flex-shrink: 0;
}

.role-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.role-card-body {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 1100px) {
  .role-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .role-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .role-cards {
    grid-template-columns: 1fr;
  }
}

/* ========================
   COMPARISON SECTION
======================== */

.comparison-section {
  background: var(--color-light);
}

.comparison-header {
  max-width: 780px;
  margin: 0 auto 48px;
  text-align: center;
}

.comparison-subtitle {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 1.0625rem;
}

/* Scroll wrapper for mobile horizontal scroll */
.comparison-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Column sizing via colgroup */
.comparison-table .col-cap { width: 28%; }
.comparison-table .col-ss  { width: 36%; }
.comparison-table .col-tr  { width: 36%; }

/* ── Column header cells ── */
.comparison-table thead th {
  padding: 18px 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-border);
  vertical-align: middle;
}

.th-cap {
  background: #fff;
  color: var(--color-muted);
  text-align: left;
  /* Sticky left for mobile scroll */
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--color-border);
}

.th-ss {
  background: #fef2f2;
  color: #b91c1c;
  text-align: center;
  border-right: 1px solid #fecaca;
}

.th-tr {
  background: #f0fdf4;
  color: var(--color-green-dark);
  text-align: center;
}

.th-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.th-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.th-icon--no  { background: #fee2e2; color: #b91c1c; }
.th-icon--yes { background: #dcfce7; color: var(--color-green-dark); }

/* ── Body rows ── */
.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:hover .td-ss {
  background: #fee2e2;
}

.comparison-table tbody tr:hover .td-tr {
  background: #dcfce7;
}

/* ── Body cells ── */
.comparison-table tbody td {
  padding: 16px 20px;
  vertical-align: top;
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Capability column — sticky left */
.td-cap {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  font-weight: 600;
  color: var(--color-text);
  border-right: 1px solid var(--color-border);
}

/* Ensure sticky col keeps bg on row hover */
.comparison-table tbody tr:hover .td-cap {
  background: #fff;
}

.td-ss {
  background: #fef2f2;
  color: #374151;
  border-right: 1px solid #fecaca;
}

.td-tr {
  background: #f0fdf4;
  color: #374151;
}

/* Sub-label under capability name (e.g. "MtM · Margin · ...") */
.cap-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-muted);
  margin-top: 3px;
  letter-spacing: 0.01em;
}

/* ── Cell content layout ── */
.cell-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cell-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.ci-no  { background: #fee2e2; color: #b91c1c; }
.ci-yes { background: #dcfce7; color: var(--color-green-dark); }

/* ── Closing subtext ── */
.comparison-subtext {
  text-align: center;
  margin-top: 40px;
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  color: var(--color-muted);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .comparison-table {
    min-width: 560px;
  }

  .comparison-table tbody td,
  .comparison-table thead th {
    padding: 14px 16px;
  }
}

@media (max-width: 600px) {
  .comparison-header {
    margin-bottom: 32px;
  }

  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table tbody td {
    padding: 12px 14px;
  }

  .comparison-table thead th {
    padding: 14px 14px;
  }
}


/* ========================
   COMPONENT: TABLE SCROLL WRAPPER
======================== */

.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin: 1.5rem 0;
}

/* Inside an existing comparison-wrap the margin/shadow are handled
   by the outer container — reset them to avoid double-styling */
.comparison-wrap .table-scroll-wrapper {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.table-scroll-hint {
  display: none;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.4rem 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  letter-spacing: 0.05em;
}

/* Show scroll hint only on mobile */
@media (max-width: 768px) {
  .table-scroll-hint {
    display: block;
  }

  /* Ensure table never shrinks below readable width */
  .comparison-table {
    min-width: 600px;
  }

  /* 3-way table on Why page needs more room */
  .comparison-table--three-col {
    min-width: 780px;
  }
}

/* Scrollbar styling for webkit browsers */
.table-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #2d7a3a;
  border-radius: 2px;
}


/* ========================
   COMPONENT: VIDEO MODAL
======================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.video-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
}

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: opacity 150ms ease;
}

.video-modal-close:hover {
  opacity: 0.7;
}

.video-modal-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-modal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
