/* ============================================
   SpineLux Pain & Ortho — Design System
   ============================================ */

:root {
  --ink: #16213E;
  --ink-soft: #3A4363;
  --base: #FAFAF8;
  --surface-alt: #EEF1F0;
  --teal: #0E7C7B;
  --teal-dark: #0A5F5E;
  --brass: #C9A227;
  --line: #D8DDD9;
  --white: #FFFFFF;
  --tbd-bg: #FFF4D6;
  --tbd-border: #C9A227;

  --font-display: 'Archivo', sans-serif;
  --font-serif: 'Newsreader', serif;
  --font-body: 'Inter', sans-serif;

  --container: 1180px;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(22, 33, 62, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--base);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--teal-dark);
  display: inline-block;
  margin-bottom: 0.6em;
}

/* ---------- TBD marker ---------- */
.tbd {
  background: var(--tbd-bg);
  border: 1px dashed var(--tbd-border);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  font-size: 0.85em;
  color: #6B5900;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo-block { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
}
.brand-word .lux { font-family: var(--font-serif); font-weight: 400; font-style: italic; color: var(--teal-dark); }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

.primary-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.primary-nav a { color: var(--ink-soft); font-weight: 600; font-size: 0.94rem; }
.primary-nav a:hover { color: var(--teal-dark); text-decoration: none; }
.primary-nav a.active { color: var(--teal-dark); }

/* ---------- Dropdown nav ---------- */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-item .caret { font-size: 0.65em; opacity: 0.7; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 200;
}
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--surface-alt); }

@media (prefers-reduced-motion: reduce) {
  .dropdown-menu { transition: none; }
}

.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-small { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 0; }
.hero .badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(14,124,123,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { max-width: 780px; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 620px; margin-bottom: 1.6em; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 2em; }
.hero-photo {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
  margin-top: 32px;
}
.facility-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  margin: 2em 0;
}
.facility-grid img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.facility-grid .facility-stack { display: flex; flex-direction: column; gap: 16px; }
.facility-grid .facility-stack img { min-height: 102px; }
@media (max-width: 700px) { .facility-grid { grid-template-columns: 1fr; } }
.photo-caption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Map embed ---------- */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 1.5em 0;
}
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Treatment Ladder (signature element) ---------- */
.ladder {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin: 40px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.ladder-step {
  flex: 1;
  background: var(--surface-alt);
  padding: 28px 20px 22px;
  position: relative;
  border-right: 1px solid var(--white);
}
.ladder-step:last-child { border-right: none; }
.ladder-step:nth-child(1) { height: 140px; align-self: flex-end; background: #E4E9E7; }
.ladder-step:nth-child(2) { height: 175px; align-self: flex-end; background: #D7DFDB; }
.ladder-step:nth-child(3) { height: 210px; align-self: flex-end; background: var(--teal); color: var(--white); }
.ladder-step:nth-child(4) { height: 245px; align-self: flex-end; background: var(--ink); color: var(--white); }
.ladder-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  opacity: 0.6;
  display: block;
  margin-bottom: 10px;
}
.ladder-step h4 { font-size: 1.02rem; margin-bottom: 6px; }
.ladder-step p { font-size: 0.88rem; margin: 0; opacity: 0.85; }

@media (max-width: 800px) {
  .ladder { flex-direction: column; }
  .ladder-step, .ladder-step:nth-child(1), .ladder-step:nth-child(2), .ladder-step:nth-child(3), .ladder-step:nth-child(4) {
    height: auto; border-right: none; border-bottom: 3px solid var(--white);
  }
}

/* ---------- Sections ---------- */
.block { padding: 56px 0; }
.block.alt { background: var(--surface-alt); }
.block h2 { margin-bottom: 0.3em; }
.block .section-intro { max-width: 680px; color: var(--ink-soft); margin-bottom: 2em; }

/* ---------- Grids & Cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.4em; }
.card h3 a { color: var(--ink); }
.card p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0; }

.icon-circle {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(14,124,123,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.icon-circle svg { width: 22px; height: 22px; stroke: var(--teal-dark); fill: none; }
.icon-circle.brass { background: rgba(201,162,39,0.12); }
.icon-circle.brass svg { stroke: var(--brass); }

/* ---------- Physician card ---------- */
.physician-card { display: flex; gap: 22px; align-items: flex-start; }
.physician-photo {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--surface-alt);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 0.7rem; text-align: center; padding: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.physician-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cred-line { font-family: var(--font-serif); font-style: italic; color: var(--teal-dark); margin-bottom: 0.3em; }

/* ---------- Disclosure box ---------- */
.disclosure {
  background: var(--surface-alt);
  border-left: 4px solid var(--brass);
  padding: 18px 22px;
  border-radius: 6px;
  font-size: 0.92rem;
  margin: 1.5em 0;
}

/* ---------- Pill list ---------- */
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.pill-list li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1em; }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #C7CCDA; }
.cta-band .btn-secondary { border-color: var(--white); color: var(--white); }
.cta-band .btn-secondary:hover { background: var(--white); color: var(--ink); }

/* ---------- Forms ---------- */
.form-embed { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-embed label { display: block; font-weight: 600; font-size: 0.88rem; margin: 14px 0 5px; }
.form-embed input, .form-embed select, .form-embed textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--base);
}
.form-embed textarea { min-height: 90px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C7CCDA; padding: 52px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #C7CCDA; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Step cards (patient experience) ---------- */
.step-card { text-align: left; }
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--teal);
  margin-bottom: 8px;
}

/* ---------- Reviews ---------- */
.reviews-widget-slot {
  background: var(--white);
  border: 2px dashed var(--tbd-border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.reviews-widget-slot .stars { font-size: 1.8rem; color: var(--brass); margin-bottom: 10px; letter-spacing: 4px; }
.reviews-widget-slot h3 { color: var(--ink); margin-bottom: 0.3em; }

.review-carousel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.review-track { overflow: hidden; }
.review-slides { display: flex; transition: transform 0.4s ease; }
.review-card {
  flex: 0 0 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}
.review-card .stars { color: var(--brass); font-size: 1.3rem; letter-spacing: 3px; margin-bottom: 14px; }
.review-card blockquote { font-size: 1.05rem; color: var(--ink); margin: 0 0 18px; font-style: italic; }
.review-card cite { font-style: normal; font-weight: 600; color: var(--ink-soft); font-size: 0.9rem; }
.review-nav {
  display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 20px;
}
.review-nav button {
  background: var(--white); border: 1px solid var(--line); border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.review-nav button:hover { background: var(--surface-alt); }
.review-dots { display: flex; gap: 8px; }
.review-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; cursor: pointer;
}
.review-dots span.active { background: var(--teal); }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--line);
    gap: 14px;
    max-height: 80vh;
    overflow-y: auto;
  }
  .primary-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-cta .btn { display: none; }

  .nav-item { position: static; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 6px 0 0 12px;
    padding: 4px 0;
  }
  .dropdown-menu a { padding: 6px 0 6px 12px; }
}
