/* ==========================================================================
   CARTA MAGNA — Home page chrome
   The hero, the light nav variant and the footer used by index.html. The old
   benefits deck that this file used to style is gone; the home page now links
   straight into the product sections.
   ========================================================================== */

:root {
  /* Keep the main content inside a 1280px frame. */
  --shell: 1280px;
}

/* The page field is animated between slides (falls back to an instant
   change in browsers without @property). */
@property --bn-field {
  syntax: "<color>";
  inherits: true;
  initial-value: #ede2d2;
}

.bn-page {
  --bn-field: #ede2d2;
  background-color: var(--bn-field);
}

/* --------------------------------------------------------------------------
   Nav — light variant
   -------------------------------------------------------------------------- */
.nav--light .brand {
  color: var(--text-strong);
}
.nav--light .brand__word span {
  color: var(--terracota);
}
.nav--light .brand__crest {
  filter: drop-shadow(0 4px 12px rgba(78, 51, 34, 0.28));
}
.nav--light .nav__link,
.nav--light .nav__link:link,
.nav--light .nav__link:visited {
  color: var(--text-muted);
}
.nav--light .nav__link:hover,
.nav--light .nav__link:focus-visible,
.nav--light .nav__link[aria-current="page"] {
  color: var(--text-strong);
}
.nav--light .nav__link::after {
  background: var(--magna-600);
}
.nav--light.is-stuck {
  background: color-mix(in srgb, var(--bn-field) 82%, transparent);
  border-bottom-color: rgba(78, 51, 34, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}
.nav--light .nav__burger {
  border-color: var(--border-light);
  background: color-mix(in srgb, var(--bn-field) 72%, transparent);
  color: var(--text-strong);
}

/* The reference art uses pill buttons */
.bn-page .btn {
  border-radius: var(--r-pill);
}

/* --------------------------------------------------------------------------
   Hero — the crest and the claim, and nothing else.
   -------------------------------------------------------------------------- */
.bn-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + clamp(16px, 4vh, 56px)) var(--gutter) clamp(48px, 9vh, 104px);
  text-align: center;
}
.bn-hero__inner {
  display: grid;
  justify-items: center;
  gap: clamp(26px, 4.6vh, 56px);
  width: min(100%, var(--shell));
}
.bn-hero__logo {
  display: block;
  /* Scales with the display on big screens, but never so tall that the
     claim is pushed below the fold. */
  width: clamp(168px, min(26vw, 44vh), 520px);
}
.bn-hero__logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 26px rgba(78, 51, 34, 0.17));
  animation: bn-float 7s var(--ease-ola) infinite alternate;
}
@keyframes bn-float {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -10px, 0);
  }
}
.bn-hero__claim {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 1.4rem + 7.4vw, 7.2rem);
  line-height: 0.94;
  letter-spacing: -0.022em;
  color: var(--text-strong);
  text-wrap: balance;
}
/* Room inside the line masks. The claim can carry a marked phrase whose
   selection band is taller than the line box, so the top also needs a little
   room; the matching negative margins cancel both, so the claim's own layout
   does not move — only the mask's clip box grows. */
.bn-hero__claim .line-mask {
  padding-top: 0.16em;
  margin-top: -0.16em;
  padding-bottom: 0.12em;
  margin-bottom: -0.08em;
}
.bn-hero__accent {
  color: var(--magna-700);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 620px) {
  .bn-hero {
    padding-inline: 16px;
  }
  /* The claim runs as two lines at every size: it scales with the phone
     instead of wrapping inside its line mask. */
  .bn-hero__claim {
    font-size: clamp(2.25rem, 10vw, 3.6rem);
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bn-hero__logo img {
    animation: none;
  }
}
