/* ---------- Site-specific layout ---------- */

/* Nav */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-neutral-200);
  height: var(--nav-height);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--padding-global);
  position: relative; /* positioning context for the centered Solutions mega-menu */
}
.nav-logo {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo svg,
.nav-logo img {
  width: 34px;
  height: 27px;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 1.75rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}
.nav-links a:hover {
  opacity: 0.6;
}
.nav-links a.is-active {
  color: #0d7eaf; /* Clover blue (darker) — active page indicator, WCAG AA on white */
  opacity: 1;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nav dropdown */
.nav-dropdown {
  /* static so the wide (880px) mega-menu anchors to .nav-inner (the centered
     container) rather than the trigger — keeps it from clipping off-screen */
  position: static;
}
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.nav-dropdown:hover .nav-dropdown-chevron {
  transform: rotate(180deg);
}
/* Reset global .nav-links a overrides inside the dropdown */
.nav-dropdown-menu .nav-dropdown-ind {
  display: block;
  padding: 8px 0;
  font-size: 13.5px;
}
.nav-dropdown-menu a:hover {
  opacity: 1;
}

/* Solutions dropdown — 2×2 category grid + industry rail (spec 24) */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: 880px;
  max-width: calc(100vw - 32px);
  background-color: var(--color-base-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-default);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 14px 36px rgba(10,35,55,0.12),
    0 30px 70px rgba(10,35,55,0.07);
  /* No overflow:hidden here — it would clip the ::before hover bridge above the
     menu. The tinted minor/foot areas round their own outer corners instead. */
  grid-template-columns: 1fr 244px;
  grid-template-areas:
    "major minor"
    "foot  foot";
  z-index: 200;
}
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: grid;
}

/* Major column — categories, dominant */
.nav-dropdown-major {
  grid-area: major;
  padding: 28px 32px 26px;
}
.nav-dropdown-major-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--accent);
  font-variation-settings: "opsz" 96;
  margin: 0 0 5px;
}
.nav-dropdown-brand {
  font-family: var(--font-logo);
  letter-spacing: -0.015em;
}
.nav-dropdown-major-sub {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  margin: 0;
  line-height: 1.45;
  max-width: 320px;
}

/* Categories grid — major column (3-level IA: category → its processes) */
.nav-dropdown-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  margin-top: 18px;
}
.nav-dropdown-cat-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-menu .nav-dropdown-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0; /* override global .nav-links a padding (specificity) */
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  margin-bottom: 5px;
}
.nav-dropdown-cat-arr {
  color: rgba(0, 0, 0, 0.3);
  align-self: center;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
  fill: none;
}
.nav-dropdown-cat:hover { color: #0d7eaf; }
.nav-dropdown-cat:hover .nav-dropdown-cat-arr {
  opacity: 1;
  transform: translateX(0);
  color: #0d7eaf;
}
.nav-dropdown-menu .nav-dropdown-cat-proc {
  display: block;
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s ease;
}
.nav-dropdown-menu .nav-dropdown-cat-proc:hover { color: #0d7eaf; }

/* Minor column — By Industry, secondary (bordered, tinted rail) */
.nav-dropdown-minor {
  grid-area: minor;
  border-left: 1px solid var(--color-neutral-200);
  background: #fafbfc;
  padding: 28px 26px;
  border-top-right-radius: var(--radius-default); /* clip to panel corner (no overflow:hidden) */
}
.nav-dropdown-minor-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.45);
  margin: 0 0 12px;
}
.nav-dropdown-ind {
  display: block;
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-neutral-200);
  transition: color 0.15s ease;
}
.nav-dropdown-ind:last-of-type {
  border-bottom: none;
}
.nav-dropdown-ind:hover {
  color: #0d7eaf;
}

/* Serif italic footnote tying the two columns together */
.nav-dropdown-ind-foot {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--color-neutral-200);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.5;
}

.nav-dropdown-foot {
  grid-area: foot;
  margin: 0;
  padding: 15px 32px;
  border-top: 1px solid var(--color-neutral-200);
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  /* clip to panel bottom corners (no overflow:hidden) */
  border-bottom-left-radius: var(--radius-default);
  border-bottom-right-radius: var(--radius-default);
}
.nav-dropdown-foot-text {
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
}
.nav-dropdown-foot-text strong {
  display: block;
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 1px;
}
.nav-dropdown-menu .nav-dropdown-foot-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(var(--color-base-white), var(--color-base-white)),
    linear-gradient(135deg, #17e67d 0%, #0096db 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.nav-dropdown-foot-cta svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2; fill: none;
  transition: transform 0.4s var(--ease-spring);
}
.nav-dropdown-foot-cta:hover svg { transform: translateX(3px); }

/* Mobile submenu */
.nav-mobile-group {
  border-bottom: 1px solid var(--color-neutral-100);
}
.nav-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-align: left;
}
.nav-mobile-toggle svg {
  transition: transform 0.2s ease;
}
.nav-mobile-group.is-open .nav-mobile-toggle svg {
  transform: rotate(180deg);
}
.nav-mobile-submenu {
  display: none;
  flex-direction: column;
  padding-bottom: 12px;
}
.nav-mobile-group.is-open .nav-mobile-submenu {
  display: flex;
}
.nav-mobile-submenu a {
  padding: 8px 0 8px 16px;
  font-size: var(--text-sm);
  border-bottom: none;
}
.nav-mobile-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted-60);
  font-family: var(--font-mono);
  padding: 4px 0 2px 16px;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-base-black);
  stroke-width: 2;
}
.nav-hamburger .hamburger-close {
  display: none;
}
.nav-hamburger.is-open .hamburger-open {
  display: none;
}
.nav-hamburger.is-open .hamburger-close {
  display: block;
}

/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px var(--padding-global) 24px;
  border-bottom: 1px solid var(--color-neutral-200);
  background-color: var(--color-base-white);
}
.nav-mobile.is-open {
  display: flex;
}
.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-neutral-100);
}
.nav-mobile a:last-child {
  border-bottom: none;
}
.nav-mobile .button {
  display: inline-flex;
  justify-content: center;
  border-bottom: none;
  color: var(--color-base-white);
}

/* Hero viewport — hero + trust bar fill the first screen */
.hero-viewport {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
}

/* Hero pattern */
.hero {
  position: relative;
  z-index: 1;
  padding-top: var(--section-padding-lg);
  padding-bottom: var(--section-padding-md);
  flex: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 100px;
  background-color: var(--color-neutral-100);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.03;
  font-variation-settings: "opsz" 144;
  max-width: 800px;
}
.hero p.hero-sub {
  font-size: 1.1875rem;   /* 19px — one-off bump from 18px */
  line-height: var(--leading-body);
  color: var(--color-text-muted-60);
  max-width: 560px;
  margin-top: 20px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
/* Section headers */
.section-header {
  max-width: 654px;
  margin-bottom: 48px;
}
.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 100px;
  /* Clover gradient outline: green → blue via double-background technique.
     Inner fill is white so the pill reads on any section bg. */
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #17e67d 0%, #0096db 100%) border-box;
  border: 1.5px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header h2,
.feature-detail-content h2 { /* about: section header rendered in the feature-detail layout */
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variation-settings: "opsz" 72;
}
.section-header p {
  font-size: var(--text-md);
  color: var(--color-text-muted-60);
  margin-top: 16px;
  line-height: var(--leading-body);
}

/* Feature grid — flexbox so partial last rows center automatically */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.feature-grid > * {
  flex: 0 1 calc((100% - 48px) / 3);
  min-width: 0;
}
/* 5-card 3+2 layout: second row has 2 cards, centered and matching the
   width of the top row's cards. Used when a feature-grid immediately
   follows another feature-grid (bottom of a 5-card layout). */
.feature-grid-second-row {
  max-width: calc((100% - 24px) * 2 / 3);
  margin: 24px auto 0;
}
.feature-grid-second-row > * {
  flex-basis: calc((100% - 24px) / 2);
}
.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 12px;
  row-gap: 8px;
  padding: 28px;
  border: none;
  border-radius: 20px;
  background-color: var(--color-base-white);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.04),
    0 1px 3px rgba(0,0,0,0.03),
    0 8px 24px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.7);
  transition: var(--transition-fast);
}
.feature-card:hover {
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 4px 8px rgba(0,0,0,0.03),
    0 24px 48px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.7);
}
.feature-card .icon-wrap {
  grid-row: 1;
  grid-column: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(23,230,125,0.08) 0%, rgba(0,150,219,0.08) 100%);
  align-self: center;
}
.feature-card .icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
}
.feature-card h3 {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  line-height: var(--leading-relaxed);
}
.feature-card p {
  grid-column: 1 / -1;
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  line-height: var(--leading-loose);
}

/* ── Benefits section: left text + right 2×2 card grid ── */
.benefits-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.benefits-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.benefits-text .section-header {
  margin-bottom: 0;
}
.benefits-quote {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
}
.benefits-quote-icon {
  flex-shrink: 0;
  color: var(--color-neutral-300);
  margin-top: 2px;
}
.benefits-quote p {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  line-height: var(--leading-body);
  font-style: italic;
}
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.benefits-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 10px;
  row-gap: 6px;
  padding: 24px;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-default);
  background-color: var(--color-base-white);
  transition: var(--transition-fast);
}
.benefits-card:hover {
  border-color: var(--color-neutral-400);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.benefits-card-icon {
  grid-row: 1;
  grid-column: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.benefits-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-text-primary);
  stroke-width: 1.5;
  fill: none;
}
.benefits-card h3 {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  line-height: var(--leading-relaxed);
}
.benefits-card p {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  color: var(--color-text-muted-60);
  line-height: var(--leading-loose);
}
a.benefits-card--link {
  text-decoration: none;
  color: inherit;
}
.benefits-card--link .card-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: #0088cc;
  margin-top: auto;
  padding-top: 4px;
}
.benefits-card--link .card-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform var(--transition-fast);
}
.benefits-card--link:hover .card-link {
  opacity: 0.7;
}
.benefits-card--link:hover .card-link svg {
  transform: translateX(3px);
}

/* ───────────────────────────────────────────────────────────────────────
   Progress-pill carousel control (.pcc-*) — driven by js/carousel-pills.js.
   Inactive: a small dot. Active: expands to a pill whose brand-green fill
   scales left→right to show progress toward the next advance (timer or
   scroll position). Used by the home "How Clover works" carousel, the
   platform workflow-builder indicator, and the platform Security cards.
   ─────────────────────────────────────────────────────────────────────── */
.pcc-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.pcc-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--color-neutral-300);
  overflow: hidden;
  cursor: default;
  -webkit-appearance: none;
  appearance: none;
  transition: width 0.45s var(--ease-spring), background-color 0.3s ease;
}
button.pcc-dot { cursor: pointer; }
.pcc-dot:hover:not(.is-active) { background: var(--color-neutral-400); }
.pcc-dot.is-active {
  width: 34px;
  background: var(--color-neutral-200); /* pale track behind the fill */
  cursor: default;
}
.pcc-dot-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #17e67d; /* Clover brand green (logo gradient start) */
  transform: scaleX(0);
  transform-origin: left center;
  /* transition is set inline by the driver: a timer duration, or 'none' for
     scroll-scrubbed progress. */
}
@media (prefers-reduced-motion: reduce) {
  .pcc-dot,
  .pcc-dot-fill { transition: none !important; }
}

/* Alternating feature sections */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature-detail.is-reversed {
  direction: rtl;
}
.feature-detail.is-reversed > * {
  direction: ltr;
}
.feature-detail-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feature-detail-content .eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 100px;
  /* Clover gradient outline — same treatment as section-header eyebrows */
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #17e67d 0%, #0096db 100%) border-box;
  border: 1.5px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.feature-detail-content h3 {
  font-family: var(--font-display);
  font-size: 2.25rem;   /* 36px */
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variation-settings: "opsz" 60;
}
.feature-detail-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted-60);
  line-height: var(--leading-body);
}
.feature-detail-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.feature-detail-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.feature-detail-checks svg {
  width: 18px;
  height: 18px;
  stroke: #27ae60; /* Clover success green — "done / included" */
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.feature-detail-image {
  border-radius: var(--radius-default);
  overflow: hidden;
  background-color: var(--color-neutral-100);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Mockup screenshot images */
.feature-detail-image--mockup {
  aspect-ratio: auto;
  background-color: transparent;
  display: block;
  overflow: visible;
  min-width: 0; /* prevent typed animation strings from stretching the grid column */
}
.feature-detail-image--mockup img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-default);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}
.feature-detail-image .placeholder {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
  font-style: italic;
}

/* Industry chip links (pill-style buttons, e.g. "See it in your industry: Foodservice Retail...") */
.cm-industry-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--color-neutral-400);
  border-radius: 9999px;
  background-color: var(--color-base-white);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color 0.4s var(--ease-spring),
              border-color 0.4s var(--ease-spring),
              transform 0.4s var(--ease-spring);
}
.cm-industry-chip:hover {
  background-color: var(--color-neutral-100);
  border-color: var(--color-neutral-600);
  transform: translateY(-1px);
}
.cm-industry-chip--all {
  border-style: dashed;
  color: var(--color-text-muted-60);
}
.cm-industry-chip--all:hover {
  color: var(--color-text-primary);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  padding: 48px 0;
}
.stat-item .stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
}
.stat-item .stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  margin-top: 4px;
}

/* CTA banner */
.cta-banner {
  text-align: center;
  padding: 80px 40px;
  border-radius: 24px;
  background-color: var(--accent);
  color: var(--color-base-white);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 30%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.2) 70%, transparent 100%);
  pointer-events: none;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variation-settings: "opsz" 72;
  color: var(--color-base-white);
}
.cta-banner p {
  font-size: var(--text-md);
  opacity: 0.85;
  margin-top: 12px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner .button {
  margin-top: 28px;
  background-color: var(--color-base-white);
  background-image: none;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.cta-banner .button:hover {
  filter: none;
  background-color: var(--color-base-white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
}
/* Dual-CTA row (primary + ghost secondary) inside the dark banner */
.cta-banner .cta-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-banner .cta-actions .button { margin-top: 0; }
.cta-banner .button.is-ghost {
  background-color: transparent;
  background-image: none;
  color: var(--color-base-white);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: none;
}
.cta-banner .button.is-ghost:hover {
  background-color: rgba(255,255,255,0.12);
  box-shadow: none;
  filter: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-neutral-200);
  padding-top: 64px;
  padding-bottom: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  margin-top: 12px;
  line-height: var(--leading-body);
  max-width: 280px;
}
.footer-col-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-col a:hover {
  color: var(--color-text-primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-neutral-200);
  font-size: var(--text-xs);
  color: var(--color-text-muted-60);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--color-neutral-200);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-align: left;
  color: var(--color-text-primary);
}
.faq-question svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-neutral-600);
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s var(--ease-spring);
  flex-shrink: 0;
}
.faq-item.is-open .faq-question svg {
  transform: rotate(45deg);
}
/* Animated collapse: grid 0fr -> 1fr smoothly resolves to the answer's
   natural height. The inner element clips via overflow during the transition. */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  line-height: var(--leading-body);
  transition: grid-template-rows 0.32s var(--ease-spring), opacity 0.25s ease;
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
}
/* Inner wrapper is the overflow-clipped grid child. Padding lives one level
   deeper (on the <p>) so it gets clipped too — letting the row collapse fully
   to 0 (an element can't clip its own padding, hence the nesting). */
.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
}
.faq-answer-inner > p {
  margin: 0;
  padding-bottom: 20px;
}
@media (prefers-reduced-motion: reduce) {
  .faq-answer,
  .faq-question svg { transition: none; }
}

/* ── Solution Template cards (shared: catalog, verticals, use-cases) ── */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tpl-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--color-neutral-300); border-radius: var(--radius-default); background-color: var(--color-base-white); box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: border-color 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), transform 0.4s var(--ease-spring); }
.tpl-card:hover { border-color: var(--color-neutral-600); box-shadow: 0 10px 24px rgba(0,0,0,0.06); transform: translateY(-2px); }
.tpl-card.is-roadmap { background-color: var(--color-neutral-50); }
.tpl-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.tpl-tag { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 10px; border-radius: 100px; }
.tpl-tag--cross { background-color: #eff8fd; color: #0088cc; }
.tpl-tag--industry { background-color: #eafaf1; color: #137a4a; }
.tpl-tag--roadmap { background-color: #fff4e5; color: #b4690e; }
/* Tier badge (IA-6): standard = a single survey/collection · advanced = a full process */
.tpl-tag--tier-standard { background-color: #eef2f6; color: #475569; }
.tpl-tag--tier-advanced { background-color: #14171f; color: #ffffff; }
.tpl-card h3 { font-size: var(--text-md); font-weight: var(--weight-medium); margin-bottom: 6px; }
.tpl-card p { font-size: var(--text-sm); color: var(--color-text-muted-60); line-height: var(--leading-body); }
.tpl-evergreen-label { text-align: center; font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted-60); margin: 36px 0 14px; }
.tpl-evergreen { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tpl-chip { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--color-neutral-300); border-radius: 100px; background-color: var(--color-base-white); font-size: var(--text-sm); color: var(--color-text-primary); }
.tpl-buildany { display: flex; align-items: flex-start; gap: 12px; max-width: 720px; margin: 36px auto 0; padding: 18px 24px; border-radius: 14px; background-color: var(--color-neutral-50); border: 1px solid var(--color-neutral-200); }
.tpl-buildany svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 1.6; fill: none; flex-shrink: 0; margin-top: 1px; }
.tpl-buildany p { font-size: var(--text-sm); color: var(--color-text-muted-60); line-height: var(--leading-body); margin: 0; }
.tpl-buildany strong { color: var(--color-text-primary); font-weight: var(--weight-medium); }
.tpl-more { text-align: center; margin-top: 22px; }
.tpl-more a { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-medium); color: #0088cc; text-decoration: none; }
.tpl-more a svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; transition: transform 0.3s var(--ease-spring); }
.tpl-more a:hover svg { transform: translateX(3px); }
@media screen and (max-width: 991px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 767px) { .tpl-grid { grid-template-columns: 1fr; } }

/* Contact form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .is-full-width {
  grid-column: 1 / -1;
}
.form-group {
  display: flex;
  flex-direction: column;
}

/* Vertical cards (solutions) — flexbox so partial last rows center */
.vertical-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.vertical-grid > * {
  flex: 0 1 calc((100% - 40px) / 3);
  min-width: 0;
}
.vertical-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--color-neutral-400);
  border-radius: var(--radius-default);
  background-color: var(--color-base-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-decoration: none;
  color: var(--color-text-primary);
  transition: var(--transition-fast);
}
.vertical-card:hover {
  border-color: var(--color-neutral-600);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.vertical-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vertical-card .icon-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background-color: var(--color-neutral-100);
  flex-shrink: 0;
}
.vertical-card .icon-wrap svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
}
.vertical-card h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}
.vertical-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  line-height: var(--leading-loose);
}
.vertical-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: #0088cc; /* Clover link blue */
}
.vertical-card .card-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Solution Category cards (IA middle layer — home Solutions section + Solutions hub) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.category-card-procs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.category-card-procs span {
  font-size: var(--text-xs);
  color: var(--color-text-muted-60);
  padding: 4px 10px;
  border: 1px solid var(--color-neutral-300);
  border-radius: 100px;
  background-color: var(--color-neutral-50);
}
@media screen and (max-width: 767px) {
  .category-grid { grid-template-columns: 1fr; }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background-color: var(--color-neutral-300);
}
.timeline-item {
  position: relative;
  padding-bottom: 32px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background-color: var(--color-base-white);
}
.timeline-item h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}
.timeline-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted-60);
  margin-top: 4px;
}

/* Responsive */
@media screen and (max-width: 991px) {
  .hero h1 { font-size: 3.5rem; }       /* 56px on tablet */
  .section-header h2,
  .cta-banner h2 { font-size: 2.25rem; } /* 36px on tablet */
  .feature-grid > * { flex-basis: calc((100% - 24px) / 2); }
  /* Release the second-row max-width once we're stacking at 2-col or 1-col */
  .feature-grid-second-row { max-width: none; }
  .feature-grid-second-row > * { flex-basis: calc((100% - 24px) / 2); }
  .feature-detail { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail.is-reversed { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .vertical-grid > * { flex-basis: calc((100% - 20px) / 2); }
  .benefits-layout { grid-template-columns: 1fr; gap: 40px; }

  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: block; }
}

@media screen and (max-width: 767px) {
  .feature-grid > * { flex-basis: 100%; }
  .feature-detail { margin-bottom: 80px !important; }
  .stats-row { grid-template-columns: 1fr; gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .vertical-grid > * { flex-basis: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .benefits-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 567px) {
  .hero h1 { font-size: 2.5rem; }       /* 40px on mobile */
  .section-header h2,
  .cta-banner h2 { font-size: 1.875rem; } /* 30px on mobile */
  .feature-detail-content h3,
  .sticky-carousel-text h3 { font-size: 1.75rem; }
}

@media screen and (max-width: 479px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .cta-banner { padding: 48px 24px; }
}

/* ── Section accent background — shift neutral gray toward Clover blue ── */
section.padding-section-medium[style*="neutral-50"] {
  background-color: #f0f7fb !important;
}

/* ── Feature detail spacing — breathing room between alternating sections ── */
.feature-detail {
  margin-bottom: 160px !important;
}
.feature-detail:last-child {
  margin-bottom: 0 !important;
}

/* ── Inline mockups — disable interaction so they behave like images ── */
.feature-detail-image--mockup .cm-window,
.feature-detail-image--mockup > .clover-mock {
  pointer-events: none;
  user-select: none;
  cursor: default;
}

/* ---------- Scroll-reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* Staggered delays for grid children */
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* Slide-in from left/right for feature-details */
.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
}
.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
}
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* CTA banner scale entrance */
.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-spring),
              transform 0.9s var(--ease-spring),
              filter 0.9s var(--ease-spring);
}
.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Enhanced card hover — spring physics */
.feature-card,
.vertical-card {
  transition: border-color 0.5s var(--ease-spring),
              box-shadow 0.5s var(--ease-spring),
              transform 0.5s var(--ease-spring);
}
.feature-card:hover,
.vertical-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

/* Button press physics — haptic press-down */
.button {
  transition: filter 0.15s ease, box-shadow 0.5s var(--ease-spring), transform 0.3s var(--ease-spring);
}
.button:active {
  transform: scale(0.97);
}
/* Button arrow kinetic tension */
.button svg {
  transition: transform 0.5s var(--ease-spring);
}
.button:hover svg {
  transform: translateX(3px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .feature-card:hover,
  .vertical-card:hover {
    transform: none;
  }
  .cm-industry-chip:hover {
    transform: none;
  }
  .button:active {
    transform: none;
  }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--color-base-white);
  padding: 8px 16px;
  z-index: 200;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; }

/* Trust bar (stats + brand logo scroller) */
.trust-bar {
  padding: 48px 0;
  background-color: var(--color-base-white);
}
.trust-bar-label {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted-60);
  letter-spacing: 0.3px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}
.trust-bar.is-revealed .trust-bar-label {
  opacity: 1;
  transform: translateY(0);
}
.trust-bar-logos {
  overflow: hidden;
}
.trust-bar-track {
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  padding: 12px 0;
}
.trust-bar-scroll {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
}
.trust-bar.is-scrolling .trust-bar-scroll {
  animation: trust-scroll 50s linear infinite;
}
.trust-bar-scroll img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5);
  transition: filter 0.3s ease, transform 0.3s ease, opacity 0.5s ease;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(8px);
}
.trust-bar.is-revealed .trust-bar-scroll img {
  opacity: 1;
  transform: translateY(0);
}
.trust-bar.is-revealed .trust-bar-scroll img:hover {
  filter: grayscale(0) opacity(0.85);
  transform: translateY(-3px);
}
@keyframes trust-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .trust-bar-label {
    opacity: 1;
    transform: none;
  }
  .trust-bar.is-scrolling .trust-bar-scroll { animation: none; }
  .trust-bar-scroll img {
    opacity: 1;
    transform: none;
    scale: 1 !important;
    transition: filter 0.3s ease;
  }
}

