/* ============================================================
   CAPITAL PODIATRY CENTRE — DESIGN SYSTEM v2
   Extracted from the draft landing page.
   Editorial serif · deep forest + sage · cream · organic shapes
   ============================================================ */

/* ---- FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* Boston — Capital Podiatry brand font (logo typeface) */
@font-face {
  font-family: 'Boston';
  src: url('fonts/Boston-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Boston';
  src: url('fonts/Boston-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* --- Forest greens (deep, desaturated) --- */
  --forest-900: #1A2B1D;   /* hero / dark sections — brand dark green */
  --forest-800: #233323;
  --forest-700: #314330;

  /* --- Green scale (muted olive-green) --- */
  --green-50:  #eef1e9;
  --green-100: #dce4d2;
  --green-200: #c0cdb0;
  --green-300: #9fb189;
  --green-400: #84996d;
  --green-500: #6c8553;   /* PRIMARY button green */
  --green-600: #5c7547;
  --green-700: #4a5f3a;
  --green-800: #3a4a2e;

  /* --- Sage (accent · italics · eyebrows) --- */
  --sage-200: #cdd8c1;
  --sage-300: #aebd9d;
  --sage-400: #93a781;   /* accent sage */
  --sage-500: #7e9369;

  /* --- Warm neutrals --- */
  --ink-900: #21271f;
  --ink-700: #3c453a;
  --ink-500: #616c5d;
  --ink-300: #9aa394;
  --line:    #e6e7df;
  --line-strong: #d6d8cc;
  --cream:   #f3f1e8;     /* warm section bg */
  --sand:    #eceee5;     /* cool pale-green section bg */
  --paper:   #faf9f4;
  --white:   #ffffff;

  /* --- Semantic --- */
  --bg:        var(--paper);
  --surface:   var(--white);
  --text:      var(--ink-900);
  --text-soft: var(--ink-500);
  --primary:   var(--brand-teal);
  --accent:    var(--sage-400);
  /* brand sage green (logo) for primary actions */
  --brand-teal: #a6ccb3;
  --brand-teal-dark: #8fbd9f;

  /* --- Type --- */
  --font-serif: 'Boston', 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-sans:  'Boston', 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;

  /* --- Radius (squared, restrained) --- */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* --- Shadow --- */
  --shadow-sm: 0 1px 2px rgba(26,38,26,.05), 0 1px 3px rgba(26,38,26,.05);
  --shadow-md: 0 8px 22px rgba(26,38,26,.08), 0 2px 6px rgba(26,38,26,.05);
  --shadow-lg: 0 28px 56px rgba(26,38,26,.14), 0 8px 18px rgba(26,38,26,.06);

  /* --- Spacing (8pt) --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* --- Organic blob shapes --- */
  --blob-a: 62% 38% 46% 54% / 58% 42% 58% 42%;
  --blob-b: 48% 52% 40% 60% / 55% 45% 55% 45%;
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { font-family: var(--font-serif); font-weight: 500; line-height: 1.1; margin: 0; color: var(--ink-900); letter-spacing: -.005em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--green-600); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }
.ital { font-style: italic; color: var(--sage-500); font-weight: 500; }

/* ============================================================
   3. TYPOGRAPHIC SCALE (serif display, sans text)
   ============================================================ */
.t-display { font-family: var(--font-serif); font-weight: 500; font-size: clamp(44px, 6.2vw, 76px); line-height: 1.04; letter-spacing: -.01em; }
.t-h1 { font-family: var(--font-serif); font-weight: 500; font-size: 46px; line-height: 1.08; }
.t-h2 { font-family: var(--font-serif); font-weight: 500; font-size: 36px; line-height: 1.12; }
.t-h3 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.18; }
.t-h4 { font-family: var(--font-sans); font-weight: 600; font-size: 17px; letter-spacing: -.005em; }
.t-lead { font-family: var(--font-sans); font-size: 19px; line-height: 1.6; color: var(--ink-700); font-weight: 400; }
.t-body { font-size: 16px; line-height: 1.62; }
.t-small { font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.t-eyebrow {
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green-700);
}
.t-mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; letter-spacing: -.01em; }

/* Eyebrow with thin rule (as in the draft) */
.eyebrow-rule { display: inline-flex; flex-direction: column; gap: 10px; }
.eyebrow-rule::after { content:""; width: 46px; height: 2px; background: var(--sage-400); border-radius: 2px; }

/* ============================================================
   4. BUTTONS (squared · uppercase · tracked)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 15px 26px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, box-shadow .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* ---------- Accessibility: skip link + visible keyboard focus ---------- */
.skip-link {
  position: absolute; left: 12px; top: -52px; z-index: 100;
  background: var(--forest-900); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm);
  font-family: var(--font-sans); font-weight: 600; font-size: 13px;
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
.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;
}
#main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; border-radius: 3px; }
/* lighter ring on dark sections where the green ring would vanish */
.site-header :focus-visible,
.footer :focus-visible,
.mobile-menu :focus-visible,
.nav-dd-menu :focus-visible,
.skip-link:focus-visible,
.sub-cta-inner :focus-visible { outline-color: var(--sage-300); }
.btn-primary { background: var(--brand-teal); color: var(--forest-900); }
.btn-primary:hover { background: var(--brand-teal-dark); box-shadow: var(--shadow-md); color: var(--forest-900); }
.btn-outline { background: transparent; color: var(--ink-900); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--green-500); color: var(--green-600); }
/* on dark backgrounds */
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost { background: transparent; color: var(--green-600); padding-left: 0; padding-right: 0; }
.btn-lg { font-size: 13px; padding: 17px 32px; }
.btn-sm { font-size: 11px; padding: 11px 18px; letter-spacing: .1em; }
.btn .arrow { transition: transform .2s ease; font-size: 1.1em; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   5. FORM CONTROLS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.input, .textarea, .select {
  font-family: var(--font-sans); font-size: 15px; color: var(--ink-900);
  background: var(--white); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 12px 15px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(108,133,83,.16);
}
.textarea { resize: vertical; min-height: 96px; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--green-500); }

/* ============================================================
   6. CARDS & SURFACES
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-6); box-shadow: var(--shadow-sm); }
.card-cream { background: var(--cream); border-color: #e6e3d6; }
.card-sand  { background: var(--sand); border-color: #dde0d4; }
.card-dark  { background: var(--forest-900); border-color: var(--forest-900); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--green-50); color: var(--green-700); }
.pill-dark { background: rgba(255,255,255,.12); color: #fff; }

/* ============================================================
   7. ICON CIRCLE (line icon in pale disc)
   ============================================================ */
.ico-circle { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--sand); color: var(--green-600); border: 1px solid var(--line); }
.ico-circle svg { width: 28px; height: 28px; }
.ico { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   8. ORGANIC PHOTO SHAPES
   ============================================================ */
.photo {
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, #e7ebe3 0 14px, #eef1ea 14px 28px);
  display: grid; place-items: center;
}
.photo::after {
  content: attr(data-label);
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; letter-spacing: .03em;
  color: #899583; background: rgba(255,255,255,.72); padding: 5px 11px; border-radius: 999px; text-align: center;
}
.photo-dark { background: repeating-linear-gradient(135deg, var(--forest-800) 0 14px, var(--forest-900) 14px 28px); }
.photo-dark::after { color: #c2cdb8; background: rgba(26,38,26,.5); }
.shape-rounded { border-radius: var(--r-lg); }
.shape-blob-a  { border-radius: var(--blob-a); }
.shape-blob-b  { border-radius: var(--blob-b); }
/* curved-corner hero leaf (one rounded corner, like the draft) */
.shape-leaf { border-radius: var(--r-lg) var(--r-lg) 160px var(--r-lg); }

/* Boston display headings render best at SemiBold */
h1, h2, h3, h4, h5,
.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .ital { font-weight: 600; }

/* ============================================================
   10. BRAND LOGO MARK (real SVG)
   ============================================================ */
.logo-mark { display: block; height: 38px; width: auto; flex: none; }
.footer .logo-mark { height: 42px; }
.logo-lockup { display: block; height: 54px; width: auto; flex: none; }
/* Same SVG-internal-margin compensation as the footer: 30 units ≈ 13px at 54px height */
.nav-logo .logo-lockup { margin-left: -13px; }
@media (max-width: 640px) { .logo-lockup { height: 44px; } .nav-logo .logo-lockup { margin-left: -11px; } }

/* ============================================================
   PARTNERS MARQUEE (auto-scrolling carousel)
   ============================================================ */
.partner-marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.partner-track { display: flex; width: max-content; animation: partnerScroll 48s linear infinite; }
.partner-track .partner-logo {
  flex: none; margin-right: 24px;
  width: 188px; height: 80px; padding: 14px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
}
.partner-track .partner-logo img { max-height: 52px; max-width: 144px; width: auto; height: auto; object-fit: contain; display: block; }
.partner-marquee:hover .partner-track { animation-play-state: paused; }
.partner-track a.partner-logo { text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.partner-track a.partner-logo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-200); }
@keyframes partnerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .partner-track { animation: none; flex-wrap: wrap; row-gap: 18px; width: 100%; }
}

/* Images placed into shaped .photo containers (cover-fit, clipped) */
.photo.has-img::after { display: none; }
.photo.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   11. SPA TRANSITIONS (client-side routing — spa.js)
   ============================================================ */
/* No opacity fade — content paints at full opacity immediately (prevents a
   background "flash" between pages). Just a small, quick upward settle. */
/* Content swaps in place with no transform/opacity move — any motion here
   briefly reveals the page background under the fixed header (a "white gap"). */
@media (prefers-reduced-motion: no-preference) {
  .spa-in { animation: none; }
}
#spa-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--green-500); box-shadow: 0 0 8px rgba(108,133,83,.55);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: width .25s ease, opacity .3s ease;
}

/* ============================================================
   12. HEADER — SERVICES DROPDOWN
   ============================================================ */
.nav-dd { align-self: stretch; display: flex; align-items: center; position: relative; }
.dd-caret { font-size: 9px; opacity: .65; margin-left: 3px; display: inline-block; transition: transform .2s ease; }
.nav-dd:hover .dd-caret, .nav-dd:focus-within .dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--forest-800); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 8px; min-width: 226px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  box-shadow: 0 22px 48px rgba(0,0,0,.34); z-index: 60;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(4px);
}
.nav-links .nav-dd-menu a {
  display: block; padding: 9px 14px; border-radius: 7px;
  font-size: 14px; font-weight: 500; color: #cdd6c2; white-space: nowrap; transition: background .14s, color .14s;
}
.nav-links .nav-dd-menu a::after { display: none !important; }
.nav-links .nav-dd-menu a:hover { background: var(--forest-700); color: #fff; }
.nav-links .nav-dd-menu a.active { color: #fff; background: var(--forest-700); }
.nav-links .nav-dd-menu a.dd-all { font-weight: 600; color: #fff; }
.dd-sep { display: block; height: 1px; background: rgba(255,255,255,.13); margin: 6px 8px; }
/* mobile submenu */
.mobile-menu .mm-sub { padding-left: 22px; font-size: 14px; color: #b6c1a8; }
.mobile-menu .mm-sub::before { content: "›\00a0"; opacity: .55; }

/* AHS accreditation seal — real logo */
.accred img.seal { border: 0 !important; padding: 0; background: transparent; object-fit: contain; }

/* Footer lockup tagline — normalize across all pages (some use class="tag",
   some a plain nested <span>); force the "A Resonance Partner" line to its own row */
.footer .f-logo span span {
  display: block; font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--sage-300); font-weight: 600; margin-top: 4px;
}
/* Footer uses the official inverted lockup (same artwork as the header) */
/* The SVG artwork has a 30-unit internal left margin (viewBox 0→art at x=30);
   at 46px height that's ~11px — pull it back so the mark left-aligns with the blurb text */
.footer .f-logo .logo-lockup { height: 46px; width: auto; display: block; margin-left: -11px; }

/* ============================================================
   Shared page chrome — centralized out of per-page inline <style>
   (header, footer, .container). index.php keeps a small override.
   ============================================================ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ===== SHARED HEADER (centralized from page styles) ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--forest-900); transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #e2e8d8; font-size: 14.5px; font-weight: 500; transition: color .15s; position: relative; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { content:""; position:absolute; left:0; right:0; bottom:-7px; height:2px; background: var(--sage-400); border-radius:2px; }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.menu-btn span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 14px 28px 22px; background: var(--forest-800); }
.mobile-menu a { color: #e2e8d8; padding: 12px 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu .btn { margin-top: 14px; justify-content: center; }


/* ===== SHARED FOOTER (centralized from page styles) ===== */
.footer { background: var(--forest-900); color: #cdd6c2; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer h4 { font-family: var(--font-sans); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-300); margin-bottom: 16px; }
.footer a { display: block; color: #cdd6c2; font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.footer a:hover { color: #fff; }
.footer .f-logo { display: flex; align-items: center; gap: 11px; }
.footer .f-blurb { font-size: 13.5px; line-height: 1.6; color: #aab69d; margin-top: 16px; max-width: 30ch; }
.footer .socials { display: flex; gap: 12px; margin-top: 18px; }
.footer .socials a { width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; padding: 0; }
.footer .socials svg { width: 17px; height: 17px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: 12.5px; color: #93a088; flex-wrap: wrap; gap: 10px; }
.accred { display: flex; align-items: center; gap: 14px; }
.accred .seal { width: 54px; height: 54px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.25); display: grid; place-items: center; font-family: ui-monospace, monospace; font-size: 8px; color: var(--sage-300); text-align: center; line-height: 1.2; }

/* Collapse to the burger menu before the desktop nav stops fitting (the
   links + CTA need ~780px); pages also repeat this at 640px, harmlessly */
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .menu-btn { display: flex; }
  .mobile-menu.open { display: flex; }
}

/* When a CTA banner's button can't fit beside the text, drop it onto its
   own row instead of crushing the text column (footwear's long label) */
.sub-cta-inner { flex-wrap: wrap; }

/* Long CTA labels wrap on phones instead of clipping at the panel edge
   (.btn is nowrap by default; footwear's long label is the worst case).
   Hero and banner CTAs become full-width, centered buttons. */
@media (max-width: 640px) {
  .btn { white-space: normal; text-align: center; }
  .sub-cta .btn, .sub-hero .btn, .svc-cta-inner .btn { width: 100%; justify-content: center; }
  .sub-cta .btn .arrow, .sub-hero .btn .arrow, .svc-cta-inner .btn .arrow { display: none; } /* decorative arrow reads oddly mid-wrap */
}

