/* =========================================================================
   ACCESSIBLE PHYSICAL THERAPY — Pensacola, FL
   "Therapy Within Reach."
   Palette: Gulf Coast clinical-warm — teal + warm sand + amber accent
   Type:    Fraunces (display) · Inter Tight (body) · JetBrains Mono (labels)
   Brand tokens:  --reach (teal) · --gulf (deep navy) · --ember (amber spot)
   ========================================================================= */

:root {
  /* ---- Brand tokens ---- */
  --reach:        #2E8B74;   /* primary teal — brand anchor */
  --reach-deep:   #1E6557;   /* AA-safe on white for small text / hovers */
  --reach-tint:   #D0EDE6;   /* light teal tint / placeholders */

  --gulf:         #1B3247;   /* deep coastal navy — body text + dark bands */
  --gulf-mid:     #2E4A60;   /* mid-range for dark band elements */
  --gulf-mute:    #4D5E6E;   /* muted body text — AA on sand */

  --ember:        #D47A42;   /* warm amber — spot colour CTAs + headings */
  --ember-deep:   #B36030;   /* deeper amber for hover / emphasis */
  --ember-tint:   #F7E0CB;   /* light amber tint */

  --sand:         #F6F2EB;   /* page background — warm sand */
  --sand-soft:    #EDE8DF;   /* soft panel background */
  --sand-rule:    #D9D2C6;   /* hairline borders */
  --white:        #FFFFFF;

  /* ---- Mapped structure tokens (CSS uses these) ---- */
  --bone:         var(--sand);
  --bone-soft:    var(--sand-soft);
  --sage:         var(--reach);
  --sage-deep:    var(--gulf);
  --sage-tint:    var(--reach-tint);
  --terra:        var(--ember);
  --terra-deep:   var(--ember-deep);
  --terra-tint:   var(--ember-tint);
  --ink:          var(--gulf);
  --ink-mute:     var(--gulf-mute);
  --rule:         var(--sand-rule);

  /* ---- Dark-band overrides (used in .philosophy section) ---- */
  --slate:        var(--gulf);
  --slate-deep:   #122336;
  --cyan:         var(--reach);
  --cyan-deep:    var(--reach-deep);
  --cyan-tint:    var(--reach-tint);

  /* ---- Typography ---- */
  --f-display: "Fraunces", "Tiempos Headline", "Times New Roman", Georgia, serif;
  --f-body:    "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Spacing + layout ---- */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 9vw, 144px);

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-soft: 0 1px 2px rgba(27,50,71,.05), 0 18px 40px -28px rgba(27,50,71,.20);
  --shadow-card: 0 1px 1px rgba(27,50,71,.05), 0 36px 72px -42px rgba(27,50,71,.30);
  --shadow-teal: 0 18px 44px -22px rgba(46,139,116,.55);
}

/* ---- RESET + BASE -------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ambient brand wash */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(46,139,116,.09), transparent 68%),
    radial-gradient(820px 560px at 92% 102%, rgba(27,50,71,.06), transparent 70%);
}

/* film grain (signature) */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* ---- TYPOGRAPHY ---------------------------------------------------------- */

.f-display { font-family: var(--f-display); font-weight: 360; letter-spacing: -.012em; font-variation-settings: "SOFT" 70, "WONK" 0, "opsz" 144; }
.f-italic  { font-family: var(--f-display); font-style: italic; font-weight: 360; font-variation-settings: "SOFT" 100, "opsz" 144; }
.f-mono    { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 360; letter-spacing: -.018em; margin: 0; color: var(--ink); font-variation-settings: "SOFT" 70, "opsz" 144; }
h1 { font-size: clamp(42px, 6vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.06; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.18; }
h4 { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.3; }

p  { margin: 0 0 1em; }
.lead  { font-size: clamp(17px, 1.4vw, 20.5px); line-height: 1.55; color: var(--ink); }
.muted { color: var(--ink-mute); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--sage-deep);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--sage); }
.eyebrow--dot::before { width: 8px; height: 8px; border-radius: 50%; background: var(--reach); }
.kicker--terra { color: var(--terra-deep); }
.kicker--terra::before { background: var(--terra); }

/* ---- LAYOUT -------------------------------------------------------------- */

.wrap, .container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.section { padding: var(--section-y) 0; position: relative; }
.section--bone      { background: var(--bone); }
.section--bone-soft { background: var(--bone-soft); }
.section--ink       { background: var(--ink); color: var(--bone); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--bone); }
.section--sage      { background: var(--sage-deep); color: var(--bone); }
.section--sage h1, .section--sage h2, .section--sage h3, .section--sage h4 { color: var(--bone); }

.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--rule); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  margin: 0 0 24px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.grid { display: grid; gap: clamp(20px, 2.4vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- NAV ----------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,242,235,.84); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: padding .3s ease, box-shadow .3s ease, background .3s ease;
}
.nav.is-scrolled { box-shadow: 0 10px 30px -22px rgba(27,50,71,.35); background: rgba(246,242,235,.96); }
.nav__inner { max-width: var(--container); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: padding .3s ease; }
.nav.is-scrolled .nav__inner { padding: 9px 0; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__wordmark { font-family: var(--f-display); font-size: 16px; font-weight: 400; color: var(--ink); letter-spacing: -.01em; }
.nav__mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--reach); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 500; font-size: 14px; letter-spacing: .02em;
}
.nav__name { font-family: var(--f-display); font-size: 17px; line-height: 1.1; }
.nav__name small { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-mute); margin-top: 2px; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { font-size: 14.5px; color: var(--ink); position: relative; padding: 8px 0; font-weight: 450; }
.nav__links a:hover { color: var(--reach-deep); }
.nav__links a.is-active { color: var(--reach-deep); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--reach); border-radius: 2px; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--reach); color: #fff;
  padding: 11px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nav__cta:hover { background: var(--reach-deep); transform: translateY(-1px); box-shadow: var(--shadow-teal); }
.nav__cta svg { width: 15px; height: 15px; }
.nav__toggle { display: none; flex-direction: column; background: none; border: 0; padding: 8px; gap: 5px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bone); padding: 24px var(--gutter); border-bottom: 1px solid var(--rule);
  }
  .nav.is-open .nav__cta { display: inline-flex; margin-top: 12px; align-self: flex-start; }
}

/* ---- BUTTONS ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 500; letter-spacing: .005em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--reach); color: #fff; box-shadow: 0 12px 30px -16px rgba(46,139,116,.65); }
.btn--primary:hover { background: var(--reach-deep); transform: translateY(-2px); box-shadow: var(--shadow-teal); }
.btn--ink { background: var(--gulf); color: #fff; }
.btn--ink:hover { background: var(--reach-deep); }
.btn--ember { background: var(--ember); color: #fff; font-weight: 600; }
.btn--ember:hover { background: var(--ember-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--bone { background: #fff; color: var(--ink); }
.btn--bone:hover { background: var(--reach-tint); }

/* ---- BADGE --------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--reach-tint); color: var(--reach-deep);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid rgba(46,139,116,.22);
}
.badge svg { width: 14px; height: 14px; }

/* ---- HERO ---------------------------------------------------------------- */

.hero { position: relative; padding: clamp(28px, 4vw, 56px) 0 0; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
.hero__copy { padding-bottom: clamp(40px, 6vw, 96px); }
.hero__badge { margin-bottom: 28px; }
.hero__title {
  font-size: clamp(46px, 6.4vw, 92px);
  line-height: .98; letter-spacing: -.022em;
}
.hero__title em { font-style: italic; color: var(--ember-deep); font-variation-settings: "SOFT" 100, "opsz" 144; }
.hero__lede { margin-top: 28px; max-width: 50ch; font-size: clamp(16.5px, 1.3vw, 19px); line-height: 1.55; color: var(--ink-mute); }
.hero__ctas { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__phone {
  font-family: var(--f-display); font-size: 22px; color: var(--ink); margin-left: 4px;
}
.hero__phone small { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }
.hero__media {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--reach-tint);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(27,50,71,.35));
}
.hero__caption {
  position: absolute; left: 20px; bottom: 18px; z-index: 2;
  color: #fff; font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.hero__seal {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 104px; height: 104px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center; text-align: center;
  font-family: var(--f-display); line-height: 1.05; font-size: 12px;
  border: 2px solid var(--reach);
  box-shadow: 0 14px 34px -16px rgba(46,139,116,.55);
}
.hero__seal span { display: grid; place-items: center; }
.hero__seal strong { display: block; font-size: 26px; font-weight: 400; color: var(--reach-deep); letter-spacing: -.01em; }
.hero__seal small  { display: block; font-family: var(--f-mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: var(--gulf-mute); margin-top: 3px; }
.hero__seal .seal-top { font-family: var(--f-mono); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px; }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 8px; }
  .hero__media { aspect-ratio: 4 / 5; max-height: 70vh; }
}

/* ---- TRUST BAR ----------------------------------------------------------- */

.trust { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--bone-soft); }
.trust__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.trust__cell {
  padding: 28px 28px; border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px;
}
.trust__cell:last-child { border-right: 0; }
.trust__cell strong {
  font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 360; line-height: 1.05;
  color: var(--reach-deep);
}
.trust__cell span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 880px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__cell { border-right: 0; border-bottom: 1px solid var(--rule); padding: 22px 18px; }
  .trust__cell:nth-child(odd) { border-right: 1px solid var(--rule); }
  .trust__cell:last-child { border-bottom: 0; }
}

/* ---- FOOTER -------------------------------------------------------------- */

.footer { background: var(--gulf); color: var(--sand-soft); padding: 72px 0 28px; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
}
.footer h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer a { color: var(--sand-soft); opacity: .82; font-size: 14px; line-height: 1.7; }
.footer a:hover { color: var(--reach-tint); opacity: 1; }
.footer__wordmark { display: inline-flex; align-items: center; gap: 12px; }
.footer__icon { width: 32px; height: 32px; flex: 0 0 auto; }
.footer__wordmark span { font-family: var(--f-display); font-size: 18px; line-height: 1.1; color: #fff; }
.footer__wordmark small { display: block; font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--reach-tint); margin-top: 3px; opacity: .9; }
.footer__brand p { margin: 16px 0 0; color: var(--sand-soft); opacity: .7; font-size: 14px; max-width: 38ch; }
.footer__sub {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(214,209,198,.16);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(237,232,223,.5);
}
.footer__sub a { color: rgba(237,232,223,.7); }
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__sub { flex-direction: column; align-items: flex-start; }
}

/* ---- REVEALS (fail-open) ------------------------------------------------- */

.reveal { transform: translateY(14px); opacity: 1; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s ease; }
.reveal--hidden { transform: translateY(28px); opacity: 0; }
.reveal--in { transform: translateY(0); opacity: 1; }

/* ---- ACCESSIBILITY ------------------------------------------------------- */

:focus-visible { outline: 2px solid var(--reach); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- GRID BREAKPOINTS ---------------------------------------------------- */

@media (max-width: 880px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- BIG STAT NUMBER ----------------------------------------------------- */

.statnum { font-family: var(--f-display); font-weight: 380; line-height: .95; letter-spacing: -.02em; color: var(--reach-deep); font-variation-settings: "SOFT" 60, "opsz" 144; }

/* ---- IMAGE ZOOM ---------------------------------------------------------- */

.zoom { overflow: hidden; }
.zoom img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.zoom:hover img { transform: scale(1.05); }

/* ---- WILL-CHANGE HINT FOR GSAP ------------------------------------------ */
[data-anim] { will-change: transform, opacity; }

/* ---- BUTTON SIZE VARIANTS ------------------------------------------------ */
.btn--sm { padding: 10px 18px; font-size: 13.5px; }

/* ---- FOOTER (new multi-col structure) ------------------------------------ */

.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(24px, 4vw, 64px); padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__mark { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--reach); color: #fff; font-family: var(--f-display); font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.footer__tagline { font-family: var(--f-display); font-size: 20px; color: #fff; margin: 0 0 8px; }
.footer__sub { color: rgba(237,232,223,.6); font-size: 13.5px; line-height: 1.6; margin: 0; }
.footer__nav ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.footer__nav li a { color: rgba(237,232,223,.75); font-size: 14.5px; line-height: 1.6; transition: color .2s; }
.footer__nav li a:hover { color: var(--reach-tint); }
.footer__contact { display: flex; flex-direction: column; gap: 8px; }
.footer__contact a { color: rgba(237,232,223,.75); font-size: 14.5px; transition: color .2s; }
.footer__contact a:hover { color: var(--reach-tint); }
.footer__locations { color: rgba(237,232,223,.55); font-size: 13px; line-height: 1.6; margin: 4px 0 0; }
.footer__bottom { padding-top: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.footer__bottom p { font-size: 12.5px; color: rgba(237,232,223,.45); line-height: 1.55; margin: 0; max-width: 70ch; }
.footer__credit { font-size: 12px; color: rgba(237,232,223,.35); white-space: nowrap; }
.footer__credit a { color: rgba(237,232,223,.45); }
.footer__credit a:hover { color: var(--reach-tint); }
@media (max-width: 880px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__inner { grid-template-columns: 1fr; } .footer__bottom { flex-direction: column; } }

/* ---- SELECTION + SCROLLBAR ----------------------------------------------- */
::selection { background: var(--reach); color: #fff; }
