/* ════════════════════════════════════════════════════════════════════════════
   WYARNO MOTION + INTERACTION SYSTEM (shared by every public page)
   Driven by js/motion.js, which writes scroll-progress variables:
     --e   0..1  entrance progress of a [data-reveal] element (staggered by --i)
     --sp -1..1  where a section/layer sits in the viewport (-1 below, 0 centred, 1 above)
   SAFE BY DEFAULT: every hidden/offset state is scoped to html.motion, which the
   script adds only after it has measured the page. No JS, a JS error, or
   prefers-reduced-motion → html.motion is absent → everything renders static and
   fully visible. Hover/press feedback uses the independent `translate`/`scale`
   properties so it never fights the scroll-driven `transform`.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --m-ease: cubic-bezier(.2, .7, .2, 1);
  --m-press: cubic-bezier(.3, 0, .2, 1);
  --m-reveal-y: 28px;      /* how far a block rises as it enters */
  --m-layer-shift: 46px;   /* how far section texture layers drift */
  --m-lift: -2px;          /* hover lift */
  --m-shadow-rest: 0 1px 0 rgba(0,0,0,.08);
  --m-shadow-lift: 0 10px 22px -10px rgba(0,0,0,.55);
  --m-shadow-press: 0 2px 6px -2px rgba(0,0,0,.5);
  --m-glow: 0 0 0 3px rgba(217,165,74,.28);
}

/* ── 1. Scroll-tied reveals ─────────────────────────────────────────────────── */
html.motion [data-reveal] {
  opacity: var(--e, 1);
  transform: translate3d(0, calc((1 - var(--e, 1)) * var(--m-reveal-y)), 0) scale(calc(.985 + var(--e, 1) * .015));
  will-change: transform, opacity;
}
html.motion [data-reveal="left"]  { transform: translate3d(calc((1 - var(--e, 1)) * -40px), 0, 0); }
html.motion [data-reveal="right"] { transform: translate3d(calc((1 - var(--e, 1)) * 40px), 0, 0); }
html.motion [data-reveal="fade"]  { transform: none; }
/* Small items (list entries, chips, menu lines) travel less. */
html.motion [data-reveal="item"]  { transform: translate3d(0, calc((1 - var(--e, 1)) * 14px), 0); }

/* ── 2. Depth layers: texture + warm glow per section, drifting with scroll ─── */
[data-m-section] { position: relative; isolation: isolate; overflow: clip; }
.m-layer { display: none; }
html.motion .m-layer {
  display: block; position: absolute; inset: -18% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 30% at var(--m-gx, 82%) 18%, rgba(217,165,74,.10), transparent 70%),
    radial-gradient(36% 26% at var(--m-gx2, 12%) 82%, rgba(167,56,31,.06), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .38 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translate3d(0, calc(var(--sp, 0) * var(--m-layer-shift)), 0);
  will-change: transform;
}
/* Decorative/imagery parallax (set per element by motion.js via data-depth). */
html.motion [data-depth-y] { translate: 0 calc(var(--sp, 0) * var(--depth, 20px)); }

/* ── 3. (Hero entrance removed Nov 20: the hero logo and headline never slide; the logo is revealed by
   the scroll-driven video instead.) ── */

/* ── 4. Interaction feedback (hover · keyboard focus · press) ────────────────── */
/* Buttons and button-like links */
.btn, .find-us, .marquee__pause, .cal__btn, .cal__today, .cta-stack, .nav-toggle, .service-chip, .chips-scroll a, .events-cta__btn {
  transition: translate .22s var(--m-ease), scale .22s var(--m-ease), box-shadow .22s var(--m-ease), background-color .18s, color .18s, border-color .18s, filter .18s;
}
.btn:not(:disabled):not(.is-disabled):hover, .find-us:hover, .marquee__pause:hover, .cal__btn:not(:disabled):hover, .cal__today:not(:disabled):hover,
.cta-stack:hover, .nav-toggle:hover, .service-chip:hover, .chips-scroll a:hover {
  translate: 0 var(--m-lift); box-shadow: var(--m-shadow-lift); filter: brightness(1.04);
}
.btn:focus-visible, .find-us:focus-visible, .marquee__pause:focus-visible, .cal__btn:focus-visible, .cal__today:focus-visible,
.cta-stack:focus-visible, .nav-toggle:focus-visible, .service-chip:focus-visible, .chips-scroll a:focus-visible {
  translate: 0 var(--m-lift); box-shadow: var(--m-shadow-lift), var(--m-glow);
}
.btn:not(:disabled):not(.is-disabled):active, .find-us:active, .marquee__pause:active, .cal__btn:not(:disabled):active, .cal__today:not(:disabled):active,
.cta-stack:active, .nav-toggle:active, .service-chip:active, .chips-scroll a:active {
  translate: 0 1px; scale: .97; box-shadow: var(--m-shadow-press); transition-duration: .08s;
}
.btn { position: relative; }
/* Highlight sweep on primary buttons */
.btn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 60%); transition: opacity .2s; }
.btn:hover::after, .btn:focus-visible::after { opacity: 1; }

/* Clickable cards */
.weekday__details summary, .cal__item, .feature-card, .gallery-link, .more-opt, .events-home, .call-card, .weekday--ask {
  transition: translate .25s var(--m-ease), box-shadow .25s var(--m-ease), background-color .2s, border-color .2s;
}
.weekday:has(summary:hover), .cal__item:hover, .gallery-link:hover, .more-opt:hover, .call-card:hover {
  translate: 0 -3px; box-shadow: 0 16px 30px -18px rgba(40,25,10,.6);
}
.weekday:has(summary:focus-visible), .cal__item:focus-visible, .gallery-link:focus-visible { translate: 0 -3px; box-shadow: 0 16px 30px -18px rgba(40,25,10,.6), var(--m-glow); }
.weekday:has(summary:active), .cal__item:active, .gallery-link:active { translate: 0 0; scale: .99; transition-duration: .08s; }
.weekday { transition: translate .25s var(--m-ease), box-shadow .25s var(--m-ease); }
.cal__ev { transition: translate .18s var(--m-ease), filter .18s; }
.cal__ev:hover, .cal__ev:focus-visible { translate: 0 -1px; filter: brightness(1.12); }
.cal__ev:active, button.cal__num:active { scale: .96; }
button.cal__num { transition: filter .18s, scale .12s; }
button.cal__num:hover { filter: brightness(1.12); }

/* Text links: underline grows, warm highlight, slight press */
main a:not(.btn):not(.find-us):not(.service-chip):not(.cal__item):not(.gallery-link):not(.cta-stack):not(.feature-card):not(.events-cta__btn),
.site-footer a, .footer-links a, .band__line a, .brand-back {
  transition: color .18s, text-decoration-color .18s, text-decoration-thickness .18s, text-underline-offset .18s, opacity .1s;
}
main a:not(.btn):not(.find-us):not(.service-chip):not(.cal__item):not(.gallery-link):not(.cta-stack):not(.feature-card):not(.events-cta__btn):hover,
.site-footer a:hover, .footer-links a:hover {
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
main a:not(.btn):active, .site-footer a:active, .band__line a:active { opacity: .7; }

/* Navigation */
.primary-nav a { transition: color .18s, translate .2s var(--m-ease); }
.primary-nav a:hover, .primary-nav a:focus-visible { translate: 0 -1px; }
.primary-nav a:active { translate: 0 1px; }
.mobile-nav nav a { transition: color .18s, padding-left .2s var(--m-ease); }
.mobile-nav nav a:hover, .mobile-nav nav a:focus-visible { padding-left: 12px; }
.mobile-nav nav a:active { opacity: .7; }
.brand { transition: translate .2s var(--m-ease); }
.brand:active { translate: 0 1px; }

/* Form controls */
.fld input, .fld textarea, .fld select { transition: border-color .18s, box-shadow .18s; }
.fld input:hover, .fld textarea:hover, .fld select:hover { border-color: var(--ink); }
.fld input:focus-visible, .fld textarea:focus-visible, .fld select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(167,56,31,.35); }

/* ── 5. Reduced motion: no movement anywhere (states still change colour/outline) ── */
@media (prefers-reduced-motion: reduce) {
  html.motion [data-reveal], html.motion .m-layer, html.motion [data-depth-y] { transform: none !important; translate: none !important; opacity: 1 !important; }
  .btn, .find-us, .marquee__pause, .cal__btn, .cal__today, .cta-stack, .nav-toggle, .service-chip, .chips-scroll a,
  .weekday, .cal__item, .gallery-link, .more-opt, .call-card, .cal__ev, .primary-nav a, .brand { translate: none !important; scale: none !important; }
}
