/* ============================================================
   LAYOUT.CSS — Grid, Sections, Containers, Reveal Animations
   ============================================================ */

/* ── Container ───────────────────────────────────────────── */
/* `width:100%` matters wherever a .container is a flex item — the hero
   (.hero-photo is a column flex container) and the subpage heroes.
   `margin: 0 auto` sets auto margins on the cross axis, which disables
   the default stretch; the container then falls back to fit-content,
   which resolved to the full 1200px max-width on a 390px phone and
   pushed the hero's right column off-screen entirely. */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px)  { .container { padding: 0 48px; } }
@media (min-width: 1280px) { .container { padding: 0 24px; } }

/* ── Sections ────────────────────────────────────────────── */
.section {
  padding: var(--section-pad) 0;
}

.section-sm {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 56px;
}

.section-header.centered {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Alternate background sections */
.section-surface  { background: #EDF2ED; }
.section-elevated { background: var(--color-bg-elevated); }
.section-light    { background: var(--color-bg-light); }

/* Full-bleed brand-green dark section — always dark regardless of theme,
   for alternating light / violet-dark (.cta-bg) / green-dark rhythm down the page. */
.section-brand-green {
  background-color: #10150E;
  background-image: radial-gradient(ellipse 65% 55% at 50% 0%, rgba(149, 191, 71, 0.2) 0%, transparent 70%);
}

.section-brand-green .eyebrow { color: var(--color-accent-primary); }
.section-brand-green h2,
.section-brand-green h3 { color: #FFFFFF; }
.section-brand-green .section-header p { color: rgba(255, 255, 255, 0.6); }

/* `html` prefix bumps specificity above the sitewide
   `.card { background:#FFF }` rule — without it, cards here would
   render white while this section's text stays white too, making
   them invisible. */
html .section-brand-green .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
html .section-brand-green .card:hover {
  border-color: rgba(149, 191, 71, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.section-brand-green .card h3 { color: #FFFFFF; }
.section-brand-green .card p,
.section-brand-green .card .text-secondary { color: rgba(255, 255, 255, 0.62); }
.section-brand-green .card-icon {
  background: rgba(149, 191, 71, 0.16);
  color: var(--color-accent-primary);
}
.section-brand-green .value-prop-link { color: var(--color-accent-primary); }

/* ── Hero Backgrounds ────────────────────────────────────── */
.hero-bg {
  background-color: var(--color-bg-dark);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(149, 191, 71, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(90,49,244,0.05) 0%, transparent 65%),
    radial-gradient(circle at 1px 1px, rgba(0,0,0,0.05) 1px, transparent 0);
  background-size: auto, auto, 28px 28px;
}

.cta-bg {
  background-color: #1A1F1C;
  background-image: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(90,49,244,0.15) 0%, transparent 70%);
}

.cta-bg h2,
.cta-bg h3 { color: #FFFFFF; }

.cta-bg p { color: rgba(255,255,255,0.78); }

.cta-bg .eyebrow { color: #c4b5fd; }

/* Hero with image background */
.hero-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Text is always on a dark overlay — force white in both themes */
  color: rgba(255,255,255,0.88);
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,15,12,0.55) 0%, rgba(10,15,12,0.85) 100%),
    linear-gradient(135deg, rgba(149,191,71,0.08) 0%, transparent 50%);
  z-index: 1;
}

/* Premium green accent line at top of inner hero banners */
.hero-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
  z-index: 3;
  opacity: 0.7;
}

.hero-banner > * { position: relative; z-index: 2; }

/* Force heading + body text white regardless of theme */
.hero-banner h1,
.hero-banner h2,
.hero-banner h3 { color: #FFFFFF; }

.hero-banner p { color: rgba(255,255,255,0.82); }

.hero-banner .eyebrow {
  color: #c4b5fd; /* lighter violet — readable on dark overlay */
  border-color: rgba(196,181,253,0.25);
  background: rgba(90,49,244,0.15);
  display: inline-block;
  padding: 10px 20px;
  border-radius: 50px;
}

/* ── Grid Systems ────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--gap-card);
}

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

.grid-auto-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Asymmetric splits */
.grid-55-45 { grid-template-columns: 55fr 45fr; }
.grid-60-40 { grid-template-columns: 60fr 40fr; }
.grid-40-60 { grid-template-columns: 40fr 60fr; }

@media (max-width: 1023px) {
  .grid-2, .grid-3, .grid-4,
  .grid-55-45, .grid-60-40, .grid-40-60 {
    grid-template-columns: 1fr;
  }
  .grid-auto-2, .grid-auto-3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .grid-auto-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-auto-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Flex utilities ──────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center{ align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm  { gap: 12px; }
.gap-md  { gap: 24px; }
.gap-lg  { gap: 40px; }

/* ── Spacers ─────────────────────────────────────────────── */
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 40px; }

/* ── CTA Row ─────────────────────────────────────────────── */
.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Trust Strip ─────────────────────────────────────────── */
.trust-strip {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.trust-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

@media (max-width: 639px) {
  .trust-strip { gap: 16px; }
  .trust-divider { display: none; }
}

/* ── Sub-page hero ───────────────────────────────────────── */
.subpage-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

/* ── Top Bar Marquee — persistent trust strip above the header ── */
.topbar-marquee {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  overflow: hidden;
  background: #0E1310;
  padding: 10px 0;
}

.topbar-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: marquee-scroll 34s linear infinite;
}

.topbar-track:hover { animation-play-state: paused; }

.topbar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.topbar-item svg { color: var(--color-accent-primary); flex-shrink: 0; }

body.has-topbar #site-header { top: var(--topbar-h); }
body.has-topbar .mobile-nav { inset: calc(84px + var(--topbar-h)) 0 0; }

/* ── Marquee (Awards band) ───────────────────────────────── */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee-scroll 28s linear infinite;
  width: max-content;
}

.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding: 12px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.marquee-item:hover {
  color: var(--color-accent-primary);
  border-color: var(--color-border-accent);
}

/* ── Tab switcher (Pricing / Industry) ───────────────────── */
.tab-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.tab-group.centered { justify-content: center; }

.tab-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-primary);
}

.tab-btn.active {
  background: var(--color-accent-primary);
  color: var(--color-accent-text);
  border-color: var(--color-accent-primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Timeline (Approach / Launch) ───────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 70px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent-primary);
  z-index: 1;
}

.timeline-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  margin-top: 10px;
}

.timeline-body {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
}

/* ── Process Accordion — click-through step list + synced visual
   panel. Modelled on the reference agency site: only the active
   step is bold/expanded, the rest sit muted; selecting a step
   swaps the illustration on the right. ──────────────────────── */
.process-accordion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 64px;
  align-items: start;
}

.pa-list { border-top: 1px solid var(--color-border); }

.pa-item { border-bottom: 1px solid var(--color-border); }

.pa-item-head {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 26px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.pa-item-num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.pa-item-title {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: -0.01em;
  opacity: 0.55;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.pa-item-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.pa-item:hover .pa-item-title { opacity: 0.85; }

.pa-item.active .pa-item-num,
.pa-item.active .pa-item-chevron { color: var(--color-accent-primary); }

.pa-item.active .pa-item-title {
  color: var(--color-text-primary);
  opacity: 1;
}

.pa-item.active .pa-item-chevron { transform: rotate(90deg); }

.pa-item-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pa-item.active .pa-item-collapse { grid-template-rows: 1fr; }

.pa-item-collapse-inner { overflow: hidden; }

.pa-item-body {
  padding: 0 0 28px 44px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 56ch;
}

.pa-item-duration {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent-dark);
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
}

.pa-item-cta {
  display: block;
  margin-top: 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-dark);
}
.pa-item-cta:hover { color: var(--color-violet); }

/* Visual panel — swaps content per active step */
.pa-visual {
  position: sticky;
  top: 110px;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, #F3F6F1, #FFFFFF);
  box-shadow: 0 2px 24px rgba(26, 31, 28, 0.06);
  overflow: hidden;
}

.pa-visual-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px;
  text-align: center;
  opacity: 0;
  transform: scale(0.94) translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.pa-visual-panel.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.pa-visual-icon {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-violet));
  color: #FFFFFF;
  box-shadow: 0 20px 44px rgba(90, 49, 244, 0.28);
}

.pa-visual-index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pa-visual-label {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.pa-visual-duration {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent-dark);
}

/* Photo variant — fills the panel instead of the icon+label layout */
.pa-visual-panel.has-image {
  padding: 0;
  gap: 0;
}

.pa-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pa-visual-image-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 28px 24px;
  background: linear-gradient(to top, rgba(10, 15, 30, 0.85) 0%, rgba(10, 15, 30, 0.2) 70%, transparent 100%);
  text-align: left;
}

.pa-visual-image-caption .pa-visual-index,
.pa-visual-image-caption .pa-visual-label { color: #FFFFFF; }

.pa-dots {
  display: none;
  gap: 8px;
  margin-top: 24px;
}

.process-accordion[data-autorotate] .pa-dots {
  display: flex;
}

.pa-dot {
  width: 28px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  border: none;
  padding: 0;
  transition: background 0.2s ease, width 0.3s ease;
}

.pa-dot.active {
  background: var(--color-accent-primary);
  width: 44px;
}

.process-accordion.no-visual {
  grid-template-columns: 1fr;
  max-width: 640px;
}

@media (max-width: 900px) {
  .process-accordion { grid-template-columns: 1fr; gap: 28px; }
  .pa-visual { position: static; aspect-ratio: 16 / 9; order: -1; }
}

@media (max-width: 639px) {
  .pa-item-head { gap: 14px; padding: 20px 0; }
  .pa-item-title { font-size: var(--text-md); }
  .pa-item-body { padding-left: 30px; }
}

/* ── Section Dividers ────────────────────────────────────── */
.divider-angle {
  line-height: 0;
  overflow: hidden;
}

.divider-angle svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--color-accent-primary); }

.breadcrumb-sep { color: var(--color-border); }

/* ── Video Placeholder ───────────────────────────────────── */
.video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.video-play-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-accent-subtle);
  border: 2px solid var(--color-accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ── Chip grid ───────────────────────────────────────────── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Comparison table ────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.compare-table th {
  font-weight: 700;
  color: var(--color-text-primary);
  background: var(--color-bg-elevated);
}

.compare-table td { color: var(--color-text-secondary); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .check { color: var(--color-accent-primary); font-weight: 700; }
.compare-table .cross { color: var(--color-danger); }

/* ── Scroll-Reveal Animations ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

.reveal-group .reveal-child {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* ── Reduce motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track { animation: none; }
  .topbar-track { animation: none; }
}


/* sr-only utility (screen reader only) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ════════════════════════════════════════════════════════════
   MOBILE DENSITY — sitewide
   --section-pad handles the outer rhythm (base.css); these trim
   the inner spacing that stacks up once a multi-column layout
   collapses to one column. No body copy drops below 15px and no
   tap target below 44px.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .section-sm { padding: 34px 0; }

  .section-header          { margin-bottom: 28px; }
  .section-header.centered { max-width: 100%; }
  .section-header p        { font-size: var(--text-base); }

  /* Process accordion — the sticky visual panel is 4/5 portrait on
     desktop, which is nearly a full phone screen on its own. */
  .pa-visual    { aspect-ratio: 16 / 10; }
  .pa-item-head { padding: 16px 0; }
  .pa-item-body { padding-bottom: 20px; }

  .marquee-item { padding: 9px 18px; }
  .timeline-item { padding-bottom: 28px; }

  .trust-strip { margin-top: 28px; padding-top: 22px; }
}

@media (max-width: 480px) {
  .section-sm     { padding: 30px 0; }
  .section-header { margin-bottom: 22px; }
}

/* ── Mobile: tab strips scroll instead of wrapping ───────────
   Three pricing tabs wrapped onto two rows (91px) and the six
   industry tabs onto four (296px). One swipeable row keeps them
   to a single line and signals there's more to the right. */
@media (max-width: 767px) {
  .tab-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    margin-bottom: 24px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-group::-webkit-scrollbar { display: none; }
  .tab-group.centered { justify-content: flex-start; }
  .tab-btn { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ── Mobile: retire the top disclaimer ticker ────────────────
   A perpetually animating legal ticker pinned above a phone
   header is constant motion the user can't dismiss, and it costs
   39px of a small viewport on every scroll position. The same
   notice is set in full in the footer (.trademark-notice), so
   nothing is lost by dropping it here. Zeroing --topbar-h makes
   the header and mobile-nav offsets that depend on it follow
   automatically. */
@media (max-width: 767px) {
  :root { --topbar-h: 0px; }
  .topbar-marquee { display: none; }
}
