/* ==========================================================================
   Águilas UFC — Landing Tetracampeones
   La fuente Montserrat se carga desde index.html.
   ========================================================================== */

:root {
  color-scheme: dark;
  --navy: #071a2d;
  --gold: #dcae38;
  --white: #fafafa;
  --header-h: 116px;
  --footer-h: 60px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: Montserrat, Arial, sans-serif;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  border-top: 1px solid #25405b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(20px, 3vw, 60px);
}

.brand { display: flex; align-items: center; }

.brand img {
  display: block;
  width: clamp(66px, 5vw, 98px);
  height: auto;
  object-fit: contain;
}

/* Contacto en horizontal con iconos. */
.header-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.header-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: clamp(12px, 1.15vw, 17px);
  font-weight: 600;
  text-decoration: none;
}

.header-links a:hover,
.header-links a:focus-visible { color: var(--gold); }

.header-links .icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Escena con scroll
   -------------------------------------------------------------------------- */

/* La altura define cuánto scroll dura la animación. */
.scroll-scene { position: relative; height: 350svh; }

.sticky-panel {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 360px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 46%, #203951 0%, #0a2037 45%, #071a2d 80%);
}

.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(220, 174, 56, 0.065), transparent 42%);
}

.scene-content {
  position: absolute;
  inset: var(--header-h) 0 var(--footer-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 16px 14px;
}

/* Nombre del club encima del logo. */
.club-name {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 30px);
  width: min(750px, 90vw);
  max-width: 100%;
  margin: 0 0 -12px;
  color: #cad6e2;
  font-size: clamp(10px, 1.15vw, 18px);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
  white-space: nowrap;
}

.club-name .rule {
  flex: 0 1 auto;
  width: clamp(24px, 6vw, 78px);
  height: 2px;
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Logo y trazos SVG
   -------------------------------------------------------------------------- */

.logo-wrap {
  position: relative;
  flex: 0 0 auto;
  width: min(65vw, 510px, 45svh);
  aspect-ratio: 1;
  filter: drop-shadow(0 10px 22px #0003);
}

.logo-color,
.traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-color {
  opacity: 0;
  transform: scale(0.975);
  will-change: opacity, transform;
}

.traces {
  overflow: visible;
  pointer-events: none;
  will-change: opacity;
}

.trace {
  fill: none;
  stroke: #e1b34c;
  stroke-width: 2.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  vector-effect: non-scaling-stroke;
}

/* --------------------------------------------------------------------------
   Indicador de scroll
   -------------------------------------------------------------------------- */

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(12px + 20%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #f3f6fa;
  font-size: clamp(15px, 1.5vw, 21px);
  font-weight: 800;
  letter-spacing: 0.16em;
  white-space: nowrap;
  transform-origin: center;
  will-change: transform, opacity;
}

.scroll-arrow {
  color: var(--gold);
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  50% { transform: translateY(7px); }
}

/* --------------------------------------------------------------------------
   Mensaje final
   -------------------------------------------------------------------------- */

.final-message {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-top: clamp(14px, 2.5svh, 26px);
  padding: 0 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  will-change: opacity, transform;
}

.final-message h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5.2vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.final-message h1 span { color: var(--gold); }

.final-message p {
  margin: clamp(8px, 1.6svh, 16px) 0 0;
  color: #c1cedb;
  font-size: clamp(12px, 1.22vw, 19px);
  line-height: 1.5;
}

/* Estrellas con el año de cada campeonato debajo. */
.stars {
  display: flex;
  justify-content: center;
  gap: 0.55em;
  margin-top: clamp(5px, 1.4svh, 14px);
  color: var(--gold);
  font-size: clamp(24px, 2.8vw, 38px);
}

.star {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.star small {
  margin-top: 6px;
  color: #c1cedb;
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Barra de progreso y footer
   -------------------------------------------------------------------------- */

.scroll-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--footer-h);
  height: 2px;
  background: #304050;
}

.scroll-progress {
  width: 0;
  height: 100%;
  background: var(--gold);
}

.site-footer {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(20px, 3vw, 60px);
  border-top: 1px solid #233b50;
  background: #0a1d30ee;
  color: #adbbca;
  font-size: clamp(9px, 0.85vw, 12px);
  font-weight: 700;
  letter-spacing: 0.13em;
}

.site-footer > span:last-child { color: var(--gold); }

/* Botón "volver arriba": aparece al terminar la animación. */
.back-to-top {
  position: fixed;
  z-index: 20;
  right: clamp(20px, 3vw, 60px);
  bottom: calc(var(--footer-h) + 16px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #0a1d30ee;
  color: var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background-color 0.2s, color 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--gold);
  color: var(--navy);
}

.back-to-top:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.back-to-top .icon { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root { --header-h: 94px; --footer-h: 64px; }

  .scroll-scene { height: 320svh; }
  .club-name { margin-bottom: -8px; font-size: clamp(9px, 1.7vw, 12px); letter-spacing: 0.16em; }
  .logo-wrap { width: min(82vw, 43svh, 460px); }
  .final-message h1 { font-size: clamp(1.5rem, 6.4vw, 3.5rem); }
  .final-message p { font-size: clamp(12px, 2.4vw, 16px); }
}

@media (max-width: 480px) {
  :root { --header-h: 78px; --footer-h: 62px; }

  .site-header { padding: 6px 16px; }
  .brand img { width: 62px; }
  .header-links { gap: 10px; }
  .header-links a { gap: 5px; font-size: 11px; }
  .header-links .icon { width: 15px; height: 15px; }

  .scroll-scene { height: 310svh; }
  .club-name { gap: 7px; font-size: clamp(8px, 2.25vw, 11px); letter-spacing: 0.09em; }
  .club-name .rule { width: 17px; }
  .logo-wrap { width: min(91vw, 39svh); }

  .scroll-cue { bottom: calc(4px + 20%); font-size: 12px; letter-spacing: 0.11em; }
  .scroll-arrow { font-size: 25px; }

  .final-message { margin-top: 13px; }
  .final-message h1 { font-size: clamp(1.55rem, 7.6vw, 2.5rem); }
  .final-message p { font-size: 12px; }
  .stars { margin-top: 8px; font-size: 24px; }
  .star small { margin-top: 4px; font-size: 9px; }

  .site-footer { gap: 8px; padding: 10px 14px; font-size: 8px; letter-spacing: 0; }
  .site-footer > span:last-child { font-size: 8px; }
  .back-to-top { right: 16px; bottom: calc(var(--footer-h) + 12px); width: 40px; height: 40px; }
}

@media (max-height: 680px) {
  .logo-wrap { width: min(67vw, 34svh); }
  .final-message { margin-top: 7px; }
  .final-message p { margin-top: 6px; }
  .stars { margin-top: 5px; }
}

/* Sin animación: se muestra directamente el logo a color y el mensaje. */
@media (prefers-reduced-motion: reduce) {
  .scroll-scene { height: 100svh; }
  .traces,
  .scroll-cue { display: none; }
  .scroll-arrow { animation: none; }
  .back-to-top { transition: none; }
  .logo-color { opacity: 1 !important; }
  .final-message { opacity: 1 !important; transform: none !important; }
}
