/* ============================================================
   Mend — shared site styles
   Consolidated from per-page inline CSS on 2026-06-10 (final QA pass).
   Reference standard: index.html (tokens, type scale, header/footer).
   Page-specific sections remain in each page's own <style> block,
   which loads AFTER this file and may override contextual colors
   (e.g. what-we-treat's gold hero, insurance's blue top band).
   ============================================================ */

@font-face{
  font-family:'PP Grafier';
  src:url('fonts/PPGrafier-Regular.woff2') format('woff2'),
      url('fonts/PPGrafier-Regular.woff') format('woff');
  font-weight:400;font-style:normal;font-display:swap;
}

:root{
  --cream:#ECE8E1; --paper:#FAF9F5; --blue:#5D7C96; --blue-deep:#4C6379; --sage:#C3C8B4;
  --slate:#3E4C57; --ink:#26261F; --grey:#D7D7D2; --white:#fff;
  --error:#8C2F21; /* form errors (contact) — ~6.7:1 on cream */
  --content:1080px; --gutter:clamp(24px,5vw,40px);
  --serif:'PP Grafier',Georgia,serif;
  --sans:'Figtree',system-ui,-apple-system,sans-serif;
  --line-dark:rgba(236,232,225,.30);
  --line-light:rgba(38,38,31,.22);
}
/* NOTE: --blue #5D7C96 is decorative fills only (hero overlay, bands with extra shade).
   All text/buttons/footer use --blue-deep #4C6379 (5.1:1 on cream = AA). */

*{box-sizing:border-box;margin:0;padding:0;letter-spacing:normal}
html{scroll-behavior:smooth}
body{background:var(--cream);color:var(--ink);font-family:var(--sans);font-weight:300;
  font-size:clamp(16px,1.6vw,20px);line-height:1.3;-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}

/* ---- accessibility ---- */
.skip{position:absolute;left:-9999px;top:0;z-index:100;background:var(--ink);color:var(--cream);
  padding:12px 18px;border-radius:0 0 4px 0;font-weight:600}
.skip:focus{left:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}
a:focus-visible,button:focus-visible{outline:3px solid var(--blue-deep);outline-offset:3px;border-radius:1px}
input:focus-visible,textarea:focus-visible{outline:3px solid var(--blue-deep);outline-offset:2px}
.hero a:focus-visible,.dark a:focus-visible,.topband a:focus-visible,
.foot a:focus-visible,.foot button:focus-visible,
.topbar a:focus-visible,.topbar button:focus-visible,.mobile-nav a:focus-visible{outline-color:var(--cream)}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
.band{width:100%}
.inner{max-width:var(--content);margin-inline:auto;padding-inline:var(--gutter)}

/* ---- type scale (measured off live site; see BUILD-NOTES) ---- */
.ac{font-family:var(--serif);font-weight:400}
.h-sec{font-family:var(--sans);font-weight:300;font-size:clamp(38px,5.4vw,64px);line-height:1.09}
.t30{font-size:clamp(21px,2.6vw,30px);line-height:1.2}
.t24{font-size:clamp(18px,2vw,24px);line-height:1.17}
.t20{font-size:clamp(16px,1.6vw,20px);line-height:1.3}
.label{font-weight:600;font-size:clamp(16px,1.6vw,20px);line-height:1.1}

/* ---- buttons ---- */
.btn{display:inline-block;font-weight:700;text-transform:uppercase;font-size:12px;
  padding:13px 22px;border-radius:2px;transition:transform .2s,opacity .2s;
  border:0;cursor:pointer;font-family:var(--sans)}
.btn:hover{transform:translateY(-1px)}
.btn-blue{background:var(--blue-deep);color:var(--cream)}
.btn-ghost{border:1px solid rgba(236,232,225,.6);color:var(--cream)}

/* ---- logo + primary nav ---- */
.logo{font-family:var(--serif);font-size:clamp(30px,3.3vw,44px);line-height:.85;color:var(--ink)}
/* nav divider bleeds through the header's bottom padding so it TOUCHES the horizontal rule
   (negative margin = 20px header padding-bottom; padding keeps link baseline unchanged) */
.nav{display:flex;gap:clamp(18px,2.4vw,40px);font-size:clamp(14px,1.25vw,16px);font-weight:600;
  margin-bottom:-20px;padding-bottom:26px;
  align-self:stretch;align-items:flex-end;padding-left:clamp(20px,3vw,44px);border-left:1px solid var(--line-light)}
.nav a{opacity:.95}.nav a:hover{opacity:1;text-decoration:underline;text-underline-offset:4px}
.nav a[aria-current="page"]{text-decoration:underline;text-underline-offset:4px;opacity:1}
/* dark headers (home hero, insurance topband) need the light-on-dark line */
.hero-head .nav{border-left-color:var(--line-dark)}

/* dark hero/band header (index, insurance, what-we-treat) */
.hero-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  padding-top:30px;padding-bottom:20px;border-bottom:1px solid var(--line-dark)}

/* light subpage header (contact, about-team) */
.page-head .inner{position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  padding-top:30px;padding-bottom:20px}
/* A15: bottom hairline must stop at the gutter-inset content edge (logo-left → nav-right),
   not overhang into the gutters. .inner IS the padded container here, so inset by --gutter. */
.page-head .inner::after{content:"";position:absolute;bottom:0;left:var(--gutter);right:var(--gutter);
  height:1px;background:var(--line-light)}

/* page title block (contact, about-team) */
.page-title{padding-top:clamp(28px,3.5vw,44px)}
.page-title .eyebrow{font-weight:600;text-transform:uppercase;font-size:clamp(15px,1.4vw,18px);margin-bottom:6px}

/* ---- fixed mobile/tablet top bar + overlay nav ---- */
.topbar{position:fixed;top:0;left:0;right:0;z-index:50;display:none;align-items:center;justify-content:space-between;
  padding:13px var(--gutter);background:rgba(40,48,55,.86);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.topbar .logo{color:var(--cream);font-family:var(--serif);font-size:28px;line-height:.85}
.topbar .menu-btn{display:block;background:none;border:0;color:var(--cream);font-size:25px;line-height:1;cursor:pointer}
.mobile-nav{position:fixed;inset:0;z-index:49;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:30px;background:rgba(40,48,55,.97);transform:translateX(100%);visibility:hidden;
  transition:transform .3s ease,visibility .3s ease;font-weight:600;font-size:22px;color:var(--cream)}
.mobile-nav.open{transform:translateX(0);visibility:visible}
.mobile-nav a[aria-current="page"]{text-decoration:underline;text-underline-offset:5px} /* you-are-here in the mobile menu */

/* ---- footer ---- */
.foot{background:var(--blue-deep);color:var(--cream);padding-block:clamp(44px,5vw,72px)}
.foot .logo{color:var(--cream)}
/* A10: full-width hairline directly above the footer grid; col-mid verticals hang from it */
/* footer rule sits BELOW the columns; col-mid verticals stretch down to land on it */
.foot .grid-f{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:clamp(24px,4vw,56px);align-items:start;
  border-bottom:1px solid var(--line-dark);padding-bottom:clamp(24px,3vw,40px)}
.foot .col .foot-h{font-family:var(--serif);font-weight:400;font-size:clamp(24px,2.7vw,30px);line-height:1.2;margin-bottom:22px}
.foot .fnav{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}
.foot .fnav a[aria-current="page"]{text-decoration:underline;text-underline-offset:4px}
.foot .meta{line-height:1.4}
/* A11: footer nav + address meta 2–4px smaller (cream on blue-deep stays ≥4.5:1) */
.foot .fnav a,.foot .meta{font-size:clamp(14px,1.3vw,17px)}
.foot .actions{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.foot .contact{line-height:1.4}
.foot .copyright{font-size:13px;margin-top:clamp(30px,4vw,48px)} /* was opacity:.75 — 3.5:1 AA fail; full cream = 5.1:1 */
.col-mid{border-left:1px solid var(--line-dark);border-right:1px solid var(--line-dark);
  padding-inline:clamp(20px,3vw,44px);
  align-self:stretch;margin-bottom:calc(-1*clamp(24px,3vw,40px));padding-bottom:clamp(24px,3vw,40px)} /* verticals reach the bottom rule */

/* ---- shared responsive ---- */
@media(max-width:820px){
  .topbar{display:flex}
  .hero-head,.page-head{display:none}
  .foot .grid-f{grid-template-columns:1fr}
  .col-mid{border:0;padding-inline:0}
}

/* ============================================================
   ANIMATIONS — scroll-reveal (added 2026-06-11)
   Initial-hidden states are double-gated: html.js (no flash/lock
   when JS is off) + prefers-reduced-motion:no-preference (the
   global reduced-motion rule above kills transitions, so without
   this gate elements would stay stuck at opacity:0). One shared
   easing; transforms/opacity only — no layout properties.
   ============================================================ */
@media(prefers-reduced-motion:no-preference){
  /* single-element reveal */
  html.js [data-reveal]{
    opacity:0;
    transition:opacity 1.1s cubic-bezier(.25,.6,.3,1),
               transform 1.1s cubic-bezier(.25,.6,.3,1);
    will-change:opacity,transform;
  }
  html.js [data-reveal="fade"]{
    transition:opacity 1.4s cubic-bezier(.25,.6,.3,1);
  }
  html.js [data-reveal="rise"]{transform:translateY(22px)}
  html.js [data-reveal="slide-l"]{transform:translateX(-26px)}
  html.js [data-reveal="slide-r"]{transform:translateX(26px)}
  html.js [data-reveal="photo"]{
    transform:scale(1.04);
    transition:opacity 1.6s cubic-bezier(.25,.6,.3,1),
               transform 1.6s cubic-bezier(.25,.6,.3,1);
  }
  html.js [data-reveal].is-in{opacity:1;transform:none}

  /* staggered group reveal — direct children animate in sequence */
  html.js [data-reveal-group] > *{
    opacity:0;
    transform:translateY(18px);
    transition:opacity .9s cubic-bezier(.25,.6,.3,1),
               transform .9s cubic-bezier(.25,.6,.3,1);
    will-change:opacity,transform;
  }
  html.js [data-reveal-group].is-in > *{opacity:1;transform:none}
  html.js [data-reveal-group].is-in > *:nth-child(1){transition-delay:0ms}
  html.js [data-reveal-group].is-in > *:nth-child(2){transition-delay:120ms}
  html.js [data-reveal-group].is-in > *:nth-child(3){transition-delay:240ms}
  html.js [data-reveal-group].is-in > *:nth-child(4){transition-delay:360ms}
  html.js [data-reveal-group].is-in > *:nth-child(5){transition-delay:480ms}
  html.js [data-reveal-group].is-in > *:nth-child(n+6){transition-delay:600ms}
}
