/* Smarco — motion layer for the sector and catalog pages.
 * Plain-CSS versions of effects popularised by Magic UI (MIT): border beam + shimmer button,
 * magic card spotlight, blur fade, text animate, number ticker, scroll progress, marquee.
 */

/* ---------- Scroll progress ---------- */
.fx-progress { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 3px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--gold), var(--orange)); pointer-events: none; }

/* ---------- Request a quote: border beam + shimmer ---------- */
@property --beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.s-hero .s-cta { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px;
  box-shadow: 0 12px 34px -12px rgba(252,84,0,.85); transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, background .2s ease; }
.s-hero .s-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(252,84,0,.95); }
.s-hero .s-cta::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--beam), transparent 0deg 250deg, rgba(255,226,170,.0) 270deg, #FFE2AA 315deg, #fff 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: fx-beam 3.4s linear infinite; }
.s-hero .s-cta::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0) 20%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 80%, transparent 100%);
  transform: skewX(-18deg); animation: fx-shine 4.2s cubic-bezier(.4,0,.2,1) infinite 1s; }
.s-cta-arrow { display: inline-block; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.s-cta:hover .s-cta-arrow { transform: translateX(4px); }
@keyframes fx-beam { to { --beam: 360deg; } }
@keyframes fx-shine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }

/* ---------- Magic card: a soft gold spotlight that follows the cursor ---------- */
.s-card, .s-other { position: relative; }
.s-card::before, .s-other::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(216,168,72,.13), transparent 55%); }
.s-card::after, .s-other::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(216,168,72,.9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@media (hover: hover) { .s-card:hover::before, .s-card:hover::after, .s-other:hover::before, .s-other:hover::after { opacity: 1; } }

/* ---------- Blur fade on scroll (only once JS has marked the page) ---------- */
html.fx .fx-in { opacity: 0; transform: translateY(18px); filter: blur(5px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease; transition-delay: var(--d, 0ms); }
/* arriving by a jump (menu link): show at once, no blur */
html.fx-jump .fx-in { transition: none !important; }
html.fx .fx-in.is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Text animate: hero headline words blur in ---------- */
.fx-word { display: inline-block; white-space: pre; }
html.fx .fx-word { opacity: 0; filter: blur(10px); transform: translateY(.35em); animation: fx-word .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes fx-word { to { opacity: 1; filter: none; transform: none; } }

/* ---------- How it works: the line draws itself and the dots pop ---------- */
.s-steps::after { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; margin-top: -.5px; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--navy), var(--gold) 60%, var(--orange)); transition: transform 1.8s cubic-bezier(.65,0,.2,1) .2s; }
.s-steps.is-drawn::after { transform: scaleX(1); }
html.fx .s-steps .s-step-dot { transform: scale(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1); transition-delay: var(--d, 0ms); }
html.fx .s-steps.is-drawn .s-step-dot { transform: scale(1); }
@media (max-width: 720px) { .s-steps::after { display: none; } }

/* ---------- Marquee: everything we source, gliding past ---------- */
.fx-marquee { overflow: hidden; padding: clamp(1.6rem, 4vw, 2.6rem) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.fx-marquee-track { display: flex; width: max-content; animation: fx-marquee 48s linear infinite; }
.fx-marquee:hover .fx-marquee-track { animation-play-state: paused; }
.fx-marquee ul { display: flex; flex: none; align-items: center; gap: clamp(1.4rem, 3vw, 2.4rem); margin: 0; padding: 0 clamp(.7rem, 1.5vw, 1.2rem); list-style: none; }
.fx-marquee li { flex: none; display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.4rem); font-weight: 600; font-size: clamp(1.4rem, 3.2vw, 2.4rem); letter-spacing: -.035em; color: var(--navy); white-space: nowrap; }
.fx-marquee li:nth-child(even) { color: var(--slate); font-weight: 300; }
.fx-marquee li::after { content: "\2726"; font-size: .55em; color: var(--gold); font-weight: 600; }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* ---------- Reduced motion: keep everything visible and still ---------- */
@media (prefers-reduced-motion: reduce) {
  html.fx .fx-in, html.fx .fx-word { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .s-hero .s-cta::before { animation: none; }
  .s-hero .s-cta::after { animation-duration: 9s; }
  .fx-marquee-track { animation-duration: 120s; }
  .s-steps::after { transition: none; transform: scaleX(1); }
  html.fx .s-steps .s-step-dot { transform: none; transition: none; }
}

/* ---------- Sticky dock on phones and tablets: back to the journey from anywhere ---------- */
/* shown on every screen size: the way back is always one tap away */
@media all {
  .s-dock { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 55; display: flex; align-items: center; gap: 2px; padding: 5px;
    border-radius: 999px; background: rgba(0,26,61,.82); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 16px 40px -12px rgba(0,13,32,.55);
    transform: translate(-50%, 140%); opacity: 0; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
  .s-dock.is-on { transform: translate(-50%, 0); opacity: 1; }
  .s-dock a, .s-dock button { appearance: none; border: 0; background: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
    color: #fff; font: 500 .84rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s ease, color .2s ease; }
  .s-dock a:first-child { color: var(--gold); }
  .s-dock a:active, .s-dock button:active, .s-dock a:hover, .s-dock button:hover { background: rgba(255,255,255,.14); }
  .s-dock .s-dock-top { width: 38px; height: 38px; padding: 0; justify-content: center; background: var(--orange); }
  .s-foot { padding-bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) { .s-dock { transition: opacity .2s ease; } }

/* Midnight & Brass adjustments for the motion layer */
.fx-marquee li { color: var(--ink-hi, #F7F1E4); }
.fx-marquee li:nth-child(even) { color: var(--slate); }
.s-card::before, .s-other::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(216,168,72,.16), transparent 55%); }
.s-steps::after { background: linear-gradient(90deg, var(--ivory, #F5EFE2), var(--gold) 55%, var(--orange)); }
@media all { .s-dock { background: rgba(10,26,54,.86); box-shadow: 0 0 0 1px rgba(216,168,72,.25) inset, 0 16px 40px -12px rgba(0,0,0,.7); } }

/* Desktop: the dock sits a little higher and roomier */
@media (min-width: 901px) {
  .s-dock { bottom: 22px; padding: 6px; }
  .s-dock a, .s-dock button { padding: 11px 18px; font-size: .88rem; }
  .s-dock .s-dock-top { width: 40px; height: 40px; }
}

/* dock with Login: tighter spacing so five items fit on narrow phones */
@media (max-width: 900px) {
  .s-dock { max-width: calc(100vw - 16px); }
  .s-dock a, .s-dock button { padding: 10px clamp(9px, 3.2vw, 18px); font-size: clamp(.78rem, 3.4vw, .88rem); }
  .s-dock a svg { width: 14px; height: 14px; }
}
