/* Landing hero — matches Website Screens/Landing/Desktop (1440px) and Mobile (410px).
   The loading animation opens onto this screen. */

.hero {
  --hero-gutter: clamp(32px, 4.3vw, 62px);

  position: relative;
  z-index: 2; /* sits above How It Works, which is revealed from behind it */
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

/* ---------- Photo: softened (pre-blurred) and darkened so the text reads clearly ---------- */

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  /* The softening blur is baked into images/hero.jpg and hero-mobile.jpg, so the
     browser doesn't have to blur a full-screen photo on every scroll frame */
  transform: scale(1.17);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.3);
  pointer-events: none;
}

/* ---------- Headline and links ---------- */

.hero__content {
  position: absolute;
  z-index: 1;
  top: 41%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2 * var(--hero-gutter));
  max-width: 15.6em;
  font-size: clamp(30px, 3.6vw, 60px);
  text-align: center;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1em;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.hero__title em {
  font-style: italic;
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 40px;
}

.hero__action {
  padding-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--white);
  text-decoration: none;
  /* Dashed underline, drawn so the dash size is the same in every browser */
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px) left bottom / 100% 2px no-repeat;
}

/* Dashes join into a solid line on hover */
.hero__action:hover,
.hero__action:focus-visible {
  background-image: linear-gradient(currentColor, currentColor);
}

/* The nav and logo at the bottom of this screen live in the site bar
   (site-bar.css), which slides up and docks at the top as you scroll. */

.hero a:focus-visible {
  outline: 1px solid var(--beige);
  outline-offset: 4px;
}

/* Desktop */
@media (min-width: 960px) {
  .hero__content {
    max-width: 15em;
  }

  .hero__actions {
    gap: 12px 60px;
    margin-top: 28px;
  }

  .hero__action {
    font-size: 12.5px;
  }
}

/* ---------- Text reveal ----------
   Text stays hidden while the loading animation plays, then fades up
   300ms after the loader is gone (when html loses the is-loading class). */

.reveal {
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0.3s),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0.3s);
}

html.is-loading .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: none;
}

.hero__title         { --reveal-delay: 0.3s; }
.hero__actions       { --reveal-delay: 0.45s; }
.site-bar__nav,
.site-bar__menu      { --reveal-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  html.is-loading .reveal {
    transform: none;
  }
}
