/* ==========================================================================
   Growack — Premium elevation layer
   Loaded after styles.css. Brings AIRops/Unmuted/Growth-Syndicate-grade finesse:
   confident type, generous rhythm, restrained depth/texture, and a tasteful
   motion layer (marquee, count-up, tabs, accordion, refined reveals).
   Stays within the brief: whitespace + typography first, gradients whisper-soft.
   ========================================================================== */

/* ---------- 1. Refined tokens -------------------------------------------- */
:root {
  /* v2: confident but restrained display scale (dapper.agency reference), held
     to the Developer Brief §2.2 ceiling — H1 44/32, H2 32/26. Nothing on the
     site renders a heading larger than 44px. */
  --fs-display: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);       /* hero H1: 32 → 44 */
  --fs-display-xl: clamp(1.625rem, 1.3rem + 1.3vw, 2rem);   /* statement sections are H2: 26 → 32 */

  /* Wider rhythm for breathing room (whitespace-first) */
  --section-y: clamp(56px, 7vw, 104px);
  --container: 1200px;

  /* Refined, layered shadows (soft, neutral — no coloured glows) */
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 2px 6px -2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 2px 4px rgba(17, 24, 39, 0.04), 0 12px 28px -10px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 8px 16px -8px rgba(17, 24, 39, 0.08), 0 28px 56px -22px rgba(17, 24, 39, 0.18);
  --shadow-xl: 0 20px 60px -24px rgba(17, 24, 39, 0.20), 0 10px 26px -16px rgba(17, 24, 39, 0.14);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body { -webkit-font-smoothing: antialiased; }

/* Tighter, more deliberate display typography */
h1, h2 { letter-spacing: -0.028em; }
.hero h1, .page-hero h1 { letter-spacing: -0.03em; line-height: 1.2; }
.hero h1 { font-size: var(--fs-display); }

/* Accent word — solid (v2 avoids gradient text). Orange = growth energy. */
.accent-grad, .accent { color: var(--color-primary); }

/* Eyebrow refinement */
.eyebrow { letter-spacing: 0.1em; gap: var(--space-3); }

/* ---------- 2. Hero depth (clean, no washes/gradients) ------------------- */
.hero { position: relative; }
.page-hero { position: relative; }

/* Elevated hero card — clean surface, soft neutral shadow, hairline border */
.hero-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  position: relative;
}
.sysrow { transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.hero-card:hover .sysrow { transform: translateX(2px); }
.sysrow .dot { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); animation: pulse-dot 2.4s ease-out infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.sysconnector svg { animation: drift 2.6s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(2px); opacity: 1; } }

/* ---------- 3. Buttons — refined ----------------------------------------- */
.btn { transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.2s var(--ease-out); }
/* Bright brand orange fill + dark label (white on #F97316 fails AA; dark passes ~5.5:1) */
.btn--primary { background: var(--color-primary-bright); color: var(--color-text); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.10); }
.btn--primary:hover { background: var(--color-primary-hover); color: var(--color-text); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(234, 88, 12, 0.45); }
.btn--lg { padding: 16px 30px; }
.btn--on-dark:hover { transform: translateY(-2px); }

/* ---------- 4. Cards — refined depth + hover ----------------------------- */
.card { border-radius: var(--radius); }   /* hover timing: MOTION SYSTEM role 3 (v2.css) */
.card--hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #d3deea; }
.card-icon { transition: transform 0.3s var(--ease-out); }
.card--hover:hover .card-icon { transform: scale(1.06) rotate(-3deg); }

/* ---------- 5. Logo / stack marquee -------------------------------------- */
/* --mq-fade is the ONE edge-fade value for every loop on the site. It used to
   be typed per loop: this base rule said 8%/92% while .trust-mq and .partner-mq
   each carried their own 6%/94% copy. All three loops appear on the same page
   within one scroll, so the stack loop's wider fade read as a different
   component. Change the token, not the gradient. */
.marquee {
  --mq-fade: 6%;
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--mq-fade), #000 calc(100% - var(--mq-fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--mq-fade), #000 calc(100% - var(--mq-fade)), transparent);
}
/* Duration here is only the pre-script fallback. The real value is written by
   main.js from --mq-speed so that every loop travels at the same px/s whatever
   its roster is; see the MOTION SYSTEM block at the foot of v2.css. */
.marquee-track {
  display: flex; width: max-content; gap: clamp(40px, 6vw, 80px);
  align-items: center;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem;
  color: var(--color-text-muted); white-space: nowrap; letter-spacing: -0.01em;   /* was #64748b */
}
.marquee-item svg { width: 22px; height: 22px; color: var(--color-text-muted); flex: none; }   /* was #94a3b8 */
.marquee-label { text-align: center; font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); font-weight: 500; }

/* ---------- 6. Animated stat band ---------------------------------------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8); }
@media (max-width: 760px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }
.stat-band .stat-num { font-size: clamp(2.4rem, 1.4rem + 3vw, 3.6rem); }
.count { font-variant-numeric: tabular-nums; }

/* ---------- 7. Comparison table (usual way vs Growack way) ---------------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare-col {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: var(--space-8); background: var(--color-surface);
}
.compare-col--bad { background: var(--color-surface-alt); }
.compare-col--good { border-color: rgba(249, 115, 22, 0.4); box-shadow: var(--shadow-md); position: relative; }
.compare-col--good::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--color-primary); }
.compare-col h3 { font-size: var(--fs-h4); margin-bottom: var(--space-6); display: flex; align-items: center; gap: 10px; }
.compare-col h3 .tag { font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); }
.compare-col--bad h3 .tag { background: #fef2f2; color: #b91c1c; }
.compare-col--good h3 .tag { background: var(--color-primary-soft); color: var(--color-primary); }
.compare-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.compare-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.compare-list .ci { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.compare-col--bad .ci { background: #fef2f2; color: #dc2626; }
.compare-col--good .ci { background: var(--color-primary-soft); color: var(--color-primary); }
.compare-list .ci svg { width: 13px; height: 13px; }
.compare-col--bad .compare-list li { color: var(--color-text-muted); }

/* ---------- 8. Interactive framework tabs -------------------------------- */
.tabs-head { display: flex; flex-wrap: wrap; gap: var(--space-2); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-8); }
.tab-btn {
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  padding: 12px 18px 16px; border: 0; background: none; cursor: pointer;
  color: var(--color-text-muted); position: relative; display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.2s var(--ease-out);
}
.tab-btn .tab-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-family: var(--font-heading); background: var(--color-surface-alt); color: var(--color-text-muted); transition: all 0.2s var(--ease-out); }
.tab-btn:hover { color: var(--color-text); }
.tab-btn[aria-selected="true"] { color: var(--color-primary); }
.tab-btn[aria-selected="true"] .tab-n { background: var(--color-primary); color: #fff; }
.tab-btn[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--color-primary); border-radius: 2px; }
.tab-panel { display: none; animation: fade-in 0.4s var(--ease-out); }
.tab-panel.is-active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-panel .split { align-items: center; }

/* ---------- 9. FAQ accordion (native <details>) -------------------------- */
.faq { display: grid; gap: var(--space-3); max-width: 820px; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; transition: box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out); }
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: #d3deea; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  font-family: var(--font-heading); font-weight: 600; font-size: 1.075rem; color: var(--color-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface-alt); color: var(--color-primary); transition: transform 0.3s var(--ease-out), background 0.25s; }
.faq-item[open] summary .faq-ic { transform: rotate(45deg); background: var(--color-primary-soft); }
.faq-item .faq-body { padding: 0 var(--space-6) var(--space-6); color: var(--color-text-muted); line-height: 1.65; max-width: 36em; }

/* ---------- 10. Big closing statement CTA -------------------------------- */
.cta-band { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
/* Closing statement + CTA band are H2s — they hold the brief's H2 size (32/26)
   and lean on weight 800, tight tracking and a short measure for emphasis. */
.cta-band h2 { font-size: var(--fs-h2); }
.statement { text-align: center; }
.statement h2 { font-size: var(--fs-display-xl); letter-spacing: -0.03em; line-height: 1.2; max-width: 18ch; margin-inline: auto; }

/* ---------- 11. Section heading scale + eyebrow rhythm -------------------- */
.section-head { margin-bottom: var(--space-16); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { font-size: var(--fs-lead); max-width: 60ch; }
.section-head--center p { margin-inline: auto; }

/* ---------- 12. Refined reveal (subtle, premium) ------------------------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.09s; }
.js .reveal[data-delay="2"] { transition-delay: 0.18s; }
.js .reveal[data-delay="3"] { transition-delay: 0.27s; }
.js .reveal[data-delay="4"] { transition-delay: 0.36s; }

/* Pillars + steps refined depth */
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num { transition: transform 0.3s var(--ease-out), background 0.2s, color 0.2s; }
.step:hover .step-num { background: var(--color-primary); color: #fff; transform: scale(1.08); }

/* Quote refinement */
.quote:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.quote-mark { font-size: 3rem; }

/* Link underline animation */
.link-arrow { position: relative; }

/* Header: crisper on scroll */
.site-header.is-scrolled::before { background: rgba(255, 255, 255, 0.85); }

/* Centered last row for 5-card grids (avoids the empty 3rd cell in a 3+2 grid) */
.grid--center-last { display: flex; flex-wrap: wrap; justify-content: center; }
.grid--center-last > * { flex: 1 1 300px; max-width: calc((100% - 2 * var(--space-6)) / 3); }
@media (max-width: 900px) { .grid--center-last > * { max-width: calc((100% - var(--space-6)) / 2); } }
@media (max-width: 600px) { .grid--center-last > * { max-width: 100%; } }

/* ---------- 13. Bento feature grid --------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.bento .card { height: 100%; }
.bento .span-2 { grid-column: span 2; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .span-2 { grid-column: span 2; } }
@media (max-width: 600px) { .bento, .bento .span-2 { grid-template-columns: 1fr; grid-column: auto; } }

/* Standalone hint text (used outside .field, e.g. form-level "required" note) */
.hint { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* ---------- 14. Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .sysrow .dot, .sysconnector svg { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tab-panel { animation: none; }
  /* Stopping the animation leaves a max-content track inside an overflow:hidden
     box, so everything past the first screen becomes unreachable for a sighted
     reduced-motion reader. Hand the row back its own scrollbar and drop the
     edge fade, which only makes sense on a moving track. The names are also in
     the sr-only list above each loop, so assistive tech never depended on this. */
  .marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}
