:root {
  --bg-body: #0f172a;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --text-main: #f1f5f9;
  --text-muted: #cbd5e1; /* High contrast for accessibility */
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.15);
  --border: rgba(255, 255, 255, 0.15);
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* Glassmorphism & UI */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 9999px;
  font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-decoration: none; border: none; font-size: 1rem;
}

.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 0 20px var(--primary-glow); }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }

.btn-outline { background: rgba(30, 41, 59, 0.65); color: white; border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--primary); }

h1 { font-size: 2.6rem; line-height: 1.1; margin-bottom: 1.0rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

.gradient-text {
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* NAVIGATION */
nav { position: fixed; top: 0; width: 100%; z-index: 50; border-bottom: 1px solid var(--border); padding: 12px 0; }
.nav-link { color: var(--text-muted); text-decoration: none; padding: 0.5rem; transition: color 0.2s; }
.nav-link:hover { color: white; }
.nav-desktop { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.75rem; width: 100%; }
.nav-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.nav-actions { margin-top: 0.75rem; display: flex; width: 100%; justify-content: flex-start; }

/* HERO */
.hero { padding-top: 140px; padding-bottom: 80px; position: relative; overflow: hidden; }
.glow-bg {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px; background: var(--primary);
  opacity: 0.10; filter: blur(80px); border-radius: 50%; z-index: -1;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.75rem; background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border); border-radius: 9999px;
  font-size: 0.875rem; color: #38bdf8; margin-bottom: 1.0rem;
}

/* WORLD-CLASS COPY SUPPORT CLASSES */
.subhead-clarifier {
  font-size: 1.15rem;
  max-width: 860px;
  margin: 0.25rem auto 0.75rem;
  color: var(--text-muted);
}
.authority-anchor {
  max-width: 860px;
  margin: 0.35rem auto 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.32);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e2e8f0;
  font-size: 0.95rem;
}
.authority-anchor strong { color: #ffffff; }
.authority-anchor.compact { max-width: 760px; padding: 0.5rem 0.75rem; font-size: 0.92rem; }

.micro-note {
  font-size: 0.85rem;
  color: rgba(203, 213, 225, 0.85);
  margin-top: 1.0rem;
}

/* New: MLS subline under hero clarifier */
.mls-subline{
  max-width: 860px;
  margin: 0 auto 0.85rem;
  font-size: 0.95rem;
  color: rgba(203, 213, 225, 0.88);
}

/* TRUST SIGNALS */
.trust-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 0.75rem 0 1.25rem; }
.trust-pill {
  display: inline-flex; gap: 0.5rem; align-items: center;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: rgba(2,6,23,0.35); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
}

/* SECTIONS */
.section-slab {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(15,23,42,0.50);
}
.section-slab.alt {
  background: rgba(15,23,42,0.35);
}
.section-lede {
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-muted);
}
.muted { opacity: 0.9; }

/* New: Hearing logic module */
.hearing-logic{
  max-width: 980px;
  margin: 1.6rem auto 0;
  border-radius: 18px;
  padding: 1.0rem 1.1rem;
  background: rgba(2, 6, 23, 0.28);
}
.hearing-logic-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 0.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.hearing-logic-body{
  color: rgba(203, 213, 225, 0.92);
  font-size: 0.95rem;
  max-width: 900px;
  margin: 0 auto;
}

/* New: Fit section */
.fit-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 980px;
  margin: 0 auto;
}
.fit-title{
  display:flex;
  align-items:center;
  gap: 0.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.6rem;
}
.fit-list{
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}
.fit-list li{
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}
.fit-list li:before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(56, 189, 248, 0.85);
  font-weight: 900;
}
.fit-note{
  max-width: 980px;
  margin: 1rem auto 0;
  text-align:center;
  color: rgba(203, 213, 225, 0.88);
  font-size: 0.92rem;
}
.fit-note a{ color: #ffffff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.18); }
.fit-note a:hover{ border-bottom-color: rgba(56, 189, 248, 0.7); }

/* PRICING GRID */
.pricing-section { padding: 5rem 0; background: #020617; }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr; }
.card {
  background: rgba(30, 41, 59, 0.35); border-radius: 1rem;
  padding: 2rem; border: 1px solid var(--border);
  position: relative; transition: border-color 0.3s;
}
.card:hover { border-color: var(--primary); }
.price { font-size: 2.5rem; font-weight: 700; color: white; margin: 1rem 0; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.check-list { list-style: none; margin-bottom: 1.25rem; }
.check-list li { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.95rem; color: var(--text-muted); }

.pill-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  font-size: 0.75rem;
  padding: 2px 12px;
  border-radius: 99px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #021026;
}

/* PREVIEW */
.preview-wrap { max-width: 1000px; margin: 0 auto; }
.preview-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.preview-card { background: rgba(2,6,23,0.35); border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; }
.preview-card img { width: 100%; height: auto; display: block; }
.preview-caption { padding: 0.9rem 1rem; color: var(--text-muted); font-size: 0.95rem; }

/* MODAL & STEPS */
dialog {
  background: #0f172a; color: white;
  border: 1px solid var(--border); border-radius: 1rem;
  padding: 0; max-width: 640px; width: 92%;
  margin: auto; position: fixed; inset: 0; z-index: 100;
}
dialog::backdrop { background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(4px); }
.modal-header {
  padding: 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 2rem; }
.close-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; }
.close-btn:hover { color: white; }

.step-circle {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 0.8rem; flex-shrink: 0; transition: all 0.3s ease;
}
.step-active { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.step-inactive { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.step-done { background: rgba(34, 197, 94, 0.2); color: #4ade80; }

.input {
  width: 100%; margin-top: 0.5rem; padding: 0.75rem 0.9rem;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2,6,23,0.35); color: #e2e8f0; outline: none;
}
.input:focus { border-color: rgba(56,189,248,0.7); }
.note { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tally Embed Override */
iframe.tally-embed { width: 100%; height: 400px; border: none; border-radius: 8px; background: transparent; }

/* Footer & Legal Pages */
.wrap { max-width: 900px; margin: 0 auto; padding: 48px 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-text { margin-top: 22px; border-top: 1px solid rgba(255,255,255,0.10); padding-top: 16px; font-size: 0.9rem; color: var(--text-muted); }

/* New: sensible list styling inside cards (helps legal pages too) */
.card ul { margin: 0.75rem 0 1rem; padding-left: 1.25rem; }
.card ul li { margin-bottom: 0.5rem; color: var(--text-muted); }

/* RESPONSIVE */
@media (min-width: 768px) {
  h1 { font-size: 4rem; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  nav { padding: 0; height: 70px; display:flex; align-items:center; }
  .nav-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .nav-desktop { flex-direction: row; gap: 2rem; margin-top: 0; width: auto; }
  .nav-actions { margin-top: 0; width: auto; justify-content: flex-end; }
  .preview-grid { grid-template-columns: 1fr 1fr; }
  .fit-grid { grid-template-columns: 1fr 1fr; }
}
