/* ============================================================
   Fran Amar Psychotherapy — site styles
   Mobile-first. Tokens at top, layout, components, footer.
   ============================================================ */

:root {
  /* Palette */
  --c-cream:      #fefdf8;
  /* sage values are deeper than the original brand tone so cream-on-sage
     clears WCAG AA (4.5:1). Was #8a9d80 / #6f8267 — 2.89:1, failed. */
  --c-sage:       #5d6f53;
  --c-sage-deep:  #42513a;
  --c-rose:       #dfb5a3;
  --c-rust:       #a64019;
  --c-rust-deep:  #8a3514;
  --c-ink:        #2a2a2a;
  --c-ink-soft:   #4a4a4a;
  --c-line:       rgba(42,42,42,0.12);

  /* Type */
  --f-serif:  "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-script: "Allura", "Great Vibes", cursive;

  /* Scale */
  --space-1:  .5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2.5rem;
  --space-5:  4rem;
  --space-6:  6rem;
  --container: 72rem;
}

/* ───── reset & base ───── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  padding: 0.5rem 0.875rem;
  background: var(--c-rust);
  color: var(--c-cream);
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}
body {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
main p a:not(.btn), main li a:not(.btn) { text-decoration: underline; text-underline-offset: 0.2em; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* default heading weight is 400 to match the only weight we fetch from Google Fonts;
   pages already use lighter weights for the brand voice. Adjust the font URL in
   partials/head-fonts.html if a heavier weight is reintroduced. */
h1, h2, h3, h4 { font-weight: 400; line-height: 1.2; margin: 0 0 var(--space-2); letter-spacing: 0.01em; }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.625rem); }
p  { margin: 0 0 var(--space-2); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-4); } }

/* ───── header ───── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}
.site-logo { display: block; max-width: 5.5rem; }
@media (min-width: 768px) { .site-logo { max-width: 6rem; } }
.site-logo img { width: 100%; height: auto; display: block; }

.nav-desktop { display: none; }
@media (min-width: 768px) {
  .nav-desktop { display: flex; gap: var(--space-3); }
  .nav-desktop a {
    font-size: 0.95rem;
    color: var(--c-ink-soft);
    padding: var(--space-1) var(--space-2);
    border-bottom: 2px solid transparent;
    transition: border-color 200ms ease, color 200ms ease;
  }
  .nav-desktop a:hover,
  .nav-desktop a[aria-current="page"] {
    color: var(--c-ink);
    border-bottom-color: var(--c-rust);
  }
}

/* burger button */
.burger {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 28px; height: 22px; padding: 0; align-items: stretch; justify-content: center;
}
.burger span {
  height: 1px; background: var(--c-ink); transition: transform 200ms ease, opacity 200ms ease;
}
@media (min-width: 768px) { .burger { display: none; } }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ───── mobile menu overlay ───── */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--c-rose);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-4);
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms ease, visibility 200ms;
  /* must sit above .site-header (z:50) so the rose covers the full viewport when open */
  z-index: 60;
}
.menu-open .mobile-menu { visibility: visible; opacity: 1; }
/* keep the burger reachable above the rose overlay */
.menu-open .site-header { background: transparent; border-bottom-color: transparent; z-index: 70; }
.mobile-menu a {
  font-family: var(--f-serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--c-rust-deep);
}
.mobile-menu a:hover { color: var(--c-rust); }
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* ───── hero ───── */
.hero {
  position: relative;
  min-height: clamp(420px, 60vh, 720px);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--c-ink);
  background-image: linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.28)), url("../img/hero-wave.jpg");
  background-size: cover;
  background-position: center;
  padding: var(--space-5) var(--space-3);
}
.hero__heading { margin: 0; font-weight: 400; }
.hero__title {
  display: block;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
  text-shadow: 0 1px 12px rgba(255,255,255,0.55);
}
.hero__tagline {
  display: block;
  font-family: var(--f-script);
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 400;
  line-height: 1;
  margin-top: var(--space-2);
  text-shadow: 0 1px 12px rgba(255,255,255,0.55);
}

/* ───── colour bands ───── */
.section { padding-block: var(--space-5); }
@media (min-width: 768px) { .section { padding-block: var(--space-6); } }

.section--sage  { background: var(--c-sage);     color: var(--c-cream); }
.section--rose  { background: var(--c-rose);     color: var(--c-rust-deep); }
.section--rust  { background: var(--c-rust);     color: var(--c-cream); }
.section--cream { background: var(--c-cream);    color: var(--c-ink); }

.section--sage h2,
.section--sage h3,
.section--rust h2,
.section--rust h3 { color: var(--c-cream); }
.section--rose h2,
.section--rose h3 { color: var(--c-rust-deep); }

.section__eyebrow {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  text-align: center;
  margin-bottom: var(--space-4);
  font-weight: 400;
}
.section__eyebrow--flush { margin-bottom: 0; }

/* ───── two-column ───── */
.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 768px) {
  .cols { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .cols--reverse > :first-child { order: 2; }
}
.cols__media img { margin-inline: auto; max-height: 26rem; width: auto; }

/* ───── pull quote ───── */
.quote {
  text-align: center;
  font-style: italic;
  font-size: clamp(1.25rem, 2vw + .5rem, 2rem);
  line-height: 1.4;
  max-width: 36em;
  margin-inline: auto;
}
.quote cite { display: block; font-size: 0.85em; margin-top: var(--space-2); font-style: normal; opacity: .7; }

/* ───── buttons ───── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: 1px solid currentColor;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  color: inherit;
  transition: background 200ms ease, color 200ms ease;
}

/* per-section ghost-button hover: each section sets its own pair so the
   colors are explicit instead of relying on currentColor evaluating before
   the new color rule applies. */
.section--sage .btn { color: var(--c-cream); border-color: var(--c-cream); }
.section--sage .btn:hover { background: var(--c-cream); color: var(--c-sage-deep); }
.section--rust .btn { color: var(--c-cream); border-color: var(--c-cream); }
.section--rust .btn:hover { background: var(--c-cream); color: var(--c-rust-deep); }
.section--rose .btn { color: var(--c-rust-deep); border-color: var(--c-rust-deep); }
.section--rose .btn:hover { background: var(--c-rust-deep); color: var(--c-cream); }
.section--cream .btn { color: var(--c-ink); border-color: var(--c-ink); }
.section--cream .btn:hover { background: var(--c-ink); color: var(--c-cream); }

.btn--solid-sage {
  background: var(--c-sage);
  color: var(--c-cream);
  border-color: var(--c-sage);
}
.btn--solid-sage:hover { background: var(--c-sage-deep); border-color: var(--c-sage-deep); color: var(--c-cream); }

/* ───── lists ───── */
.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.list-clean li {
  position: relative;
  padding-left: 1.25rem;
}
.list-clean li::before {
  content: "·";
  position: absolute; left: 0; top: -0.1em;
  font-weight: 700; font-size: 1.4em;
}
@media (min-width: 600px) {
  .list-two-col { grid-template-columns: 1fr 1fr; column-gap: var(--space-4); }
}

/* ───── form ───── */
.form { display: grid; gap: var(--space-3); max-width: 38rem; position: relative; }
.form--wide { max-width: none; }
.contact-meta { margin-bottom: var(--space-4); }
.contact-meta p { margin-bottom: var(--space-2); }
.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}
.form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.form label .req { font-size: 0.75rem; letter-spacing: 0.04em; }
.form input, .form textarea {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.875rem;
  border: 1px solid currentColor;
  background: var(--c-cream);
  color: var(--c-ink);
  border-radius: 0;
}
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus, .form textarea:focus {
  outline: 2px solid var(--c-rust-deep);
  outline-offset: 2px;
}
.form .honey { position: absolute; left: -10000px; opacity: 0; }
.form__privacy {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}
.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] { border-color: var(--c-rust-deep); border-width: 2px; }
.form__error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--c-rust-deep);
}
.section--rust .form__error,
.section--rust .form input[aria-invalid="true"],
.section--rust .form textarea[aria-invalid="true"] { color: var(--c-cream); border-color: var(--c-cream); }
.form button[type="submit"] {
  justify-self: start;
  background: var(--c-sage);
  color: var(--c-cream);
  padding: 0.95rem 2.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.05rem;
  font-weight: 500;
  border: 2px solid var(--c-sage);
  transition: background 200ms ease, border-color 200ms ease;
}
.form button[type="submit"]:hover { background: var(--c-sage-deep); border-color: var(--c-sage-deep); }
/* on rust/cream backgrounds the green needs a brighter outline to read as a clear CTA */
.section--rust .form button[type="submit"] { border-color: var(--c-cream); }
.section--rust .form button[type="submit"]:hover { background: var(--c-cream); color: var(--c-sage-deep); border-color: var(--c-cream); }

/* ───── map ───── */
.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  display: block;
  filter: saturate(0.85);
}
.map__fallback {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  text-align: right;
}

/* ───── speech bubble ───── */
.bubble {
  max-width: 14rem;
  margin-inline: auto;
}

/* ───── footer ───── */
.site-footer {
  background: var(--c-cream);
  border-top: 1px solid var(--c-line);
  padding-block: var(--space-5);
  font-size: 0.95rem;
  color: var(--c-ink-soft);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: var(--space-4);
  }
}
.site-footer .footer-heading {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
  color: var(--c-ink);
}
.site-footer__brand img { max-width: 10rem; }
.site-footer p { margin: 0 0 0.35rem; }
.site-footer a:hover { color: var(--c-rust); }
.site-footer__legal {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--c-line);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer__legal p { margin: 0; }

/* ───── utilities ───── */
.center        { text-align: center; }
.script        { font-family: var(--f-script); font-weight: 400; }
.italic        { font-style: italic; }
.divider-soft  { border: 0; border-top: 1px solid var(--c-line); margin-block: var(--space-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* page heading shared by all four pages */
.page-title {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 400;
  margin-bottom: var(--space-4);
}
.section-heading { font-weight: 400; margin-bottom: var(--space-4); }
.section--tight { padding-block: var(--space-4); }

.text-muted    { opacity: .85; }
.text-lg       { font-size: 1.5rem; }

.measure       { max-width: 36em; margin-inline: auto; }
.center-img    { margin-inline: auto; }
.container--narrow { max-width: 48rem; }

.divider--on-dark { border-top-color: rgba(255,255,255,0.25); }
.divider--lg      { margin-block: var(--space-5); }

.link-underline {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  text-decoration: none;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-4); }
.btn-row--center { justify-content: center; }
.btn--ink {
  color: var(--c-ink);
  border-color: var(--c-ink);
}
.btn--ink:hover { background: var(--c-ink); color: var(--c-cream); }

/* services-page individual psychotherapy heading is larger than the default h2 */
.heading--feature { font-size: clamp(2rem, 4vw, 3rem); }

/* available-services subheading */
.heading--service { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: var(--space-3); }

/* available-services bullet list — three short qualifiers under the heading */
.service-points {
  list-style: none;
  padding: 0;
  margin: var(--space-3) auto var(--space-4);
  max-width: 32em;
  display: grid;
  gap: 0.4rem;
  font-size: 1.05rem;
}

/* 404 oversized title */
.heading--404 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; margin-bottom: var(--space-3); }

/* prevent body scroll when mobile menu is open */
body.menu-open { overflow: hidden; }
