/* ===========================================================
   BabbleBoxx landing — reusable SECTION COMPONENT styles.
   Shared by every landing page in the babbleboxxmedia.com
   ecosystem: anatomy / info cards, how-it-works flow, themed-
   moment cards, the compare table, case-study thumbs, FAQ
   accordion, success messages, sticky CTA, scroll reveals,
   and the p5 hero backdrop hooks. Page-specific overrides
   stay inline in that page's <head>.

   Renamed from coop.css (2026-06): it was never Co-Op-only —
   it's the generic component layer. Co-Op-specific labels
   that remain (compare table "Co-Op Kit"/"Custom Kit") are
   overridable per page; see the landing-page-builder skill.

   Load order: fonts.css → shared.css → page.css → sections.css
               → matcher.css  (opt-in; matcher pages only)
   =========================================================== */

@media (max-width: 700px) { .hide-mobile { display: none; } }
.faq-item .q-text {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
  display: block;
}
.faq-item .q-text:focus-visible {
  outline: 2px solid var(--vivid-blue);
  outline-offset: 4px;
  border-radius: 4px;
}
.cta-form.is-success > *:not(.success-msg) { display: none; }
.cta-form .success-msg { display: none; }
.cta-form.is-success .success-msg {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--white);
}
.cta-form .success-msg strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 12px;
  color: var(--vivid-blue);
}

/* ===== Co-Op page additions ===== */

/* Anatomy: 4-up info card grid */
.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.4vw, 20px);
}
.anatomy-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(22px, 2vw, 30px);
  display: grid;
  gap: 14px;
  align-content: start;
}
.anatomy-card .stat {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--oxford-navy);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.anatomy-card .stat .unit {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.anatomy-card h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  color: var(--lls-pink);
}
.anatomy-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(9,24,56,0.72);
}
@media (max-width: 1000px) { .anatomy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .anatomy-grid { grid-template-columns: 1fr; } }

/* How it works: 4-step flow */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.4vw, 20px);
  counter-reset: step;
}
.flow-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(24px, 2.4vw, 34px);
  display: grid;
  gap: 14px;
  align-content: start;
}
.flow-card .step {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vivid-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flow-card .step::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--vivid-blue);
  border-radius: 2px;
  transform: rotate(45deg);
}
.flow-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--oxford-navy);
  text-wrap: balance;
}
.flow-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(9,24,56,0.72);
}
.flow-card .timing {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 1100px) { .flow-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .flow-grid { grid-template-columns: 1fr; } }

/* Themed moments calendar */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.moment-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(24px, 2.4vw, 32px);
  display: grid;
  gap: 14px;
  align-content: start;
  position: relative;
  overflow: hidden;
}
.moment-card .when {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.moment-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--oxford-navy);
  text-wrap: balance;
  min-height: var(--moment-h3-min, auto);
}
.moment-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(9,24,56,0.72);
}
.moment-card .meta {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.moment-card .meta .slots { color: var(--muted); }

/* ----- Tier 1: status pills (urgency-coded) -----
   Solid filled pill. Color ramps within the brand palette as fullness
   rises — cool blue → soft pink → full pink — so the eye reads "more
   pink = more urgent" without leaving the BabbleBoxx color family.
     default OPEN        — vivid-blue tint, "wide open" (≤50% full)
     .filling            — soft pink (lls-pink + paper), "moving" (50–70%)
     .almost-gone        — full lls-pink, "almost gone" (70%+ full)
     .closed             — muted gray, "no slots" */
.moment-card .meta .status {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 226, 255, 0.22);
  color: var(--oxford-navy);
  font-weight: 700;
  letter-spacing: 0.16em;
}
.moment-card .meta .status.filling {
  background: color-mix(in srgb, var(--lls-pink) 35%, var(--paper) 65%);
  color: var(--oxford-navy);
}
.moment-card .meta .status.almost-gone {
  background: var(--lls-pink);
  color: var(--oxford-navy);
}
.moment-card .meta .status.closed {
  background: rgba(9,24,56,0.10);
  color: var(--muted);
}
.moment-card .meta .meta-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ----- Tier 2: feature pills (capability-coded) -----
   Outlined navy on transparent. Different visual language so the buyer's
   eye doesn't pattern-match capability tags as status urgency. */
.moment-card .meta .tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: transparent;
  color: var(--oxford-navy);
  border: 1.5px solid rgba(9, 24, 56, 0.5);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (max-width: 900px) { .moments-grid { grid-template-columns: 1fr; } }

/* Pricing/positioning callout strip */
.price-strip {
  margin-top: clamp(28px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(20px, 2vw, 28px) clamp(24px, 2.4vw, 36px);
  background: var(--oxford-navy);
  color: var(--white);
  border-radius: var(--radius-card);
}
.price-strip p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  max-width: 64ch;
}
.price-strip strong {
  color: var(--vivid-blue);
  font-family: var(--font-head);
}
.price-strip .cta-link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vivid-blue);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--vivid-blue);
  padding-bottom: 4px;
}
@media (max-width: 700px) {
  .price-strip { grid-template-columns: 1fr; }
}

/* Co-Op vs Custom Kit table */
.compare-table {
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  gap: 0;
}
.compare-row + .compare-row { border-top: 1px solid var(--rule); }
.compare-row > div {
  padding: clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 28px);
  font-size: 15px;
  line-height: 1.5;
  color: rgba(9,24,56,0.78);
}
.compare-row > div + div { border-left: 1px solid var(--rule); }
.compare-row .row-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare-row.head > div {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxford-navy);
  background: rgba(9, 24, 56, 0.04);
}
.compare-row.head .col-coop {
  background: var(--oxford-navy);
  color: var(--white);
  position: relative;
}
.compare-row.head .col-coop::after {
  content: "Recommended";
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--vivid-blue);
  color: var(--oxford-navy);
  font-weight: 700;
}
.compare-row .col-coop {
  background: rgba(22, 226, 255, 0.06);
  color: var(--oxford-navy);
  font-weight: 600;
}
@media (max-width: 800px) {
  .compare-row { grid-template-columns: 1fr; }
  .compare-row > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .compare-row.head { display: none; }
  .compare-row .col-coop::before {
    content: "Co-Op Kit · ";
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vivid-blue);
    margin-right: 6px;
  }
  .compare-row .col-custom::before {
    content: "Custom Kit · ";
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 6px;
  }
}

/* Case-study image thumbs (replace placeholder rectangles) */
.case-thumb {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-box);
  overflow: hidden;
  isolation: isolate;
  background: rgba(255,255,255,0.04);
}
.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,24,56,0) 45%, rgba(9,24,56,0.55) 100%);
  pointer-events: none;
}
.case-thumb .thumb-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  background: rgba(9,24,56,0.6);
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.case-thumb .thumb-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.94);
  color: var(--oxford-navy);
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.35;
}

/* Stack big stat above its label so wordy descriptions get full card width */
.case-card .result-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.case-card .result-num {
  font-size: 40px;
  line-height: 1;
}
.case-card .result-lbl {
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 36ch;
}

/* Highlight word in headline */
.h-display .accent-pink-soft { color: var(--lls-pink); }

/* Back-link in topbar (desktop only) */
.topbar .back-link {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin-right: 18px;
  transition: color 0.18s ease;
}
.topbar .back-link:hover { color: var(--white); }
@media (max-width: 900px) { .topbar .back-link { display: none; } }

/* ===== Interactivity layer ===== */

/* Scroll-triggered reveal (classes added by JS) */
.reveal-pending {
  opacity: 0;
  transform: translateY(20px);
}
.reveal-done {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Moment cards: clickable */
.moment-card {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.moment-card:hover {
  transform: translateY(-2px);
  border-color: var(--vivid-blue);
  box-shadow: 0 12px 32px rgba(9, 24, 56, 0.08);
}
.moment-card:focus-visible {
  outline: 2px solid var(--vivid-blue);
  outline-offset: 4px;
}

/* Sticky "Book a call" floating CTA */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--vivid-blue);
  color: var(--oxford-navy);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(9, 24, 56, 0.25);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.18s ease;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sticky-cta:hover { background: #5cebff; }
@media (max-width: 600px) {
  .sticky-cta {
    bottom: 16px;
    right: 16px;
    font-size: 12px;
    padding: 12px 18px;
  }
}

/* ===== p5 generative hero backdrop (hero-field.js) =====
   The static clip-path corner triangles in the markup stay as the
   no-JS / reduced-motion / slow-connection fallback. Once the sketch
   is live, .hero.has-field cross-fades canvas in and fallbacks out. */
.hero-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-field canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.hero.has-field .hero-field { opacity: 1; }
.hero.has-field .hero-corner { opacity: 0; }
.hero-corner { transition: opacity 1.4s ease; }

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1; transform: none; }
  .reveal-done { transition: none; }
  .sticky-cta { transition: opacity 0.15s linear; transform: none; }
  .sticky-cta.is-visible { transform: none; }
  .moment-card:hover { transform: none; }
}
