/* =========================================================
   Fen Bridge Clinical Psychology — styles
   Design: calm, professional-but-friendly.
   Palette: sage/teal + warm neutrals. Serif headings (Fraunces),
   clean sans body (Inter).
   ========================================================= */

:root {
  /* Brand */
  --teal-900: #24413e;
  --teal-700: #3f6f6a;
  --teal-600: #4a827c;
  --teal-500: #5c948d;
  --teal-050: #eef4f2;

  --sage-100: #e4ede7;
  --clay: #c98a5e;       /* warm accent */
  --clay-dark: #a9744c;

  /* Neutrals */
  --ink: #23302e;
  --ink-soft: #4c5a57;
  --muted: #7a8a86;
  --line: #dfe6e2;
  --cream: #f7f5f0;
  --cream-2: #fbfaf6;
  --white: #ffffff;

  /* System */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 48, 46, 0.05), 0 1px 3px rgba(35, 48, 46, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(35, 48, 46, 0.22);
  --shadow-lg: 0 24px 60px -24px rgba(35, 48, 46, 0.28);

  --wrap: 1140px;
  --gap: clamp(1.5rem, 4vw, 4rem);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-2);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration-color: rgba(63,111,106,0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.12; color: var(--teal-900); letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1rem; }

/* ---------- Utilities ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only, .skip-link {
  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:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto;
  clip: auto; background: var(--teal-900); color: #fff; padding: 10px 16px;
  border-radius: 8px; z-index: 200;
}
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-600);
  margin: 0 0 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 0.95rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-900); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--teal-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal-600); background: var(--teal-050); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(74,130,124,0.45); outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,250,246,0.85); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--teal-900); }
.brand-mark { color: var(--teal-600); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.site-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.98rem; padding: 0.5rem 0.85rem; border-radius: 999px; transition: color .2s ease, background-color .2s ease; }
.nav-list a:hover { color: var(--teal-900); background: var(--teal-050); }
.nav-cta { background: var(--teal-700); color: #fff !important; margin-left: 0.35rem; }
.nav-cta:hover { background: var(--teal-900) !important; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); background:
  radial-gradient(120% 90% at 85% -10%, var(--sage-100) 0%, rgba(228,237,231,0) 55%),
  linear-gradient(180deg, var(--cream-2) 0%, var(--cream) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--gap); align-items: center; }
.hero-copy { max-width: 34rem; }
.lead { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.75rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; padding: 0; margin: 0; }
.trust-row li { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.92rem; color: var(--ink-soft); font-weight: 500; }
.tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--teal-050); color: var(--teal-700); font-size: 0.7rem; font-weight: 700; }

.hero-media { position: relative; }
.media-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 55%, var(--teal-900) 100%);
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
}
.media-frame::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 25% 15%, rgba(255,255,255,0.22), transparent 60%),
    radial-gradient(50% 40% at 90% 90%, rgba(201,138,94,0.35), transparent 65%);
  mix-blend-mode: screen;
}
.media-frame--portrait { aspect-ratio: 4 / 5; }
.media-frame--landscape { aspect-ratio: 1200 / 834; }
.media-hint {
  position: relative; z-index: 1; color: rgba(255,255,255,0.72); font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  border: 1.5px dashed rgba(255,255,255,0.45); padding: 0.5rem 0.9rem; border-radius: 999px;
}
.media-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.media-frame--photo { background: var(--teal-900); }
.media-frame--photo::after { display: none; }
.media-frame--contain img { object-fit: contain; padding: 2rem; }
.hero-badge {
  position: absolute; z-index: 2; left: -0.75rem; bottom: 1.5rem; background: #fff;
  border-radius: var(--radius-sm); padding: 0.85rem 1.1rem; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; line-height: 1.15; max-width: 12rem;
}
.hero-badge strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--teal-900); }
.hero-badge span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-intro { font-size: 1.12rem; color: var(--ink-soft); margin: 0; }

/* Intro two-column */
.intro { padding-top: clamp(2rem, 4vw, 3rem); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.intro-grid:has(.intro-col:only-child) { grid-template-columns: 1fr; max-width: 46rem; }
.intro-col p { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
.intro-col:first-child p { color: var(--ink); font-family: var(--font-head); font-weight: 400; font-size: 1.4rem; line-height: 1.4; }

/* ---------- About ---------- */
.about { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--gap); align-items: start; }
.about-media { position: sticky; top: 90px; }
.credentials { color: var(--teal-600); font-weight: 600; letter-spacing: 0.01em; margin-top: -0.25rem; margin-bottom: 1.5rem; }
.about-copy p { color: var(--ink-soft); }
.approach { margin-top: 2rem; padding: 1.75rem; background: var(--teal-050); border-radius: var(--radius); border: 1px solid var(--line); }
.approach h3 { color: var(--teal-900); margin-bottom: 0.5rem; }
.approach p:last-child { margin-bottom: 0; }

/* ---------- Services ---------- */
.service-grid {
  list-style: none; padding: 0; margin: 0; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
}
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-500); }
.service-card h3 { color: var(--teal-900); margin-bottom: 0.4rem; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.service-note {
  margin-top: 1.75rem; padding: 1rem 1.25rem; background: var(--cream);
  border: 1px solid var(--line); border-left: 4px solid var(--clay); border-radius: var(--radius-sm);
  display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); font-size: 0.98rem;
}
.service-note-icon { color: var(--clay-dark); font-weight: 700; flex: none; }

/* ---------- Fees ---------- */
.fees { background: var(--white); border-top: 1px solid var(--line); }
.fee-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.fee-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.35rem;
  background: linear-gradient(180deg, var(--cream-2), var(--white));
  display: flex; flex-direction: column;
}
.fee-name { font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.6rem; }
.fee-price { font-family: var(--font-head); font-size: 2rem; color: var(--teal-900); margin: 0 0 0.6rem; line-height: 1; }
.fee-price span { font-family: var(--font-body); font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.fee-detail { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ---------- Testimonial ---------- */
.testimonial { background:
  radial-gradient(90% 120% at 100% 0%, var(--teal-050), transparent 60%),
  var(--cream); }
.quote { margin: 0; max-width: 46rem; margin-inline: auto; text-align: center; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--font-head); font-weight: 400; font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  line-height: 1.4; color: var(--teal-900); position: relative;
}
.quote figcaption { margin-top: 1.25rem; color: var(--teal-600); font-weight: 600; letter-spacing: 0.02em; }

/* ---------- Resources ---------- */
.resource-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.resource-grid a {
  display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none;
  padding: 1.25rem 1.35rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.resource-grid a:hover { transform: translateY(-2px); border-color: var(--teal-500); box-shadow: var(--shadow-md); }
.resource-name { font-weight: 600; color: var(--teal-900); }
.resource-desc { font-size: 0.92rem; color: var(--ink-soft); }
.ext { color: var(--teal-500); font-size: 0.85em; }

/* ---------- Contact ---------- */
.contact { background: var(--teal-900); color: #eaf1ef; }
.contact h2 { color: #fff; }
.contact .eyebrow { color: var(--teal-050); opacity: 0.85; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--gap); align-items: start; }
.contact-lead { color: rgba(234,241,239,0.85); font-size: 1.08rem; }
.contact-details { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.1rem; }
.contact-details li { display: flex; gap: 0.85rem; align-items: flex-start; }
.contact-details a { color: #fff; }
.ci { color: var(--teal-050); flex: none; margin-top: 2px; opacity: 0.9; }
.contact-address { color: rgba(234,241,239,0.9); line-height: 1.5; }
.contact-address .muted { color: rgba(234,241,239,0.55); font-size: 0.9rem; }
.referral-notice {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-left: 4px solid var(--clay); border-radius: var(--radius-sm);
  padding: 1rem 1.15rem; margin-bottom: 1.25rem; color: #f4ede6; font-size: 0.98rem;
}
.referral-notice strong { color: #fff; }

/* Form */
.contact-form-wrap { position: relative; }
.contact-form {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: 0.4rem; }
.req { color: var(--clay-dark); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--cream-2);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal-500); background: #fff; box-shadow: 0 0 0 3px rgba(92,148,141,0.15); outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -5000px; }
.form-consent { margin: 0.25rem 0 1.25rem; }
.checkbox { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); cursor: pointer; }
.checkbox input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--teal-700); }
.form-privacy { margin: 0.85rem 0 0; font-size: 0.82rem; text-align: center; }

.form-success {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem); box-shadow: var(--shadow-lg); text-align: center;
}
.success-icon {
  width: 60px; height: 60px; border-radius: 999px; margin: 0 auto 1.25rem;
  display: grid; place-items: center; background: var(--teal-050); color: var(--teal-700);
  font-size: 1.7rem; font-weight: 700;
}
.form-success h3 { color: var(--teal-900); font-size: 1.35rem; }
.form-success p { color: var(--ink-soft); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: rgba(234,241,239,0.85); padding: 2.5rem 0 1.75rem; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-name { font-family: var(--font-head); font-size: 1.2rem; color: #fff; margin: 0 0 0.35rem; }
.footer-tag { margin: 0; color: rgba(234,241,239,0.7); max-width: 24rem; }
.footer-meta { text-align: right; }
.footer-meta p { margin: 0 0 0.3rem; }
.footer-meta a { color: #fff; }
.footer-meta .muted { color: rgba(234,241,239,0.55); }
.footer-legal { padding-top: 1.25rem; }
.footer-legal p { margin: 0; font-size: 0.85rem; color: rgba(234,241,239,0.55); }

/* =========================================================
   Referral toggle: hide/show pieces based on <body data-referrals>
   ========================================================= */
body[data-referrals="open"] [data-referral-notice] { display: none !important; }
body[data-referrals="closed"] [data-referral-notice] { display: block; }
body[data-referrals="closed"] [data-referral-open] { display: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 26rem; margin-inline: auto; width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { position: static; max-width: 24rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .fee-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
    position: relative;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--teal-900);
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bar::before { position: absolute; transform: translateY(-6px); }
  .nav-toggle-bar::after { position: absolute; transform: translateY(6px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); }

  .nav-list {
    position: absolute; top: calc(100% + 8px); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0.25rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 0.75rem; margin: 0 1.25rem;
    display: none;
  }
  .nav-list.is-open { display: flex; }
  .nav-list a { padding: 0.75rem 1rem; }
  .nav-cta { text-align: center; margin: 0.25rem 0 0; }
  .site-nav { position: static; }
  .header-inner { position: relative; }

  .intro-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media (max-width: 460px) {
  .service-grid { grid-template-columns: 1fr; }
  .fee-grid { grid-template-columns: 1fr; }
  .hero-badge { position: static; margin-top: 1rem; max-width: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
