/* ==========================================================================
   BusySeed design rules, applied site-wide. Brand Guide 7.6, 2026-11-30.
   Omar approved these on 2026-11-30 (BusySeed Memory 4810, source rules 4747).
   Loaded last in <head> on every page (static pages via app/favicon.html,
   database pages via app/partials.json, shell pages via app/v7.js), so it
   wins over site.css and over each page's own inline styles.

     1. OKLCH tokens (same brand colors, converted)
     2. Motion contract: one curve, the guide's durations, no loops, no bounce
     3. Visual polish: alpha borders, nested radii, dvh, edge-faded rows,
        icon strokes, multiply on logos and product shots
     4. Behavior: thumb-reach CTAs, sticky Book a call on phones, mask reveals,
        expand in place, skeletons, the confirm pulse, the menu icon crossfade
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Brand primitives in OKLCH, converted from the guide's hex values (not
     re-picked), so they render the same colors. */
  --pine:   oklch(34.03% 0.0872 150.20);   /* #08441E */
  --green:  oklch(60.47% 0.1204 137.25);   /* #5D9247 */
  --ink:    oklch(20.72% 0.0574 143.98);   /* #041E05 */
  --mint:   oklch(91.81% 0.0357 137.47);   /* #D9EAD3 */
  --orange: oklch(74.47% 0.1716 59.47);    /* #F98D13 */
  --teal:   oklch(57.38% 0.0955 200.38);   /* #0C898F */
  --navy:   oklch(37.29% 0.0740 230.24);   /* #014760 */
  --paper:     oklch(98.98% 0.0028 128.49);/* #FBFCFA */
  --mint-soft: oklch(96.01% 0.0135 134.90);/* #EEF4EB */
  --bs-orange-hover: oklch(77.83% 0.1647 63.05);  /* #FF9C2B */
  --bs-green-light:  oklch(76.46% 0.1189 136.40); /* #8FC477 */

  /* Alpha borders, never a flat gray */
  --line:      rgb(4 30 5 / 0.10);
  --bs-border: rgb(0 0 0 / 0.12);
  --line-dark: rgb(255 255 255 / 0.14);

  /* The one curve and the guide's durations */
  --bs-ease: cubic-bezier(.2,.7,.2,1);
  --bs-fast: 120ms;
  --bs-base: 180ms;
  --bs-slow: 220ms;
  --bs-reveal: 600ms;
}

/* 2. MOTION CONTRACT ------------------------------------------------------- */

/* One curve everywhere. Each component keeps its own duration, but nothing
   eases in, bounces or overshoots. */
*, *::before, *::after { transition-timing-function: var(--bs-ease) !important; }

/* Nothing loops once the work is done. The media marquee ("As seen in") is
   the guide's one decorative exception, and the live pulse dot only runs
   while something is live. Everything below stops and holds still. */
.hero-badges img,
.hero-blob,
.leaf-float,
.guarantee-seal,
.leaf-field .lf { animation: none !important; }

/* The drifting leaf field now holds still. Without the drift every leaf would
   sit on the left edge, so each takes a fixed place near the edges, away
   from the copy. The leaf never moves or rotates. */
.leaf-field .lf { opacity: .12 !important; transform: none !important; }
.leaf-field .lf:nth-child(7n+1) { left: 3%; }
.leaf-field .lf:nth-child(7n+2) { left: 92%; }
.leaf-field .lf:nth-child(7n+3) { left: 84%; }
.leaf-field .lf:nth-child(7n+4) { left: 9%; }
.leaf-field .lf:nth-child(7n+5) { left: 96%; }
.leaf-field .lf:nth-child(7n+6) { left: 77%; }
.leaf-field .lf:nth-child(7n+7) { left: 5%; }

/* The credentials row was a second marquee. It now sits still: one centered,
   wrapping row of the real badges (bs-rules.js stops the cloning). */
.cred-marquee { -webkit-mask-image: none !important; mask-image: none !important; overflow: visible !important; }
.cred-track, .cred-track.go {
  animation: none !important; width: auto !important;
  flex-wrap: wrap; justify-content: center; row-gap: 4px;
}

/* Hover never scales. Marketing lifts at most 2px (guide section 23). */
.hero-badges img:hover,
.cred-row img:hover { transform: translateY(-2px) !important; filter: none !important; }
.formula-card:hover .f-photo img { transform: none !important; }
a.card:hover, .industry-card:hover, .formula-card:hover, .cs-card:hover, .sol-card:hover,
.cred-item:hover .cred-chip,
html[data-theme="kinetic"] .cs-card:hover { transform: translateY(-2px) !important; }

/* Scroll reveal: 600ms, once, on the curve. A mask uncovers the block top to
   bottom instead of a long fade and rise. bs-rules.js drops the mask once the
   reveal is done, so it never clips a shadow afterwards. */
.reveal {
  opacity: 1 !important; transform: none !important;
  -webkit-mask-image: linear-gradient(180deg, #000 0 40%, transparent 60% 100%);
          mask-image: linear-gradient(180deg, #000 0 40%, transparent 60% 100%);
  -webkit-mask-size: 100% 250%; mask-size: 100% 250%;
  -webkit-mask-position: 0 100%; mask-position: 0 100%;
  transition: -webkit-mask-position var(--bs-reveal) var(--bs-ease), mask-position var(--bs-reveal) var(--bs-ease) !important;
}
.reveal.in { -webkit-mask-position: 0 0; mask-position: 0 0; }
.reveal.bs-done { -webkit-mask-image: none; mask-image: none; }
.reveal-d1.in, .reveal-d2.in, .reveal-d3.in { transition-delay: 0s !important; }

/* 3. VISUAL POLISH --------------------------------------------------------- */

/* Full-height things use the dynamic viewport, so phone browser bars never
   cut them off. */
.mobile-nav { max-height: calc(100vh - 76px) !important; max-height: calc(100dvh - 76px) !important; }

/* Borders in alpha, on the shared card family */
.cs-card, .sol-card, .industry-card, a.card, .card, .formula-card,
.quote-card, .cred-chip, .bk-band, .bk-in { border-color: var(--bs-border); }
.faq details { border-bottom-color: var(--bs-border); }

/* Nested radius = outer radius minus padding, on the pairs the site nests */
.quote-card { --bs-r: 20px; --bs-p: 14px; }
.quote-card .rv-portrait, .quote-card .rv-portrait img { border-radius: calc(var(--bs-r) - var(--bs-p)); }
.formula-card { --bs-r: 20px; --bs-p: 12px; }
.formula-card .f-photo, .formula-card .f-photo img { border-radius: calc(var(--bs-r) - var(--bs-p)); }

/* Rows that scroll sideways fade at both edges */
.marquee, .bs-hscroll {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15% 85%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 15% 85%, transparent);
}

/* Logos and product shots on white take the page's white instead of carrying
   their own white box */
.cred-chip img, img.product-shot { mix-blend-mode: multiply; }

/* Icon stroke matches the weight of the text beside it: Lato 700 on buttons
   and nav, Lato 400 in body copy. */
.btn svg, .main-nav svg, .header-cta svg, .nav-toggle svg, .bs-more-btn svg { stroke-width: 2.25; }
p svg, li svg, .faq-body svg { stroke-width: 1.75; }

/* Type floor (ship check 3): Georgia never below 24px. Under that it fringes,
   so these small titles take Lato 700 at the same size, per the guide. */
.faq summary, .bk-form-title, .sol-card h4, .n-body h4, .res-body h3, .topic-card h4,
.cs-client, .cs-ba-val, .cslib-link h3, .rx-brand, .rx-rank {
  font-family: var(--font-body, Lato, 'Helvetica Neue', Arial, sans-serif) !important;
  font-weight: 700 !important; letter-spacing: 0 !important;
}

/* Review quotes stay Georgia, so on phones they hold the 24px floor */
@media (max-width: 760px) { .rv-quote-body blockquote { font-size: 24px !important; line-height: 1.3 !important; } }

/* Uppercase only in eyebrows, status pills and two or three word labels
   (ship check 4). Longer labels read in sentence case. */
.rx-livehead, .cs-industry, .cslib-metriclab, .cs-ba-label, .bs-progress-meta span {
  text-transform: none !important; letter-spacing: 0 !important;
}

/* 4. BEHAVIOR -------------------------------------------------------------- */

/* Primary buttons: orange is the only fill, hover darkens and lifts 2px,
   never grows. On phones the main button spans the thumb's reach. */
.btn-primary:hover { background: var(--bs-orange-hover); }
@media (max-width: 760px) {
  .hero .btn-primary, #book .btn-primary, .bk-form .btn-primary { width: 100%; min-height: 52px; }
}

/* One orange per view. The header's button is the page's standing action, so
   it goes quiet (pine outline) while any other orange button is on screen,
   and turns orange again when that button scrolls away. bs-rules.js decides. */
.site-header .header-cta.btn-primary.bs-quiet {
  background: transparent !important; color: var(--pine) !important;
  border-color: var(--green) !important; box-shadow: none !important;
}
.site-header .header-cta.btn-primary.bs-quiet:hover { background: var(--green) !important; color: #fff !important; }
.site-header .header-cta.btn-primary { transition: background-color var(--bs-fast) var(--bs-ease), color var(--bs-fast) var(--bs-ease), border-color var(--bs-fast) var(--bs-ease), transform var(--bs-base) var(--bs-ease) !important; }

/* Sticky "Book a call" on phones. bs-rules.js adds it and shows it only while
   no other orange button is on screen, so a view never carries two. */
.bs-sticky-cta { display: none; }
@media (max-width: 760px) {
  .bs-sticky-cta {
    display: block; position: fixed; left: 12px; right: 12px; z-index: 90;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity var(--bs-base) var(--bs-ease), transform var(--bs-base) var(--bs-ease), visibility 0s linear var(--bs-base);
  }
  .bs-sticky-cta.on { opacity: 1; visibility: visible; transform: none;
    transition: opacity var(--bs-base) var(--bs-ease), transform var(--bs-base) var(--bs-ease), visibility 0s; }
  /* Self-contained, so it looks right on pages that do not load site.css
     (blog posts are SeedSite's own template). */
  .bs-sticky-cta .btn { display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 52px; margin: 0; padding: 14px 24px; border: 0; border-radius: 999px;
    background: var(--orange, oklch(74.47% 0.1716 59.47)); color: #2B1700;
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-size: 16px; text-decoration: none;
    box-shadow: 0 2px 6px rgb(249 141 19 / .25), 0 10px 24px -10px rgb(249 141 19 / .55); }
  .bs-sticky-cta .btn:active { transform: translateY(1px); }
  body.bs-has-sticky { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* Menu icon: the bars and the X crossfade, the outgoing icon blurring out */
.nav-toggle.bs-icons { position: relative; width: 40px; height: 40px; padding: 0; background: none; border: 0; cursor: pointer; }
.nav-toggle.bs-icons > span { display: none !important; }
.nav-toggle.bs-icons svg { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; color: var(--pine);
  transition: opacity var(--bs-base) var(--bs-ease), filter var(--bs-base) var(--bs-ease); }
.nav-toggle.bs-icons .bs-ic-x { opacity: 0; filter: blur(4px); }
.nav-toggle.bs-icons[aria-expanded="true"] .bs-ic-bars { opacity: 0; filter: blur(4px); }
.nav-toggle.bs-icons[aria-expanded="true"] .bs-ic-x { opacity: 1; filter: none; }

/* FAQs and long text expand in place. The space opens at once (the guide
   never animates height) and a mask uncovers the new text. */
@keyframes bsMaskIn {
  from { -webkit-mask-position: 0 100%; mask-position: 0 100%; }
  to   { -webkit-mask-position: 0 0;    mask-position: 0 0; }
}
.faq details[open] .faq-body,
.mobile-nav details[open] > :not(summary),
.bs-more[data-open="true"] .bs-more-body {
  -webkit-mask-image: linear-gradient(180deg, #000 0 40%, transparent 60% 100%);
          mask-image: linear-gradient(180deg, #000 0 40%, transparent 60% 100%);
  -webkit-mask-size: 100% 250%; mask-size: 100% 250%; -webkit-mask-position: 0 0; mask-position: 0 0;
  animation: bsMaskIn var(--bs-slow) var(--bs-ease) 1 both;
}
.faq summary .ind { transition: transform var(--bs-base) var(--bs-ease); }

/* Case study long text: the first paragraphs, then the rest on request */
.bs-more-body[hidden] { display: none !important; }
.bs-more-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--pine);
  background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer;
}
.bs-more-btn svg { width: 16px; height: 16px; transition: transform var(--bs-base) var(--bs-ease); }
.bs-more[data-open="true"] .bs-more-btn svg { transform: rotate(180deg); }
.bs-more-btn:hover { color: var(--green); }
.on-dark .bs-more-btn { color: #fff; }

/* Skeleton, not spinner: anything that takes over 300ms shows its shape */
.bs-skel { border-radius: 8px;
  background: linear-gradient(90deg in oklch, oklch(94.93% 0.0070 88.64) 0%, oklch(97.5% 0.004 100) 50%, oklch(94.93% 0.0070 88.64) 100%);
  background-size: 200% 100%; animation: bsSkel 1.4s linear infinite; }
@keyframes bsSkel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.bs-cal-skel { display: grid; gap: 12px; padding: 18px; }
.bs-cal-skel .bs-skel.h { height: 22px; width: 46%; }
.bs-cal-skel .bs-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.bs-cal-skel .bs-days .bs-skel { aspect-ratio: 1; }
.bs-cal-skel .bs-skel.row { height: 40px; }

/* Proof last: the booking band opens with the strongest proof */
.bs-proof-line { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 14px;
  font-size: 13.5px; font-weight: 700; color: var(--pine); line-height: 1.35; }
.bs-proof-line > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bs-proof-line .stars { color: var(--orange); letter-spacing: 1px; }
.bs-proof-line svg { width: 15px; height: 15px; stroke-width: 2.25; color: var(--green); flex: none; }

/* The confirm pulse: one short ring after a form submit or a booked call.
   Fires once, 400ms, no bounce, no confetti. */
.bs-pulse { animation: bsPulse 400ms var(--bs-ease) 1; }
@keyframes bsPulse {
  from { box-shadow: 0 0 0 0 oklch(60.47% 0.1204 137.25 / .45); }
  to   { box-shadow: 0 0 0 14px oklch(60.47% 0.1204 137.25 / 0); }
}
.bs-done-line { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 8px 14px; background: var(--mint-soft); color: var(--pine); font-weight: 700; }
.bs-done-line svg { width: 18px; height: 18px; stroke-width: 2.5; color: var(--green); flex: none; }

/* Case study before/after charts stack on phones so no value gets clipped */
@media (max-width: 560px) { .cs-ba-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* The live Rankxa feed: new rows arrive on the one curve, 220ms */
.rx-row { animation-duration: var(--bs-slow) !important; animation-timing-function: var(--bs-ease) !important; }

/* REDUCED MOTION: everything stops, nothing is lost -------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .marquee-track, .bs-skel, .rx-dot, .rx-row { animation: none !important; }
  /* These carry their own !important transitions, so they are named here too */
  .reveal, .site-header .header-cta.btn-primary, .nav-toggle.bs-icons svg,
  .bs-sticky-cta, .bs-sticky-cta.on, .faq summary .ind, .bs-more-btn svg { transition: none !important; }
  .reveal, .faq details .faq-body, .mobile-nav details > :not(summary), .bs-more .bs-more-body {
    -webkit-mask-image: none !important; mask-image: none !important; animation: none !important; }
  .btn-primary:hover, a.card:hover, .industry-card:hover, .formula-card:hover, .cs-card:hover, .sol-card:hover,
  .cred-item:hover .cred-chip, .hero-badges img:hover, .cred-row img:hover, .btn:hover .arrow { transform: none !important; }
}
