/*
Theme Name: Aspen Grove
Description: Block theme for the Aspen Grove Counseling site.
Version: 1.0.4
Requires at least: 6.6
Text Domain: aspen-grove
*/

:root {
  --radius-pill: 999px;
  --radius-card: 1.375rem;
}

:focus-visible {
  outline: 3px solid var(--wp--preset--color--focus);
  outline-offset: 0.2em;
}

.aspen-main {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.error404 .wp-site-blocks {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
}
.not-found-page,
.not-found-page .hero { display: grid; }
.not-found-page .grove-picture--hero {
  inset: 0;
  mask-image: none;
}
.not-found-page .grove-picture--hero img { object-position: center 64%; }
.not-found-page .hero::after {
  background: linear-gradient(180deg, rgb(var(--grove-rgb) / .93),
    rgb(var(--grove-rgb) / .78) 32% 76%, rgb(var(--grove-rgb) / .55));
}
.not-found-page .not-found-content {
  display: grid;
  place-items: center;
  min-height: clamp(20rem, 44vw, 25rem);
  padding-block: clamp(5rem, 10vw, 8rem) clamp(3rem, 8vw, 6rem);
  text-align: center;
}
.not-found-copy { display: grid; justify-items: center; gap: 1rem; }
.not-found-copy h1 { letter-spacing: -.04em; line-height: 1.07; text-wrap: balance; }
.not-found-copy p { max-width: 32ch; text-wrap: balance; }
.not-found-copy .not-found-primary {
  margin-block-start: .5rem;
  background: var(--gold);
  color: var(--grove-tone);
  text-shadow: none;
}
.not-found-copy .not-found-primary:hover { background: #fff1c9; }

/* Keep the existing inner pages while using the approved navigation and footer. */
html:not(.home-page, .inner-page) .site-header.g-header {
  background: var(--forest);
  color: var(--cream);
  border: 0;
}

html:not(.home-page, .inner-page) .g-header .header-inner { min-height: 55px; }

:root :where(.site-header, .site-footer) a { color: inherit; }
:root :where(.g-header, .g-footer) :focus-visible { outline-color: var(--gold); }

/* The designed pages specify their own typography and edge-to-edge layout. */
:is(.home-page, .inner-page) body { font: inherit; }
:is(.home-page, .inner-page) :where(h1, h2, h3) { line-height: inherit; color: inherit; }
:is(.home-page, .inner-page) :where(a) { color: inherit; }
:is(.home-page, .inner-page) .wp-site-blocks,
:is(.home-page, .inner-page) .wp-site-blocks > *,
.home-page #first-screen > * { margin-block: 0; }

.service-quote {
  margin: 0;
  padding: clamp(24px, 4vw, 48px) 18px;
  background: var(--paper);
  color: var(--forest);
  text-align: center;
}
figure.service-quote blockquote {
  max-width: 39rem;
  margin: 0 auto;
  font: italic 400 clamp(1.21rem, 2vw, 1.53rem)/1.4 var(--font-heading);
  text-wrap: pretty;
}
.service-quote blockquote > p { margin: 0; }
.service-quote blockquote > p:first-of-type::before { content: "“"; }
.service-quote blockquote > p:last-of-type::after { content: "”"; }
figure.service-quote .attribution {
  margin: .875rem 0 0;
  color: #466052;
  font: 700 .84rem/1.45 var(--font-body);
}
figure.service-quote .attribution .author { font-style: normal; }
figure.service-quote > .attribution { max-width: 39rem; margin-inline: auto; }
figure.service-quote > .attribution::before { content: "— "; }

.aspen-therapist-card {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  align-items: start;
  padding: clamp(1rem, 4vw, 2.25rem);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--radius-card);
  background: var(--wp--preset--color--card);
}

.aspen-therapist-photo img {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 50% 50% .8rem .8rem;
}

.aspen-therapist-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.aspen-therapist-content :is(h1, h2) {
  margin-block: 0 0.75rem;
}

.aspen-therapist-bio > :first-child {
  margin-block-start: 0;
}

.aspen-therapist-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

@media (min-width: 641px) {
  .aspen-therapist-card:has(> .aspen-therapist-photo img) {
    grid-template-columns: minmax(0, min(34%, 18rem)) minmax(0, 1fr);
  }
}

.aspen-office-form {
  max-width: 40rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--forest-surface-border);
  border-radius: var(--radius-card);
  background: var(--forest-surface);
}

.aspen-office-form :is(h2, p) {
  margin: 0 0 .75rem;
  overflow-wrap: anywhere;
}

.aspen-office-form h2 { font-size: clamp(1.85rem, 3vw, 2.8rem); }

:is(.aspen-office-form, .therapist-form-area) .aspen-contact-notice {
  padding: .65rem .8rem;
  border-inline-start: 3px solid var(--wp--preset--color--forest);
  background: var(--wp--preset--color--card);
}

.aspen-contact-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .85rem 1rem;
  margin-block: 1rem .8rem;
}

:is(.aspen-office-form, .therapist-form) label {
  display: block;
  font-size: .9rem;
  font-weight: 700;
}

:is(.aspen-office-form, .therapist-form) label span { font-weight: 400; }

:is(.aspen-office-form, .therapist-form) :is(input:not([type="hidden"]), textarea) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin-top: .35rem;
  padding: .7rem 1rem;
  border: 1px solid #748276;
  background: var(--wp--preset--color--card);
  color: var(--wp--preset--color--ink);
  font: 400 1rem/1.4 var(--font-body);
}

:is(.aspen-office-form, .therapist-form) input:not([type="hidden"]) { border-radius: var(--radius-pill); }
:is(.aspen-office-form, .therapist-form) :is(input, textarea)::placeholder {
  color: #62695f;
  opacity: 1;
}
:is(.aspen-office-form, .therapist-form) :is(input, textarea)[aria-invalid="true"] { border-color: #8f3024; }
.therapist-field-error:not([hidden]) {
  display: block;
  margin-top: .35rem;
  color: #8f3024;
  font-size: .85rem;
  line-height: 1.35;
}

:is(.aspen-office-form, .therapist-form) textarea {
  padding-block: .85rem;
  border-radius: var(--radius-card);
  resize: vertical;
}

#aspen-contact-guidance {
  margin: .45rem .75rem 0;
  color: #62695f;
  font-size: .8125rem;
  line-height: 1.45;
}

:is(.aspen-office-form, .therapist-form) button[type="submit"] {
  width: 100%;
  min-height: 48px;
  margin-top: 1rem;
  padding: .7rem 1.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  font: 600 .86rem/1.3 var(--font-body);
  letter-spacing: .075em;
  text-transform: uppercase;
  cursor: pointer;
}
