/* ══════════════════════════════════════════
   FIRE SITE KIT: THE HERO
   fire.co's front-door hero as Ignite and partners.fire.co lay it out
   (fire-ignite/pages.mjs, fire-partners/assets/partners.css): the window's
   full height, the words at its bottom left, the Fire mark in the accent
   over FIRE and the product's name in weight 500, then a line and the
   actions. The title, the line and the actions slide in one after another
   as the page opens. On a phone the words sit in the middle, full width.
   Put the hero net (hero-net.css) or a background (backgrounds.css) first
   inside it; the words sit above either.

   A static hero (.hero-static) is the same hero with nothing moving: the
   words are in place as the page opens, on fire.co's still hero ground
   (--hero-bg, a gradient in each theme), or on a photograph
   (.hero__picture) darkened toward the words so they read.
   ══════════════════════════════════════════ */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-24);
  overflow: hidden;
}

.hero__container {
  position: relative;
  z-index: var(--z-base);
  width: 90%;
  max-width: var(--page-max);
  margin: 0 auto;
}

.hero__content {
  max-width: 65%;
}

.hero__logo {
  width: 96px;
  height: 96px;
  margin: var(--space-5) 0 var(--space-6);
}

.hero__logo .fire-mark {
  width: 100%;
  height: 100%;
  color: var(--accent);
}

.hero__title {
  margin: 0;
  font-size: clamp(44px, 6vw, 72px);
  line-height: var(--leading-tight);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.hero__title strong {
  font-weight: 500;
}

.hero__lede {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* --- Coming in --- */
.hero__title,
.hero__lede,
.hero__actions {
  opacity: 0;
}

.hero__title {
  transform: translateX(-8px);
  animation: hero-in 800ms var(--ease-out) 400ms both;
}

.hero__lede {
  transform: translateX(-40px);
  animation: hero-in 800ms var(--ease-out) 500ms both;
}

.hero__actions {
  transform: translateX(-40px);
  animation: hero-in 800ms var(--ease-out) 600ms both;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- A static hero: nothing moves --- */
.hero-static {
  background: var(--hero-bg);
}

.hero-static .hero__title,
.hero-static .hero__lede,
.hero-static .hero__actions {
  opacity: 1;
  transform: none;
  animation: none;
}

/* The ghost button's edge, which the page's border colour loses on the
   lighter ground or a picture. */
.hero-static .btn-ghost {
  border-color: color-mix(in srgb, var(--text-3) 60%, transparent);
}

/* A photograph filling the hero, behind the words: the page's ground rises
   over it from the bottom, where the words are, and lies over its top, where
   the header's mark, name and links are. */
.hero__picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero__picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent) 0, transparent calc(var(--nav-height) * 2)),
    linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 45%, transparent 80%);
}

/* --- Phones --- */
@media (max-width: 768px) {
  .hero {
    justify-content: center;
    align-items: center;
    padding: calc(var(--nav-height) + var(--space-8)) var(--space-6) var(--space-16);
  }

  .hero__container {
    width: 100%;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__logo {
    width: 64px;
    height: 64px;
    margin: var(--space-5) 0 var(--space-4);
  }

  .hero__title {
    font-size: clamp(32px, 8vw, 44px);
  }

  /* The words sit in the middle here, so the picture dims evenly. */
  .hero__picture::after {
    background: color-mix(in srgb, var(--bg) 65%, transparent);
  }
}

@media (max-width: 400px) {
  .hero {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .hero__lede,
  .hero__actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
