﻿/* ============================================================================
   SBS — PREMIUM MOTION LAYER  (hero-safe)

   Cinematic continuation polish. Owns everything sections.js does NOT:
     - screen-loading splash          (exit tween in motion.js)
     - section-rail stagger            (CSS, is-in set by motion.js)
     - footer entrance                 (tween in motion.js, gsap)
     - 3D tilt depth on project cards   (CSS + motion.js)
     - custom cursor                    (CSS + motion.js)
     - micro-interactions               (CSS + motion.js)

   Hero viewport, hero split animation, and hero typography are LOCKED and
   owned by main.js / style.css — this file never touches them.

   Gating uses the `.js-reveal` marker sections.js drops on <html>, so every
   element stays visible when JS is unavailable.
   ============================================================================ */

:root {
  /* Motion-only token. Gentle-in (--ease) and soft (--ease-soft) and the
     child stagger (--d, set inline) are owned by sections.css. */
  --ease-prem: cubic-bezier(0.22, 1, 0.36, 1);
  /* expressive out */
}

/* ── reduced-motion kill switch ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .m-cursor,
  .m-cursor-ring,
  .splash {
    display: none !important;
  }
}

/* ── scroll lock while the splash plays ────────────────────────────────── */
body.m-loading {
  overflow: hidden;
}

/* ── splash screen (base only; exit tween is in motion.js) ────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--color-ivory);
  pointer-events: none;
}

.splash-bar {
  position: relative;
  width: min(210px, 48vw);
  height: 1px;
  background: rgb(var(--rgb-cream) / 0.14);
  overflow: hidden;
}

.splash-bar>i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-deep), var(--color-gold));
  animation: splashLoad 2.2s var(--ease-prem) forwards;
}

@keyframes splashLoad {
  to {
    width: 100%;
  }
}

.splash-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0.6;
}

/* ── section rail: continuation side index (NOT hero nav) ──────────────── */
.js-reveal .sec-rail button {
  opacity: 0;
  transform: translate3d(-12px, 0, 0);
  transition: opacity .55s var(--ease), transform .6s var(--ease-prem);
  transition-delay: var(--d, 0ms);
}

.sec-rail.is-in button {
  opacity: 1;
  transform: none;
}

/* ── custom cursor ──────────────────────────────────────────────────────── */
body.m-has-cursor {
  cursor: none;
}

body.m-has-cursor a,
body.m-has-cursor button,
body.m-has-cursor [role="button"],
body.m-has-cursor .res-card,
body.m-has-cursor .jrn-card,
body.m-has-cursor .show-media,
body.m-has-cursor .philo-plate,
body.m-has-cursor .loc-panel,
body.m-has-cursor .loc-btn,
body.m-has-cursor .sec-rail button,
body.m-has-cursor .pi-row,
body.m-has-cursor .mat-swatch,
body.m-has-cursor .nav-arrow {
  cursor: none;
}

.m-cursor,
.m-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
  transform: translate(-50%, -50%);
}

.m-cursor {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgb(var(--rgb-gold) / 0.92);
  box-shadow: 0 0 10px rgb(var(--rgb-gold) / 0.55);
  transition: width .2s var(--ease-prem), height .2s var(--ease-prem),
    background .22s var(--ease-prem), box-shadow .22s var(--ease-prem);
}

.m-cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgb(var(--rgb-gold) / 0.42);
  border-radius: 50%;
  transition: width .24s var(--ease), height .24s var(--ease),
    border-color .3s var(--ease);
}

body.m-cur-link .m-cursor {
  width: 13px;
  height: 13px;
  background: rgb(255 255 251 / 0.9);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

body.m-cur-link .m-cursor-ring {
  width: 54px;
  height: 54px;
  border-color: rgb(255 255 251 / 0.48);
}

body.m-cur-card .m-cursor {
  width: 11px;
  height: 11px;
  background: rgb(var(--rgb-gold) / 0.85);
}

body.m-cur-card .m-cursor-ring {
  width: 66px;
  height: 66px;
  border-color: rgb(var(--rgb-gold) / 0.34);
}

body.m-cur-img .m-cursor {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

body.m-cur-img .m-cursor-ring {
  width: 52px;
  height: 52px;
  border-color: rgb(var(--rgb-gold) / 0.55);
}

body.m-has-cursor:has(dialog[open]) {
  cursor: auto;
}

body.m-has-cursor:has(dialog[open]) .m-cursor,
body.m-has-cursor:has(dialog[open]) .m-cursor-ring {
  display: none;
}

body.m-has-cursor:has(dialog[open]) dialog[open],
body.m-has-cursor:has(dialog[open]) dialog[open] * {
  cursor: auto;
}

body.m-has-cursor:has(dialog[open]) dialog[open] button {
  cursor: pointer;
}

body.m-has-cursor:has(dialog[open]) dialog[open] input,
body.m-has-cursor:has(dialog[open]) dialog[open] textarea {
  cursor: text;
}



.ftr.m-ftr-ready .ftr-brand {
  animation: ftrIn .85s var(--ease-prem) 0ms both;
}

.ftr.m-ftr-ready .ftr-col:nth-of-type(1) {
  animation: ftrIn .85s var(--ease-prem) 70ms both;
}

.ftr.m-ftr-ready .ftr-col:nth-of-type(2) {
  animation: ftrIn .85s var(--ease-prem) 140ms both;
}

.ftr.m-ftr-ready .ftr-col:nth-of-type(3) {
  animation: ftrIn .85s var(--ease-prem) 210ms both;
}

.ftr.m-ftr-ready .ftr-col:nth-of-type(4) {
  animation: ftrIn .85s var(--ease-prem) 280ms both;
}

.ftr.m-ftr-ready .ftr-top-btn {
  animation: ftrIn .85s var(--ease-prem) 350ms both;
}

.ftr.m-ftr-ready .ftr-legal {
  animation: ftrIn .85s var(--ease-prem) 420ms both;
}

@keyframes ftrIn {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}


/* ── 3D tilt (desktop / fine pointer only — applied by motion.js) ──────── */
.res-card.m-tilt,
.jrn-card.m-tilt {
  transition: transform .14s var(--ease-soft), box-shadow .14s var(--ease-soft);
}

/* ── hover lifts / depth ──────────────────────────────────────────────── */
.res-card {
  transition: border-color .7s var(--ease), transform .7s var(--ease-prem), box-shadow .7s var(--ease-prem);
}

.res-card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: 0 30px 64px rgb(var(--rgb-ink) / 0.38);
}

.jrn-card {
  transition: border-color .7s var(--ease), transform .7s var(--ease-prem), box-shadow .7s var(--ease-prem);
}

.jrn-card:hover {
  transform: translate3d(0, -5px, 0);
  box-shadow: 0 22px 52px rgb(var(--rgb-ink) / 0.34);
}

.loc-panel {
  transition: transform .8s var(--ease-prem), box-shadow .8s var(--ease-prem);
}

.loc-panel:hover {
  transform: translate3d(0, -5px, 0);
  box-shadow: 0 26px 60px rgb(var(--rgb-ink) / 0.38);
}

.pi-row:hover .pi-row-name {
  transform: translate3d(7px, 0, 0);
}

.mat-swatch:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgb(var(--rgb-ink) / 0.28);
}

/* partner underline sweep */
.arc-partner {
  position: relative;
  overflow: hidden;
}

.arc-partner::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width .7s var(--ease-prem);
}

.arc-partner:hover::after {
  width: 100%;
}

/* enquiry form focus glow */
.field:focus-within .field-label {
  color: var(--color-gold);
  transform: translate3d(0, -9px, 0);
}

.field:focus-within input,
.field:focus-within textarea {
  border-color: var(--color-gold-muted);
  box-shadow: 0 0 0 2px rgb(var(--rgb-gold) / 0.22);
}

/* chip tactile state (sections.js toggles .is-on) */
[data-chip].is-on {
  transform: scale(0.96);
}

/* ── responsive taming ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .res-card:hover {
    transform: translate3d(0, -3px, 0);
  }

  .jrn-card:hover {
    transform: translate3d(0, -3px, 0);
  }

  .loc-panel:hover {
    transform: translate3d(0, -3px, 0);
  }

  .mat-swatch:hover {
    transform: none;
  }
}

@media (max-width: 768px) {

  .m-cursor,
  .m-cursor-ring {
    display: none;
  }
}