/* ---------------------------------------------------------------
   Billy O'Leary Counseling
   Palette and type taken from the existing Squarespace site:
     slate  #7B949C   page background
     navy   #182241   body copy and dark headings
     cream  #FFF5D9   hero headings, buttons
     steel  #536C7C   button label
     Marcellus (headings) / PT Serif (body)
   Fonts are self-hosted — run `npm run fetch-fonts` once.
   --------------------------------------------------------------- */

@import url("./fonts.css");

:root {
  --slate: #7b949c;
  --slate-soft: #82999f;
  --navy: #182241;
  --cream: #fff5d9;
  --steel: #536c7c;
  --rule: rgba(24, 34, 65, 0.18);
  --display: Marcellus, "Palatino Linotype", Palatino, Georgia, serif;
  --body: "PT Serif", Georgia, "Times New Roman", serif;
  --wrap: 1360px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--slate);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.45em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 2.95rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.05rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.35em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

/* height:auto is load-bearing — without it the width/height HTML attributes
   win and every aspect-ratio below is silently ignored. */
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--cream);
  padding: .75rem 1.1rem; z-index: 100; text-decoration: none;
}
.skip:focus { left: .75rem; top: .75rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------- header ---------------- */

.site-header { padding: 1.75rem 0 1.5rem; }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}

.brand {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--cream);
  text-decoration: none;
  padding-bottom: 2px;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 1rem; font-weight: 400;
  min-height: 56px; padding: 0 2rem;
  border-radius: 300px; border: 1px solid transparent;
  background: var(--cream); color: var(--steel);
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.btn:hover { background: #fffaea; color: var(--navy); }

.btn-outline {
  background: transparent; border-color: var(--cream); color: var(--cream);
}
.btn-outline:hover { background: var(--cream); color: var(--steel); }

/* ---------------- hero ---------------- */

.hero { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 6vw, 5rem); }

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy { color: var(--cream); max-width: 27rem; }
.hero-copy h1 { color: var(--cream); margin-bottom: .9rem; }
.hero-copy p { font-size: 1.0625rem; line-height: 1.55; margin-bottom: 2.25rem; }

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  object-fit: cover;
}

/* ---------------- split sections ---------------- */

.split { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.split .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.split.reverse .wrap { grid-template-columns: .85fr 1.15fr; }
.split-figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.prose { max-width: 62ch; }
.prose h1, .prose h2 { color: var(--navy); margin-bottom: .75rem; }

.lede { font-size: 1.09rem; }

/* ---------------- form ---------------- */

.form { max-width: 34rem; margin-top: 2.25rem; }

.field { margin-bottom: 1.25rem; }
.field > label,
.legend {
  display: block; font-size: .95rem; color: var(--navy); margin-bottom: .4rem;
}
.req { opacity: .65; font-size: .85em; }

.field input, .field textarea {
  width: 100%;
  font-family: var(--body); font-size: 1rem; color: var(--navy);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .8rem .9rem;
}
.field input:focus, .field textarea:focus { border-color: var(--navy); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }

.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .name-row { grid-template-columns: 1fr; } }

.checkbox-field {
  display: grid; grid-template-columns: auto 1fr; gap: .65rem;
  align-items: start; margin: 1.5rem 0;
}
.checkbox-field input { width: 1.05rem; height: 1.05rem; margin: .25rem 0 0; accent-color: var(--navy); }
.checkbox-field label { font-size: .92rem; line-height: 1.5; color: var(--navy); }

.note { font-size: .95rem; margin-bottom: 1.75rem; }

.form-status { margin-top: 1rem; font-size: .96rem; padding: .85rem 1rem; border-radius: 6px; display: none; }
.form-status[data-state="ok"] { display: block; background: rgba(255,245,217,.85); color: var(--navy); }
.form-status[data-state="error"] { display: block; background: rgba(24,34,65,.1); color: var(--navy); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- contact details ---------------- */

.details { list-style: none; margin: 2rem 0 0; padding: 0; }
.details li { padding: .85rem 0; border-top: 1px solid var(--rule); }
.details li:last-child { border-bottom: 1px solid var(--rule); }
.details .label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-bottom: .15rem; }
.details a { text-decoration: none; }
.details a:hover { text-decoration: underline; }

.crisis {
  border-left: 2px solid var(--navy);
  padding-left: 1.1rem; margin-top: 2.25rem;
  font-size: .95rem; max-width: 48ch;
}

/* ---------------- footer ---------------- */

.site-footer { padding: clamp(3.5rem, 8vw, 7rem) 0 3rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-lines { font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.35rem); line-height: 1.45; letter-spacing: -0.02em; }
.footer-lines a { text-decoration: none; }
.footer-lines a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; font-size: .92rem; margin-top: 1.5rem; }

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  .hero .wrap,
  .split .wrap,
  .split.reverse .wrap,
  .site-footer .wrap { grid-template-columns: 1fr; }

  .hero-copy { max-width: none; }
  .hero-figure img { aspect-ratio: auto; height: 300px; max-height: none; }
  .split-figure img { aspect-ratio: auto; height: 340px; }
  .split .wrap > .split-figure { order: 2; }
}

@media (max-width: 600px) {
  .site-header { padding: 1.25rem 0 1rem; }
  .site-header .wrap { gap: .6rem; }
  .site-nav { gap: 1.5rem; }
}
