/* Ivy Psychology - Design Tokens */

:root {
  /* Palette: Ivy (default - official brand) */
  --bg: #FBFBF8;
  --bg-warm: #EFF6EE;
  --bg-card: #FFFFFF;
  --bg-soft: #F0F0F0;
  --bg-dark: #1A2E1A;
  --ink: #15281A;
  --ink-soft: #3F5340;
  --ink-mute: #7A8A7C;
  --line: #DDE6DC;
  --line-soft: #ECEFEA;

  --primary: #1F3A1F;        /* Primary Ivy Green */
  --primary-hover: #122312;
  --primary-soft: #D1E7D3;
  --secondary: #2EB872;       /* Secondary Ivy Green */
  --secondary-soft: #B2DDB6;
  --sage: #8BD6A2;
  --leaf: #2F8749;
  --mint: #D1E7D3;
  --gold: #B89968;           /* warm accent (rare) */

  --grad: linear-gradient(140deg, #1F3A1F 0%, #2F8749 55%, #8BD6A2 100%);
  --grad-soft: linear-gradient(140deg, #B2DDB6 0%, #D1E7D3 100%);

  /* Type */
  --font-sans: "Quicksand", -apple-system, system-ui, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 36px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(21,40,26,0.04), 0 1px 1px rgba(21,40,26,0.03);
  --shadow-md: 0 6px 18px rgba(21,40,26,0.06), 0 2px 4px rgba(21,40,26,0.04);
  --shadow-lg: 0 22px 48px rgba(21,40,26,0.10), 0 8px 14px rgba(21,40,26,0.05);

  --container: 1240px;
  --container-narrow: 920px;
}

/* Density */
[data-density="airy"] {
  --space-8: 80px;
  --space-9: 120px;
  --space-10: 160px;
}
[data-density="cozy"] {
  --space-8: 48px;
  --space-9: 72px;
  --space-10: 96px;
}

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Typography - Quicksand */
.display-xl { font-weight: 300; font-size: clamp(48px, 6.8vw, 88px); line-height: 1.02; letter-spacing: -0.025em; }
.display-lg { font-weight: 300; font-size: clamp(40px, 5.2vw, 68px); line-height: 1.05; letter-spacing: -0.02em; }
.display-md { font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.018em; }
.display-sm { font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; letter-spacing: -0.012em; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--secondary); }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; font-weight: 400; }
.body { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.tiny { font-size: 13px; color: var(--ink-mute); }

em.in-line { font-weight: 500; color: var(--secondary); font-style: normal; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
section.section { padding: var(--space-9) 0; }
.section-sm { padding: var(--space-8) 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-full);
  font-size: 15px; font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn-primary { background: var(--primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: #FFFFFF; }
.btn-secondary:hover { background: var(--leaf); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); background: var(--bg-warm); }
.btn-text { padding: 8px 0; color: var(--primary); font-weight: 600; }
.btn-text:hover { color: var(--secondary); }
.btn-text .arrow { transition: transform .2s ease; display: inline-flex; }
.btn-text:hover .arrow { transform: translateX(4px); }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--secondary-soft); }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-mute); }
.input, .textarea, .select {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 16px; /* 16px+ prevents iOS Safari auto-zoom on focus */
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
  font-weight: 500;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px var(--primary-soft); }
.textarea { resize: vertical; min-height: 110px; }

/* Helpers */
.muted { color: var(--ink-mute); }
.divider { height: 1px; background: var(--line); margin: var(--space-7) 0; border: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.tag-soft { background: var(--bg-warm); color: var(--ink-soft); }
.tag-secondary { background: var(--secondary-soft); color: var(--primary); }
.tag-outline { background: transparent; border: 1px solid var(--secondary-soft); color: var(--primary); }

.grid { display: grid; gap: 24px; }
.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)); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Responsive 2-column layout: aside + content. Stacks to 1 column ≤ 980px. */
.split-2 { display: grid; grid-template-columns: 1fr 1.8fr; gap: 64px; align-items: start; }
@media (max-width: 980px) {
  .split-2 { grid-template-columns: 1fr; gap: 32px; }
  .split-2 > aside, .split-2 > div[style*="sticky"] { position: static !important; }
}
/* Tables on narrow screens: allow horizontal scroll rather than squish cells */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 520px; }

/* Catch-all: inline 2-column grids should stack on narrow viewports.
   Without this, pages using inline `grid-template-columns: 1fr 1.4fr` etc.
   stay 2-up at all widths and squish their content. */
@media (max-width: 980px) {
  main div[style*="grid-template-columns: 1fr 1fr"],
  main div[style*="grid-template-columns: 1fr 1.2fr"],
  main div[style*="grid-template-columns: 1fr 1.4fr"],
  main div[style*="grid-template-columns: 1fr 1.6fr"],
  main div[style*="grid-template-columns: 1fr 1.8fr"],
  main div[style*="grid-template-columns: 1fr 2fr"],
  main ul[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Disable position:sticky on the now-stacked left columns */
  main aside[style*="position: sticky"],
  main div[style*="position: sticky"] {
    position: static !important;
  }
}

/* Animations */
.fade-in { animation: fadeIn .6s ease both; }
.fade-up { animation: fadeUp .7s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Nav */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav-wrap.scrolled { border-bottom-color: var(--line-soft); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.nav-links { display: flex; gap: 0; align-items: center; }
.nav-link { padding: 9px 13px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: all .15s ease; white-space: nowrap; }
.nav-link:hover { color: var(--primary); background: var(--bg-warm); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--primary); flex-shrink: 0; }
.logo img { max-width: none; flex-shrink: 0; width: auto; }
.nav > button:first-child, .nav > a:first-child { flex-shrink: 0; }
.nav > button:first-child img, .nav > a:first-child img { max-width: none; width: auto; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--grad); color: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); }

/* Image placeholders */
.img-ph {
  border-radius: var(--r-lg);
  background: var(--grad-soft);
  display: grid; place-items: center;
  color: var(--primary);
  font-size: 13px;
  overflow: hidden;
  position: relative;
}
.img-ph::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.5), transparent 40%),
                    radial-gradient(circle at 80% 90%, rgba(31,58,31,0.10), transparent 50%);
  pointer-events: none;
}

/* Pricing */
.price-tag { font-size: 44px; font-weight: 500; color: var(--primary); letter-spacing: -0.02em; line-height: 1; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row .pname { font-weight: 500; }
.price-row .pamt { font-size: 22px; color: var(--primary); font-weight: 600; }

/* Booking flow */
.step-bar { display: flex; gap: 8px; align-items: center; }
.step-dot { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s ease; }
.step-dot.active { background: var(--secondary); }
.step-dot.done { background: var(--primary); }

.option-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s ease;
  display: flex; align-items: flex-start; gap: 14px;
  text-align: left;
  width: 100%;
}
.option-card:hover { border-color: var(--secondary); background: var(--bg-warm); }
.option-card.selected { border-color: var(--secondary); background: var(--primary-soft); box-shadow: 0 0 0 4px color-mix(in oklab, var(--secondary-soft) 50%, transparent); }
.option-card .icon-cell { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-warm); display: grid; place-items: center; color: var(--primary); flex-shrink: 0; }
.option-card.selected .icon-cell { background: var(--secondary); color: #fff; }

.timeslot {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s ease;
}
.timeslot:hover:not(.disabled):not(.selected) { border-color: var(--secondary); background: var(--bg-warm); }
.timeslot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.timeslot.disabled { color: var(--ink-mute); background: var(--bg-soft); cursor: not-allowed; opacity: 0.55; }

/* Footer */
.footer { background: var(--bg-dark); color: #E8EFE8; padding: var(--space-9) 0 var(--space-6); }
.footer a { color: #E8EFE8; opacity: 0.75; }
.footer a:hover { opacity: 1; color: var(--sage); }

/* Article / blog */
.prose { max-width: 680px; margin: 0 auto; }
.prose p { font-size: 17px; line-height: 1.8; color: var(--ink); margin: 0 0 22px; }
.prose h2 { font-weight: 500; font-size: 28px; margin: 48px 0 16px; letter-spacing: -0.012em; }
.prose blockquote { border-left: 3px solid var(--secondary); padding: 6px 0 6px 22px; margin: 28px 0; font-weight: 400; font-size: 20px; color: var(--primary); line-height: 1.5; }
.prose a { color: var(--secondary); border-bottom: 1px solid var(--secondary-soft); }

/* Home blog carousel */
.blog-carousel { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0 10px; }
.blog-carousel::-webkit-scrollbar { display: none; }
.blog-carousel-card { flex: 0 0 348px; scroll-snap-align: start; }
.carousel-nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-card); display: grid; place-items: center; color: var(--ink); transition: all .15s ease; }
.carousel-nav-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.carousel-nav-btn:disabled { opacity: 0.4; cursor: default; }
.carousel-nav-btn:disabled:hover { border-color: var(--line); color: var(--ink); background: var(--bg-card); }
@media (max-width: 700px) { .blog-carousel-card { flex-basis: 84%; } }

/* Admin team - single row on desktop, wraps on smaller screens */
.admin-team-row { display: grid; grid-template-columns: repeat(var(--admin-cols, 4), minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 900px) { .admin-team-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .admin-team-row { grid-template-columns: 1fr; } }

/* Mobile */
.menu-btn { display: none; }
.desktop-only { display: inline-flex; }
@media (max-width: 1100px) {
  .desktop-only { display: none; }
}
@media (max-width: 860px) {
  .nav-links.desktop { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-full); border: 1px solid var(--line); font-weight: 500; }
  .container, .container-narrow { padding: 0 20px; }
}

.mobile-sheet {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  padding: 80px 32px 32px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: fadeIn .25s ease both;
}
.mobile-sheet a { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); font-size: 22px; font-weight: 500; }
.close-btn { position: absolute; top: 18px; right: 22px; padding: 10px; border-radius: 50%; }

/* Trust strip */
.trust-strip { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.trust-strip .trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }

.u-accent { background: linear-gradient(transparent 64%, var(--secondary-soft) 64%); padding: 0 3px; }

/* Avatar */
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); font-size: 20px; font-weight: 600; flex-shrink: 0; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; }

.ornament { position: absolute; pointer-events: none; }

/* Hero frame */
.hero-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--grad);
}

/* Pill stat */
.stat-pill { display: inline-flex; flex-direction: column; gap: 2px; padding: 14px 22px; background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
.stat-pill .n { font-size: 28px; font-weight: 500; color: var(--primary); letter-spacing: -0.02em; }
.stat-pill .l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute); }

/* Subtle leaf pattern bg */
.bg-leaf {
  background:
    radial-gradient(circle at 12% 18%, var(--secondary-soft) 0%, transparent 25%),
    radial-gradient(circle at 88% 82%, var(--primary-soft) 0%, transparent 30%),
    var(--bg-warm);
}

/* Accordion */
.accordion-item { border-top: 1px solid var(--line); }
.accordion-item:last-child { border-bottom: 1px solid var(--line); }
.accordion-trigger { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 22px 0; font-size: 18px; font-weight: 500; color: var(--ink); text-align: left; }
.accordion-trigger:hover { color: var(--primary); }
.accordion-content { padding: 0 0 22px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.accordion-chev { transition: transform .25s ease; color: var(--secondary); }
.accordion-item.open .accordion-chev { transform: rotate(45deg); }

/* ============================================================
   2026-06 update layer
   COLOUR RULE: no new colours. Everything below uses only the
   existing palette tokens declared at the top of this file:
   #FBFBF8 (--bg), #EFF6EE (--bg-warm), #FFFFFF (--bg-card),
   #F0F0F0 (--bg-soft), #1A2E1A (--bg-dark), #15281A (--ink),
   #3F5340 (--ink-soft), #7A8A7C (--ink-mute), #DDE6DC (--line),
   #ECEFEA (--line-soft), #1F3A1F (--primary), #122312 (--primary-hover),
   #D1E7D3 (--primary-soft/--mint), #2EB872 (--secondary),
   #B2DDB6 (--secondary-soft), #8BD6A2 (--sage), #2F8749 (--leaf),
   #B89968 (--gold). Tints derived only via opacity (rgba of the
   above) or color-mix with transparent. Flag images excepted
   (official flag colours are content, not UI).
   Motion rule: gentle, cubic-bezier(0.22, 1, 0.36, 1), nothing fast.
   ============================================================ */

:root { --ease-gentle: cubic-bezier(0.22, 1, 0.36, 1); }

/* 1.6 — site-wide horizontal overflow guard */
html, body { overflow-x: clip; }

/* 1.6 — footer overflow: long strings wrap, grid children may shrink */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-grid > div { min-width: 0; }
.footer a, .footer .wrap-any { overflow-wrap: anywhere; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-flags { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }

/* 6.1 — visible keyboard focus, brand colours only */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* 6.2 — skip link: first focusable element */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--primary); color: #FFFFFF;
  padding: 12px 20px; border-radius: var(--r-full);
  font-weight: 600; font-size: 14px;
  transition: top .2s var(--ease-gentle);
}
.skip-link:focus { top: 12px; }

/* 2.1 — sticky mobile bar (≤768px only) */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none;
  gap: 10px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  transform: translateY(0);
  transition: transform .35s var(--ease-gentle);
}
.sticky-bar.hidden-by-scroll { transform: translateY(110%); }
.sticky-bar .sb-call {
  flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 13px 10px; border-radius: var(--r-full);
  border: 1px solid var(--primary); color: var(--primary);
  font-weight: 600; font-size: 15px; background: transparent; min-height: 44px;
}
.sticky-bar .sb-refer {
  flex: 1.4; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 13px 10px; border-radius: var(--r-full);
  background: var(--secondary); color: #FFFFFF;
  font-weight: 600; font-size: 15px; min-height: 44px;
}
.sticky-bar .sb-dismiss {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-mute);
  border: 1px solid var(--line);
}
@media (max-width: 768px) {
  .sticky-bar { display: flex; }
  body.has-sticky-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* 2.2 — slide-in referral card (≥769px only) */
.slide-in-card {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  display: none;
  width: 340px; max-width: calc(100vw - 48px);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  opacity: 0; transform: translateY(24px);
}
.slide-in-card.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity .5s var(--ease-gentle), transform .5s var(--ease-gentle);
}
@media (min-width: 769px) { .slide-in-card { display: block; } .slide-in-card:not(.visible) { pointer-events: none; } }

/* 3.2 — scroll reveals (gentle fade-and-rise, once per element) */
.reveal-init { opacity: 0; transform: translateY(16px); }
.reveal-in {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease-gentle), transform .8s var(--ease-gentle);
  transition-delay: var(--reveal-delay, 0ms);
}

/* 3.3 — micro-interactions */
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--secondary-soft); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.btn, .card { transition: transform .3s var(--ease-gentle), box-shadow .3s var(--ease-gentle), border-color .3s var(--ease-gentle), background .2s ease; }
.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px;
  height: 2px; border-radius: 1px; background: var(--secondary);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .3s var(--ease-gentle);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* 3.3 — accordion smooth height (grid-rows trick; content stays in DOM) */
.accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-gentle); }
.accordion-item.open .accordion-body { grid-template-rows: 1fr; }
.accordion-body > div { overflow: hidden; }

/* 3.1 — homepage ivy vine (left edge, scroll-drawn) */
.vine-rail {
  position: absolute; left: 0; top: 0; bottom: 0; width: 56px;
  pointer-events: none; z-index: 1;
}
.vine-rail svg { position: sticky; top: 0; height: 100vh; width: 56px; overflow: visible; }
@media (max-width: 1100px) { .vine-rail { display: none; } }
.vine-leaf { transform-origin: center; transform: scale(0); transition: transform .6s var(--ease-gentle); }
.vine-leaf.grown { transform: scale(1); }

/* 2.3 — "New here?" strip */
.new-here-strip { background: var(--bg-warm); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.new-here-strip .inner { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 14px 20px; flex-wrap: wrap; text-align: center; }
.new-here-strip a { color: var(--primary); font-weight: 600; border-bottom: 1px solid var(--secondary-soft); }
.new-here-strip a:hover { color: var(--secondary); }

/* Meet the team — homepage preview row */
.home-team-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.home-team-card { text-align: left; cursor: pointer; background: none; border: 0; padding: 0; display: block; }
.home-team-photo { aspect-ratio: 1/1; border-radius: var(--r-md); overflow: hidden; background: var(--bg-warm); margin-bottom: 14px; }
.home-team-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease-calm, ease); }
.home-team-card:hover .home-team-photo img { transform: scale(1.04); }
@media (max-width: 1000px) {
  .home-team-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 60%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 20px; -webkit-overflow-scrolling: touch; }
  .home-team-card { scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .home-team-row { grid-auto-columns: 78%; }
}

/* 3.5 — reduced motion: disable everything, content in final state */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-init { opacity: 1; transform: none; }
  .vine-draw { stroke-dashoffset: 0 !important; }
  .vine-leaf { transform: scale(1) !important; }
  .sticky-bar.hidden-by-scroll { transform: translateY(0); }
  .slide-in-card { opacity: 1; transform: none; }
}


/* ===== Motion system (calm by design - psychology practice serving autistic and ADHD clients)
   Palette note: uses only existing tokens (--primary, --secondary, --line, --bg-warm). */
:root { --ease-calm: cubic-bezier(0.22, 1, 0.36, 1); }

:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

/* FAQ accordion height animation (works with the always-rendered panel markup) */
.accordion-panel { display: grid; grid-template-rows: 0fr; }
.accordion-panel.is-open { grid-template-rows: 1fr; }
.accordion-inner { overflow: hidden; min-height: 0; }

@media (prefers-reduced-motion: no-preference) {
  .accordion-panel { transition: grid-template-rows .35s var(--ease-calm); }
  .btn:active { transform: scale(0.98); }
  .nav-link { position: relative; }
  .nav-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 1px; background: var(--secondary); transform: scaleX(0); transform-origin: left center; transition: transform .25s var(--ease-calm); }
  .nav-link:hover::after { transform: scaleX(1); }
  /* Scroll reveals - applied only when motion.js adds .motion-on + .reveal-pending */
  html.motion-on .reveal-pending { opacity: 0; transform: translateY(14px); }
  html.motion-on .reveal-pending.revealed { opacity: 1; transform: translateY(0); transition: opacity .6s var(--ease-calm), transform .6s var(--ease-calm); }
  /* Team filter change - incoming cards fade and rise with stagger */
  .team-anim > * { animation: teamCardIn .2s var(--ease-calm) both; }
  .team-anim > *:nth-child(2) { animation-delay: 50ms; }
  .team-anim > *:nth-child(3) { animation-delay: 100ms; }
  .team-anim > *:nth-child(4) { animation-delay: 150ms; }
  .team-anim > *:nth-child(5) { animation-delay: 200ms; }
  .team-anim > *:nth-child(6) { animation-delay: 250ms; }
}
@keyframes teamCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Reduced motion: render everything in its final state, instantly */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
