/* Our Wild World — globe logo, animal chips, hotspots and the animal card.
   Unlayered, so it wins over the engine's @layer sw defaults. */

/* Globe logo instead of the colour-changing tab */
.sw-brand__mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: url(assets/globe.svg) center / contain no-repeat;
  /* ring takes the current scene's accent; the engine updates --sw-accent as you scroll */
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--sw-accent);
  transition: box-shadow .5s ease;
}

/* Animal chips: buttons that open the card */
.sw-copy__tags li { padding: 0; }
.sw-copy.ow-live .sw-copy__tags { pointer-events: auto; }
/* Engine quirk: the finale's CTA stays clickable while its panel is faded out, and since every
   panel sits in the same spot it swallows clicks meant for the visible panel's chips. */
.sw-copy:not(.ow-live) .sw-copy__cta { pointer-events: none; }
.ow-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 14px; border: 0; border-radius: 999px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.ow-chip i {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sw-accent); color: #fff; font: 700 15px/1 "Fredoka", system-ui, sans-serif; font-style: normal;
}
.ow-chip:hover { background: color-mix(in srgb, var(--sw-accent) 18%, #fff); transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--sw-accent) 25%, transparent); }
.ow-chip:focus-visible { outline: 3px solid var(--sw-accent); outline-offset: 2px; }

/* Glowing hotspots on the animals in the videos */
.ow-hotspots { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.ow-spot {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s ease; will-change: transform, opacity;
}
.ow-spot.is-on { opacity: 1; pointer-events: auto; }
.ow-spot__dot {
  position: absolute; inset: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px #FFC83D, 0 0 14px 5px rgba(255, 200, 61, .85), 0 0 30px 10px rgba(255, 255, 255, .45);
}
.ow-spot::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 3px solid rgba(255, 200, 61, .95); animation: ow-pulse 1.8s ease-out infinite;
}
.ow-spot__label {
  position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%);
  white-space: nowrap; padding: 6px 11px; border-radius: 999px;
  background: #26345A; color: #fff; font: 700 .8rem/1 "Nunito", system-ui, sans-serif;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.ow-spot:hover .ow-spot__label, .ow-spot:focus-visible .ow-spot__label { opacity: 1; }
.ow-spot:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes ow-pulse { 0% { transform: scale(.55); opacity: .95; } 100% { transform: scale(1.6); opacity: 0; } }

/* Animal card */
html.ow-locked { overflow: hidden; }
.ow-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.ow-modal[hidden] { display: none; }
.ow-modal__backdrop { position: absolute; inset: 0; background: rgba(38, 52, 90, .55); backdrop-filter: blur(6px); }
.ow-card {
  position: relative; display: flex; flex-direction: column;
  width: min(720px, 100%); max-height: calc(100dvh - 32px); overflow: hidden;
  background: #FFF6E6; color: #26345A;
  border: 4px solid var(--ow-accent); border-radius: 28px;
  box-shadow: 0 30px 80px rgba(20, 28, 50, .35); animation: ow-pop .28s ease-out;
}
.ow-modal { --ow-accent: #2FA7E0; }
.ow-card { border-color: var(--ow-accent); }
/* Picture and text scroll together on short screens; the close button stays put. */
.ow-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
/* A classic (non-overlay) scrollbar would eat into the picture's width and bring back
   an empty strip; the card still scrolls by touch, trackpad and wheel. */
.ow-scroll::-webkit-scrollbar { display: none; }
/* Full card width at the pictures' own 3:2 shape: nothing cropped, no empty margins. */
.ow-photo { margin: 0; width: 100%; aspect-ratio: 3 / 2; background: #F3E6CF; border-radius: 24px 24px 0 0; overflow: hidden; }
.ow-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ow-body { padding: 22px 26px 24px; }
.ow-home { margin: 0; color: var(--ow-accent); font: 700 .85rem/1.2 "Fredoka", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.ow-card h2 { margin: 6px 0 10px; font: 700 clamp(1.8rem, 5vw, 2.4rem)/1.05 "Fredoka", system-ui, sans-serif; }
.ow-about { margin: 0 0 18px; font: 500 1.15rem/1.55 "Nunito", system-ui, sans-serif; }
.ow-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ow-fact { padding: 14px 16px; background: #fff; border-radius: 18px; border: 2px solid color-mix(in srgb, var(--ow-accent) 25%, transparent); }
.ow-fact h3 { margin: 0 0 6px; color: var(--ow-accent); font: 700 1rem/1.2 "Fredoka", system-ui, sans-serif; }
.ow-fact p { margin: 0; font: 500 1.02rem/1.5 "Nunito", system-ui, sans-serif; }
.ow-credit { margin: 14px 0 0; color: #4A5677; font: 500 .8rem/1.4 "Nunito", system-ui, sans-serif; }
.ow-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: #fff; color: #26345A; cursor: pointer;
  font: 700 1.7rem/1 "Fredoka", system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.ow-close:focus-visible { outline: 3px solid var(--ow-accent); outline-offset: 2px; }
@keyframes ow-pop { from { transform: translateY(16px) scale(.97); opacity: 0; } }
@media (max-width: 560px) {
  .ow-facts { grid-template-columns: 1fr; }
  .ow-body { padding: 18px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ow-spot::before { animation: none; opacity: .6; }
  .ow-card { animation: none; }
}
