/* ============================================================================
   PREMIUM.CSS — Override layer for Alpha Seed Web Design
   Loaded AFTER styles.css. Targets Linear/Vercel/Stripe quality level.
   Design system: near-black depth + sparing orange accent.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   0. ROOT TOKENS
---------------------------------------------------------------------------- */
:root {
  --prem-bg:           #08090a;
  --prem-bg-elevated:  #0f1011;
  --prem-text:         #f7f8f8;
  --prem-text-2:       #d0d6e0;
  --prem-text-3:       #8a8f98;
  --prem-text-4:       #62666d;
  --prem-accent:       #f97316;
  --prem-accent-2:     #fb923c;
  --prem-border-subtle:   rgba(255, 255, 255, 0.06);
  --prem-border-default:  rgba(255, 255, 255, 0.10);
  --prem-border-strong:   rgba(255, 255, 255, 0.15);
  --prem-surface-1:    rgba(255, 255, 255, 0.03);
  --prem-surface-2:    rgba(255, 255, 255, 0.05);
  --prem-surface-3:    rgba(255, 255, 255, 0.08);
}

/* ----------------------------------------------------------------------------
   1. SCROLL PROGRESS BAR (fixed, top, 2px gradient)
   Uses native CSS scroll-timeline where supported; otherwise stays at 0.
---------------------------------------------------------------------------- */
#premium-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--prem-accent) 0%, var(--prem-accent-2) 100%);
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
}
@supports (animation-timeline: scroll()) {
  #premium-scroll-progress {
    transform: none;
    width: 100%;
    animation: premium-progress auto;
    animation-timeline: scroll(root);
  }
  @keyframes premium-progress {
    from { width: 0%; }
    to   { width: 100%; }
  }
}

/* ----------------------------------------------------------------------------
   2. BASE / BODY — replace navy with near-black
---------------------------------------------------------------------------- */
html {
  background: var(--prem-bg);
  scrollbar-color: rgba(255, 255, 255, 0.18) var(--prem-bg);
}

body,
body.bg-navy-950,
.bg-navy-950,
body.bg-navy-900,
.bg-navy-900 {
  background-color: var(--prem-bg) !important;
  color: var(--prem-text);
}

body {
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--prem-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  border: 2px solid var(--prem-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}
::selection {
  background: rgba(249, 115, 22, 0.28);
  color: #fff;
}

/* ----------------------------------------------------------------------------
   3. COLOR UTILITIES — override Tailwind navy classes
   Target exact class names; equal specificity but later source order wins.
---------------------------------------------------------------------------- */

/* Solid navy backgrounds -> surface tokens */
.bg-navy-950,
body.bg-navy-950 { background-color: var(--prem-bg) !important; }

.bg-navy-900,
body.bg-navy-900 { background-color: var(--prem-bg) !important; }

.bg-navy-800 { background-color: var(--prem-bg-elevated) !important; }

.bg-navy-700 { background-color: var(--prem-surface-2) !important; }

.bg-navy-600 { background-color: var(--prem-surface-3) !important; }

.bg-navy-500 { background-color: var(--prem-surface-3) !important; }

/* Opacity-modified backgrounds -> translucent surface */
.bg-navy-900\/95 { background-color: rgba(8, 9, 10, 0.95) !important; }
.bg-navy-900\/80 { background-color: rgba(8, 9, 10, 0.80) !important; }
.bg-navy-900\/60 { background-color: rgba(8, 9, 10, 0.60) !important; }
.bg-navy-900\/40 { background-color: rgba(8, 9, 10, 0.40) !important; }
.bg-navy-950\/60 { background-color: rgba(8, 9, 10, 0.60) !important; }
.bg-navy-800\/90 { background-color: rgba(255, 255, 255, 0.04) !important; }
.bg-navy-800\/80 { background-color: rgba(255, 255, 255, 0.035) !important; }
.bg-navy-800\/60 { background-color: rgba(255, 255, 255, 0.03) !important; }
.bg-navy-800\/50 { background-color: rgba(255, 255, 255, 0.025) !important; }
.bg-navy-800\/40 { background-color: rgba(255, 255, 255, 0.02) !important; }
.bg-navy-700\/50 { background-color: rgba(255, 255, 255, 0.04) !important; }
.bg-navy-700\/70 { background-color: rgba(255, 255, 255, 0.06) !important; }

/* Borders -> subtle white lines */
.border-navy-800 { border-color: var(--prem-border-subtle) !important; }
.border-navy-700 { border-color: var(--prem-border-default) !important; }
.border-navy-600 { border-color: var(--prem-border-default) !important; }
.border-navy-500 { border-color: var(--prem-border-strong) !important; }
.border-navy-800\/50 { border-color: rgba(255, 255, 255, 0.05) !important; }
.border-navy-700\/50 { border-color: var(--prem-border-subtle) !important; }
.border-navy-600\/50 { border-color: var(--prem-border-default) !important; }

/* Text colors */
.text-navy-100 { color: var(--prem-text) !important; }
.text-navy-200 { color: var(--prem-text-2) !important; }
.text-navy-300 { color: var(--prem-text-3) !important; }
.text-navy-400 { color: var(--prem-text-4) !important; }
.text-navy-500 { color: var(--prem-text-4) !important; }
.text-navy-700 { color: var(--prem-text-4) !important; opacity: 0.6; }

/* Divide borders (used by Tailwind divide-y utilities) */
.divide-navy-800 > * + * { border-color: var(--prem-border-subtle) !important; }
.divide-navy-700 > * + * { border-color: var(--prem-border-default) !important; }

/* ----------------------------------------------------------------------------
   4. TYPOGRAPHY
---------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 {
  letter-spacing: -0.022em;
  font-weight: 600;
}
h2 { font-weight: 600; }
h3 { font-weight: 600; }
h4 { font-weight: 600; }

p, li, dd, dt, blockquote {
  text-wrap: pretty;
}

.font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.022em;
}

/* Hero h1 — premium scale & weight */
.hero-gradient h1,
section[id="main"] h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.022em;
}

/* ----------------------------------------------------------------------------
   5. BUTTONS
---------------------------------------------------------------------------- */

/* Primary CTA — white pill (NOT orange) */
a.bg-accent-500,
button.bg-accent-500,
a[href].bg-accent-500:not(.cta-pulse),
.bg-accent-500.hover\:bg-accent-600 {
  background-color: var(--prem-text) !important;
  color: var(--prem-bg) !important;
  border: 1px solid var(--prem-border-default);
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: -0.011em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
              0 1px 2px rgba(0, 0, 0, 0.4);
  transition: background-color 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.12s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

a.bg-accent-500:hover,
button.bg-accent-500:hover,
a[href].bg-accent-500:not(.cta-pulse):hover {
  background-color: #ffffff !important;
  border-color: var(--prem-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

/* Hero / accent-500 CTA with .cta-pulse (the big "Get Your Free Website Audit")
   Still uses accent for vibrancy in the hero, but with refined surface & ring. */
a.cta-pulse.bg-accent-500,
a.cta-pulse[class*="bg-accent-500"] {
  background-color: var(--prem-accent) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: -0.011em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
              0 8px 32px rgba(249, 115, 22, 0.22),
              0 1px 2px rgba(0, 0, 0, 0.4) !important;
  transition: background-color 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.12s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
a.cta-pulse.bg-accent-500:hover,
a.cta-pulse[class*="bg-accent-500"]:hover {
  background-color: #ea580c !important;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* Accent-600 fills (hover state of primary buttons, used standalone sometimes) */
a.bg-accent-600,
button.bg-accent-600,
.hover\:bg-accent-600:hover {
  background-color: var(--prem-accent) !important;
}

/* Secondary / ghost buttons (navy fills) -> glass surface */
a.bg-navy-700,
button.bg-navy-700,
a.bg-navy-700\/50,
button.bg-navy-700\/50,
a.bg-navy-800,
button.bg-navy-800,
a.bg-navy-800\/80,
button.bg-navy-800\/80,
a.bg-navy-800\/90,
button.bg-navy-800\/90 {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--prem-border-default);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--prem-text);
  font-weight: 500;
  letter-spacing: -0.011em;
  transition: background-color 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.12s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.12s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

a.bg-navy-700:hover,
button.bg-navy-700:hover,
a.bg-navy-700\/50:hover,
button.bg-navy-700\/50:hover,
a.bg-navy-800:hover,
button.bg-navy-800:hover,
a.bg-navy-800\/80:hover,
button.bg-navy-800\/80:hover,
a.bg-navy-800\/90:hover,
button.bg-navy-800\/90:hover,
.hover\:bg-navy-700:hover,
.hover\:bg-navy-800:hover {
  background-color: rgba(255, 255, 255, 0.09) !important;
  border-color: var(--prem-border-strong);
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------------------
   6. NAV / HEADER
---------------------------------------------------------------------------- */
#navbar.nav-scrolled {
  background: rgba(8, 9, 10, 0.72) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--prem-border-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset,
              0 8px 24px rgba(0, 0, 0, 0.35);
}

#navbar:not(.nav-scrolled) {
  background: transparent;
}

/* Nav link hover refinement */
#navbar a.text-navy-200,
#navbar a.text-navy-300 {
  transition: color 0.15s ease;
}

/* Mobile menu panel */
#mobileMenu {
  background: rgba(8, 9, 10, 0.92) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--prem-border-subtle) !important;
}
#mobileMenu a:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* ----------------------------------------------------------------------------
   7. CARDS — translucent surface, refined hover
---------------------------------------------------------------------------- */
.bg-navy-900.rounded-xl,
.bg-navy-900\/60.rounded-xl,
.bg-navy-900\/80.rounded-xl,
.bg-navy-800.rounded-2xl,
.bg-navy-800\/80.rounded-2xl,
.bg-navy-800\/90.rounded-xl,
[class*="bg-navy-"][class*="rounded"] {
  background-color: var(--prem-surface-1);
  border-color: var(--prem-border-subtle);
  border-radius: 16px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Explicit card containers with white-surface tokens */
[class*="bg-navy-"][class*="rounded-xl"],
[class*="bg-navy-"][class*="rounded-2xl"] {
  background-color: var(--prem-surface-1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Card hover */
[class*="bg-navy-"][class*="rounded"]:hover,
[class*="bg-navy-"][class*="rounded"][class*="hover:border"]:hover {
  background-color: var(--prem-surface-2);
  border-color: var(--prem-border-default);
  transform: translateY(-2px);
}

/* Pricing card featured highlight */
.bg-accent-500[class*="rounded"]:not(button):not(a) {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.04) 100%) !important;
  border: 1px solid rgba(249, 115, 22, 0.35) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
              0 12px 40px rgba(249, 115, 22, 0.12);
}

/* Form fields — dark premium inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
  background-color: var(--prem-surface-1) !important;
  border: 1px solid var(--prem-border-default) !important;
  border-radius: 8px !important;
  color: var(--prem-text) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  background-color: var(--prem-surface-2) !important;
  border-color: rgba(249, 115, 22, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: var(--prem-text-4);
}

/* ----------------------------------------------------------------------------
   8. HERO GRADIENT — refined near-black base + glow + grid
---------------------------------------------------------------------------- */
.hero-gradient {
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(249, 115, 22, 0.10), transparent 60%),
    radial-gradient(700px 500px at 80% 30%, rgba(56, 89, 255, 0.04), transparent 60%),
    linear-gradient(180deg, #0a0b0d 0%, #08090a 60%, #08090a 100%) !important;
  background-size: 100% 100% !important;
  position: relative;
  isolation: isolate;
}

/* Disable the old gradientShift animation — premium uses static layers */
.hero-gradient {
  animation: none !important;
}

/* Subtle grid overlay on hero */
.hero-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
  z-index: 0;
}

/* Soft radial glow behind hero content (right side, behind browser mockup) */
.hero-gradient::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10%;
  width: 800px;
  height: 800px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(249, 115, 22, 0.14) 0%, rgba(249, 115, 22, 0.04) 35%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
}

/* Make sure hero content sits above pseudo-elements */
.hero-gradient > *:not(.particle) {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------------------------
   9. STATS BAR
---------------------------------------------------------------------------- */
.stat-number {
  background: linear-gradient(135deg, #ffffff 0%, #b8c0cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

/* Stats bar divider look */
section.bg-navy-900.border-y {
  background: var(--prem-bg) !important;
  border-top: 1px solid var(--prem-border-subtle) !important;
  border-bottom: 1px solid var(--prem-border-subtle) !important;
}

/* ----------------------------------------------------------------------------
   10. SECTION PADDING — more breathing room
---------------------------------------------------------------------------- */
section[class*="py-16"]:not([class*="py-24"]):not([class*="py-28"]):not([class*="py-32"]) {
  padding-top: 96px;
  padding-bottom: 96px;
}

/* ----------------------------------------------------------------------------
   11. HEADER (page hero on inner pages like services, about, contact) — refined gradient
---------------------------------------------------------------------------- */
section.hero-gradient[class*="py-20"],
section.hero-gradient[class*="py-28"] {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(249, 115, 22, 0.08), transparent 60%),
    linear-gradient(180deg, #0a0b0d 0%, #08090a 100%) !important;
}

/* Inner-page hero often uses .bg-navy-900 too */
section.bg-navy-900[class*="py-20"],
section.bg-navy-900[class*="py-28"],
section.bg-navy-950[class*="py-20"],
section.bg-navy-950[class*="py-28"] {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(249, 115, 22, 0.06), transparent 60%),
    var(--prem-bg) !important;
}

/* ----------------------------------------------------------------------------
   12. ACCENT CHIPS / BADGES
---------------------------------------------------------------------------- */
.bg-accent-500\/10,
.bg-accent-500\/15,
.bg-accent-500\/20 {
  background-color: rgba(249, 115, 22, 0.10) !important;
}
.border-accent-500\/20,
.border-accent-500\/30 {
  border-color: rgba(249, 115, 22, 0.30) !important;
}
.border-accent-500\/40 {
  border-color: rgba(249, 115, 22, 0.40) !important;
}

/* Tag pills / chip rings */
[class*="rounded-full"][class*="bg-accent-500\/"] {
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

/* ----------------------------------------------------------------------------
   13. CTA-PULSE refinement (subtler pulse)
---------------------------------------------------------------------------- */
.cta-pulse {
  animation: premium-pulse 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes premium-pulse {
  0%, 100% {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
                0 8px 32px rgba(249, 115, 22, 0.22),
                0 0 0 0 rgba(249, 115, 22, 0.45);
  }
  50% {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
                0 8px 32px rgba(249, 115, 22, 0.28),
                0 0 0 14px rgba(249, 115, 22, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

/* ----------------------------------------------------------------------------
   14. GLOW-ACCENT — refined
---------------------------------------------------------------------------- */
.glow-accent {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 8px 30px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(249, 115, 22, 0.18);
}

/* ----------------------------------------------------------------------------
   15. BEFORE/AFTER SLIDER — keep functional, refine visuals
---------------------------------------------------------------------------- */
.ba-slider {
  border: 1px solid var(--prem-border-default) !important;
  background-color: var(--prem-bg-elevated) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.ba-handle {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1),
              0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------------------------------
   16. LINK CARDS (404 page)
---------------------------------------------------------------------------- */
.link-card {
  background-color: var(--prem-surface-1) !important;
  border: 1px solid var(--prem-border-subtle) !important;
}
.link-card:hover {
  background-color: var(--prem-surface-2) !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}

/* 404 error gradient -> near-black radial */
.error-gradient,
body.error-gradient {
  background: radial-gradient(ellipse at top, #0a0b0d 0%, #08090a 60%, #060708 100%) !important;
}

/* ----------------------------------------------------------------------------
   17. FOOTER / DIVIDERS — refined
---------------------------------------------------------------------------- */
footer,
footer.bg-navy-950,
footer[class*="bg-navy"] {
  background: var(--prem-bg) !important;
  border-top: 1px solid var(--prem-border-subtle);
}
footer.border-t,
.border-t.border-navy-800 {
  border-top: 1px solid var(--prem-border-subtle) !important;
}
.border-b.border-navy-800,
.border-b.border-navy-800\/50 {
  border-bottom: 1px solid var(--prem-border-subtle) !important;
}
.border-y.border-navy-800 {
  border-top: 1px solid var(--prem-border-subtle) !important;
  border-bottom: 1px solid var(--prem-border-subtle) !important;
}

/* ----------------------------------------------------------------------------
   18. CODE / PREFORMATTED — premium look
---------------------------------------------------------------------------- */
pre, code {
  background: var(--prem-surface-1);
  border: 1px solid var(--prem-border-subtle);
  border-radius: 6px;
  color: var(--prem-text-2);
}

/* ----------------------------------------------------------------------------
   19. HEALTH-CHECKLIST PAGE — soft override (page has its own design)
---------------------------------------------------------------------------- */
.website-health-checklist .header,
.website-health-checklist header[style] {
  background: linear-gradient(135deg, #0a0b0d 0%, #111315 100%) !important;
}

/* ----------------------------------------------------------------------------
   20. PRINT PROTECTION — never print the progress bar
---------------------------------------------------------------------------- */
@media print {
  #premium-scroll-progress { display: none; }
  body { background: #fff !important; color: #000 !important; }
}

/* ----------------------------------------------------------------------------
   21. HERO BACKGROUND IMAGE — AI-generated hero-bg.png layered under content
---------------------------------------------------------------------------- */
.hero-bg-image {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0 !important;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
}

/* Gradient overlay: transparent at top, fades to brand black at bottom */
.hero-bg-overlay {
  position: absolute !important;
  inset: 0;
  z-index: 0 !important;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 9, 10, 0) 0%,
    rgba(8, 9, 10, 0.55) 55%,
    rgba(8, 9, 10, 0.95) 100%
  );
}

/* Ensure hero content sits above the bg image + overlay */
.hero-gradient > .hero-bg-image,
.hero-gradient > .hero-bg-overlay {
  z-index: 0 !important;
  position: absolute !important;
}

/* When the AI bg image is present, soften the radial glow pseudo so the
   photographic image carries the visual weight instead of the orange blob. */
.hero-gradient:has(.hero-bg-image)::after {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .hero-bg-image { opacity: 0.28; }
  .hero-bg-overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 9, 10, 0.15) 0%,
      rgba(8, 9, 10, 0.7) 60%,
      rgba(8, 9, 10, 1) 100%
    );
  }
}

/* ----------------------------------------------------------------------------
   22. CASE STUDY IMAGES — portfolio showcase tabs
---------------------------------------------------------------------------- */
.case-study-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  background-color: var(--prem-bg-elevated);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.4s ease;
}

.case-study-image:hover {
  transform: scale(1.03);
}

/* Smooth fade-in when a tab panel becomes active */
.case-panel:not(.hidden) .case-study-image {
  animation: caseImageFadeIn 0.55s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes caseImageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-panel:not(.hidden) .case-study-image {
    animation: none;
  }
  .case-study-image { transition: none; }
}

/* Mobile: keep aspect-ratio but slightly taller for thumb scroll */
@media (max-width: 640px) {
  .case-study-image {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }
}

/* ============================================================================
   23. UI/UX REVIEW REFINEMENTS — GPT-4o feedback pass (Linear/Vercel polish)
   All overrides below are later in source order → win at equal specificity.
   ============================================================================ */

/* 23.1 — Color tokens: brighter secondary text for AA-grade contrast.
   Body copy and metadata must read at >= rgba(255,255,255,0.70) on #08090a. */
:root {
  --prem-text-3: #a8aebb;   /* was #8a8f98 — ~0.70 alpha equivalent */
  --prem-text-4: #828892;   /* was #62666d — ~0.55 alpha equivalent */
}

/* 23.2 — HERO: tighter vertical rhythm, brighter photo, H1 glow + gradient text */

/* Slightly shorter hero so it doesn't dwarf the next section */
section[id="main"] {
  min-height: min(92vh, 880px) !important;
}
section[id="main"] > .max-w-7xl {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}
@media (min-width: 1024px) {
  section[id="main"] > .max-w-7xl {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* Bump hero background photo opacity for more visual weight */
.hero-bg-image { opacity: 0.45 !important; }
@media (max-width: 768px) {
  .hero-bg-image { opacity: 0.38 !important; }
}

/* Hero H1: extra-bold weight, white→gray-300 gradient fill */
.hero-gradient h1,
section[id="main"] h1 {
  position: relative;
  isolation: isolate;
  font-weight: 800 !important;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #ffffff 0%, #c5cbd6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

/* Restore orange accent word inside hero H1 (escapes the text gradient) */
.hero-gradient h1 .text-accent-500,
section[id="main"] h1 .text-accent-500 {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
          color: var(--prem-accent) !important;
}

/* Soft radial glow behind hero H1 (Linear-style) */
section[id="main"] h1::before {
  content: "";
  position: absolute;
  inset: -25% -15% -10% -15%;
  background: radial-gradient(ellipse 60% 55% at 28% 50%,
              rgba(249, 115, 22, 0.18) 0%,
              rgba(249, 115, 22, 0.06) 35%,
              transparent 70%);
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 1023px) {
  section[id="main"] h1::before {
    inset: -20% -10% -10% -10%;
    background: radial-gradient(ellipse 70% 60% at 50% 50%,
                rgba(249, 115, 22, 0.16) 0%,
                transparent 65%);
  }
}

/* Hero body text: 18px+, brighter so it doesn't disappear on the photo */
.hero-gradient p,
section[id="main"] p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

/* 23.3 — Section headings: tighter tracking, heavier weight for punch */
h2 {
  letter-spacing: -0.03em;
  font-weight: 700;
}
h2.font-display,
.font-display h2 {
  letter-spacing: -0.035em;
}

/* 23.4 — Section header label refinement: small uppercase orange chip
   (markup already provides .text-accent-500 spans above H2s; just polish them) */
section h2 ~ p,
section .text-accent-500 + h2 {
  letter-spacing: -0.035em;
}
section span.text-accent-500 {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--prem-accent);
}

/* 23.5 — PRIMARY CTA (hero "Free Website Audit"): pure white + glow + scale */
a.cta-pulse.bg-accent-500,
a.cta-pulse[class*="bg-accent-500"] {
  background-color: #ffffff !important;
  color: #08090a !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  font-weight: 700 !important;
  letter-spacing: -0.012em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 0 30px rgba(255, 255, 255, 0.15),
    0 10px 32px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              background-color 0.2s ease !important;
}
a.cta-pulse.bg-accent-500:hover,
a.cta-pulse[class*="bg-accent-500"]:hover {
  background-color: #f5f6f8 !important;
  border-color: rgba(255, 255, 255, 1) !important;
  transform: scale(1.02);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 0 40px rgba(255, 255, 255, 0.22),
    0 14px 40px rgba(0, 0, 0, 0.5) !important;
}

/* Rework the pulse keyframes so they glow WHITE (not orange) */
a.cta-pulse {
  animation: prem-pulse-white 3.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes prem-pulse-white {
  0%, 100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      0 0 30px rgba(255, 255, 255, 0.15),
      0 10px 32px rgba(0, 0, 0, 0.45),
      0 0 0 0 rgba(255, 255, 255, 0.30);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      0 0 38px rgba(255, 255, 255, 0.22),
      0 10px 32px rgba(0, 0, 0, 0.45),
      0 0 0 12px rgba(255, 255, 255, 0);
  }
}

/* 23.6 — Generic primary CTAs (e.g. nav "Free Audit", pricing buttons):
   also pure white bg with glow + scale-on-hover */
a.bg-accent-500:not(.cta-pulse):not(.pricing-card *),
button.bg-accent-500:not(.cta-pulse),
.pricing-card a.bg-accent-500 {
  background-color: #ffffff !important;
  color: #08090a !important;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 0 22px rgba(255, 255, 255, 0.10),
    0 4px 14px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              background-color 0.2s ease !important;
}
a.bg-accent-500:not(.cta-pulse):hover,
button.bg-accent-500:not(.cta-pulse):hover,
.pricing-card a.bg-accent-500:hover {
  background-color: #f5f6f8 !important;
  transform: scale(1.02);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 0 32px rgba(255, 255, 255, 0.20),
    0 8px 22px rgba(0, 0, 0, 0.45) !important;
}

/* 23.7 — Secondary / ghost CTAs: refined 1px white border that brightens on hover */
a.bg-navy-700,
a.bg-navy-700\/50,
a.bg-navy-800,
a.bg-navy-800\/80,
a.bg-navy-800\/90,
button.bg-navy-700,
button.bg-navy-800 {
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.2s ease,
              background-color 0.2s ease !important;
}
a.bg-navy-700:hover,
a.bg-navy-700\/50:hover,
a.bg-navy-800:hover,
a.bg-navy-800\/80:hover,
a.bg-navy-800\/90:hover,
button.bg-navy-700:hover,
button.bg-navy-800:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background-color: rgba(255, 255, 255, 0.09) !important;
  transform: translateY(-1px);
}

/* 23.8 — Cards: deeper glass surface, bigger hover lift, gradient border on hover */
[class*="bg-navy-"][class*="rounded-xl"],
[class*="bg-navy-"][class*="rounded-2xl"] {
  background-color: rgba(255, 255, 255, 0.05) !important;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.25s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease !important;
}

/* Hover state: lift + gradient-tinted border + soft shadow */
[class*="bg-navy-"][class*="rounded-xl"]:hover,
[class*="bg-navy-"][class*="rounded-2xl"]:hover,
[class*="bg-navy-"][class*="rounded"]:hover {
  background-color: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(249, 115, 22, 0.28) !important;
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(249, 115, 22, 0.06);
}

/* Keep pricing "popular" card visually distinct — don't lift as much */
.pricing-card:hover,
.pricing-popular:hover {
  transform: translateY(-2px);
}

/* 23.9 — Section dividers: shimmer line between adjacent sections
   Adds visual rhythm and signals section transitions. */
body > section + section {
  position: relative;
}
body > section + section:not([class*="border-y"])::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 1280px);
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 75%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 5;
}
/* Traveling shimmer pulse along the divider */
body > section + section:not([class*="border-y"])::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(18%, 260px);
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(249, 115, 22, 0.55) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 6;
  animation: prem-divider-shimmer 7s ease-in-out infinite;
}
@keyframes prem-divider-shimmer {
  0%   { transform: translateX(-50%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(600%); opacity: 0; }
}

/* 23.10 — Section padding: more breathing room (py-16 → py-20+ feel) */
section[class*="py-16"]:not([class*="py-20"]):not([class*="py-24"]):not([class*="py-28"]):not([class*="py-32"]):not([id="main"]) {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}
@media (min-width: 1024px) {
  section[class*="py-16"]:not([class*="py-20"]):not([class*="py-24"]):not([class*="py-28"]):not([class*="py-32"]):not([id="main"]) {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
}

/* 23.11 — Nav polish: hover bg-pill + active underline indicator */
#navbar nav a[href],
#navbar a.text-navy-200,
#navbar a.text-navy-300,
#navbar .hidden.md-flex > a:not([class*="bg-accent-500"]):not(.cta-pulse) {
  position: relative;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: color 0.18s ease, background-color 0.18s ease;
}
#navbar a.text-navy-200:hover,
#navbar a.text-navy-300:hover,
#navbar .hidden.md-flex > a:not([class*="bg-accent-500"]):hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--prem-text) !important;
}
/* Active nav indicator (apply .nav-active via per-page JS or class on link) */
#navbar a.nav-active::after,
#navbar a.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  background: var(--prem-accent);
  border-radius: 1px;
  opacity: 0.9;
}

/* 23.12 — Subtle accent glow behind key sections (pricing, cases, testimonials, contact) */
#pricing,
#cases,
#testimonials,
#contact {
  position: relative;
  isolation: isolate;
}
#pricing::before,
#cases::before,
#testimonials::before,
#contact::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  height: 380px;
  background: radial-gradient(ellipse 55% 60% at 50% 0%,
              rgba(249, 115, 22, 0.08) 0%,
              transparent 65%);
  pointer-events: none;
  z-index: 0;
}
#pricing > *,
#cases > *,
#testimonials > *,
#contact > * {
  position: relative;
  z-index: 1;
}

/* 23.13 — Footer: subtle top border + animated underline on link hover */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  position: relative;
}
footer ul li a {
  position: relative;
  display: inline-block;
}
footer ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--prem-accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.28s cubic-bezier(0.23, 1, 0.32, 1);
}
footer ul li a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* 23.14 — Reduced motion guards */
@media (prefers-reduced-motion: reduce) {
  body > section + section::after { animation: none !important; opacity: 0 !important; }
  a.cta-pulse { animation: none !important; }
  [class*="bg-navy-"][class*="rounded-xl"]:hover,
  [class*="bg-navy-"][class*="rounded-2xl"]:hover,
  [class*="bg-navy-"][class*="rounded"]:hover { transform: none !important; }
  a.cta-pulse.bg-accent-500:hover,
  a.cta-pulse[class*="bg-accent-500"]:hover,
  a.bg-accent-500:not(.cta-pulse):hover,
  button.bg-accent-500:not(.cta-pulse):hover { transform: none !important; }
  footer ul li a::after { transition: none !important; }
}

/* 23.15 — Mobile responsiveness guardrails */
@media (max-width: 640px) {
  /* Hero h1 still scales but stays punchy */
  section[id="main"] h1 {
    font-size: clamp(2.25rem, 9vw, 3rem) !important;
    line-height: 1.08 !important;
  }
  /* Hero p stays readable on small screens */
  .hero-gradient p,
  section[id="main"] p {
    font-size: 1rem !important;
  }
  /* Tighter section padding on phones */
  section[class*="py-16"]:not([id="main"]) {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  /* CTA buttons full width stack */
  .hero-gradient .flex.flex-col.sm-flex-row > a,
  section[id="main"] .flex.flex-col.sm-flex-row > a {
    width: 100%;
  }
  /* Card hover lift toned down on touch */
  [class*="bg-navy-"][class*="rounded-xl"]:hover,
  [class*="bg-navy-"][class*="rounded-2xl"]:hover,
  [class*="bg-navy-"][class*="rounded"]:hover {
    transform: translateY(-2px);
  }
}

/* ============================================================================
   END premium.css
   JS hint (NOT executed — informational):
   For older browsers without animation-timeline support, you may add:
     <script>
       (function(){
         var bar=document.getElementById('premium-scroll-progress');
         if(!bar||!('animationTimeline' in document.documentElement.style))return;
         // modern browsers use CSS animation-timeline; no JS needed.
       })();
     </script>

   To enable the active-nav underline (23.11), add class="nav-active"
   to the relevant <a> in each page's navbar via per-page JS or static markup.
   ============================================================================ */
