/* Grace Counseling: mobile first, fluid up to wide desktop. No framework required.
   Breakpoints: 768px (tablet), 992px (desktop nav + split hero), 1280px (wide). */

:root {
  --bg: #f2f6f4;
  --surface: #ffffff;
  --ink: #1d3438;
  --ink-soft: #4a6266;
  --line: rgba(29, 52, 56, 0.13);
  --accent: #3f6c7a;
  --on-accent: #ffffff;
  --glass: #a9cbc4;
  --deep: #1f3a3d;
  --on-deep: #eef5f3;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", ui-serif, "New York", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(20px, 5vw, 40px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14262a; --surface: #1c3236; --ink: #e8f1ef; --ink-soft: #a9bfbc;
    --line: rgba(232, 241, 239, 0.15); --deep: #0f1e21;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 8px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0 0 1em; }
ul, dl, dd { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: calc(8px + var(--safe-top)); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 760px; }
.narrow--wide { max-width: 1000px; }
@supports (padding: max(0px)) {
  .container { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
}

.kicker {
  margin: 0 0 .6rem;
  font: 600 .8125rem/1.2 var(--font-sans);
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.row-title {
  margin: 0 0 1rem;
  font: 600 clamp(2rem, 1.5rem + 2vw, 2.75rem)/1.1 var(--font-serif);
  letter-spacing: -.005em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 0 24px; border-radius: 14px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, filter .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn-lg { min-height: 54px; font-size: 1.0625rem; }
.btn-ink { background: var(--accent); color: var(--on-accent); }
.btn-ink:hover { filter: brightness(1.08); }
.btn-line { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }

/* ---------- Row 1: header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding-top: var(--safe-top);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.navbar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand span { font: 700 1.375rem/1 var(--font-serif); letter-spacing: .005em; }

.nav-toggle {
  appearance: none; background: transparent; border: 0; width: 44px; height: 44px; margin-right: -10px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink);
}
.nav-toggle__bar { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child { transform: translateY(-4px) rotate(-45deg); }

/* mobile: collapsible sheet under the bar */
.navbar-collapse { display: none; flex-basis: 100%; padding-bottom: 14px; }
.navbar-collapse.show { display: block; }
.navbar-nav { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.nav-item + .nav-item { border-top: 1px solid var(--line); }
.nav-link { display: flex; align-items: center; min-height: 52px; padding: 0 18px; color: var(--ink); text-decoration: none; }
.nav-link:active { background: color-mix(in srgb, var(--glass) 30%, transparent); }
.nav-item--cta { padding: 10px; }
.nav-item--cta .btn { width: 100%; }

/* ---------- Rows 2 and 6: photographs ---------- */
.photo { position: relative; margin: 0; }
.photo__img { width: 100%; object-fit: cover; background: #d7e4de; }

.photo--hero { background: var(--bg); }
.photo--hero .photo__img { aspect-ratio: 4 / 3; object-position: 83% 50%; animation: settle .9s ease-out both; }
@keyframes settle { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }

.photo__overlay { padding: 28px 0 56px; }
.photo__title {
  margin: 0 0 1.4rem;
  font: 600 clamp(2.4rem, 1.4rem + 4.2vw, 4.25rem)/1.02 var(--font-serif);
  letter-spacing: -.012em; text-wrap: balance;
}

.photo--closing .photo__img { aspect-ratio: 16 / 9; object-position: 52% 60%; }

/* ---------- Row blocks ---------- */
.row-block { padding: 0 0 clamp(48px, 8vw, 96px); }

/* Row 3: about card overlaps the hero a little, like an iOS sheet */
.row-block--about { margin-top: -36px; position: relative; z-index: 2; padding-bottom: clamp(40px, 7vw, 80px); }
.card { background: var(--surface); border: 1px solid var(--line); }
.about-card {
  padding: 28px 22px 24px; border-radius: 28px;
  box-shadow: 0 14px 34px -22px rgba(20, 38, 42, .5);
}
.about-card .row-title { margin-bottom: .8rem; }
.lede { font: 500 1.375rem/1.35 var(--font-serif); color: var(--ink); }

.credentials { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.credentials div { display: grid; gap: 2px; }
.credentials dt { font-size: .8125rem; color: var(--ink-soft); }
.credentials dd { font-size: .9375rem; line-height: 1.4; }

/* Row 4: services */
.row-block--services { padding-top: clamp(24px, 5vw, 48px); }
.service-quote { margin: 0; position: relative; padding-top: 52px; }
.service-quote::before {
  content: "\201C"; position: absolute; top: -8px; left: -4px;
  font: 700 7rem/1 var(--font-serif); color: var(--glass);
}
.service-quote p {
  margin: 0 0 1.2rem;
  font: 500 clamp(2rem, 1.3rem + 3.4vw, 3.5rem)/1.12 var(--font-serif);
  letter-spacing: -.012em; text-wrap: pretty;
}
.service-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.6rem 0 1.4rem; }
.service-list li {
  padding: 8px 14px; border-radius: 999px; font-size: .9375rem; line-height: 1.2;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.note { color: var(--ink-soft); font-size: .9375rem; }

/* Row 5: contact card */
.contact-card {
  background: var(--deep); color: var(--on-deep); border-color: transparent; border-radius: 28px;
  padding: 28px 22px 14px;
  display: grid; gap: 4px;
}
.contact-card .kicker { color: var(--glass); }
.contact-card .row-title { margin-bottom: .6rem; }
.contact-lede { color: color-mix(in srgb, var(--on-deep) 80%, transparent); margin-bottom: 1.2rem; }

.contact-list { display: grid; margin-bottom: 20px; }
.contact-list > div { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid rgba(238, 245, 243, .16); font-size: .9688rem; line-height: 1.45; }
.contact-list dt { font-size: .8125rem; color: var(--glass); }
.contact-list a { color: var(--on-deep); text-decoration-color: rgba(238, 245, 243, .4); overflow-wrap: anywhere; }

.contact-actions { display: grid; gap: 10px; margin-bottom: 8px; }
.contact-card .btn-ink { background: var(--glass); color: #12292d; }
.contact-card .btn-line { color: var(--on-deep); border-color: rgba(238, 245, 243, .45); }
.contact-card :focus-visible { outline-color: var(--glass); }

.fees { margin-top: 12px; border-top: 1px solid rgba(238, 245, 243, .16); font-size: .9375rem; }
.fees summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.fees summary::-webkit-details-marker { display: none; }
.fees summary::after {
  content: ""; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid var(--glass); border-bottom: 2px solid var(--glass);
  transform: rotate(45deg); transition: transform .2s ease;
}
.fees[open] summary::after { transform: rotate(-135deg); }
.fees p { color: color-mix(in srgb, var(--on-deep) 86%, transparent); }
.fees strong { color: var(--on-deep); }

.crisis-note {
  margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(169, 203, 196, .16); font-size: .9375rem; color: var(--on-deep);
}
.crisis-note a { color: var(--on-deep); font-weight: 600; }

/* ---------- Row 7: footer ---------- */
.site-footer { padding: 40px 0 calc(40px + var(--safe-bottom)); color: var(--ink-soft); font-size: .9375rem; }
.brand--footer { margin-bottom: .6rem; }
.footer-text { margin-bottom: .6rem; }
.footer-legal { margin: 1.2rem 0 0; font-size: .8125rem; }

/* ============ Tablet: 768px and up ============ */
@media (min-width: 768px) {
  body { font-size: 1.125rem; }
  .photo--hero .photo__img { aspect-ratio: 16 / 8; object-position: 70% 50%; }
  .photo__overlay { padding: 36px 0 64px; }
  .row-block--about { margin-top: -56px; }
  .about-card { padding: 44px 48px 40px; border-radius: 32px; }
  .lede { font-size: 1.625rem; }
  .credentials { grid-template-columns: 1fr 1fr; gap: 18px 28px; }
  .service-quote { padding-top: 70px; }
  .service-quote::before { font-size: 9rem; top: -14px; }

  .contact-card { padding: 44px 48px 22px; border-radius: 32px; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
  .contact-card__intro { grid-column: 1 / -1; max-width: 560px; }
  .contact-list { margin-bottom: 0; }
  .contact-list > div:first-child { border-top: 0; padding-top: 0; }
  .contact-actions { align-content: start; padding-top: 4px; }
  .fees, .crisis-note { grid-column: 1 / -1; }
  .photo--closing .photo__img { aspect-ratio: 21 / 8; }
}

/* ============ Desktop: 992px and up ============ */
@media (min-width: 992px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: none; }
  .navbar-collapse, .navbar-collapse.show { display: block; flex-basis: auto; padding-bottom: 0; }
  .navbar-nav { display: flex; align-items: center; gap: 4px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .nav-item + .nav-item { border-top: 0; }
  .nav-link { min-height: 44px; padding: 0 16px; border-radius: 10px; }
  .nav-link:hover { background: color-mix(in srgb, var(--glass) 30%, transparent); }
  .nav-item--cta { padding: 0 0 0 12px; }
  .nav-item--cta .btn { width: auto; min-height: 44px; }

  /* Split hero: panel floats over the empty wall on the left of the photograph */
  .photo--hero { height: clamp(520px, 62vh, 720px); }
  .photo--hero .photo__img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 0% 62%; }
  .photo__overlay { position: absolute; inset: 0; padding: 0; display: flex; align-items: center; }
  .photo__panel {
    max-width: 460px; padding: 36px 36px 34px; border-radius: 28px;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
  }
  .photo__title { font-size: clamp(2.75rem, 3.4vw, 3.5rem); }
  .row-block--about { margin-top: -72px; }
  .service-quote p { max-width: 20em; }
  .photo--closing .photo__img { aspect-ratio: auto; height: clamp(320px, 38vh, 460px); }
}

/* ============ Wide: 1280px and up ============ */
@media (min-width: 1280px) {
  .narrow { max-width: 820px; }
  .narrow--wide { max-width: 1060px; }
}

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