/* ==========================================================================
   Full-bleed photographic hero + the header that sits over it

   The photograph is bright at the top (white ceiling) and light at the bottom
   (oak floor), so text cannot sit on it directly. Two scrims do the work: a
   heavy bottom one that carries the copy, and a light top one that keeps the
   transparent header legible. The upper half of the photo is left clear.

   Copy follows the StoryBrand order: the customer's problem and desire (title),
   the promise (lede), a direct call to action, a three-step plan, and one line
   of authority.
   ========================================================================== */

.hero {
  --hero-header-offset: 4.75rem; /* matches .site-header__bar min-block-size */
  position: relative;
  display: grid;
  align-content: end;
  min-block-size: max(36rem, 100svh);
  /* Pull the hero up under the sticky header so the photo runs to the top
     edge. Without JS the header simply stays solid over it. */
  margin-block-start: calc(var(--hero-header-offset) * -1);
  padding-block: calc(var(--hero-header-offset) + var(--space-xl)) var(--space-xl);
  overflow: clip;
  isolation: isolate;
}

.hero__media,
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__bg {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  /* Keep the lit glasses wall and the reception desk; lose floor, not frames. */
  object-position: 50% 36%;
}

.hero__scrim {
  z-index: 0;
  background:
    linear-gradient(
      to bottom,
      oklch(17.5% 0.016 258 / 0.58) 0,
      oklch(17.5% 0.016 258 / 0.14) 13%,
      transparent 24%
    ),
    linear-gradient(
      to top,
      oklch(17.5% 0.016 258 / 0.95) 0,
      oklch(17.5% 0.016 258 / 0.88) 28%,
      oklch(17.5% 0.016 258 / 0.62) 46%,
      oklch(17.5% 0.016 258 / 0.24) 64%,
      transparent 82%
    ),
    linear-gradient(
      to right,
      oklch(17.5% 0.016 258 / 0.4) 0,
      transparent 58%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-lg);
  align-items: end;
}

.hero .eyebrow {
  color: oklch(93% 0.008 85 / 0.9);
  text-shadow: 0 1px 12px oklch(0% 0 0 / 0.6);
}

.hero__title {
  font-size: clamp(2.5rem, 1.2rem + 4.2vw, 5.25rem);
  line-height: 1;
  max-inline-size: 26ch;
  color: var(--color-night-text);
  text-shadow: 0 2px 24px oklch(0% 0 0 / 0.55), 0 0 2px oklch(0% 0 0 / 0.35);
}

.hero__title em {
  font-style: italic;
  color: var(--color-brass-glow);
}

.hero__lede {
  margin-block-start: var(--space-md);
  max-inline-size: 44ch;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: oklch(93% 0.008 85 / 0.92);
  text-shadow: 0 1px 14px oklch(0% 0 0 / 0.55);
}

.hero__actions {
  margin-block-start: var(--space-lg);
}

/* --- The three-step plan --------------------------------------------------
   Dark glass so it holds against whichever part of the photo sits behind it. */

.hero__plan {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    148deg,
    oklch(17.5% 0.016 258 / 0.78),
    oklch(17.5% 0.016 258 / 0.58)
  );
  border-color: oklch(100% 0 0 / 0.2);
}

.hero__plan-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-brass-glow);
}

.hero__steps {
  display: grid;
  gap: var(--space-sm);
  counter-reset: step;
}

.hero__steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: var(--space-xs);
  align-items: baseline;
}

.hero__steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-brass-glow);
}

.hero__steps strong {
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-night-text);
}

.hero__steps span {
  grid-column: 2;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: oklch(93% 0.008 85 / 0.78);
}

.hero__proof {
  margin: 0;
  padding-block-start: var(--space-sm);
  border-block-start: 1px solid oklch(100% 0 0 / 0.16);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(93% 0.008 85 / 0.72);
}

@media (min-width: 62rem) {
  .hero__content {
    grid-template-columns: minmax(0, 1fr) 21.5rem;
    gap: var(--space-2xl);
  }
}

/* --- Phones ----------------------------------------------------------------
   A 4:3 photograph cropped to portrait. Favour the glasses wall, and compact
   the plan so the buttons land on screen. */

@media (max-width: 47.99rem) {
  .hero {
    min-block-size: max(34rem, 100svh);
    padding-block: calc(var(--hero-header-offset) + var(--space-md)) var(--space-lg);
  }

  .hero__bg {
    object-position: 24% 40%;
  }

  .hero__scrim {
    background:
      linear-gradient(
        to bottom,
        oklch(17.5% 0.016 258 / 0.62) 0,
        transparent 22%
      ),
      linear-gradient(
        to top,
        oklch(17.5% 0.016 258 / 0.96) 0,
        oklch(17.5% 0.016 258 / 0.9) 46%,
        oklch(17.5% 0.016 258 / 0.55) 70%,
        transparent 92%
      );
  }

  .hero .eyebrow {
    margin-block-end: var(--space-xs);
  }

  .hero__title {
    font-size: clamp(2.125rem, 1.4rem + 3.4vw, 2.75rem);
  }

  .hero__lede {
    margin-block-start: var(--space-sm);
    font-size: 1rem;
  }

  .hero__actions {
    margin-block-start: var(--space-md);
    gap: var(--space-xs);
  }

  .hero__actions .btn {
    padding: 0.8rem 1.25rem;
    font-size: var(--text-sm);
  }

  .hero__plan {
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-xs);
  }

  .hero__steps {
    gap: var(--space-xs);
  }

  .hero__steps li {
    grid-template-columns: 1.5rem 1fr;
  }

  .hero__steps li::before {
    grid-row: auto;
    font-size: 1.25rem;
  }

  /* On a phone the step names carry the plan; the descriptions are extra. */
  .hero__steps span,
  .hero__proof {
    display: none;
  }
}

/* A slow settle on load: the image eases in from slightly zoomed. Transform
   only, once, and not at all under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero__bg {
    animation: hero-settle 2.4s var(--ease-out-expo) both;
  }
}

@keyframes hero-settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

/* --- Header over the hero --------------------------------------------------
   On a page with a hero the header starts transparent (the CSS default, so
   there is no solid-bar flash before JS runs) and JS sets data-over-hero="false"
   once the hero has scrolled behind it. Gated on .js: without script the
   header cannot change state, so it stays the solid bar. */

.site-header {
  transition: background-color var(--duration-normal) var(--ease-standard),
    border-color var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard);
}

.wordmark__logo--light {
  display: none;
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom-color: transparent;
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .wordmark__logo--dark {
  display: none;
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .wordmark__logo--light {
  display: block;
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .wordmark__meta {
  color: oklch(93% 0.008 85 / 0.72);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .nav__link,
.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .header__phone {
  color: oklch(93% 0.008 85 / 0.86);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .nav__link:hover,
.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .nav__link[aria-current="page"] {
  color: var(--color-night-text);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .nav__link::after {
  background: var(--color-brass-glow);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .btn {
  --btn-bg: var(--color-bone);
  --btn-fg: var(--color-night);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .btn:hover {
  --btn-fg: var(--color-bone);
}

.js body:has([data-hero-overlay]) .site-header:not([data-over-hero="false"]) .nav-toggle {
  color: var(--color-night-text);
  border-color: oklch(100% 0 0 / 0.32);
}
