/*
 * Hilltop Latimer House homepage
 * Drupal 10 Layout Builder stylesheet
 * All selectors are scoped to .lh-home to avoid leaking into the global theme.
 */

.lh-home {
  --lh-plum-950: #25052f;
  --lh-plum-900: #31093e;
  --lh-plum-800: #451156;
  --lh-plum-100: #f4eef8;
  --lh-blue-700: #006884;
  --lh-blue-600: #007a9d;
  --lh-blue-100: #e8f5f8;
  --lh-ink: #25212a;
  --lh-muted: #5c5763;
  --lh-line: #d8d2de;
  --lh-white: #ffffff;
  --lh-off-white: #fbfafc;
  --lh-focus: #f0aa16;
  --lh-max-width: 90rem;
  --lh-radius: 0.375rem;
  --lh-shadow: 0 0.75rem 2rem rgb(37 5 47 / 0.08);

  color: var(--lh-ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

/*
 * Node 238 is rendered inside Cleanplus' constrained main-content container.
 * Break each homepage section out to the viewport edge while retaining the
 * readable inner width supplied by .lh-shell. This remains page-specific and
 * does not change the global header, footer, or other nodes.
 */
.page-node-238 {
  overflow-x: hidden;
  overflow-x: clip;
}

/*
 * Cleanplus and Layout Builder both add structural wrappers around the body
 * block. On this canvas page those wrappers must not impose their usual
 * article-width limit or horizontal gutters.
 */
.page-node-238 #main-content .main-content__container,
.page-node-238 #main-content .main-content__section,
.page-node-238 #block-cleanplus-content,
.page-node-238 #block-cleanplus-content > .content,
.page-node-238 article.node,
.page-node-238 .node__container,
.page-node-238 .node__main-content,
.page-node-238 .layout-builder__layout,
.page-node-238 .layout-builder__layout > .col-12,
.page-node-238 .field--name-body {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

.page-node-238 .lh-home {
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
}

@supports (width: 100dvw) {
  .page-node-238 .lh-home {
    width: 100dvw;
    margin-inline: calc(50% - 50dvw);
  }
}

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

.lh-home h1,
.lh-home h2,
.lh-home h3,
.lh-home p,
.lh-home ul,
.lh-home dl,
.lh-home dd {
  margin-block-start: 0;
}

.lh-home h1,
.lh-home h2,
.lh-home h3,
.lh-home dt {
  color: var(--lh-plum-900);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.lh-home h1 {
  max-width: 12ch;
  margin-block-end: 1rem;
  color: var(--lh-white);
  font-size: clamp(2.5rem, 5vw, 4.75rem);
}

.lh-home h2 {
  margin-block-end: 0.75rem;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
}

.lh-home h3 {
  margin-block-end: 0.85rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.lh-home p {
  margin-block-end: 1rem;
}

.lh-home img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.lh-home a {
  color: var(--lh-blue-700);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

.lh-home a:hover {
  color: var(--lh-plum-800);
}

.lh-home a:focus-visible {
  outline: 0.2rem solid var(--lh-focus);
  outline-offset: 0.25rem;
  border-radius: 0.125rem;
}

.lh-shell {
  width: min(
    calc(100% - clamp(2.5rem, 7vw, 9rem)),
    var(--lh-max-width)
  );
  margin-inline: auto;
}

.lh-section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.lh-eyebrow {
  margin-block-end: 0.65rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.lh-eyebrow--blue {
  color: var(--lh-blue-700);
}

.lh-section-heading {
  margin-block-end: clamp(2rem, 4vw, 3rem);
}

.lh-section-heading--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
}

.lh-section-heading--split > p {
  max-width: 38rem;
  margin-block-end: 0.2rem;
  color: var(--lh-muted);
}

/* Hero */
.lh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 39rem;
  background: var(--lh-plum-950);
}

.lh-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  padding-inline-start: clamp(1.5rem, 7vw, 9rem);
  padding-inline-end: clamp(2rem, 5vw, 6rem);
  color: var(--lh-white);
  background: var(--lh-plum-950);
}

.lh-hero__summary {
  max-width: 42rem;
  margin-block-end: 1.75rem;
  color: #f2edf4;
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
}

.lh-hero__media {
  min-height: 31rem;
  background: #ded9d3;
}

.lh-hero__media img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.lh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.lh-button {
  display: inline-flex;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  align-items: center;
  justify-content: center;
  border: 0.125rem solid transparent;
  border-radius: var(--lh-radius);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.lh-button--primary {
  color: var(--lh-white) !important;
  background: var(--lh-blue-600);
}

.lh-button--primary:hover,
.lh-button--primary:focus-visible {
  color: var(--lh-white) !important;
  background: var(--lh-blue-700);
}

.lh-button--secondary {
  color: var(--lh-white) !important;
  border-color: var(--lh-white);
  background: transparent;
}

.lh-button--secondary:hover,
.lh-button--secondary:focus-visible {
  color: var(--lh-plum-950) !important;
  background: var(--lh-white);
}

.lh-button--solid {
  color: var(--lh-white) !important;
  background: var(--lh-plum-800);
}

.lh-button--solid:hover,
.lh-button--solid:focus-visible {
  color: var(--lh-white) !important;
  background: var(--lh-plum-950);
}

.lh-button--outline {
  color: var(--lh-blue-700) !important;
  border-color: var(--lh-blue-700);
  background: var(--lh-white);
}

.lh-button--outline:hover,
.lh-button--outline:focus-visible {
  color: var(--lh-white) !important;
  background: var(--lh-blue-700);
}

.page-node-238 .lh-home .lh-reassurance {
  display: flex;
  flex-wrap: wrap;
  max-width: 42rem;
  gap: 0.65rem 2rem;
  margin: 0;
  padding: clamp(1.75rem, 3vw, 2rem) 0 0;
  border: 0;
  list-style: none;
}

.lh-reassurance li {
  padding: 0;
  border: 0;
  color: #e9e1ec;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Help cards */
.lh-help {
  background: var(--lh-off-white);
}

.lh-card-grid {
  display: grid;
  gap: 1rem;
}

.lh-card-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lh-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lh-card {
  display: flex;
  min-width: 0;
  min-height: 19rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  flex-direction: column;
  border-block-start: 0.25rem solid var(--lh-plum-800);
  border-radius: var(--lh-radius);
  background: var(--lh-white);
  box-shadow: var(--lh-shadow);
}

.lh-card p {
  color: var(--lh-muted);
}

.lh-text-link {
  display: inline-flex;
  width: fit-content;
  min-height: 2.75rem;
  margin-block-start: auto;
  align-items: center;
  font-weight: 800;
}

/* Survivor choice */
.lh-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--lh-plum-100);
}

.lh-choice__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  padding-inline-start: max(1.25rem, calc((100vw - var(--lh-max-width)) / 2));
  padding-inline-end: clamp(2rem, 5vw, 5rem);
}

.lh-choice__summary {
  max-width: 46rem;
  color: var(--lh-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.lh-choice__media {
  min-height: 34rem;
  background: #e2ddd8;
}

.lh-choice__media img {
  height: 100%;
  object-fit: cover;
}

.lh-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 2rem 0;
}

.lh-facts > div {
  padding-inline: 1.25rem;
  border-inline-start: 0.0625rem solid #aa9eb0;
}

.lh-facts > div:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.lh-facts dt {
  margin-block-end: 0.4rem;
  font-size: 1rem;
  line-height: 1.3;
}

.lh-facts dd {
  color: var(--lh-muted);
  font-size: 0.95rem;
}

/* Safehouse feature */
.lh-safehouse {
  background: var(--lh-white);
}

.lh-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  overflow: hidden;
  border: 0.0625rem solid var(--lh-line);
  border-radius: var(--lh-radius);
  box-shadow: var(--lh-shadow);
}

.lh-feature__media {
  min-height: 27rem;
  background: #e6e2dc;
}

.lh-feature__media img {
  height: 100%;
  object-fit: cover;
}

.lh-feature__content {
  display: flex;
  padding: clamp(2rem, 5vw, 4.5rem);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.lh-feature__content p:not(.lh-eyebrow) {
  max-width: 44rem;
  color: var(--lh-muted);
}

.lh-feature__content .lh-button {
  margin-block-start: 0.75rem;
}

/* Learning resources */
.lh-learn {
  background: var(--lh-plum-100);
}

.lh-card--resource {
  min-height: 16rem;
  border-block-start-color: var(--lh-blue-700);
  box-shadow: none;
}

/* Secondary calls to action */
.lh-support {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-block-start: 0.0625rem solid var(--lh-line);
  background: var(--lh-white);
}

.lh-support__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lh-support__item {
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}

.lh-support__item:first-child {
  padding-inline-start: 0;
}

.lh-support__item + .lh-support__item {
  border-inline-start: 0.0625rem solid var(--lh-line);
}

.lh-support__item h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.lh-support__item p {
  max-width: 38rem;
  color: var(--lh-muted);
}

.lh-actions--compact {
  margin-block-start: 1.5rem;
}

/* Tablet */
@media (max-width: 64rem) {
  .lh-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  }

  .lh-card-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lh-card {
    min-height: 16rem;
  }

  .lh-choice {
    grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  }

  .lh-facts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .lh-facts > div,
  .lh-facts > div:first-child {
    padding-inline: 0;
    padding-block-start: 1rem;
    border-block-start: 0.0625rem solid #aa9eb0;
    border-inline-start: 0;
  }
}

/* Mobile */
@media (max-width: 47.99rem) {
  .lh-shell {
    width: min(calc(100% - 2rem), var(--lh-max-width));
  }

  .lh-section {
    padding-block: 3.5rem;
  }

  .lh-section-heading--split,
  .lh-hero,
  .lh-choice,
  .lh-feature,
  .lh-support__grid {
    grid-template-columns: 1fr;
  }

  .lh-hero__content,
  .lh-choice__content {
    padding: 3.5rem 1rem;
  }

  .lh-hero__media {
    min-height: 22rem;
  }

  .lh-choice__media {
    min-height: 24rem;
  }

  .lh-card-grid--four,
  .lh-card-grid--three {
    grid-template-columns: 1fr;
  }

  .lh-card {
    min-height: 0;
  }

  .lh-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .lh-button {
    width: 100%;
  }

  .page-node-238 .lh-home .lh-reassurance {
    flex-direction: column;
    gap: 0.75rem;
    padding-block-start: 1.5rem;
  }

  .lh-reassurance li,
  .lh-reassurance li:first-child {
    padding: 0;
    border: 0;
  }

  .lh-feature__media {
    min-height: 21rem;
  }

  .lh-support__item,
  .lh-support__item:first-child {
    padding-inline: 0;
  }

  .lh-support__item + .lh-support__item {
    margin-block-start: 2.5rem;
    padding-block-start: 2.5rem;
    border-block-start: 0.0625rem solid var(--lh-line);
    border-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lh-home *,
  .lh-home *::before,
  .lh-home *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  .lh-card,
  .lh-feature,
  .lh-support__item + .lh-support__item {
    border-color: currentColor;
  }

  .lh-home a {
    text-decoration-thickness: 0.15em;
  }
}

@media (forced-colors: active) {
  .lh-button,
  .lh-card,
  .lh-feature {
    border: 0.125rem solid ButtonText;
  }

  .lh-home a:focus-visible {
    outline-color: Highlight;
  }
}
