/* Suramina theme and static fallback for the scroll-world landing panel. */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3000;
  padding: 10px 16px;
  border-radius: 999px;
  color: #130e1f;
  background: #f5eedc;
  font: 600 0.9rem var(--font-body);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* The engine defaults html/body to its cream --sw-bg fallback; keep the page
   canvas dark so overscroll bounce never flashes cream on this dark site.
   (:root and html body outrank the engine's element selectors — its injected
   <style> comes after this sheet, so plain html/body here would lose.) */
:root,
html body {
  background: #130e1f;
}

#scroll-world {
  min-height: 100vh;
  background: #130e1f;
}

.scroll-world-active .fab,
body:has(#panel-inicio.active) .fab,
body:has(#panel-home.active) .fab {
  display: none;
}

.scroll-world-active > footer,
body:has(#panel-inicio.active) > footer,
body:has(#panel-home.active) > footer {
  display: none;
}

#scroll-world.sw-root {
  --sw-bg: #130e1f;
  --sw-ink: #f5eedc;
  --sw-ink-soft: rgba(245, 238, 220, 0.7);
  --sw-accent: #d0b8f5;
  --sw-font-display: var(--font-display);
  --sw-font-body: var(--font-body);
}

#scroll-world .sw-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      rgba(19, 14, 31, 0.66) 0%,
      rgba(19, 14, 31, 0.18) 52%,
      rgba(19, 14, 31, 0.08) 100%
    ),
    linear-gradient(0deg, rgba(19, 14, 31, 0.34), transparent 48%);
}

#scroll-world .sw-scene:nth-child(1) .sw-scene__still {
  object-position: center 44%;
}

#scroll-world .sw-scene:nth-child(2) .sw-scene__still {
  object-position: center 52%;
}

#scroll-world .sw-scene:nth-child(3) .sw-scene__still {
  object-position: center 50%;
}

#scroll-world .sw-scene:nth-child(4) .sw-scene__still {
  object-position: center 58%;
}

/* The site nav and #scroll-progress already provide top chrome; the engine's
   empty topbar and its own progress bar would sit invisibly behind them. */
#scroll-world .sw-topbar,
#scroll-world .sw-scrollbar {
  display: none;
}

#scroll-world .sw-copy__title,
#scroll-world .sw-copy__body {
  text-wrap: balance;
}

#scroll-world .sw-copy__body {
  color: rgba(245, 238, 220, 0.92);
  text-shadow: 0 1px 14px rgba(19, 14, 31, 0.85);
}

#scroll-world .sw-copy__keepsake img {
  background: #f5eedc;
  box-shadow:
    0 14px 34px rgba(19, 14, 31, 0.65),
    0 0 0 1px rgba(200, 152, 42, 0.35);
}

#scroll-world .sw-copy__keepsake figcaption {
  font-family: var(--font-mono, ui-monospace, monospace);
  color: #d0b8f5;
  text-shadow: 0 1px 10px rgba(19, 14, 31, 0.9);
}

#scroll-world .sw-copy__keepsake[data-modal] {
  cursor: pointer;
}

/* Ring the photo itself, not the whole figure — a box around image + caption
   reads as a stray container. */
#scroll-world .sw-copy__keepsake[data-modal]:focus-visible {
  outline: none;
}

#scroll-world .sw-copy__keepsake[data-modal]:focus-visible img {
  outline: 2px solid #d0b8f5;
  outline-offset: 3px;
}

/* The card is portrait; the default .modal-photo crops to 16:9. */
.modal-photo--keepsake {
  border: 0;
  background: transparent;
}

.modal-photo--keepsake img {
  width: auto;
  max-width: 100%;
  aspect-ratio: auto;
  max-height: 58vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-gold, rgba(200, 152, 42, 0.35));
}

#scroll-world .sw-copy__tags li {
  color: #f5eedc;
  background: rgba(42, 26, 74, 0.72);
  border-color: rgba(208, 184, 245, 0.36);
  backdrop-filter: blur(10px);
}

#scroll-world .sw-btn--primary {
  color: #130e1f;
  background: #f5eedc;
}

#scroll-world .sw-btn--ghost {
  color: #f5eedc;
  border-color: rgba(245, 238, 220, 0.52);
  background: rgba(19, 14, 31, 0.3);
  backdrop-filter: blur(10px);
}

#scroll-world .sw-route__label {
  color: #f5eedc;
  background: rgba(19, 14, 31, 0.82);
  border-color: rgba(208, 184, 245, 0.3);
}

#scroll-world .sw-hint {
  bottom: 22px;
}

.sw-seo-fallback {
  color: #f5eedc;
  background: #130e1f;
}

.sw-seo-fallback > header,
.sw-seo-fallback > section {
  min-height: 78vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(96px, 14vw, 180px) clamp(24px, 7vw, 96px);
}

.sw-seo-fallback h1,
.sw-seo-fallback h2 {
  max-width: 15ch;
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.02;
}

.sw-seo-fallback h1 {
  font-size: clamp(3rem, 8vw, 7rem);
}

.sw-seo-fallback h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.sw-seo-fallback p {
  max-width: 48ch;
  margin: 0;
  color: rgba(245, 238, 220, 0.76);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}

.sw-seo-fallback img {
  width: min(100%, 900px);
  max-height: 62vh;
  margin-top: 22px;
  border-radius: 28px;
  object-fit: cover;
}

.sw-seo-fallback a {
  width: fit-content;
  color: #f5eedc;
  text-underline-offset: 5px;
}

@media (max-width: 860px) {
  #scroll-world .sw-hint {
    display: none;
  }

  #scroll-world .sw-scene::after {
    background: linear-gradient(
      0deg,
      rgba(19, 14, 31, 0.82) 0%,
      rgba(19, 14, 31, 0.18) 62%,
      transparent 100%
    );
  }

  #scroll-world .sw-route {
    top: 42%;
  }

  #scroll-world .sw-copy__tags {
    margin-top: 16px;
  }

  #scroll-world .sw-copy__cta {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}
