:root {
  color-scheme: light;
  --leb-page: #f8fafc;
  --leb-surface: #ffffff;
  --leb-surface-soft: #f1f5f9;
  --leb-text: #1f2937;
  --leb-text-strong: #111827;
  --leb-muted: #64748b;
  --leb-border: #e2e8f0;
  --leb-blue: #1e40af;
  --leb-teal: #14b8a6;
  --leb-gold: #f59e0b;
}

html.dark {
  color-scheme: dark;
  --leb-page: #05070f;
  --leb-surface: #0b0f19;
  --leb-surface-soft: #111827;
  --leb-text: #d1d5db;
  --leb-text-strong: #f9fafb;
  --leb-muted: #9ca3af;
  --leb-border: #273244;
  --leb-blue: #60a5fa;
  --leb-teal: #2dd4bf;
  --leb-gold: #fbbf24;
}

html { background: var(--leb-page); }
body {
  transition: background-color .25s ease, color .25s ease;
}
body:not(.home-page) {
  background-color: var(--leb-page);
  color: var(--leb-text);
}
body:not(.home-page) .bg-bg-light { background-color: var(--leb-page); }
body:not(.home-page) .bg-primary-blue { background-color: #1e40af; }
body:not(.home-page) .bg-secondary-gold { background-color: #f59e0b; }
body:not(.home-page) .bg-accent-teal { background-color: #14b8a6; }
body:not(.home-page) .text-primary-blue { color: #1e40af; }
body:not(.home-page) .text-secondary-gold { color: #f59e0b; }
body:not(.home-page) .text-accent-teal { color: #0f766e; }
body:not(.home-page) .text-text-dark { color: var(--leb-text-strong); }
body:not(.home-page) .border-primary-blue { border-color: #1e40af; }
body:not(.home-page) .border-accent-teal { border-color: #14b8a6; }

/* The legacy content pages use fixed light Tailwind utility colors. Map those
   surfaces and text colors into the same site palette as the homepage at night. */
html.dark body:not(.home-page) {
  background-color: var(--leb-page) !important;
  color: var(--leb-text) !important;
}
html.dark body:not(.home-page) .bg-white,
html.dark body:not(.home-page) .bg-gray-50,
html.dark body:not(.home-page) .bg-gray-100,
html.dark body:not(.home-page) .bg-primary-blue\/5 {
  background-color: var(--leb-surface) !important;
}
html.dark body:not(.home-page) .bg-bg-light { background-color: var(--leb-page) !important; }
html.dark body:not(.home-page) .bg-primary-blue\/5 { background-color: #0f172a !important; }
html.dark body:not(.home-page) .text-gray-900,
html.dark body:not(.home-page) .text-gray-800,
html.dark body:not(.home-page) .text-text-dark { color: var(--leb-text-strong) !important; }
html.dark body:not(.home-page) .text-gray-700,
html.dark body:not(.home-page) .text-gray-600 { color: var(--leb-text) !important; }
html.dark body:not(.home-page) .text-gray-500 { color: var(--leb-muted) !important; }
html.dark body:not(.home-page) .text-primary-blue { color: #60a5fa !important; }
html.dark body:not(.home-page) .text-secondary-gold { color: #fbbf24 !important; }
html.dark body:not(.home-page) .text-accent-teal { color: #2dd4bf !important; }
html.dark body:not(.home-page) .border-gray-100,
html.dark body:not(.home-page) .border-gray-200,
html.dark body:not(.home-page) .border-gray-300 { border-color: var(--leb-border) !important; }
html.dark body:not(.home-page) input,
html.dark body:not(.home-page) textarea,
html.dark body:not(.home-page) select {
  background-color: var(--leb-surface-soft);
  color: var(--leb-text-strong);
  border-color: var(--leb-border);
}
html.dark body:not(.home-page) input::placeholder,
html.dark body:not(.home-page) textarea::placeholder { color: var(--leb-muted); }

/* Atmospheric canvas and shared page surfaces for the supporting pages. */
body:not(.home-page) {
  background-image:
    radial-gradient(ellipse at 8% 4%, rgba(30, 64, 175, .10), transparent 34rem),
    radial-gradient(ellipse at 94% 28%, rgba(20, 184, 166, .09), transparent 30rem),
    radial-gradient(ellipse at 48% 100%, rgba(245, 158, 11, .055), transparent 36rem),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 48%, #f8fafc 100%);
  background-attachment: fixed;
}
html.dark body:not(.home-page) {
  background-image:
    radial-gradient(ellipse at 8% 4%, rgba(30, 64, 175, .22), transparent 34rem),
    radial-gradient(ellipse at 94% 28%, rgba(20, 184, 166, .13), transparent 30rem),
    radial-gradient(ellipse at 48% 100%, rgba(245, 158, 11, .07), transparent 36rem),
    linear-gradient(180deg, #070b16 0%, #05070f 56%, #090e18 100%);
  background-attachment: fixed;
}
body:not(.home-page) > header {
  background-color: color-mix(in srgb, var(--leb-surface) 88%, transparent) !important;
  border-bottom: 1px solid var(--leb-border);
  backdrop-filter: blur(16px);
}
body:not(.home-page) .max-w-4xl > .bg-white,
body:not(.home-page) .max-w-7xl .bg-white,
body:not(.home-page) .bg-white.p-8,
body:not(.home-page) .bg-white.p-6 {
  border-color: color-mix(in srgb, var(--leb-border) 82%, transparent);
  box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}
html.dark body:not(.home-page) .max-w-4xl > .bg-white,
html.dark body:not(.home-page) .max-w-7xl .bg-white,
html.dark body:not(.home-page) .bg-white.p-8,
html.dark body:not(.home-page) .bg-white.p-6 {
  background: linear-gradient(145deg, rgba(17, 24, 39, .96), rgba(11, 15, 25, .94)) !important;
  border-color: rgba(96, 165, 250, .14);
  box-shadow: 0 22px 65px rgba(0, 0, 0, .28);
}
body:not(.home-page) #main-content,
body:not(.home-page) section.bg-primary-blue\/5 {
  background-image: linear-gradient(130deg, rgba(30, 64, 175, .075), rgba(20, 184, 166, .055) 58%, rgba(245, 158, 11, .045));
  border: 1px solid rgba(30, 64, 175, .09);
}
html.dark body:not(.home-page) #main-content,
html.dark body:not(.home-page) section.bg-primary-blue\/5 {
  background-image: linear-gradient(130deg, rgba(30, 64, 175, .21), rgba(20, 184, 166, .10) 58%, rgba(245, 158, 11, .07));
  border-color: rgba(96, 165, 250, .13);
}
body:not(.home-page) footer {
  background-image: linear-gradient(120deg, rgba(17, 24, 39, .98), rgba(11, 15, 25, .98));
  border-top: 1px solid rgba(20, 184, 166, .24);
}

html:not(.dark) [data-theme-toggle],
html.dark [data-theme-toggle] {
  color: var(--leb-muted);
  border-color: var(--leb-border);
}
[data-theme-toggle] { cursor: pointer; }
[data-theme-toggle] .theme-icon-night { display: none; }
html.dark [data-theme-toggle] .theme-icon-day { display: none; }
html.dark [data-theme-toggle] .theme-icon-night { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}


/* Homepage-specific styling formerly embedded in index.html. */
body.home-page header span.text-brand-500 { color: #14b8a6 !important; }
body.home-page { font-family: 'Inter', sans-serif; transition: background-color .3s ease, color .3s ease; }
.home-page h1, .home-page h2, .home-page h3, .home-page h4, .home-page .font-outfit { font-family: 'Outfit', sans-serif; }
.seo-signal-card.is-active {
  border-color: rgba(30,64,175,.65);
  box-shadow: 0 12px 30px rgba(30,64,175,.10);
  transform: translateY(-2px);
}
.leb-path-btn.is-active {
  border-color: rgba(30,64,175,.65);
  background: rgba(30,64,175,.10);
  color: rgb(15,118,110);
}
.dark .leb-path-btn.is-active { background: rgba(30,64,175,.12); color: rgb(94,234,212); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .seo-signal-card.is-active { transform: none; }
}
body.home-page input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1e40af;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.35);
}
[data-track="bio_plans_cta"], [data-track="builder_products_cta"], [data-track="builder_resources_cta"] {
  background: #f59e0b !important; color: #fff !important; border-color: #f59e0b !important; text-decoration: none !important;
}
[data-track="bio_plans_cta"]:hover, [data-track="builder_products_cta"]:hover, [data-track="builder_resources_cta"]:hover {
  background: #d97706 !important; border-color: #d97706 !important;
}
[data-track="bio_linkinbio_cta"], [data-track="bio_qr"], [data-track="bio_files"], [data-track="bio_utm"], [data-track="bio_payments"] { color: #0f766e !important; }
[data-track="bio_linkinbio_cta"]:hover, [data-track="bio_qr"]:hover, [data-track="bio_files"]:hover, [data-track="bio_utm"]:hover, [data-track="bio_payments"]:hover { color: #115e59 !important; }

#scroll-to-top-btn {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 45; width: 3rem; height: 3rem;
  border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
  background: #1e40af; color: #fff; border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 25px rgba(15,23,42,.18); opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}
#scroll-to-top-btn:hover { background: #14b8a6; }
#scroll-to-top-btn.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scroll-to-top-btn:focus-visible { outline: 3px solid rgba(245,158,11,.75); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { #scroll-to-top-btn { transition: none; } }
@media (max-width: 640px) { #scroll-to-top-btn { right: 1rem; bottom: 1rem; width: 2.75rem; height: 2.75rem; } }

/* Contrast refinements. */
body.home-page .text-gray-400 { color: #334155 !important; }
body.home-page .text-gray-500 { color: #475569 !important; }
.dark body.home-page .text-gray-400, html.dark body.home-page .text-gray-400 { color: #e2e8f0 !important; }
.dark body.home-page .text-gray-500, html.dark body.home-page .text-gray-500 { color: #cbd5e1 !important; }
body.home-page .text-brand-505, body.home-page .dark\:text-brand-505 { color: #1d4ed8 !important; }
.dark body.home-page .dark\:text-brand-505 { color: #93c5fd !important; }
#seo-predictor-demo .text-gray-400, #seo-predictor-demo .text-gray-500,
#reviews .text-gray-400, #reviews .text-gray-500, #free-tools .text-gray-400, #academy .text-gray-400 { color: #475569 !important; }
.dark #seo-predictor-demo .text-gray-400, .dark #seo-predictor-demo .text-gray-500,
.dark #reviews .text-gray-400, .dark #reviews .text-gray-500, .dark #free-tools .text-gray-400, .dark #academy .text-gray-400 { color: #cbd5e1 !important; }
