/* Birzont landing overrides */

/* ── Theme tokens (system preference) ── */
:root {
  color-scheme: light dark;
  --bg-page: #ffffff;
  --bg-section-light: #f7f8fa;
  --bg-section-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-muted: #f7f8fa;
  --bg-header-scrolled: rgba(255, 255, 255, 0.98);
  --text-primary: #1a1a1f;
  --text-muted: rgba(26, 26, 31, 0.55);
  --text-on-dark: #1a1a1f;
  --text-on-dark-muted: rgba(26, 26, 31, 0.55);
  --border-subtle: rgba(0, 0, 0, 0.1);
  --border-on-dark: rgba(0, 0, 0, 0.1);
  --glass-on-dark: rgba(0, 0, 0, 0.03);
  --checklist-item-bg: rgba(232, 251, 240, 0.5);
  --form-field-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #2b2b2a;
    --bg-section-light: #2b2b2a;
    --bg-section-dark: #2b2b2a;
    --bg-card: #363635;
    --bg-card-muted: #323231;
    --bg-header-scrolled: rgba(43, 43, 42, 0.98);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-on-dark: #ffffff;
    --text-on-dark-muted: rgba(255, 255, 255, 0.55);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-on-dark: rgba(255, 255, 255, 0.1);
    --glass-on-dark: rgba(255, 255, 255, 0.06);
    --checklist-item-bg: rgba(255, 255, 255, 0.05);
    --form-field-bg: #323231;
  }
}

/* Page shell */
html,
body {
  background-color: var(--bg-page) !important;
  color: var(--text-primary);
}

body.bg-\[\#050607\] {
  background-color: var(--bg-page) !important;
}

/* Section backgrounds */
#hero,
#product,
#beta-form,
.bg-\[\#050607\],
.bg-\[\#050607\]\/95 {
  background-color: var(--bg-section-dark) !important;
  color: var(--text-on-dark);
}

#checklist,
#use-cases,
#how-it-works,
#pricing,
.bg-birzont-cream {
  background-color: var(--bg-section-light) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
}

#before-after,
#output-examples,
#security,
footer,
.bg-birzont-black {
  background-color: var(--bg-section-dark) !important;
  background-image: none !important;
  color: var(--text-on-dark);
}

/* Remove ambient spread/glow backgrounds */
.flow-desktop .absolute.-inset-6,
#how-it-works .absolute.left-0.right-0.top-1\/2,
.bg-gradient-to-b.from-birzont-mint\/40,
.bg-gradient-to-r.from-\[\#5ee496\]\/10 {
  display: none !important;
}

.glass-card,
.glass-card-light,
.backdrop-blur-xl,
.backdrop-blur-md,
.backdrop-blur-sm {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#product .rounded-3xl.border-white\/10 {
  background-color: var(--glass-on-dark) !important;
}

/* Light-mode text on formerly-dark sections */
@media (prefers-color-scheme: light) {
  main,
  header {
    color: #000000;
  }

  /* Force readable black text — keep mint/blue accent classes */
  main :is(h1, h2, h3, h4, p, li, label, pre, td, th, span, a):not([class*="text-[#"]):not([class*="text-birzont-blue"]):not([class*="text-birzont-green"]):not(.text-\[\#5ee496\]),
  header nav a,
  header [data-menu-toggle] {
    color: #000000;
  }

  main [class*="text-white"],
  header [class*="text-white"]:not(.gradient-cta):not(.gradient-cta *) {
    color: #000000 !important;
  }

  main :is(.text-white\/30, .text-white\/35, .text-white\/40, .text-white\/50, .text-white\/55, .text-white\/60, .text-white\/65, .text-white\/70, .text-white\/85, .text-white\/90),
  #before-after .before-panel,
  #before-after .before-panel p,
  .code-card pre,
  .beta-chip,
  .pipeline-step,
  .engine-step,
  .glass-card,
  .flow-mobile .glass-card p {
    color: rgba(0, 0, 0, 0.55) !important;
  }

  #before-after .after-panel,
  #before-after .after-panel p,
  main h1,
  main h2,
  main h3,
  .after-panel .text-sm.font-medium {
    color: #000000 !important;
  }

  #hero h1,
  #hero p,
  #product,
  #beta-form h2,
  #beta-form p,
  #beta-form label,
  #before-after h2,
  #output-examples h2,
  #security h2,
  #security p,
  footer p,
  footer a {
    color: #000000 !important;
  }

  #hero .text-white\/60,
  #product .text-white\/50,
  #product .text-white\/85,
  #product .text-white\/90,
  #beta-form .text-white\/55,
  #security .text-white\/55 {
    color: rgba(0, 0, 0, 0.55) !important;
  }

  #before-after .before-after-card {
    border-color: rgba(0, 0, 0, 0.1) !important;
  }

  #before-after .before-panel {
    background: rgba(0, 0, 0, 0.04) !important;
  }

  #before-after .after-panel {
    background: rgba(94, 228, 150, 0.12) !important;
    border-color: rgba(94, 228, 150, 0.35) !important;
  }

  .pipeline-step {
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #000000 !important;
  }

  .pipeline-step-num {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #000000 !important;
  }

  .beta-chip {
    border-color: rgba(0, 0, 0, 0.12) !important;
    background: rgba(0, 0, 0, 0.04) !important;
  }

  .beta-chip.is-active {
    color: #000000 !important;
  }

  a.btn-glow.border-white\/20,
  a.btn-glow.border-white\/20 span {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    background: transparent !important;
  }

  a.btn-glow.border-white\/20:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #000000 !important;
  }

  header:not(.header-scrolled) nav a,
  header:not(.header-scrolled) .text-white\/60,
  header:not(.header-scrolled) .text-white\/75 {
    color: rgba(26, 26, 31, 0.6) !important;
  }

  header:not(.header-scrolled) nav a:hover,
  header:not(.header-scrolled) a:hover {
    color: #1a1a1f !important;
  }

  header:not(.header-scrolled) [data-menu-toggle] {
    color: rgba(26, 26, 31, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    background: rgba(0, 0, 0, 0.04) !important;
  }

  [data-mobile-menu] {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  [data-mobile-menu] a {
    color: rgba(26, 26, 31, 0.75) !important;
  }

  [data-mobile-menu] .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  .site-logo-wordmark {
    filter: none !important;
  }

  #checklist h2,
  #checklist p,
  #checklist .text-birzont-black,
  #use-cases h2,
  #use-cases h3,
  #use-cases p,
  #how-it-works h2,
  #how-it-works h3,
  #how-it-works p,
  #pricing h2,
  #pricing h3,
  #pricing p,
  #pricing li,
  .text-birzont-black {
    color: var(--text-primary) !important;
  }

  .text-birzont-black\/55,
  .text-birzont-black\/70,
  .text-birzont-black\/75 {
    color: var(--text-muted) !important;
  }
}

/* Dark-mode text on formerly-light sections */
@media (prefers-color-scheme: dark) {
  main {
    color: #ffffff;
  }

  main [class*="text-birzont-black"],
  main [class*="text-white"] {
    color: #ffffff !important;
  }

  main :is(.text-birzont-black\/35, .text-birzont-black\/45, .text-birzont-black\/55, .text-birzont-black\/60, .text-birzont-black\/70, .text-birzont-black\/75, .text-birzont-black\/80),
  main :is(.text-white\/30, .text-white\/35, .text-white\/40, .text-white\/50, .text-white\/55, .text-white\/60, .text-white\/65, .text-white\/70, .text-white\/85, .text-white\/90) {
    color: rgba(255, 255, 255, 0.55) !important;
  }

  #checklist h2,
  #checklist p,
  #checklist .text-birzont-black,
  #checklist .text-sm,
  #use-cases h2,
  #use-cases h3,
  #use-cases p,
  #how-it-works h2,
  #how-it-works h3,
  #how-it-works p,
  #pricing h2,
  #pricing h3,
  #pricing p,
  #pricing li,
  #pricing td,
  #pricing th,
  .text-birzont-black {
    color: var(--text-primary) !important;
  }

  .text-birzont-black\/55,
  .text-birzont-black\/70,
  .text-birzont-black\/75,
  .text-birzont-black\/45,
  .text-birzont-black\/60,
  .text-birzont-black\/80 {
    color: var(--text-muted) !important;
  }

  #checklist .rounded-2xl.border-birzont-black\/10.bg-white,
  .glass-card-light,
  #pricing .bg-white\/90,
  #pricing .bg-white,
  #pricing .rounded-3xl.border {
    background-color: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
  }

  #checklist .checklist-btn {
    color: var(--text-primary) !important;
  }
}

/* Logo */
.site-logo-wordmark {
  height: 2rem;
  width: auto;
  filter: brightness(0) invert(1);
}

.site-logo-icon {
  display: block;
}

@media (min-width: 768px) {
  .site-logo-icon {
    display: none !important;
  }
}

/* Tighter corners — buttons & cards only */
a.btn-glow,
button.btn-glow {
  border-radius: 0.5rem !important;
  padding-top: 0.68rem !important;
  padding-bottom: 0.68rem !important;
}

.rounded-3xl {
  border-radius: 0.75rem !important;
}

.rounded-2xl {
  border-radius: 0.625rem !important;
}

.rounded-xl {
  border-radius: 0.5rem !important;
}

/* Buttons: black & white only */
a.btn-glow.gradient-cta,
.btn-glow.gradient-cta {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
  box-shadow: none !important;
}

a.btn-glow.gradient-cta:hover,
.btn-glow.gradient-cta:hover {
  background: #e8e8e8 !important;
  color: #000000 !important;
  box-shadow: none !important;
}

/* Secondary outline buttons on dark sections */
a.btn-glow.border-white\/20 {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

a.btn-glow.border-white\/20:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

/* Outline buttons on light sections */
a.btn-glow.border-birzont-black\/15,
button.btn-glow.border-birzont-black\/15,
[data-diagnosis-btn] {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  box-shadow: none !important;
}

a.btn-glow.border-birzont-black\/15:hover,
button.btn-glow.border-birzont-black\/15:hover,
[data-diagnosis-btn]:hover {
  background: #f0f0f0 !important;
  color: #000000 !important;
}

[data-diagnosis-btn] span {
  color: #000000 !important;
}

/* Pricing buttons should contrast against the white cards */
#pricing a.btn-glow,
#pricing .btn-glow.gradient-cta,
#pricing .btn-glow.border-birzont-black\/15 {
  background: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid #000000 !important;
  box-shadow: none !important;
}

#pricing a.btn-glow:hover,
#pricing .btn-glow.gradient-cta:hover,
#pricing .btn-glow.border-birzont-black\/15:hover {
  background: #1a1a1a !important;
  color: #ffffff !important;
}

#pricing a.btn-glow span {
  color: #ffffff !important;
}

/* Slightly tighter header CTA */
header a.btn-glow {
  padding-top: 0.58rem !important;
  padding-bottom: 0.58rem !important;
}

/* Opaque scrolled header */
header.header-scrolled {
  background: var(--bg-header-scrolled) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (prefers-color-scheme: light) {
  header.header-scrolled nav a,
  header.header-scrolled .text-white\/60 {
    color: rgba(26, 26, 31, 0.6) !important;
  }

  header.header-scrolled nav a:hover {
    color: #1a1a1f !important;
  }
}

/* Remove headline gradients and keep text monochrome */
.gradient-text {
  background: none !important;
  background-image: none !important;
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Pricing badge */
.bg-gradient-to-r.from-birzont-green.to-birzont-blue,
span.bg-gradient-to-r {
  background: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
}

/* Layout */
html,
body {
  overflow-x: hidden;
}

main {
  overflow-x: hidden;
}

/* Hero mobile */
#hero {
  min-height: 0;
  padding-top: 72px;
}

#hero h1 {
  width: 100%;
  max-width: 100%;
  font-size: clamp(2.125rem, 8.5vw, 2.625rem);
  line-height: 1.12;
}

@media (min-width: 768px) {
  #hero {
    padding-top: 9rem;
  }

  #hero h1 {
    font-size: 3rem;
    line-height: 1.08;
  }
}

@media (min-width: 1024px) {
  #hero h1 {
    font-size: 3.25rem;
  }
}

.hero-subcopy-desktop {
  display: none;
}

.hero-subcopy-mobile {
  display: inline;
}

@media (min-width: 768px) {
  .hero-subcopy-desktop {
    display: inline;
  }

  .hero-subcopy-mobile {
    display: none;
  }
}

/* Product flow */
.flow-desktop {
  display: none;
}

.flow-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .flow-desktop {
    display: block;
  }

  .flow-mobile {
    display: none;
  }
}

.pipeline-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pipeline-step.is-active {
  border-color: rgba(94, 228, 150, 0.3);
  background: rgba(94, 228, 150, 0.08);
}

.pipeline-step-num {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.pipeline-step.is-active .pipeline-step-num {
  background: #5ee496;
  color: #2b2b2a;
}

/* Checklist */
.checklist-btn {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: var(--checklist-item-bg);
  padding: 0.875rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.checklist-btn:hover {
  border-color: rgba(59, 200, 120, 0.3);
  background: var(--checklist-item-bg);
}

.checklist-box {
  margin-top: 0.125rem;
  display: flex;
  height: 1.25rem;
  width: 1.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-size: 0.75rem;
}

.checklist-box.is-checked {
  border-color: #3bc878;
  background: #3bc878;
  color: #fff;
}

/* Before / After */
#before-after .mt-16.grid > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.before-after-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 9rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .before-after-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    min-height: 7.5rem;
  }

  .before-after-card > .flex.items-center {
    align-self: center;
  }
}

.before-panel,
.after-panel {
  flex: 1 1 0;
  min-height: 4.5rem;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.before-after-card > .flex.items-center {
  flex-shrink: 0;
  align-self: center;
}

.before-panel {
  background: var(--glass-on-dark);
  color: var(--text-on-dark-muted);
}

.after-panel {
  border: 1px solid rgba(94, 228, 150, 0.25);
  background: rgba(94, 228, 150, 0.08);
  color: var(--text-on-dark);
}

/* Output examples */
.code-card pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

/* Beta form */
.beta-form-field,
.beta-form-select,
.beta-form-textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border-on-dark);
  background: var(--form-field-bg);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-on-dark);
  outline: none;
}

.beta-form-field:focus,
.beta-form-select:focus,
.beta-form-textarea:focus {
  border-color: rgba(94, 228, 150, 0.4);
}

.beta-chip {
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.2s;
}

.beta-chip.is-active {
  border-color: rgba(94, 228, 150, 0.4);
  background: rgba(94, 228, 150, 0.15);
  color: #fff;
}

.checklist-summary {
  display: none;
  border-radius: 0.75rem;
  border: 1px solid rgba(94, 228, 150, 0.3);
  background: rgba(94, 228, 150, 0.1);
  padding: 1rem;
}

.checklist-summary.is-visible {
  display: block;
}

.checklist-summary li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.engine-step.is-active {
  border-color: rgba(94, 228, 150, 0.25) !important;
  background: rgba(94, 228, 150, 0.08) !important;
  opacity: 1 !important;
}

.engine-step.is-done {
  opacity: 0.55 !important;
}

/* Mobile overflow fixes */
@media (max-width: 767px) {
  .absolute.-left-32,
  .absolute.-right-24 {
    display: none !important;
  }

  section {
    max-width: 100vw;
  }
}

/* How it works: hide connector arrows */
#how-it-works .absolute.-right-3 {
  display: none !important;
}

#how-it-works .absolute.left-0.right-0.top-1\/2 {
  display: none !important;
}
