/* =============================================================================
   ADVANCED INTEGRATIVE PHYSICAL THERAPY
   Shared site stylesheet
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Brand palette — cornflower blue with cream and bronze accents */
  --cream: #f5f3ef;
  --cream-soft: #faf8f4;
  --cream-warm: #ede8db;
  --primary: #3a6ea5;         /* Cornflower — primary brand color */
  --primary-dark: #2c5282;    /* Deeper cornflower for emphasis */
  --primary-soft: #6e96be;    /* Mid-tone for secondary text */
  --primary-pale: #c8d8ea;    /* Pale tint for backgrounds & dividers */
  --bronze: #8b6f47;
  --bronze-light: #c9bda4;
  --ink: #1a1a1a;
  --charcoal: #4a4a4a;
  --muted: #6b665c;
  --rule: #b8b0a0;

  /* Legacy aliases — kept so existing component CSS keeps working */
  --forest: var(--primary);
  --forest-soft: var(--primary-soft);
  --forest-pale: var(--primary-pale);
  --cornflower: var(--primary);

  /* Type */
  --serif: 'Spectral', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --max-width: 1180px;
  --section-pad: clamp(60px, 8vw, 120px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography ============================================================== */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 500;
}

h4 {
  font-size: 1.1rem;
  font-weight: 500;
}

p { margin-bottom: 1.2em; max-width: 65ch; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

a {
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid var(--bronze-light);
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover { border-color: var(--bronze); color: var(--bronze); }

/* Eyebrow / small caps labels — Inter, bronze, letter-spaced */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.2em;
  display: inline-block;
}

/* Bronze hairline divider */
.rule {
  width: 32px;
  height: 1px;
  background: var(--bronze);
  margin: 1.4em 0;
  border: 0;
}

.rule-center { margin-left: auto; margin-right: auto; }

/* Layout ================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px);
}

section {
  padding: var(--section-pad) 0;
}

/* Avoid doubled padding when two content sections meet, but page-header
   should still let the following section have full top padding so content
   doesn't sit flush against the divider. */
section + section { padding-top: 0; }
.page-header + section { padding-top: var(--section-pad); }

/* Header / Navigation ===================================================== */

.site-header {
  background: var(--cream);
  padding: 22px 0;
  border-bottom: 1px solid var(--cream-warm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(245, 243, 239, 0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  color: var(--forest);
}

.site-header .logo:hover { color: var(--bronze); }
.site-header .logo:hover svg circle { stroke: var(--bronze); }
.site-header .logo:hover svg text { fill: var(--bronze); }
.site-header .logo:hover svg line { stroke: var(--bronze); }
.site-header .logo svg circle,
.site-header .logo svg text,
.site-header .logo svg line { transition: all 0.2s ease; }

.site-header .logo-text {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.site-header .logo-text .sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 500;
  margin-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  border: 0;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after,
.site-nav a.current::after {
  transform: scaleX(1);
}

.site-nav a:hover { color: var(--ink); }

.btn-book {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: var(--forest);
  color: var(--cream);
  border: 1px solid var(--forest);
  border-radius: 0;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-book:hover {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

/* Mobile nav */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.mobile-nav-toggle svg { width: 24px; height: 24px; stroke: var(--forest); }

@media (max-width: 820px) {
  .site-nav { display: none; gap: 18px; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--cream-soft);
    padding: 24px;
    border-bottom: 1px solid var(--cream-warm);
    align-items: flex-start;
  }
  .mobile-nav-toggle { display: block; }
  .site-header .logo-text { font-size: 0.85rem; }
}

/* Hero ==================================================================== */

.hero {
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 10vw, 120px) 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 0.6em;
}

.hero-text h1 em {
  color: var(--bronze);
  font-weight: 300;
}

.hero-lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--charcoal);
  max-width: 32em;
  margin-bottom: 2em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 0;
  border: 1px solid var(--forest);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--forest);
  color: var(--cream);
}

.btn-primary:hover {
  background: transparent;
  color: var(--forest);
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--bronze);
}

.btn-secondary:hover {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

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

.hero-mark svg {
  width: min(100%, 320px);
  height: auto;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mark { order: -1; }
  .hero-mark svg { width: 200px; }
}

/* Generic section types =================================================== */

.section-light { background: var(--cream); }
.section-warm { background: var(--cream-warm); }
.section-soft { background: var(--cream-soft); }
.section-dark { background: var(--forest); color: var(--cream); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark .pull-quote { color: var(--cream); }
.section-dark .pull-quote::before { background: var(--bronze-light); }
.section-dark .eyebrow { color: var(--bronze-light); }
.section-dark a { color: var(--cream); border-color: var(--bronze); }
.section-dark a:hover { color: var(--bronze-light); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 70px) auto;
}

.section-header .rule { margin: 1.4em auto; }

.section-header p {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--charcoal);
  font-weight: 300;
}

/* Two-column content ====================================================== */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.two-col-narrow {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

@media (max-width: 820px) {
  .two-col, .two-col-narrow { grid-template-columns: 1fr; gap: 40px; }
}

/* Story grid (portrait + bio) ============================================ */

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(36px, 5vw, 70px);
  align-items: start;
}

.story-portrait {
  margin: 0;
  position: relative;
}

.story-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.92);
}

/* Bronze hairline accent in the bottom-right corner — echoes the
   card seal aesthetic. */
.story-portrait::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 60%;
  height: 60%;
  border-right: 1px solid var(--bronze);
  border-bottom: 1px solid var(--bronze);
  pointer-events: none;
}

.story-text .eyebrow { margin-bottom: 1em; }

@media (max-width: 820px) {
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .story-portrait img { aspect-ratio: 4 / 5; max-width: 360px; margin: 0 auto; }
  .story-portrait::after { display: none; }
}

/* Feature image (with caption) =========================================== */

.feature-image {
  margin: 0 0 clamp(50px, 6vw, 80px) 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.feature-image img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.9);
}

.feature-image figcaption {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 300;
  color: var(--charcoal);
  text-align: center;
  margin-top: 1em;
  padding: 0 8%;
  line-height: 1.55;
}

/* Card grids ============================================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.card {
  background: var(--cream-soft);
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--cream-warm);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: var(--bronze-light);
  transform: translateY(-2px);
}

.card .eyebrow {
  font-size: 0.65rem;
  margin-bottom: 1em;
}

.card h3 { margin-bottom: 0.6em; }
.card p { font-size: 0.95rem; }

/* Conditions list ========================================================= */

.conditions {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 32px;
  margin: 1.6em 0;
}

.conditions li {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
  line-height: 1.4;
}

.conditions li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 1px;
  background: var(--bronze);
}

/* Quote / pull ============================================================ */

.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  color: var(--forest);
  max-width: 28em;
  margin: 0 auto;
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 0;
}

.pull-quote::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--bronze);
  margin: 0 auto 2em auto;
}

/* Numbered list (process steps) =========================================== */

.steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 28px;
}

.steps li {
  counter-increment: step;
  padding: 0 0 28px 70px;
  position: relative;
  border-bottom: 1px solid var(--cream-warm);
}

.steps li:last-child { border-bottom: 0; padding-bottom: 0; }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -4px;
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--bronze);
  line-height: 1;
}

.steps li h3 { margin-bottom: 0.4em; font-size: 1.2rem; }
.steps li p { font-size: 0.98rem; margin-bottom: 0; }

/* Contact block =========================================================== */

.contact-list {
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 80px 1px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-warm);
}

.contact-list li:last-child { border-bottom: 0; }

.contact-list .label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  text-align: right;
}

.contact-list .sep {
  width: 1px;
  height: 14px;
  background: var(--bronze-light);
  justify-self: center;
}

.contact-list .value {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.contact-list .value a {
  border: 0;
  color: var(--ink);
}

.contact-list .value a:hover { color: var(--bronze); }

/* Form ==================================================================== */

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 6px;
  display: block;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  font-family: var(--serif);
  font-size: 1rem;
  width: 100%;
  padding: 12px 14px;
  background: var(--cream-soft);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--forest);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form button {
  justify-self: start;
  margin-top: 8px;
}

.form-success {
  display: none;
  padding: 24px;
  background: var(--forest-pale);
  border-left: 3px solid var(--forest);
  color: var(--forest);
}

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

/* Footer ================================================================== */

.site-footer {
  background: var(--forest);
  color: var(--cream);
  padding: 70px 0 28px 0;
  margin-top: clamp(60px, 8vw, 120px);
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(30px, 4vw, 60px);
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(245, 243, 239, 0.15);
}

.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-light);
  margin-bottom: 18px;
}

.site-footer ul { list-style: none; }

.site-footer ul li {
  font-family: var(--serif);
  font-size: 0.98rem;
  margin-bottom: 8px;
  line-height: 1.45;
}

.site-footer a {
  color: var(--cream);
  border-color: rgba(139, 111, 71, 0.5);
}

.site-footer a:hover {
  color: var(--bronze-light);
  border-color: var(--bronze-light);
}

.site-footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.site-footer .footer-brand .seal svg {
  width: 60px;
  height: 60px;
}

.site-footer .footer-brand p {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--cream);
  font-weight: 300;
  max-width: 30ch;
  line-height: 1.5;
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(245, 243, 239, 0.55);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 820px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Page header (for non-home pages) ======================================== */

.page-header {
  padding: clamp(110px, 12vw, 140px) 0 clamp(50px, 5vw, 70px) 0;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--rule);
}

.page-header .eyebrow { margin-bottom: 1em; }
.page-header h1 { margin-bottom: 0.4em; }

.page-header .lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  font-weight: 300;
  color: var(--charcoal);
  max-width: 42em;
}

/* Stat / number callouts ================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(28px, 4vw, 60px);
  padding: clamp(40px, 5vw, 70px) 0;
  border-top: 1px solid var(--cream-warm);
  border-bottom: 1px solid var(--cream-warm);
}

.stat {
  text-align: center;
}

.stat .num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 300;
  color: var(--forest);
  line-height: 1;
  display: block;
}

.stat .num em {
  font-style: italic;
  color: var(--bronze);
}

.stat .label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
  display: block;
}

/* Editor note (development only) ========================================== */

.editor-note {
  background: rgba(139, 111, 71, 0.08);
  border-left: 3px solid var(--bronze);
  padding: 18px 24px;
  margin: 24px 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--charcoal);
  font-style: italic;
}

.editor-note strong {
  font-style: normal;
  color: var(--bronze);
  font-weight: 600;
}

/* Reveal animations ======================================================= */

/* Default: content is visible. JavaScript adds .js-reveal-active to enable
   the hidden-until-scrolled behavior. If JS fails or is slow, content
   still appears normally. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-reveal-active .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js-reveal-active .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .js-reveal-active .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
