/* =========================================================
   Integrated Rehab and Physical Therapy — design tokens
   Palette: deep teal ink, sage/eucalyptus, warm coral accent,
   cool mint-white background (deliberately NOT the cream+terracotta
   combo that's become an AI-design default).
   Type: Fraunces (display) / Inter (body) / IBM Plex Mono (data & labels)
   Signature: recurring "range-of-motion arc" — the same arc a
   therapist reads off a goniometer — used as dividers & hero motif.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink:        #0E2A2E;
  --ink-soft:   #22423F;
  --sage:       #5B8C7B;
  --sage-light: #CFE1D6;
  --mint-bg:    #F4F7F6;
  --paper:      #FFFFFF;
  --coral:      #E15B45;
  --coral-dark: #B8402E;
  --sand:       #E9E4D8;
  --ink-70:     rgba(14, 42, 46, 0.7);
  --ink-50:     rgba(14, 42, 46, 0.5);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 14px;
  --shadow-soft: 0 8px 30px rgba(14, 42, 46, 0.08);
  --shadow-lift: 0 16px 40px rgba(14, 42, 46, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mint-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1 { font-size: clamp(2.3rem, 4.5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-70); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
}

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

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.utility-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.utility-bar a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }
.utility-bar a:hover { border-color: var(--coral); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(320px, 55vw);
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--sage-light); color: var(--ink); }
.main-nav a.active { background: var(--ink); color: #fff; }

.nav-cta {
  background: var(--coral) !important;
  color: #fff !important;
  padding: 10px 20px !important;
  margin-left: 6px;
}
.nav-cta:hover { background: var(--coral-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-lift);
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: left; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* ---------- Arc motif (signature element) ---------- */
.arc-divider {
  width: 100%;
  height: 48px;
  display: block;
}
.arc-divider path { stroke: var(--sage); }

.hero-arc {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  max-width: 60vw;
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #0E2A2E 0%, #133934 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--sage-light); }
.hero h1 { color: #fff; max-width: 640px; }
.hero p.lede {
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  font-size: 1.08rem;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-dark); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-soft); }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
}
.hero-stats div span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sage-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper); }
.section-header { max-width: 640px; margin-bottom: 40px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(14,42,46,0.06);
}
.card .icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--sage-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .icon-badge svg { width: 24px; height: 24px; color: var(--ink); }

/* Promo panel (like the $14.99 consult box) */
.promo-panel {
  background: var(--sage);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
}
.promo-panel h3 { color: #fff; }
.promo-panel .price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: #fff;
}
.promo-panel .btn-primary { background: #fff; color: var(--ink); }
.promo-panel .btn-primary:hover { background: var(--sand); }

/* Doctor / staff card */
.doctor-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.doctor-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.doctor-card .role { font-family: var(--font-mono); font-size: 0.75rem; color: var(--sage); text-transform: uppercase; letter-spacing: 0.06em; }

/* Location card */
.location-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.location-card .map-strip {
  height: 8px;
  background: linear-gradient(90deg, var(--sage), var(--coral));
}
.location-card .body { padding: 26px; }
.location-card dl {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.location-card dt {
  color: var(--sage);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  margin-top: 12px;
}
.location-card dd { margin: 2px 0 0; color: var(--ink); }

/* Insurance list */
.insurance-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 700px) { .insurance-list { grid-template-columns: 1fr; } }
.insurance-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  font-weight: 500;
}
.insurance-list li svg { width: 20px; height: 20px; color: var(--sage); flex-shrink: 0; }

/* Testimonial strip */
.testimonial {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
}
.testimonial p { color: rgba(255,255,255,0.88); font-style: italic; font-size: 1.05rem; }
.testimonial .who { font-family: var(--font-mono); font-size: 0.78rem; color: var(--sage-light); }

/* Forms */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.field input, .field textarea {
  border: 1.5px solid var(--sage-light);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--mint-bg);
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  border-color: var(--sage);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 140px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

.alert-success {
  background: var(--sage-light);
  color: var(--ink);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-weight: 500;
}
.alert-error {
  background: #FBE3DE;
  color: var(--coral-dark);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.alert-error ul { margin: 6px 0 0 18px; padding: 0; }

.contact-split {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 32px;
}
@media (max-width: 900px) { .contact-split { grid-template-columns: 1fr; } }
.contact-info-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
}
.contact-info-card h3 { color: #fff; }
.contact-info-card .line { display: flex; gap: 12px; margin: 18px 0; align-items: flex-start; }
.contact-info-card .line svg { width: 20px; height: 20px; color: var(--sage-light); flex-shrink: 0; margin-top: 3px; }
.contact-info-card a { border-bottom: 1px solid rgba(255,255,255,0.35); }
.contact-info-card a:hover { border-color: var(--coral); }

/* Footer area */
.footer-services {
  padding: 56px 0 48px;
  background: var(--mint-bg);
}
.footer-services-header {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 36px;
}
.footer-services-header h2 { margin-bottom: 0; }
.footer-services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 960px) {
  .footer-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-services-grid { grid-template-columns: 1fr; }
}
.footer-service-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.footer-service-image {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.footer-service-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.footer-service-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.footer-service-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 500;
}

.site-footer {
  background: linear-gradient(180deg, var(--ink) 0%, #133934 100%);
  color: rgba(255, 255, 255, 0.82);
  padding: 0 0 28px;
}
.site-footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}
.footer-menu a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.footer-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.9fr;
  gap: 40px;
  padding: 48px 0 36px;
  align-items: start;
}
@media (max-width: 960px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-main { grid-template-columns: 1fr; }
}
.footer-brand p {
  margin: 16px 0 0;
  max-width: 300px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
.footer-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 260px;
  border-radius: 8px;
}
.footer-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 640px) {
  .footer-locations { grid-template-columns: 1fr; }
}
.footer-location h4,
.footer-connect h4 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
}
.footer-location p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.footer-location a {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.footer-location a:hover { border-color: var(--coral); color: var(--coral); }

.footer-connect {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-social-row {
  display: flex;
  gap: 10px;
}
.footer-social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.footer-social-row a:hover { background: var(--coral); }
.footer-social-row svg { width: 18px; height: 18px; }
.footer-email {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
}
.footer-email:hover { color: var(--coral); }
.footer-cta {
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 0.88rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.visit-us-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 800px) { .visit-us-grid { grid-template-columns: 1fr; } }
.visit-map-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.visit-map-card iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}
.visit-map-body { padding: 20px 22px; }
.visit-map-body h3 { margin-bottom: 8px; }
.visit-map-body p { margin: 0 0 10px; font-size: 0.95rem; }
.visit-hours {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 26px;
}
.visit-hours h3 { margin-bottom: 14px; }
.visit-hours ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 360px;
}
.visit-hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sage-light);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.visit-directions {
  display: inline-block;
  margin-top: 16px;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.92rem;
}
.visit-directions:hover { color: var(--coral-dark); }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: background 0.15s ease, transform 0.15s ease;
}
.back-to-top:hover { background: var(--ink); transform: translateY(-2px); }
.back-to-top svg { width: 20px; height: 20px; }

/* Admin */
.admin-body { background: var(--mint-bg); min-height: 100vh; }
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 32px;
}
.admin-login-header { text-align: center; margin-bottom: 24px; }
.admin-login-logo { height: 56px; width: auto; margin: 0 auto 16px; display: block; }
.admin-login-header h1 { margin-bottom: 6px; }
.admin-login-header p { margin: 0; color: var(--ink-70); }
.admin-login-form { display: grid; gap: 16px; }
.admin-remember label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.admin-login-btn { width: 100%; justify-content: center; }
.admin-login-footer { margin: 20px 0 0; text-align: center; font-size: 0.9rem; }

.admin-shell { min-height: 100vh; }
.admin-topbar {
  background: var(--ink);
  color: #fff;
  padding: 14px 0;
}
.admin-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-topbar-logo { height: 40px; width: auto; }
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-user { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.admin-logout-btn { padding: 8px 14px; font-size: 0.85rem; }
.admin-main { padding: 40px 0 56px; }
.admin-page-header { margin-bottom: 28px; }
.admin-page-header p { margin: 0; }
.admin-cards .card { display: flex; flex-direction: column; gap: 12px; }
.admin-cards .btn { align-self: flex-start; }

.admin-subnav {
  background: var(--paper);
  border-bottom: 1px solid var(--sage-light);
}
.admin-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.admin-subnav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.admin-subnav a:hover { background: var(--mint-bg); color: var(--ink); }
.admin-subnav a.active {
  background: var(--ink);
  color: #fff;
}

.admin-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 800px) {
  .admin-highlight-grid { grid-template-columns: 1fr; }
}
.admin-highlight-card { display: flex; flex-direction: column; gap: 14px; }
.admin-highlight-preview .footer-service-image {
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-50);
}
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
