/* Homepage hero geometry. Loaded after shared styles by design. */

#home .hero {
  --hero-top-clearance: calc(var(--global-nav-height) + clamp(16px, 2.6svh, 30px));
  --hero-field-clearance: clamp(178px, 25svh, 270px);
  box-sizing: border-box;
  height: 100svh;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

@supports (height: 100dvh) {
  #home .hero {
    height: 100dvh;
  }
}

#home .hero-canvas-wrap,
#home .hero-canvas {
  height: 100%;
}

#home .hero-canvas {
  opacity: 0;
  transition: opacity 160ms ease-out;
}

#home .hero-canvas.is-ready {
  opacity: 1;
}

#home .hero-content {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding-top: var(--hero-top-clearance);
  padding-bottom: var(--hero-field-clearance);
  transform: none;
}

#home .hero-frame {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-block: 0;
  text-align: center;
}

#home .hero-kicker {
  margin-bottom: 14px;
}

#home .hero-title {
  width: 100%;
  max-width: none !important;
  margin: 0 auto 16px;
  display: grid;
  justify-items: center;
  font-size: clamp(3.55rem, 5.7vw, 5.35rem) !important;
  line-height: 0.94 !important;
  text-align: center;
}

#home .hero-title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

#home .hero-copy-plain {
  max-width: 590px !important;
  margin-inline: auto;
  font-size: clamp(1rem, 1.35vw, 1.18rem) !important;
  line-height: 1.5 !important;
  text-align: center;
}

#home .hero-actions {
  margin-top: 20px;
}

@media (max-width: 900px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + clamp(14px, 2.4svh, 24px));
    --hero-field-clearance: clamp(160px, 26svh, 232px);
  }

  #home .hero-content {
    padding-top: var(--hero-top-clearance);
    padding-bottom: var(--hero-field-clearance);
  }

  #home .hero-title {
    max-width: 14ch !important;
    font-size: clamp(3.3rem, 7.2vw, 4.6rem) !important;
  }

  #home .hero-title-line {
    width: auto;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + 12px);
    --hero-field-clearance: clamp(138px, 24svh, 196px);
    min-height: 0;
  }

  #home .hero-content {
    padding-top: var(--hero-top-clearance);
    padding-bottom: var(--hero-field-clearance);
  }

  #home .hero-title {
    max-width: 11.5ch !important;
    margin-bottom: 15px;
    font-size: clamp(2.65rem, 11.5vw, 3.45rem) !important;
  }

  #home .hero-copy-plain {
    max-width: 330px !important;
    font-size: 0.92rem !important;
    line-height: 1.42 !important;
  }

  #home .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 18px;
  }

  #home .hero .hero-actions .btn.primary {
    width: min(248px, 100%);
  }

  #home .hero-canvas-wrap {
    opacity: 0.86;
  }

  #home .grain-overlay {
    opacity: 0.10;
  }

  #home .hero::before {
    background:
      radial-gradient(ellipse at 50% 49%, rgba(250, 250, 246, 0.60) 0%, rgba(250, 250, 246, 0.36) 25%, rgba(250, 250, 246, 0) 54%),
      radial-gradient(circle at 12% 6%, rgba(236, 218, 168, 0.18), rgba(236, 218, 168, 0) 32%);
  }
}

@media (max-width: 380px) {
  #home .hero {
    --hero-field-clearance: clamp(126px, 22svh, 168px);
  }

  #home .hero-title {
    max-width: 10.5ch !important;
    font-size: clamp(2.45rem, 11.2vw, 2.85rem) !important;
  }

  #home .hero-copy-plain {
    max-width: 300px !important;
    font-size: 0.88rem !important;
  }

  #home .hero .hero-actions .btn.primary {
    width: min(236px, 100%);
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + 6px);
    --hero-field-clearance: clamp(116px, 20svh, 148px);
  }

  #home .hero-kicker {
    margin-bottom: 7px;
  }

  #home .hero-title {
    margin-bottom: 10px;
    font-size: clamp(2.35rem, 10.4vw, 2.8rem) !important;
  }

  #home .hero-copy-plain {
    font-size: 0.84rem !important;
    line-height: 1.32 !important;
  }

  #home .hero-actions {
    gap: 2px;
    margin-top: 12px;
  }

  #home .hero .hero-actions .btn.primary {
    width: min(232px, 100%);
  }
}

@media (orientation: landscape) and (max-width: 900px) and (max-height: 500px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + 4px);
    --hero-field-clearance: clamp(72px, 20svh, 96px);
  }

  #home .hero-frame {
    max-width: 760px;
  }

  #home .hero-kicker {
    display: none;
  }

  #home .hero-title {
    max-width: none !important;
    margin-bottom: 8px;
    font-size: clamp(2.55rem, 5.8vw, 3.2rem) !important;
    line-height: 0.92 !important;
  }

  #home .hero-title-line {
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
  }

  #home .hero-copy-plain {
    max-width: 620px !important;
    font-size: 0.8rem !important;
    line-height: 1.28 !important;
  }

  #home .hero-actions {
    flex-direction: row;
    gap: 8px;
    margin-top: 8px;
  }

  #home .hero .hero-actions .btn {
    min-height: 44px;
    padding-inline: 16px;
  }
}

@media (max-height: 780px) and (min-width: 701px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + 14px);
    --hero-field-clearance: clamp(152px, 24svh, 190px);
    min-height: 0;
  }

  #home .hero-content {
    padding-top: var(--hero-top-clearance);
    padding-bottom: var(--hero-field-clearance);
  }

  #home .hero-title {
    margin-bottom: 15px;
    font-size: clamp(3.45rem, 5.5vw, 4.8rem) !important;
  }

  #home .hero-copy-plain {
    font-size: 1rem !important;
    line-height: 1.42 !important;
  }

  #home .hero-actions {
    margin-top: 18px;
  }

  #home .hero .hero-actions .btn {
    min-height: 44px;
  }
}

@media (max-height: 680px) and (min-width: 701px) {
  #home .hero {
    --hero-top-clearance: calc(var(--global-nav-height) + 8px);
    --hero-field-clearance: clamp(132px, 22svh, 164px);
  }

  #home .hero-title {
    margin-bottom: 12px;
    font-size: clamp(3rem, 5vw, 4rem) !important;
  }

  #home .hero-kicker {
    margin-bottom: 8px;
  }

  #home .hero-copy-plain {
    font-size: 0.94rem !important;
    line-height: 1.36 !important;
  }

  #home .hero-actions {
    margin-top: 14px;
  }
}

/* Final mobile CTA pairing: keep hero buttons visually equal on small screens. */
@media (max-width: 700px) {
  #home .hero .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 300px);
    justify-content: stretch;
    justify-items: stretch;
    gap: 8px;
    margin-inline: auto;
  }

  #home .hero .hero-actions .btn,
  #home .hero .hero-actions .btn.primary,
  #home .hero .hero-actions .btn.secondary {
    width: 100% !important;
    inline-size: 100% !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    justify-self: stretch !important;
    justify-content: center;
    padding-inline: 16px;
    text-align: center;
  }
}

@media (max-width: 380px) {
  #home .hero .hero-actions {
    width: min(100%, 284px);
    gap: 7px;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  #home .hero .hero-actions {
    width: min(100%, 284px);
    gap: 6px;
  }
}
