/* Brand & Build: speed, legibility and mobile layout fixes (applies to every page) */

/* 1. Legible headings: swap the thin high-contrast serif for Space Grotesk (already loaded) */
html:root{--font-fraunces:var(--font-space)!important}
.font-display{font-family:var(--font-space),system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;letter-spacing:-.02em;font-style:normal!important}
.font-display em,.font-display i,.font-display .italic{font-style:normal!important}
h1.font-display{letter-spacing:-.035em;font-weight:700}
h2.font-display{font-weight:700}

/* 2. Stop effects that repaint forever (the videos are untouched) */
.animate-spin-slow,.animate-float{animation:none!important}

@media (max-width:1023px),(hover:none){
  .animate-twinkle,.animate-pulse-glow{animation:none!important}
  /* soft glow blobs: drawn with huge blurs that phones redraw on every scroll */
  .pointer-events-none.rounded-full[class*="blur-"],
  .absolute.rounded-full[class*="blur-["]{display:none!important}
  /* frosted-glass panels: same look, solid tint instead of live blur */
  [class*="backdrop-blur"],.glass,.glass-strong{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .glass{background:rgba(14,18,40,.82)!important}
  .glass-strong{background:rgba(10,13,30,.94)!important}
  a[class*="backdrop-blur"].bg-white\/\[0\.03\],div[class*="backdrop-blur"].bg-white\/\[0\.03\]{background:rgba(18,23,48,.72)!important}
  header[class*="backdrop-blur"],header.bg-night-950\/80,header[class*="bg-night"]{background:rgba(6,8,21,.96)!important}
  .text-shadow-cosmic{text-shadow:0 1px 3px rgba(3,4,12,.7)!important}
  .hero-word{text-shadow:0 0 12px rgba(255,172,60,.55)!important}
}
@media (prefers-reduced-motion:reduce){
  .animate-marquee,.animate-twinkle,.animate-pulse-glow{animation:none!important}
}

/* 3. Phone layout */
@media (max-width:767px){
  /* slimmer header */
  header .container-x.h-20{height:3.75rem!important;padding-top:.5rem!important;padding-bottom:.5rem!important}
  header img[src*="logo"]{height:1.6rem!important}
  /* slimmer bottom Call / Audit bar */
  .mobile-cta-bar{padding-top:.4rem!important;padding-bottom:calc(.4rem + env(safe-area-inset-bottom))!important}
  .mobile-cta-bar a{padding-top:.7rem!important;padding-bottom:.7rem!important;font-size:.95rem!important}
  /* less empty space between sections */
  main section.py-20,main section.py-24{padding-top:3.25rem!important;padding-bottom:3.25rem!important}
  main section.py-28{padding-top:3.75rem!important;padding-bottom:3.75rem!important}
  main section .mt-16{margin-top:2.25rem!important}
  main section .mt-14{margin-top:2rem!important}
  main section .mt-12{margin-top:1.75rem!important}
  main section .gap-12{gap:2rem!important}
  main section .gap-16{gap:2.25rem!important}
  /* cards: tighter, no oversized decorative numbers */
  main section a.p-7,main section div.p-7,main section .p-8{padding:1.25rem!important}
  main section .sm\:p-10{padding:1.25rem!important}
  main section .text-5xl.font-mono{display:none!important}
  main section a.p-7 p,main section div.p-7 p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  main section .rounded-2xl > .mb-6:first-child{margin-bottom:.9rem!important}
  /* headings sized for a phone */
  h1.font-display.text-5xl{font-size:2.6rem!important;line-height:1.05!important}
  main h2.font-display{font-size:clamp(1.65rem,7vw,2.1rem)!important;line-height:1.12!important}
  /* first-screen buttons (added by bb-perf.js) */
  section[aria-label="Introduction"]{min-height:auto!important;padding-top:4.5rem}
  section[aria-label="Introduction"] .py-24{padding-top:2.5rem!important;padding-bottom:2.75rem!important}
  section[aria-label="Introduction"] .mt-7{margin-top:1.1rem!important}
  section[aria-label="Introduction"] p.text-lg{font-size:1.05rem!important}
  section[aria-label="Introduction"] .mt-9{min-height:7.6rem}
}

/* 4. Homepage buttons + free audit section (inserted by bb-perf.js) */
.bb-hero-ctas{display:flex;flex-direction:column;gap:.7rem;width:100%}
.bb-hero-ctas a{display:flex;align-items:center;justify-content:center;gap:.5rem;border-radius:.9rem;padding:.95rem 1.2rem;font-weight:700;font-size:1rem;text-decoration:none}
.bb-hero-ctas .bb-gold{background:linear-gradient(135deg,#f6d88b,#e0a93f);color:#060815}
.bb-hero-ctas .bb-line{border:1px solid rgba(255,255,255,.22);color:#eef1ff;background:rgba(255,255,255,.05)}
@media (min-width:768px){.bb-hero-ctas{flex-direction:row;width:auto}.bb-hero-ctas .bb-line{display:none}}
.bb-audit{position:relative;padding:3.5rem 0;border-bottom:1px solid rgba(255,255,255,.08);background:linear-gradient(180deg,rgba(18,24,58,.55),rgba(6,8,21,0))}
.bb-audit .bb-in{max-width:56rem;margin:0 auto;padding:0 1.25rem}
.bb-audit h2{font-family:var(--font-space),system-ui,sans-serif;font-weight:700;letter-spacing:-.025em;color:#f4f6ff;font-size:clamp(1.65rem,4.2vw,2.6rem);line-height:1.1;margin:0}
.bb-audit p.bb-sub{color:#aab3d6;font-size:1.05rem;line-height:1.6;margin:.8rem 0 1.6rem;max-width:40rem}
.bb-audit .bb-ph{min-height:220px;border:1px solid rgba(255,255,255,.1);border-radius:1.25rem;display:flex;align-items:center;justify-content:center;color:#aab3d6}
@media (min-width:768px){.bb-audit{padding:5.5rem 0}}
.bb-audit .bw label,.bb-audit .bw .bw-label{color:#aab3d6!important}
@media (max-width:767px){section[aria-label="Introduction"] .absolute.bottom-8{display:none!important}}
.bb-swipe{display:none}
@media (max-width:767px){
  .bb-q{position:relative;cursor:pointer;padding-right:2.2rem}
  .bb-q::after{content:"+";position:absolute;right:.2rem;top:50%;transform:translateY(-50%);width:1.6rem;height:1.6rem;border-radius:50%;border:1px solid rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:1.1rem;line-height:1;color:#f1c96b;transition:transform .2s}
  .bb-q[aria-expanded="true"]::after{transform:translateY(-50%) rotate(45deg)}
  .bb-a{display:none}
  .bb-a.bb-open{display:block}
}
@media (max-width:767px){
  footer .grid.gap-12{grid-template-columns:1fr 1fr!important;column-gap:1.25rem!important;row-gap:2rem!important}
  footer .grid.gap-12>:first-child,footer .grid.gap-12>:last-child{grid-column:1/-1}
  footer .grid.gap-12 li{font-size:.92rem}
}
/* homepage: hold the audit section's space from the first paint so nothing jumps */
html:has(style[data-bb-home]) main>div:not(:has(>#free-audit))>:nth-child(2){margin-bottom:534px}
#free-audit{min-height:534px}
@media (min-width:768px){
  html:has(style[data-bb-home]) main>div:not(:has(>#free-audit))>:nth-child(2){margin-bottom:490px}
  #free-audit{min-height:490px}
  .bb-audit .bb-ph{min-height:130px}
}