/* ============================================
   MOTUS PHYSIOTHERAPY — DESIGN SYSTEM
   Palette: deep teal (clinical calm) + clay (human warmth)
   Type: Fraunces (display) + Inter (body) + JetBrains Mono (data/labels)
   Signature: range-of-motion arc motif, used as a recurring
   structural device across hero, section dividers and cards
   ============================================ */

:root {
  /* Color tokens */
  --ink: #1a1f1d;
  --ink-soft: #3f4a46;
  --teal-900: #112727;
  --teal-800: #1b3a3a;
  --teal-700: #234848;
  --teal-600: #2f5c5c;
  --sage: #8fa89a;
  --sage-light: #c9d6cd;
  --clay: #c8704d;
  --clay-dark: #a8572f;
  --clay-light: #e9b393;
  --sand: #f7f4ef;
  --sand-deep: #efe9df;
  --white: #ffffff;
  --line: rgba(26, 31, 29, 0.12);
  --line-on-dark: rgba(247, 244, 239, 0.18);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  /* Scale */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1.25rem;
  --space-4: 2rem;
  --space-5: 3.25rem;
  --space-6: 5.25rem;
  --space-7: 8rem;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;

  --shadow-card: 0 1px 2px rgba(17, 39, 39, 0.04), 0 12px 32px -16px rgba(17, 39, 39, 0.18);
  --shadow-lift: 0 24px 48px -20px rgba(17, 39, 39, 0.32);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--teal-900);
  letter-spacing: -0.01em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ============ EYEBROW / LABEL ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-dark);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--clay-dark);
  display: inline-block;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--clay);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(168, 87, 47, 0.55);
}
.btn-primary:hover { background: var(--clay-dark); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--teal-900);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--white); border-color: var(--teal-700); }

.btn-on-dark {
  background: transparent;
  color: var(--sand);
  border-color: var(--line-on-dark);
}
.btn-on-dark:hover { background: rgba(247,244,239,0.08); border-color: var(--sand); }

.btn-block { width: 100%; justify-content: center; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--teal-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav-links a:hover { color: var(--teal-900); }

.nav-links a.active { color: var(--teal-900); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--clay);
  border-radius: 2px;
}

.nav-cta { display: flex; align-items: center; gap: var(--space-3); }

.nav-phone {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-800);
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal-900);
  margin: 5px 0;
  transition: 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 880px) {
  .nav-phone { display: inline; }
}

@media (max-width: 879px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--sand);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  background: var(--teal-800);
  overflow: hidden;
  padding: var(--space-6) 0 var(--space-7);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 500px at 85% 15%, rgba(200, 112, 77, 0.18), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-light);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.hero-eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--clay-light);
}

.hero h1 {
  color: var(--sand);
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  max-width: 11.5ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--clay-light);
}

.hero-lede {
  color: var(--sage-light);
  font-size: 1.1rem;
  max-width: 42ch;
  margin-top: var(--space-3);
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-on-dark);
}

.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  color: var(--clay-light);
  font-weight: 600;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--sage-light);
  margin-top: 2px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rom-art {
  width: 100%;
  max-width: 420px;
  height: auto;
}

/* ============ ARC DIVIDER (signature motif) ============ */
.arc-divider {
  display: block;
  width: 100%;
  height: 48px;
  color: var(--sand);
}

/* ============ SECTION SCAFFOLDING ============ */
.section {
  padding: var(--space-6) 0;
}

.section-sand { background: var(--sand); }
.section-white { background: var(--white); }
.section-deep { background: var(--sand-deep); }
.section-teal { background: var(--teal-800); color: var(--sand); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-5);
}

.section-head.center { margin-inline: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-teal .section-head h2 { color: var(--sand); }
.section-teal .eyebrow { color: var(--clay-light); }
.section-teal .eyebrow::before { background: var(--clay-light); }

.section-lede {
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-teal .section-lede { color: var(--sage-light); }

/* ============ CONDITION / SERVICE CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.condition-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.condition-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--teal-600);
}

.condition-icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-3);
  color: var(--teal-700);
}

.condition-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.condition-card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-3);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--sand-deep);
  color: var(--teal-800);
}

/* ============ PROCESS / PATHWAY ============ */
.pathway {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.pathway-step {
  position: relative;
  padding-top: var(--space-4);
}

.pathway-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.pathway-step::after {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--sand);
}

.pathway-degree {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage);
  letter-spacing: 0.06em;
}

.pathway-step h3 {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.5rem;
}

.pathway-step p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ============ TEAM ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.team-photo {
  aspect-ratio: 4/5;
  background: var(--sage-light);
  position: relative;
  overflow: hidden;
}

.team-photo svg { width: 100%; height: 100%; }

.team-info { padding: var(--space-3); }

.team-info h3 { font-size: 1.05rem; }

.team-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin-top: 4px;
  display: block;
}

.team-bio {
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* ============ TESTIMONIALS ============ */
.testimonial-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border: 1px solid var(--line);
  position: relative;
}

.testimonial-mark {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--clay-light);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.testimonial p.quote {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.testimonial-name {
  margin-top: var(--space-3);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--teal-900);
}

.testimonial-condition {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sage);
}

/* ============ CTA BAND ============ */
.cta-band {
  background: var(--teal-800);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
}

.cta-band h2 {
  color: var(--sand);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  max-width: 22ch;
}

.cta-band p {
  color: var(--sage-light);
  margin-top: var(--space-1);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--teal-900);
  color: var(--sage-light);
  padding: var(--space-5) 0 var(--space-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line-on-dark);
}

.footer-brand {
  font-family: var(--font-display);
  color: var(--sand);
  font-size: 1.2rem;
}

.footer-tagline {
  margin-top: var(--space-2);
  font-size: 0.88rem;
  max-width: 28ch;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.footer-col ul li { margin-bottom: 0.55rem; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--clay-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-emergency {
  font-family: var(--font-mono);
  color: var(--clay-light);
}

/* ============ PAGE HEADER (sub-pages) ============ */
.page-hero {
  background: var(--teal-800);
  padding: var(--space-5) 0 var(--space-4);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 700px 400px at 90% 0%, rgba(200, 112, 77, 0.16), transparent 60%);
}

.page-hero h1 {
  color: var(--sand);
  font-size: clamp(2rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow { color: var(--clay-light); position: relative; z-index: 1; }
.page-hero .eyebrow::before { background: var(--clay-light); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sage-light);
  margin-top: var(--space-2);
  position: relative;
  z-index: 1;
}
.breadcrumb a { color: var(--sage-light); }
.breadcrumb a:hover { color: var(--sand); }

/* ============ FORM ELEMENTS ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-900);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(47, 92, 92, 0.15);
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field input.field-error,
.form-field select.field-error,
.form-field textarea.field-error {
  border-color: var(--clay-dark);
  box-shadow: 0 0 0 3px rgba(168, 87, 47, 0.14);
}

.form-success {
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
}
.form-success svg { width: 22px; height: 22px; color: var(--teal-700); flex-shrink: 0; margin-top: 1px; }

.form-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: var(--space-1);
}

.form-success {
  background: var(--sand-deep);
  border: 1px solid var(--sage-light);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-top: var(--space-3);
  color: var(--teal-800);
  font-weight: 600;
  font-size: 0.92rem;
}

.form-success.show { display: flex; }

/* ============ CONTACT / INFO CARDS ============ */
.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.info-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  color: var(--clay-dark);
}

.info-card h4 { font-size: 0.98rem; margin-bottom: 2px; }
.info-card p { font-size: 0.88rem; color: var(--ink-soft); }

/* ============ MAP EMBED PLACEHOLDER ============ */
.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 320px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: var(--space-3) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--teal-900);
}
.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--clay);
  transition: transform 0.3s var(--ease);
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.faq-answer-inner {
  padding-bottom: var(--space-3);
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 70ch;
}

/* ============ PRICING / INSURANCE STRIP ============ */
.strip {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* ============ UTILITY ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }

.badge-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.badge-item svg { width: 20px; height: 20px; color: var(--teal-700); flex-shrink: 0; }

/* fade-up reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .pathway { grid-template-columns: 1fr 1fr; row-gap: var(--space-5); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 var(--space-3); }
  .hero { padding: var(--space-5) 0 var(--space-6); }
  .hero-stats { grid-template-columns: 1fr; gap: var(--space-2); }
  .pathway { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .section { padding: var(--space-5) 0; }
}
