/* ===================================================================
   LUXURY POLISH PASS
   Purely additive premium refinements layered on top of the existing
   design system — no structural, compositional, color-palette or
   typography changes, and nothing here removes an existing animation.
   =================================================================== */

:root {
  --ease-silk: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Selection & scrollbar ---- */
::selection {
  background: var(--color-brand);
  color: #fff;
}

html {
  scrollbar-color: var(--color-brand) var(--color-bg-soft);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--color-brand);
  border-radius: 999px;
  border: 2px solid var(--color-bg-soft);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-dark);
}

/* ---- Custom cursor (fine pointers only — see js/cursor.js) ----
   A single fixed canvas renders the whole thing: a soft luminous core,
   a handful of trailing micro-particles and two faint light strands
   that only emerge from the motion itself. No icon, no glyph. */
.cursor-canvas {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  will-change: transform;
}

html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button {
  cursor: none;
}

/* Reduced-motion fallback: a plain soft dot that tracks the pointer
   1:1 with no lag, no trail, no particles — functional, not decorative. */
.cursor-simple {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--color-brand);
  opacity: 0.7;
  pointer-events: none;
  z-index: 2000;
}

@media (hover: none), (pointer: coarse) {
  .cursor-canvas,
  .cursor-simple {
    display: none;
  }
}

/* ---- Magnetic buttons ----
   js/magnetic.js sets --mx/--my; base.css composes them into the
   existing hover transform so the original -2px lift is never lost. */
.btn-primary,
.btn-ghost {
  --mx: 0px;
  --my: 0px;
}

/* ---- Button sheen sweep ---- */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 48%,
    rgba(255, 255, 255, 0.35) 52%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-silk);
  pointer-events: none;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

/* Slow, quiet breathing glow on the hero's primary call to action only —
   draws the eye without ever feeling loud or being overused sitewide. */
.hero .btn-primary {
  animation: ctaGlow 3.6s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(40, 127, 143, 0.55); }
  50% { box-shadow: 0 10px 34px -6px rgba(40, 127, 143, 0.8); }
}

/* ---- Premium loading state for the booking-form submit button ---- */
.btn-primary.is-loading {
  pointer-events: none;
  color: transparent;
}

.btn-primary.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

/* The contact-panel button sits on a white background (see
   contact.css), so its spinner needs the brand color instead of white
   to stay visible in that context. */
.contact__form .btn-primary.is-loading::before {
  border-color: rgba(40, 127, 143, 0.25);
  border-top-color: var(--color-brand-dark);
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* ---- Spotlight + tilt cards ----
   js/magnetic.js sets --mx/--my (cursor position) and --rx/--ry (tilt)
   per card; both default to a neutral rest state so nothing moves
   until JS (desktop, motion-safe) is actually active. */
.service-card,
.testimonial-card {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
}

.service-card::before,
.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(40, 127, 143, 0.1),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-silk);
  pointer-events: none;
}

.service-card:hover::before,
.testimonial-card:hover::before {
  opacity: 1;
}

.dutch__dashboard {
  position: relative;
  transition: transform var(--dur-med) var(--ease-premium),
    box-shadow var(--dur-med) var(--ease-premium);
}

.dutch__dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(40, 127, 143, 0.08),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-silk);
  pointer-events: none;
}

.dutch__dashboard:hover::before {
  opacity: 1;
}

.dutch__dashboard:hover {
  box-shadow: 0 46px 90px -40px rgba(20, 25, 27, 0.24);
}

/* ---- Data-reveal: DUTCH gauge/bars fill to their real values, driven
   by js/data-reveal.js (height + the --pct custom property). ---- */
.dutch__bars span {
  transition: height 0.9s var(--ease-silk);
}

.dutch__gauge {
  transition: background 0.05s linear;
}

/* ---- Process timeline: connecting line draws in left to right,
   js/data-reveal.js adds .is-drawn once the steps scroll into view. ---- */
.process__steps::before {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s var(--ease-silk);
}

.process__steps.is-drawn::before {
  transform: scaleX(1);
}

/* ---- Reduced motion: quiet everything new down to a respectful stop ---- */
@media (prefers-reduced-motion: reduce) {
  .hero .btn-primary {
    animation: none;
  }
  .cursor-canvas {
    display: none;
  }
  .service-card,
  .testimonial-card {
    transform: none;
  }
  .btn-primary.is-loading::before {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.6);
  }
  .contact__form .btn-primary.is-loading::before {
    border-top-color: var(--color-brand-dark);
  }
  .dutch__bars span {
    transition: none;
  }
  .process__steps::before {
    transition: none;
    transform: scaleX(1);
  }
}
