/* ==========================================================================
   Jennifer Roy Therapy — stylesheet
   Palette: warm sage & cream. Mobile-first. No external assets.
   ========================================================================== */

:root {
  /* Color */
  --ground:      #F5F1E8; /* cream */
  --ground-tint: #ECE7DA; /* slightly deeper cream for alternating sections */
  --panel:       #E3E8ED; /* soft dusty-blue panel */
  --text:        #3A3A36; /* warm charcoal */
  --text-soft:   #5C5B53; /* muted body/secondary */
  --accent:      #6B7A63; /* sage */
  --accent-deep: #47513F; /* deep sage — footer, dark sections */
  --accent-2:    #C4B5A0; /* tan */
  --blue:        #6E8194; /* dusty blue — primary accent */
  --blue-deep:   #445468; /* deep dusty blue — buttons, CTA band */
  --blue-deepest:#333F4D; /* darkest blue — footer */
  --line:        #D8D2C4; /* hairline on cream */
  --white:       #FBFAF6;

  /* Type */
  --serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scale */
  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.3rem;
  --step-2:  1.65rem;
  --step-3:  2.1rem;
  --step-4:  2.7rem;
  --step-5:  3.4rem;

  /* Space & shape */
  --container: 68rem;
  --gutter: 1.5rem;
  --radius: 4px;
  --radius-lg: 14px;
}

/* --- Reset-ish --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
  font-optical-sizing: auto;
  text-wrap: balance; /* even line lengths; avoids lone orphan words */
}
p { text-wrap: pretty; }
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; max-width: 62ch; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}

/* --- Accessibility --- */
:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue-deep); color: var(--white);
  padding: 0.6rem 1rem; z-index: 200; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }
.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;
}

/* --- Layout helpers --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 3.5rem; }
.section--tint { background: var(--ground-tint); }
.section--panel { background: var(--panel); }
.section__head { max-width: 46rem; margin-bottom: 2.25rem; }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn--primary { background: var(--blue-deep); color: var(--white); }
.btn--primary:hover { background: var(--blue); color: var(--white); transform: translateY(-1px); }
.btn--ghost { border: 1px solid var(--accent); color: var(--accent-deep); }
.btn--ghost:hover { background: var(--accent); color: var(--white); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.5rem; gap: 1rem;
}
.brand {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.1;
}
.brand span { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: 2px; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 0.5rem;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--sans); font-size: var(--step-0); font-weight: 500;
  color: var(--text); text-decoration: none; display: block;
}
.site-nav a:hover { color: var(--blue-deep); }
/* Current page — mobile: bold, blue text, left accent bar + tinted row */
.site-nav a[aria-current="page"] {
  color: var(--blue-deep);
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  padding-left: 0.9rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline-start: calc(var(--gutter) + 0.6rem);
  padding-inline-end: var(--gutter);
}

/* Mobile nav: collapsed by default */
.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ground); border-bottom: 1px solid var(--line);
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.site-nav.is-open { max-height: 24rem; }
.site-nav ul { padding: 0.5rem var(--gutter) 1.25rem; }
.site-nav li + li { border-top: 1px solid var(--line); }
.site-nav a { padding: 0.9rem 0; }
.site-nav .btn { margin-top: 0.75rem; text-align: center; }

/* ==========================================================================
   Hero — the signature: arched portrait + literary headline
   ========================================================================== */
.hero { padding-block: 3rem 3.5rem; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__title { font-size: var(--step-5); margin-bottom: 0.4em; }
.hero__lede { font-size: var(--step-1); color: var(--text-soft); font-family: var(--serif); font-style: italic; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

.portrait {
  position: relative;
  border-radius: 50% 50% 6px 6px / 42% 42% 6px 6px; /* arch: rounded top, squared base */
  overflow: hidden;
  background: var(--panel);
  aspect-ratio: 4 / 5;
  box-shadow: 0 20px 50px -30px rgba(58,58,54,0.5);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait--framed { border: 1px solid var(--line); padding: 10px; background: var(--white); }
.portrait--framed img { border-radius: 50% 50% 4px 4px / 42% 42% 4px 4px; }

/* ==========================================================================
   Cards / feature grids
   ========================================================================== */
.grid { display: grid; gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0.9rem 0 0; padding-left: 1.15rem; font-size: var(--step--1); color: var(--text-soft); }
.card ul:last-child { margin-bottom: 0; }
.card li { margin-bottom: 0.35rem; }
.card li:last-child { margin-bottom: 0; }
.card__mark {
  font-family: var(--serif); font-size: var(--step-2); color: var(--blue);
  line-height: 1; display: block; margin-bottom: 0.6rem;
}

/* Prose blocks (About, Services) */
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: 0.4rem; }

/* Definition-style credential/fee list */
.factlist { margin: 0; }
.factlist div { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.factlist div:last-child { border-bottom: 1px solid var(--line); }
.factlist dt { font-weight: 600; min-width: 9rem; margin: 0; }
.factlist dd { margin: 0; color: var(--text-soft); flex: 1; }

/* Fee cards */
.fee { text-align: center; }
.fee__amount { font-family: var(--serif); font-size: var(--step-4); color: var(--accent-deep); line-height: 1; }
.fee__unit { display: block; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 0.4rem; }
.fee__rates { margin: 0 0 1.25rem; }
.fee__rate { display: flex; justify-content: center; align-items: baseline; gap: 0.6rem; margin: 0 0 0.4rem; }
.fee__rate:last-child { margin-bottom: 0; }
.fee__rate-label,
.fee__rate-price { font-family: var(--serif); font-size: 1.5rem; color: var(--accent-deep); font-weight: 600; }

/* FAQ */
.faq { max-width: 46rem; }
.faq__item { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q { font-size: var(--step-1); margin-bottom: 0.5rem; }
.faq__a { margin-bottom: 0; }

/* Contact */
.contact-grid { display: grid; gap: 2rem; }
.contact-lines a { font-weight: 600; font-size: var(--step-1); }
.location { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.location:first-of-type { border-top: 0; }
.location address { font-style: normal; color: var(--text-soft); }

/* Callout band */
.callout { background: var(--blue-deep); color: var(--white); text-align: center; }
.callout h2, .callout .eyebrow { color: var(--white); }
.callout .eyebrow { color: var(--accent-2); }
.callout p { color: rgba(251,250,246,0.85); margin-inline: auto; }
.callout .btn--primary { background: var(--white); color: var(--blue-deep); }
.callout .btn--primary:hover { background: var(--accent-2); color: var(--blue-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--blue-deepest); color: rgba(251,250,246,0.82); padding-block: 3rem 2rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--accent-2); }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
.site-footer h2 { color: var(--white); font-size: var(--step-1); }
.site-footer .brand { color: var(--white); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { text-decoration: none; }
.footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(251,250,246,0.2); padding-top: 1.5rem; font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-bottom p { margin: 0; max-width: none; }

/* ==========================================================================
   Responsive — tablet & up
   ========================================================================== */
@media (min-width: 46rem) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; max-height: none; overflow: visible;
    background: none; border: 0;
  }
  .site-nav ul { display: flex; align-items: center; gap: 2rem; padding: 0; }
  .site-nav li + li { border-top: 0; }
  .site-nav a { padding: 0; }

  /* Reset the mobile current-page treatment on desktop */
  .site-nav a[aria-current="page"] {
    box-shadow: none; background: none; margin-inline: 0;
    padding: 0; padding-left: 0;
  }

  /* Animated underline: grows on hover, stays put on the current page */
  .site-nav a:not(.btn) { position: relative; }
  .site-nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
    background: var(--blue); border-radius: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
  }
  .site-nav a:not(.btn):hover::after,
  .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

  .site-nav .btn { margin-top: 0; padding: 0.6rem 1.3rem; color: var(--white); }
  .site-nav .btn:hover { color: var(--white); }

  .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
  .section { padding-block: 5rem; }
  .about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3.5rem; align-items: start; }
}

@media (min-width: 62rem) {
  .hero { padding-block: 4.5rem 5rem; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
