/* =============================================================================
   base.css — the SKELETON
   Theme-agnostic. Every colour, font and shape is driven by a CSS custom
   property (a "token"). A skin (themes/*.css) only sets those tokens, so the
   same markup + this file can be reskinned by swapping one stylesheet.
   Do not put skin-specific colours/fonts here — only structure and the
   neutral fallback tokens below.
   ========================================================================== */

/* ---- Neutral fallback tokens ------------------------------------------------
   These make the page legible even with no skin loaded. A skin overrides them
   on :root. Grouped by role so a skin author knows exactly what to set.        */
:root {
  /* surfaces & ink */
  --bg: #f6f7f7;
  --bg-2: #eceeee;
  --surface: #ffffff;
  --surface-2: #f0f2f2;
  --ink: #1b1f1e;
  --ink-2: #55605d;          /* muted text — must stay AA on --bg */
  --line: #dce0df;           /* hairlines / borders */

  /* accent */
  --accent: #2a6f61;
  --accent-2: #1e5648;       /* hover / pressed */
  --accent-ink: #ffffff;     /* text on --accent — must stay AA */
  --accent-wash: #e6efec;    /* faint accent tint background */
  --focus: #1e5648;          /* focus ring colour */

  /* type */
  --font-head: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --head-weight: 600;
  --head-tracking: -0.01em;
  --head-leading: 1.08;
  --eyebrow-weight: 600;
  --eyebrow-tracking: 0.16em;
  --eyebrow-transform: uppercase;

  /* shape */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --border: 1px;
  --shadow: 0 1px 2px rgba(20, 30, 28, 0.04), 0 8px 24px -12px rgba(20, 30, 28, 0.14);
  --shadow-lg: 0 2px 6px rgba(20, 30, 28, 0.06), 0 24px 48px -20px rgba(20, 30, 28, 0.22);

  /* rhythm — fixed across skins so structure stays stable */
  --maxw: 74rem;
  --measure: 62ch;           /* readable text column */
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --gap: clamp(1rem, 2.5vw, 2rem);

  /* fluid type scale (major-third-ish, clamped) */
  --fs-eyebrow: 0.78rem;
  --fs-body: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --fs-lead: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h3: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(1.7rem, 1.4rem + 1.6vw, 2.6rem);
  --fs-h1: clamp(2.4rem, 1.8rem + 3.2vw, 4.2rem);
  --fs-display: clamp(2.8rem, 2rem + 4.4vw, 5.4rem);
}

/* ---- Reset (minimal) ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:target { scroll-margin-top: 6rem; }

/* Honour reduced-motion everywhere. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Accessibility helpers ------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.7rem 1.1rem; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 1rem; }

/* Visible, consistent focus for every interactive element. */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Layout primitives ----------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-2); }
.section--accent { background: var(--accent-wash); }
.stack > * + * { margin-top: var(--flow, 1rem); }
.lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: var(--measure); line-height: 1.55; }

/* ---- Typography ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  line-height: var(--head-leading);
  letter-spacing: var(--head-tracking);
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { max-width: var(--measure); }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--font-head);
  font-size: var(--fs-eyebrow);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: var(--eyebrow-transform);
  color: var(--accent-2);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 2px; background: currentColor; opacity: 0.6;
}

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { margin-top: 0.8rem; }
.section-head p { margin-top: 1rem; }

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  --_bg: var(--accent); --_fg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  background: var(--_bg); color: var(--_fg);
  font-weight: 600; text-decoration: none; line-height: 1.1;
  border: var(--border) solid transparent; border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--ghost {
  --_bg: transparent; --_fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { --_bg: var(--surface-2); border-color: var(--ink-2); }
.btn--block { width: 100%; }

/* ---- Header / navigation --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: var(--border) solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem;
}
.brand { display: inline-flex; align-items: baseline; gap: 0.55rem; text-decoration: none; }
.brand__name { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__role { font-size: 0.8rem; color: var(--ink-2); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav__list { display: flex; align-items: center; gap: 0.1rem; list-style: none; padding: 0; }
.nav__link {
  display: inline-block; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-2); font-size: 0.95rem; font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link[aria-current="true"], .nav__link[aria-current="page"] { color: var(--accent-2); font-weight: 600; }
.nav__cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.8rem; background: transparent;
  border: var(--border) solid var(--line); border-radius: var(--radius-pill);
  cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.nav-toggle__bars { display: inline-block; width: 1.1rem; height: 0.8rem; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars::after { bottom: 0; }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: var(--border) solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.25s ease, visibility 0s linear 0.25s;
  }
  .nav[data-open="true"] { max-height: 80vh; visibility: visible; transition: max-height 0.25s ease; overflow: auto; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0.15rem; width: 100%; }
  .nav__link { padding: 0.85rem 0.9rem; font-size: 1.05rem; }
  .nav__cta { margin: 0.5rem 0 0.25rem; }
  .nav__cta .btn { width: 100%; }
}

/* ---- Hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem); }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: 1.15fr 0.85fr;
}
@media (max-width: 54rem) { .hero__grid { grid-template-columns: 1fr; } }

.hero__title { margin-top: 1.1rem; font-size: var(--fs-display); }
.hero__lead { margin-top: 1.4rem; }
.hero__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero__meta { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; color: var(--ink-2); font-size: 0.92rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__meta svg { width: 1.05em; height: 1.05em; color: var(--accent-2); }

/* Signature: the "listening" motif — concentric rings that breathe softly.
   Colour comes from the skin's --accent. Portrait sits on top. */
.hero__figure { position: relative; display: grid; place-items: center; min-height: 22rem; }
.hero__rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.hero__rings span {
  position: absolute; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  width: var(--r); height: var(--r);
  animation: breathe 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.hero__rings span:nth-child(1) { --r: 9rem; }
.hero__rings span:nth-child(2) { --r: 15rem; --d: 0.5s; opacity: 0.7; }
.hero__rings span:nth-child(3) { --r: 21rem; --d: 1s; opacity: 0.45; }
.hero__rings span:nth-child(4) { --r: 27rem; --d: 1.5s; opacity: 0.25; }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: var(--o, 0.6); }
  50% { transform: scale(1.06); opacity: calc(var(--o, 0.6) * 0.6); }
}
.hero__portrait {
  position: relative; z-index: 1;
  width: min(20rem, 70%); aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}
.hero__portrait--placeholder {
  display: grid; place-items: center; color: var(--ink-2);
  border: var(--border) dashed var(--line); font-size: 0.85rem; text-align: center; padding: 1rem;
}
@media (prefers-reduced-motion: reduce) { .hero__rings span { animation: none; } }

/* ---- Credential chips ------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; font-size: 0.85rem; font-weight: 500;
  background: var(--surface); color: var(--ink-2);
  border: var(--border) solid var(--line); border-radius: var(--radius-pill);
}
.chip::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); }

/* ---- Card grids (services) ------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 60rem) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: var(--border) solid var(--line);
  border-radius: var(--radius); padding: clamp(1.25rem, 2.5vw, 1.75rem);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.card__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-sm); background: var(--accent-wash); color: var(--accent-2);
  margin-bottom: 1rem;
}
.card__icon svg { width: 1.4rem; height: 1.4rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-2); font-size: 0.97rem; }

/* ---- Feature (specialty) blocks -------------------------------------------- */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; grid-template-columns: 0.9fr 1.1fr; }
.feature:not(:first-child) { margin-top: clamp(3rem, 6vw, 5rem); }
.feature--flip .feature__media { order: 2; }
@media (max-width: 52rem) {
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
}
.feature__media {
  border-radius: var(--radius); background: var(--accent-wash);
  min-height: 16rem; display: grid; place-items: center; overflow: hidden;
  border: var(--border) solid var(--line);
}
.feature__body h3 { font-size: var(--fs-h2); }
.feature__body h3 + p { margin-top: 1rem; }
.feature__list { margin-top: 1.25rem; padding: 0; list-style: none; display: grid; gap: 0.65rem; }
.feature__list li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em; width: 0.55rem; height: 0.55rem;
  border-radius: 2px; background: var(--accent);
}

/* ---- Definition list / plain lists ----------------------------------------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin-top: 1.25rem; list-style: none; }
.tag-list li {
  padding: 0.4rem 0.85rem; border-radius: var(--radius-sm);
  background: var(--surface); border: var(--border) solid var(--line);
  color: var(--ink-2); font-size: 0.9rem;
}

/* ---- Contact --------------------------------------------------------------- */
.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 56rem) { .contact { grid-template-columns: 1fr; } }

.info-list { display: grid; gap: 1.25rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.info-list > li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; align-items: start; }
.info-list__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm); background: var(--accent-wash); color: var(--accent-2); }
.info-list__icon svg { width: 1.35rem; height: 1.35rem; }
.info-list dt { font-weight: 600; font-size: 0.95rem; }
.info-list dd { margin: 0.15rem 0 0; color: var(--ink-2); }
.info-list a { color: var(--accent-2); text-decoration: none; font-weight: 500; }
.info-list a:hover { text-decoration: underline; }

/* ---- Form ------------------------------------------------------------------ */

/* ---- Map / access ---------------------------------------------------------- */
.access { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; align-items: stretch; }
@media (max-width: 56rem) { .access { grid-template-columns: 1fr; } }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--bg-2); border-top: var(--border) solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 52rem) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: var(--border) solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  color: var(--ink-2); font-size: 0.85rem;
}

/* ---- Prose (multi-page article bodies) ------------------------------------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: var(--fs-h2); margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--accent); }
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-hero h1 { margin-top: 0.9rem; }

/* ---- Theme switcher (DEMO tool — remove for production) --------------------- */
.theme-switcher {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 150;
  background: var(--surface); border: var(--border) solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.75rem;
  max-width: min(20rem, calc(100vw - 2rem));
}
.theme-switcher__label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.55rem; }
.theme-switcher__opts { display: flex; gap: 0.4rem; }
.theme-switcher__opt {
  flex: 1; display: grid; gap: 0.4rem; justify-items: center;
  padding: 0.5rem 0.35rem; background: var(--bg); cursor: pointer;
  border: var(--border) solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.72rem; font-weight: 600; color: var(--ink-2);
}
.theme-switcher__opt[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--accent-wash); }
.theme-switcher__sw { width: 100%; height: 1.4rem; border-radius: 4px; border: var(--border) solid rgba(0,0,0,0.08); }

/* ---- Images (photo variants) ----------------------------------------------
   Added for practices that ship real photography. Purely additive — the
   photo-less components above still work untouched.                          */
.hero__photo {
  position: relative; z-index: 1;
  width: min(32rem, 100%); aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--surface-2);
}
.card--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--media .card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card--media .card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card--media:hover .card__media img { transform: scale(1.04); }
.card--media .card__body { padding: clamp(1.25rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; }
.feature__media { padding: 0; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.avatar {
  width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow); border: 3px solid var(--surface); background: var(--surface-2);
}
@media (prefers-reduced-motion: reduce) { .card--media:hover .card__media img { transform: none; } }

/* ---- Blockquote (cited definitions) ---------------------------------------- */
.quote {
  margin: 1.5rem 0; padding: 1.2rem 1.5rem;
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.quote p { max-width: none; font-size: 1.02rem; }
.quote cite {
  display: block; margin-top: 0.75rem; font-style: normal;
  font-weight: 600; font-size: 0.85rem; color: var(--accent-2);
}

/* ---- Praticienne (avatar + intro) ------------------------------------------ */
.praticienne { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 40rem) { .praticienne { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
@media (max-width: 40rem) { .praticienne .hero__actions { justify-content: center; } }

@media print {
  .site-header, .theme-switcher, .skip-link, .nav-toggle, .hero__rings { display: none !important; }
}
