@layer components {

  /* ---------- photo hero (home, brunch) ---------- */
  .hero__frame {
    height: calc(100svh - 2 * var(--frame-gap));
    min-height: 560px; max-height: 1080px;
    display: grid; align-content: end;
  }
  .hero__media { position: absolute; inset: 0; z-index: -1; }
  .hero__media picture, .hero__img { width: 100%; height: 100%; object-fit: cover; }
  .hero__media::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(90deg, rgba(34, 22, 11, .78) 0%, rgba(34, 22, 11, .5) 38%, rgba(34, 22, 11, 0) 68%),
      linear-gradient(0deg, rgba(34, 22, 11, .55) 0%, rgba(34, 22, 11, 0) 42%),
      linear-gradient(180deg, rgba(34, 22, 11, .4) 0%, rgba(34, 22, 11, 0) 26%);
  }
  /* the top padding keeps the title clear of the logo and the nav, whatever the screen height */
  .hero__copy { padding: calc(var(--logo-h) + 40px) var(--gutter) clamp(32px, 4.5svh, 64px); color: var(--paper); }
  .hero__title { max-width: 12.5ch; color: var(--paper); }
  .hero__lead { margin-top: clamp(14px, 2.2svh, 26px); max-width: 52ch; color: rgba(255, 249, 232, .92); }
  .hero .btn-row { margin-top: clamp(18px, 3svh, 34px); }

  /* ---------- light page head (menu, contact): the title on the left, a photo on the right ---------- */
  .page-head { padding-top: calc(var(--logo-h) + clamp(40px, 6vw, 88px)); }
  .page-head__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: clamp(28px, 5vw, 80px); }
  .page-head h1 { max-width: 12ch; }
  .page-head .lead { margin-top: clamp(16px, 2vw, 26px); max-width: 46ch; color: var(--ink-soft); }
  .page-head__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; --d: .85s; }
  .page-head .btn-row { margin-top: clamp(24px, 3vw, 36px); --d: .95s; }
  .page-head__photo { aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; background: var(--cream); --d: .3s; }
  .page-head__photo picture, .page-head__photo img { width: 100%; height: 100%; object-fit: cover; }
  @media (max-width: 860px) {
    .page-head__grid { grid-template-columns: 1fr; }
    .page-head__photo { aspect-ratio: 4 / 3; }
  }

  /* entrance, in CSS so it never waits for a script: words rise out of their own mask,
     the photo settles. Transforms only: with no animation, all is visible. */
  /* .split-title: any big title made of {{ text | splitWords }} rises word by word */
  .split-title .w { display: inline-block; overflow: clip; vertical-align: top; padding-block: .14em .08em; margin-block: -.14em -.08em; }
  .split-title .w > span { display: inline-block; }
  @media (prefers-reduced-motion: no-preference) {
    .split-title .w > span { animation: word-up 1.15s var(--ease-out) both; animation-delay: calc(.2s + var(--i) * .05s); }
    .hero__img { animation: hero-settle 2.2s var(--ease-out) both; }
    .hero__lead { animation: fade-up 1s var(--ease-out) .75s both; }
    .hero .btn-row { animation: fade-up 1s var(--ease-out) .87s both; }
    /* .enter: fades up once on load, after the title (--d sets the delay) */
    .enter { animation: fade-up 1s var(--ease-out) var(--d, .75s) both; }
  }
  @keyframes word-up { from { transform: translateY(115%) rotate(6deg); } }
  @keyframes hero-settle { from { transform: scale(1.16); } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(26px); } }

  @media (max-width: 767px) {
    .hero__frame { min-height: 600px; }
    .hero__media::after {
      background: linear-gradient(180deg, rgba(34, 22, 11, .45) 0%, rgba(34, 22, 11, .05) 28%, rgba(34, 22, 11, .7) 58%, rgba(34, 22, 11, .92) 100%);
    }
    .hero .btn-row .btn--glass { display: none; }
  }
}
