/* ==========================================================================
   Motion layer: scroll and entrance animations (assets/js/motion.js).
   Only active when <html> has the "motion" class, which the small script in
   <head> adds unless the visitor has asked their device to reduce motion.
   ========================================================================== */

/* ---------- Lenis smooth scroll (from lenis.css, v1.3) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

/* Sections receive focus after a menu link is used; no outline box needed */
html.motion main:focus, html.motion section:focus { outline: none; }

/* ---------- Intro screen (first visit in a session) ---------- */
.loader { display: none; }
html.intro .loader {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: var(--olive-ink); color: var(--cream);
  /* safety net: never cover the site if the animation script fails */
  animation: motion-hide 0.4s ease 4.5s forwards;
}
html.intro .loader-inner { visibility: hidden; text-align: center; }
.loader-name { font-family: var(--serif); font-weight: 500; font-size: clamp(56px, 9vw, 120px); line-height: 1; letter-spacing: -0.01em; }
.loader-sub { margin-top: 18px; font-size: 12px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--sand); }
.loader-bar { width: 180px; height: 1px; margin: 28px auto 0; background: rgba(242, 240, 234, 0.2); }
.loader-bar span { display: block; height: 100%; background: var(--sand); transform: scaleX(0); transform-origin: left; }
@keyframes motion-hide { to { opacity: 0; visibility: hidden; } }
@keyframes motion-show { to { visibility: visible; } }

/* ---------- Hero: hidden until the script builds it (safety net after 3.5 s) ---------- */
html.motion .hero-card, html.motion .trust-strip { visibility: hidden; animation: motion-show 0s 3.5s forwards; }
.hero-card.has-bg { background: var(--olive-deep); }
.hero-bg {
  position: absolute; inset: -6% 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(52, 53, 43, 0.97) 0%, rgba(68, 69, 56, 0.9) 42%, rgba(74, 75, 61, 0.55) 72%, rgba(74, 75, 61, 0.3) 100%),
    url("../img/photos/hero-food.jpg") right center / cover no-repeat;
}
@media (max-width: 960px) {
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(52, 53, 43, 0.95) 0%, rgba(68, 69, 56, 0.88) 55%, rgba(74, 75, 61, 0.6) 100%),
      url("../img/photos/hero-food.jpg") center bottom / cover no-repeat;
  }
}

/* ---------- Header slides away on the way down, back on the way up ---------- */
html.motion .site-header { transition: border-color .3s ease, box-shadow .3s ease, transform .6s var(--ease); }
html.motion .site-header.is-hidden { transform: translateY(-100%); }

/* ---------- Split text: room for letters with tails (g, y, J) and italics ---------- */
.ch-mask, .ln-mask { padding: 0 0.06em 0.16em; margin: 0 -0.06em -0.16em; }

/* ---------- How it works: progress line ---------- */
.steps { position: relative; }
.steps-progress {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--olive);
  transform: scaleX(0); transform-origin: left;
}

/* ---------- Cursor follower (mouse only; created by the script) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9998; pointer-events: none;
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9); mix-blend-mode: difference;
  display: grid; place-items: center; opacity: 0;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .3s ease, opacity .3s ease;
}
.cursor.is-on { opacity: 1; }
.cursor::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; transition: opacity .2s ease; }
.cursor-label { position: absolute; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream); opacity: 0; transition: opacity .2s ease; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 255, 255, 0.12); }
.cursor.is-label { width: 96px; height: 96px; margin: -48px 0 0 -48px; mix-blend-mode: normal; background: var(--olive); border-color: var(--olive); }
.cursor.is-label::after { opacity: 0; }
.cursor.is-label .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
