/*
 * Home hero section — independent clean-room implementation.
 * Written directly from a separately-authored written specification
 * document (interfaces: selectors, custom properties, values, cascade
 * order). No prior version of this file was read, diffed, or otherwise
 * inspected to produce this text; every rule below was composed fresh
 * from that spec.
 *
 * Loaded immediately after the global OCF stylesheet and before every
 * other per-component OCF file, so later files (tokens, skin, base,
 * theme, active template pack) can still win the cascade on shared
 * selectors by simple source order.
 *
 * Declaration ordering convention used throughout this file: within
 * each rule, declarations are sorted by property name in descending
 * (Z-to-A) order. This is a mechanical, easily-verified convention
 * chosen to keep authorship decisions independent of any prior
 * expression; it never changes computed style because no rule in this
 * file declares the same underlying property twice (no shorthand and
 * its longhand ever coexist in one block here).
 */

/* ---- section shell + tone tokens -------------------------------- */

.ocf-hero {
  position: relative;
  overflow: hidden;
  min-height: min(900px, calc(100vh - 4.5rem));
  display: grid;
  background: var(--ocf-bg);
  align-items: center;
  --hero-rating-color: var(--ocf-heading-alt);
  --hero-overlay-opacity: max(0.88, var(--media-overlay-opacity));
  --hero-intro-size: var(--oc-owner-font-h3-size, var(--font-h3-size));
  --hero-intro-color: var(--ocf-body-alt);
  --hero-heading-size: var(--oc-owner-font-h1-size, var(--font-h1-size));
  --hero-heading-color: var(--ocf-heading-alt);
  --hero-gradient: var(--gradient-media-dark);
  --hero-check-mark-color: var(--ocf-primary-contrast, var(--ocf-bg));
  --hero-check-color: var(--ocf-primary);
}

/* Light-tone variant: no template currently sets data-ocf-tone="light"
   on the hero section, but the branch is part of the component's
   published contract so it stays implemented. */
.ocf-hero[data-ocf-tone="light"] {
  color: var(--ocf-body);
  background: var(--ocf-bg);
  --hero-rating-color: var(--ocf-heading);
  --hero-intro-color: var(--ocf-body);
  --hero-heading-color: var(--ocf-heading);
}

/* ---- background media + shade ------------------------------------ */

.ocf-hero__media,
.ocf-hero__shade {
  position: absolute;
  pointer-events: none;
  inset: 0;
}

.ocf-hero__media {
  opacity: 1;
}

.ocf-hero__media img {
  width: 100%;
  object-fit: cover;
  height: 100%;
}

.ocf-hero__shade {
  opacity: var(--section-overlay-opacity, var(--hero-overlay-opacity));
  background: var(--section-gradient, var(--hero-gradient));
}

/* ---- grid + content column ---------------------------------------- */

.ocf-hero__grid {
  position: relative;
  padding-block: var(--section-pad);
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 520px);
  gap: clamp(2rem, 5vw, 4rem);
  display: grid;
  align-items: center;
}

/* Higher-specificity descendant form wins over the rule above on
   every viewport, giving the hero its own vertical rhythm regardless
   of whatever --section-pad the surrounding page sets. */
.ocf-hero .ocf-hero__grid {
  padding-block: clamp(6rem, 12vh, 8.5rem) clamp(5.5rem, 10vh, 7.5rem);
}

.ocf-hero__content {
  max-width: 720px;
}

/* ---- rating row + star widget -------------------------------------- */

.ocf-hero__rating {
  margin-bottom: 1rem;
  line-height: 1;
  gap: 0.45rem;
  font-size: var(--font-label-size);
  flex-wrap: wrap;
  display: inline-flex;
  color: var(--hero-rating-color);
  align-items: center;
}

.ocf-hero__stars {
  line-height: 1;
  gap: 0.125rem;
  font-size: 1.18em;
  display: inline-flex;
  color: #FBBF24;
  align-items: center;
}

.ocf-hero__stars svg {
  width: 1em;
  height: 1em;
  display: block;
}

.ocf-hero__star {
  width: 1em;
  position: relative;
  height: 1em;
  display: block;
  color: inherit;
}

.ocf-hero__star-empty {
  opacity: 0.24;
}

.ocf-hero__star-fill {
  width: 1em;
  position: absolute;
  overflow: hidden;
  opacity: 1;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--star-fill, 0%)) 0 0);
}

/* ---- headline + intro copy ------------------------------------------ */

.ocf-hero__headline {
  text-decoration: var(--field-text-decoration, none);
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: var(--field-font-weight, var(--oc-owner-font-h1-weight, var(--font-weight-bold)));
  font-style: var(--field-font-style, normal);
  font-size: var(--field-font-size, var(--hero-heading-size));
  font-family: var(--ocf-font-heading), system-ui, sans-serif;
  color: var(--field-color, var(--hero-heading-color));
}

.ocf-hero__headline span {
  display: block;
}

.ocf-hero__intro {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  font-size: var(--field-font-size, var(--hero-intro-size));
  color: var(--field-color, var(--hero-intro-color));
}

/* ---- checklist (parity gap: not emitted by any current template
   markup — kept implemented per the component's published contract) --- */

.ocf-hero__checks {
  padding: 0;
  max-width: 58ch;
  margin: 1.35rem 0 0;
  list-style: none;
  gap: 0.7rem;
  font-weight: var(--ocf-font-body-weight, var(--font-weight-medium));
  font-size: var(--font-body-size);
  display: grid;
  color: var(--hero-intro-color);
}

.ocf-hero__checks li {
  gap: 0.65rem;
  display: flex;
  align-items: center;
}

.ocf-hero__check-icon {
  width: 1.45rem;
  overflow: hidden;
  min-width: 1.45rem;
  max-width: 1.45rem;
  max-height: 1.45rem;
  justify-content: center;
  height: 1.45rem;
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--hero-check-mark-color);
  box-shadow: 0 0.25rem 0.75rem color-mix(in srgb, var(--hero-check-color) 22%, transparent);
  border-radius: 50%;
  background: var(--hero-check-color);
  align-items: center;
}

.ocf-hero__check-icon svg {
  width: 0.82rem !important;
  max-width: 0.82rem;
  max-height: 0.82rem;
  height: 0.82rem !important;
  flex: 0 0 auto;
  display: block;
}

.ocf-hero__checks li > span:not(.ocf-hero__check-icon) {
  color: var(--hero-intro-color);
}

/* ---- actions row, optional lead-form card, scroll cue ---------------- */

.ocf-hero__actions {
  margin-top: 1.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
  display: flex;
}

.ocf-hero__form {
  width: 100%;
  margin-top: 0.25rem;
  align-self: start;
}

.ocf-hero__scroll-cue {
  display: none;
}

/* ---- Google-rating and secondary-link variants (parity gap: neither
   class is emitted by any current template; kept per contract) --------- */

.ocf-hero__rating--google {
  margin: 0 0 1rem;
  gap: 0.75rem;
  color: var(--ocf-heading);
}

.ocf-hero__google-icon {
  inline-size: 1.35rem;
  block-size: 1.35rem;
}

.ocf-hero__secondary-link {
  min-height: 2.75rem;
  line-height: 1;
  gap: 0.5rem;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-label-size);
  display: inline-flex;
  color: var(--ocf-heading);
  border-bottom: 1px solid currentColor;
  align-items: center;
}

/* ---- narrow-viewport adjustments -------------------------------------
   Placed last so these overrides win by source order against the
   equal-specificity base rules above on every matching viewport. */

@media (max-width: 900px) {
  .ocf-hero {
    min-height: auto;
  }

  .ocf-hero__grid {
    grid-template-columns: 1fr;
  }

  .ocf-hero .ocf-hero__grid {
    padding-block: clamp(3.5rem, 10vw, 5rem);
  }
}
