/* =============================================================================
   eSaintLucia — logo.css
   Dependency-free. Pair with the inline SVGs in Web/ (icon.svg, lockup*.svg, icon-mono.svg, loader*.svg).
   <link rel="stylesheet" href="logo.css">, then put classes on the inlined <svg>.

   Classes on the <svg>
     .esl-logo                base
     .esl-logo--icon          the seal
     .esl-logo--lockup        horizontal lockup
     .esl-logo--mono          currentColor versions (set `color` on a parent)
     .esl-logo--interactive   opt-in hover lift
     .esl-anim-enter          play the entrance once: the seal rotates and scales in, the white ring
                              draws round from the top, the Piton rises out of the sea, the gold
                              triangle rises under it, the wordmark is revealed left to right
                              (a wipe of the existing outlined path)
     .esl-anim-load           loader loop (use on loader.svg / loader-mono.svg inlined): a ring arc
                              sweeps round the seal while the gold triangle breathes
     [data-esl-replay]        hook for a replay button (see demo.html)

   Parts inside the SVGs (same class names in every file)
     .esl-mark  .esl-disc  .esl-seal  .esl-ring  .esl-piton  .esl-gold  .esl-wordmark  .esl-letter
     .esl-track  .esl-arc   (loader only)

   The wordmark is never restyled: no colour shift, no tracking, no per-letter movement.
   Respects prefers-reduced-motion: no animation, the final mark is shown.
   ============================================================================= */

:root {
  --esl-cerulean: #1090C6;
  --esl-gold: #FCD116;
  --esl-ink: #0A1633;
  --esl-white: #FFFFFF;
  --esl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --esl-lift-shadow: 0 8px 18px rgba(10, 22, 51, 0.22);
}

.esl-logo {
  display: inline-block;
  overflow: visible;
  vertical-align: middle;
  color: currentColor;
}

.esl-logo .esl-disc,
.esl-logo .esl-piton,
.esl-logo .esl-gold,
.esl-logo .esl-wordmark,
.esl-logo .esl-arc {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.esl-logo .esl-piton,
.esl-logo .esl-gold { transform-origin: 50% 100%; }
/* .esl-ring is deliberately not given a transform-box/origin: it carries its own rotate(-90 cx cy) attribute
   so the draw-in starts at 12 o'clock, and a CSS origin would shift that rotation off the seal. */

/* ----- Hover lift ---------------------------------------------------------- */
.esl-logo--interactive {
  transform: translateY(0);
  filter: drop-shadow(0 0 0 rgba(10, 22, 51, 0));
  transition: transform 0.3s var(--esl-ease), filter 0.3s var(--esl-ease);
  cursor: pointer;
}
.esl-logo--interactive:hover,
.esl-logo--interactive:focus-visible {
  transform: translateY(-3px);
  filter: drop-shadow(var(--esl-lift-shadow));
}
.esl-logo--interactive:active { transform: translateY(-1px); }
.esl-on-dark .esl-logo--interactive:hover,
.esl-on-dark .esl-logo--interactive:focus-visible {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

/* ----- Entrance (once) ----------------------------------------------------- */
.esl-anim-enter .esl-disc {
  animation: esl-disc-in 0.75s var(--esl-ease) both;
}
.esl-anim-enter .esl-ring {
  stroke-dasharray: 1;
  animation: esl-ring-draw 0.85s var(--esl-ease) 0.25s both;
}
.esl-anim-enter .esl-piton {
  animation: esl-rise 0.65s var(--esl-ease) 0.65s both;
}
.esl-anim-enter .esl-gold {
  animation: esl-rise 0.55s var(--esl-ease) 0.88s both;
}
.esl-anim-enter .esl-wordmark {
  animation: esl-wipe 0.7s var(--esl-ease) 0.8s both;
}

@keyframes esl-disc-in {
  from { opacity: 0; transform: rotate(-42deg) scale(0.78); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes esl-ring-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@keyframes esl-rise {
  from { opacity: 0; transform: translateY(16%); clip-path: inset(100% 0 0 0); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}
@keyframes esl-wipe {
  from { clip-path: inset(-10% 100% -10% 0); }
  to   { clip-path: inset(-10% 0 -10% 0); }
}

/* ----- Loader loop --------------------------------------------------------- */
.esl-anim-load .esl-arc {
  animation: esl-spin 1.4s linear infinite;
}
.esl-anim-load .esl-gold {
  animation: esl-breathe 1.4s ease-in-out infinite;
}
@keyframes esl-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}
@keyframes esl-breathe {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.62); }
}

/* ----- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .esl-logo, .esl-logo * {
    animation: none !important;
    transition: none !important;
  }
  .esl-logo--interactive:hover,
  .esl-logo--interactive:focus-visible { transform: none; }
}
