@import "./tailwind-base.css";

/* ============================================
   MARKETING PAGES - $1B Startup Premium Design
   ============================================ */

@layer base {
  body.marketing-page {
    background:
      radial-gradient(ellipse 100% 60% at 50% -10%, rgba(4, 93, 86, 0.25), transparent),
      radial-gradient(ellipse 80% 50% at 100% 20%, rgba(255, 195, 0, 0.08), transparent),
      radial-gradient(ellipse 60% 60% at 0% 80%, rgba(4, 93, 86, 0.15), transparent),
      linear-gradient(180deg, #011d1a 0%, #022825 30%, #033d38 100%);
    color: #f0fdfa;
    min-height: 100vh;
    font-size: 17px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Subtle grain for a more premium, tactile feel */
  body.marketing-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    /* Perf: avoid expensive blend-mode compositing during scroll */
    opacity: 0.03;
    background-image:
      radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.35) 1px, transparent 0);
    background-size: 3px 3px;
  }

  :where(body.marketing-page) h1 {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  :where(body.marketing-page) h2 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
  }

  :where(body.marketing-page) h3,
  :where(body.marketing-page) h4 {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.015em;
  }

  body.marketing-page p {
    line-height: 1.7;
  }

  /* Editorial-style highlight for the hero keyword (subtle, not neon) */
  body.marketing-page .tac-highlight {
    position: relative;
    display: inline-block;
    z-index: 0;
    color: #ffc300;
    text-shadow: 0 0 22px rgba(255, 195, 0, 0.18);
  }

  body.marketing-page .tac-highlight::after {
    content: "";
    position: absolute;
    left: -0.06em;
    right: -0.06em;
    bottom: 0.10em;
    height: 0.28em;
    border-radius: 999px;
    background: linear-gradient(
      90deg,
      rgba(255, 195, 0, 0),
      rgba(255, 195, 0, 0.34),
      rgba(255, 195, 0, 0)
    );
    filter: blur(0.6px);
    opacity: 0.9;
    z-index: -1;
  }

  body.marketing-page .card-light {
    color: #1e293b;
  }

  :where(body.marketing-page .card-light) h1,
  :where(body.marketing-page .card-light) h2,
  :where(body.marketing-page .card-light) h3,
  :where(body.marketing-page .card-light) h4 {
    color: rgb(15 23 42 / 1); /* slate-900 */
  }

  body.marketing-page .card-light .text-emerald-700 {
    color: #045d56;
  }

  /* Ensure card-light maintains white background on hover (override glass-panel:hover) */
  body.marketing-page .glass-panel.card-light,
  body.marketing-page .glass-panel.card-light:hover {
    background: rgba(255, 255, 255, 0.95) !important;
  }

  body.marketing-page ::selection {
    background-color: rgba(255, 195, 0, 0.3);
    color: #ffffff;
  }
}

@layer components {
  /* ============================================
     GLASS PANELS - Premium dark glass effect
     ============================================ */
  body.marketing-page .glass-panel {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    box-shadow:
      0 20px 50px -20px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.03) inset,
      0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.marketing-page .glass-panel:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
      0 25px 60px -20px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.05) inset,
      0 1px 0 rgba(255, 255, 255, 0.08) inset;
    transform: translateY(-2px);
  }

  /* ============================================
     PRIMARY CTA BUTTON - Gold gradient with glow
     ============================================ */
  body.marketing-page .btn-marketing-primary {
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1500;
    background: linear-gradient(135deg, #ffc300 0%, #ffb700 50%, #f5a800 100%);
    border: none;
    border-radius: 0.75rem;
    box-shadow:
      0 2px 4px rgba(255, 195, 0, 0.2),
      0 8px 24px -8px rgba(255, 195, 0, 0.5),
      0 16px 40px -16px rgba(255, 195, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  body.marketing-page .btn-marketing-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
  }

  body.marketing-page .btn-marketing-primary:hover {
    transform: translateY(-3px);
    box-shadow:
      0 4px 8px rgba(255, 195, 0, 0.25),
      0 12px 32px -8px rgba(255, 195, 0, 0.6),
      0 24px 56px -16px rgba(255, 195, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #ffd000 0%, #ffc300 50%, #ffb700 100%);
  }

  body.marketing-page .btn-marketing-primary:hover::before {
    left: 100%;
  }

  body.marketing-page .btn-marketing-primary:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 3px rgba(255, 195, 0, 0.28),
      0 2px 4px rgba(255, 195, 0, 0.2),
      0 8px 24px -8px rgba(255, 195, 0, 0.5),
      0 16px 40px -16px rgba(255, 195, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  body.marketing-page .btn-marketing-primary:active {
    transform: translateY(-1px);
    box-shadow:
      0 2px 4px rgba(255, 195, 0, 0.3),
      0 6px 16px -6px rgba(255, 195, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  /* ============================================
     SECONDARY BUTTON - Elegant outlined style
     ============================================ */
  body.marketing-page .btn-marketing-secondary {
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    box-shadow:
      0 4px 16px -8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
  }

  body.marketing-page .btn-marketing-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow:
      0 8px 24px -8px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  body.marketing-page .btn-marketing-secondary:focus-visible {
    outline: none;
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.22),
      0 4px 16px -8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  body.marketing-page .btn-marketing-secondary:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.08);
  }

  /* ============================================
     FEATURE ICONS - Elevated with glow
     ============================================ */
  body.marketing-page .glass-panel .rounded-full.bg-emerald-700 {
    background: linear-gradient(135deg, #059487 0%, #045d56 100%);
    box-shadow:
      0 4px 16px -4px rgba(4, 93, 86, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  body.marketing-page .glass-panel:hover .rounded-full.bg-emerald-700 {
    box-shadow:
      0 6px 20px -4px rgba(4, 93, 86, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  /* ============================================
     GOLD ACCENTS - Icon backgrounds
     ============================================ */
  body.marketing-page .bg-gold-500,
  body.marketing-page .bg-gold-400 {
    background: linear-gradient(135deg, #ffc300 0%, #ffb700 100%);
    box-shadow: 0 4px 12px -4px rgba(255, 195, 0, 0.5);
  }

  /* ============================================
     LINKS - Gold hover effect
     ============================================ */
  body.marketing-page a.text-gold-400 {
    color: #ffc300;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
  }

  body.marketing-page a.text-gold-400:hover {
    color: #ffd54f;
    text-shadow: 0 0 20px rgba(255, 195, 0, 0.4);
  }

  body.marketing-page a.text-gold-400::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
  }

  body.marketing-page a.text-gold-400:hover::after {
    width: 100%;
  }

  body.marketing-page a.text-gold-400:visited {
    color: #ffc300;
  }

  /* ============================================
     PRICING CARDS - Premium tier styling
     ============================================ */
  body.marketing-page .pricing-card-featured {
    background: linear-gradient(145deg, rgba(4, 93, 86, 0.4), rgba(255, 255, 255, 0.06));
    border: 1.5px solid rgba(255, 195, 0, 0.3);
    border-radius: 1.25rem;
    box-shadow:
      0 0 0 1px rgba(255, 195, 0, 0.1),
      0 20px 50px -20px rgba(0, 0, 0, 0.5),
      0 0 60px -20px rgba(255, 195, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.marketing-page .pricing-card-featured:hover {
    border-color: rgba(255, 195, 0, 0.5);
    box-shadow:
      0 0 0 1px rgba(255, 195, 0, 0.2),
      0 25px 60px -20px rgba(0, 0, 0, 0.6),
      0 0 80px -20px rgba(255, 195, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
  }

  body.marketing-page .pricing-featured-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1500;
    background: linear-gradient(135deg, #ffc300 0%, #ffb700 100%);
    border-radius: 9999px;
    box-shadow:
      0 4px 12px -4px rgba(255, 195, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  /* Gold checkmark color for pricing */
  body.marketing-page .text-gold-400 {
    color: #ffc300;
  }

  /* ============================================
     SECTION SPACING
     ============================================ */
  body.marketing-page .section-gap-md {
    margin-top: 5rem;
    margin-bottom: 5rem;
  }

  body.marketing-page .section-gap-lg {
    margin-top: 7rem;
    margin-bottom: 7rem;
  }

  /* ============================================
     HERO BADGE - Premium pill style
     ============================================ */
  body.marketing-page .bg-white\/10 {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
  }

  /* ============================================
     TRUST BADGES - Chrome store badge styling
     ============================================ */
  body.marketing-page .chrome-badge {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
  }

  body.marketing-page .chrome-badge:hover {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
    transform: translateY(-2px);
  }
}

@layer utilities {
  /* ============================================
     TRUST BAR - Social proof strip
     ============================================ */
  body.marketing-page .trust-bar {
    /* background: rgba(255, 255, 255, 0.03); */
    animation: tac-fade-in-up 0.6s ease-out;
  }

  /* Perf: `backdrop-filter` is expensive and can make scroll janky. */
  body.marketing-page .backdrop-blur-none,
  body.marketing-page .backdrop-blur-sm,
  body.marketing-page .backdrop-blur,
  body.marketing-page .backdrop-blur-md,
  body.marketing-page .backdrop-blur-lg,
  body.marketing-page .backdrop-blur-xl,
  body.marketing-page .backdrop-blur-2xl,
  body.marketing-page .backdrop-blur-3xl {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.marketing-page .trust-bar span {
    transition: all 0.3s ease;
  }

  body.marketing-page .trust-bar:hover span {
    opacity: 0.9;
  }

  @keyframes tac-fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ============================================
     SCROLL ANIMATIONS - Fade in on scroll
     ============================================ */
  body.marketing-page [data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.marketing-page [data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
  }

  body.marketing-page [data-animate="fade-up"] {
    transform: translateY(32px);
  }

  body.marketing-page [data-animate="fade-up"].animate-in {
    transform: translateY(0);
  }

  body.marketing-page [data-animate="scale"] {
    transform: scale(0.95);
  }

  body.marketing-page [data-animate="scale"].animate-in {
    transform: scale(1);
  }

  /* Staggered animation delays */
  body.marketing-page [data-animate-delay="100"] { transition-delay: 100ms; }
  body.marketing-page [data-animate-delay="200"] { transition-delay: 200ms; }
  body.marketing-page [data-animate-delay="300"] { transition-delay: 300ms; }
  body.marketing-page [data-animate-delay="400"] { transition-delay: 400ms; }
  body.marketing-page [data-animate-delay="500"] { transition-delay: 500ms; }

  /* ============================================
     METRICS COUNTER - Animated numbers
     ============================================ */
  body.marketing-page [data-counter] {
    font-variant-numeric: tabular-nums;
  }

  /* ============================================
     TESTIMONIAL CARDS - Premium hover effects
     ============================================ */
  body.marketing-page .testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow:
      0 4px 20px -8px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.marketing-page .testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 12px 32px -12px rgba(0, 0, 0, 0.25),
      0 0 0 1px rgba(0, 0, 0, 0.08);
  }

  /* ============================================
     NEWSLETTER PREMIUM - Gold accent border
     ============================================ */
  body.marketing-page .newsletter-premium {
    border: 1px solid rgba(255, 195, 0, 0.2);
  }

  body.marketing-page .newsletter-premium:hover {
    border-color: rgba(255, 195, 0, 0.35);
  }

  /* ============================================
     PROMO BANNER - V4 Launch styling
     ============================================ */
  body.marketing-page .promo-banner {
    border: 2px solid rgba(255, 195, 0, 0.5);
    animation: promo-glow 3s ease-in-out infinite;
  }

  @keyframes promo-glow {
    0%, 100% {
      box-shadow: 0 0 20px rgba(255, 195, 0, 0.15);
    }
    50% {
      box-shadow: 0 0 30px rgba(255, 195, 0, 0.25);
    }
  }

  /* ============================================
     FEATURE COMPARISON TABLE
     ============================================ */
  body.marketing-page table {
    border-collapse: separate;
    border-spacing: 0;
  }

  body.marketing-page table thead th {
    position: sticky;
    top: 0;
    background: rgba(4, 93, 86, 0.9);
    z-index: 10;
  }

  body.marketing-page table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  /* ============================================
     FOUNDING SCHOOLS BANNER
     ============================================ */
  body.marketing-page .founding-banner {
    position: relative;
    overflow: hidden;
  }

  body.marketing-page .founding-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255, 195, 0, 0.15), transparent 60%);
    pointer-events: none;
  }

  /* ============================================
     STICKY HEADER
     ============================================ */
  body.marketing-page .sticky-header-wrap {
    padding-top: 1rem;
    transition: padding-top 200ms ease;
  }

  body.marketing-page.scrolled .sticky-header-wrap {
    padding-top: 0;
  }

  /* Ensure anchor navigation doesn't land under the sticky header. */
  body.marketing-page section[id] {
    scroll-margin-top: 7rem;
  }

  /* Avoid duplicated CTAs on the homepage (hero already has primary actions). */
  body.marketing-page .marketing-header-cta {
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 0s;
    will-change: opacity, transform;
  }

  body.marketing-page[data-page="home"]:not(.scrolled) .marketing-header-cta {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
  }

  body.marketing-page[data-page="home"].scrolled .marketing-header-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 0s;
  }

  /* Only show the header CTA once the hero has left the viewport (prevents “double CTA” above the fold). */
  body.marketing-page[data-page="home"].hero-in-view .marketing-header-cta {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
  }

  @media (max-width: 640px) {
    body.marketing-page .marketing-header-cta .btn-marketing-primary.header-cta {
      padding: 0.625rem 0.95rem;
      font-size: 0.875rem;
      border-radius: 0.75rem;
      box-shadow:
        0 2px 6px rgba(255, 195, 0, 0.18),
        0 10px 26px -14px rgba(255, 195, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }
  }

  /* ============================================
     DECORATIVE GLOW EFFECTS
     ============================================ */
  body.marketing-page .marketing-glow::after {
    content: "";
    position: absolute;
    inset: auto auto -3rem -3rem;
    width: 16rem;
    height: 16rem;
    background: radial-gradient(circle, rgba(255, 195, 0, 0.25), transparent 70%);
    filter: blur(60px);
    border-radius: 9999px;
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite;
  }

  @keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
  }

  /* ============================================
     MEDIA FRAMES - Video/Image containers
     ============================================ */
  .media-frame {
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: radial-gradient(circle at top, rgba(4, 93, 86, 0.6), rgba(2, 32, 30, 0.9));
    box-shadow:
      0 20px 50px -20px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .media-frame img,
  .media-frame video {
    width: 100%;
    display: block;
    object-fit: cover;
  }

  .media-placeholder {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(240, 253, 250, 0.7);
    text-align: center;
    padding: 2rem;
  }

  .media-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .media-play__btn {
    height: 72px;
    width: 72px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
      0 8px 32px -8px rgba(0, 0, 0, 0.5),
      0 0 0 8px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }

  .media-play__btn:hover {
    transform: scale(1.1);
    box-shadow:
      0 12px 40px -8px rgba(0, 0, 0, 0.6),
      0 0 0 12px rgba(255, 255, 255, 0.15);
  }

  /* ============================================
     CUSTOM SCROLLBAR
     ============================================ */
  body.marketing-page ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  body.marketing-page ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
  }

  body.marketing-page ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
  }

  body.marketing-page ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}

/* ============================================
   LEGAL PAGES - Premium Editorial Style
   ============================================ */

/* Reading Progress Bar */
body.marketing-page .legal-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #ffc300 0%, #ffb700 100%);
  z-index: 9999;
  transition: width 50ms ease-out;
  box-shadow: 0 0 10px rgba(255, 195, 0, 0.5);
}

/* Legal Page Layout */
body.marketing-page .legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  body.marketing-page .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Sticky TOC Sidebar */
body.marketing-page .legal-toc {
  position: sticky;
  top: 6rem;
  height: fit-content;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 1rem;
}

body.marketing-page .legal-toc::-webkit-scrollbar {
  width: 4px;
}

body.marketing-page .legal-toc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

@media (max-width: 1024px) {
  body.marketing-page .legal-toc {
    position: relative;
    top: 0;
    max-height: none;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    margin-bottom: 2rem;
  }
}

body.marketing-page .legal-toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.marketing-page .legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.marketing-page .legal-toc-item {
  margin-bottom: 0.25rem;
}

body.marketing-page .legal-toc-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  line-height: 1.4;
}

body.marketing-page .legal-toc-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

body.marketing-page .legal-toc-link.active {
  color: #ffc300;
  background: rgba(255, 195, 0, 0.1);
  font-weight: 500;
}

body.marketing-page .legal-toc-link .toc-number {
  color: rgba(255, 195, 0, 0.7);
  font-weight: 600;
  font-size: 0.75rem;
  min-width: 1.5rem;
  flex-shrink: 0;
}

/* Legal Content Styles */
body.marketing-page .legal-content-wrapper {
  min-width: 0; /* Prevent grid blowout */
}

body.marketing-page .legal-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.marketing-page .legal-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.marketing-page .legal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.marketing-page .legal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

body.marketing-page .legal-meta-item svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.6;
}

/* Legal Prose Enhancements */
body.marketing-page .legal-prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

body.marketing-page .legal-prose > p:first-of-type {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* Section Headers with Gold Accent */
body.marketing-page .legal-prose h2 {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}

body.marketing-page .legal-prose h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #ffc300, transparent);
  border-radius: 2px;
}

body.marketing-page .legal-prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

body.marketing-page .legal-prose h2:first-of-type::before {
  display: none;
}

/* Subsection Headers */
body.marketing-page .legal-prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  scroll-margin-top: 5rem;
}

/* Enhanced Lists */
body.marketing-page .legal-prose ul {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

body.marketing-page .legal-prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.875rem;
  line-height: 1.7;
}

body.marketing-page .legal-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: rgba(255, 195, 0, 0.6);
  border-radius: 50%;
}

/* Nested Lists */
body.marketing-page .legal-prose ul ul {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

body.marketing-page .legal-prose ul ul li::before {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
}

/* Definition Terms (bold text in lists) */
body.marketing-page .legal-prose li > strong:first-child,
body.marketing-page .legal-prose p > strong:first-child {
  color: #ffffff;
  font-weight: 600;
}

/* Highlighted Definition Terms */
body.marketing-page .legal-prose li > strong:first-child::before {
  content: none;
}

body.marketing-page .legal-prose h2 + ul li > strong:first-child,
body.marketing-page .legal-prose h3 + ul li > strong:first-child {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  margin-right: 0.25rem;
  background: rgba(255, 195, 0, 0.12);
  border-radius: 0.25rem;
  font-size: 0.9375rem;
}

/* Paragraphs */
body.marketing-page .legal-prose p {
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Links */
body.marketing-page .legal-prose a {
  color: #ffc300;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 195, 0, 0.3);
  transition: all 0.2s ease;
}

body.marketing-page .legal-prose a:hover {
  color: #ffd54f;
  border-bottom-color: #ffd54f;
}

/* Service Provider Cards (for Section 4) */
body.marketing-page .legal-prose ul li strong:only-child {
  color: #ffc300;
}

/* Legal Footer */
body.marketing-page .legal-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.marketing-page .legal-footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

body.marketing-page .legal-contact {
  flex: 1;
  min-width: 200px;
}

body.marketing-page .legal-contact p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

body.marketing-page .legal-contact a {
  color: #ffc300;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.marketing-page .legal-contact a:hover {
  color: #ffd54f;
}

/* Back to Top Button */
body.marketing-page .legal-back-to-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.marketing-page .legal-back-to-top:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

body.marketing-page .legal-back-to-top svg {
  width: 1rem;
  height: 1rem;
}

/* Mobile TOC Toggle */
@media (max-width: 1024px) {
  body.marketing-page .legal-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
  }

  body.marketing-page .legal-toc-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
  }

  body.marketing-page .legal-toc.collapsed .legal-toc-toggle svg {
    transform: rotate(180deg);
  }

  body.marketing-page .legal-toc.collapsed .legal-toc-list {
    display: none;
  }
}

@media (min-width: 1025px) {
  body.marketing-page .legal-toc-toggle {
    display: block;
    pointer-events: none;
  }

  body.marketing-page .legal-toc-toggle svg {
    display: none;
  }
}

/* Print Styles for Legal Pages */
@media print {
  body.marketing-page .legal-toc,
  body.marketing-page .legal-progress-bar,
  body.marketing-page .legal-back-to-top {
    display: none !important;
  }

  body.marketing-page .legal-layout {
    display: block;
  }

  body.marketing-page .legal-prose {
    color: #000;
  }

  body.marketing-page .legal-prose h2,
  body.marketing-page .legal-prose h3 {
    color: #000;
  }
}

/* ============================================
   REDUCED MOTION - Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .btn-marketing-primary,
  .btn-marketing-secondary,
  .glass-panel,
  body.marketing-page * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   RADIO OVERRIDES - Keep checked fill on hover
   ============================================ */
body.marketing-page .radio:checked,
body.marketing-page .radio:checked:hover {
  background-color: #34d399;
  border-color: #34d399;
}
