:root {
  --blue: #1c7bb3;
  --blue-dark: #115a86;
  --premium: #2f9fe8;
  --platinum: #b7c7d6;
  --gold: #d5a531;
  --silver: #9da7b2;
  --bronze: #9b6a43;
  --collab: #4d8fcb;
  --software: #2b4458;
  --gray: #636363;
  --charcoal: #393839;
  --black: #000;
  --white: #fff;
  --paper: #f5f7f8;
  --line: #dfe4e7;
  --ink: #101214;
  --muted: #5a6368;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  --max: 1180px;
  --display: "Montserrat", Arial, sans-serif;
  --header-height: 90px;
  --header-logo-width: 210px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.site-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 240px 1fr auto auto;
  align-items: center;
  gap: 24px;
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 34px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.site-header > * { min-width: 0; }

.brand,
.nav-cta {
  display: inline-flex;
  align-items: center;
}

.brand {
  min-height: 52px;
  width: 240px;
}

.brand img {
  width: var(--header-logo-width);
  min-width: var(--header-logo-width);
  max-width: none;
  height: auto;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
  min-height: 44px;
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.82);
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  background: var(--blue);
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.language-switch a {
  min-width: 34px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.language-switch a:hover,
.language-switch a.is-active {
  color: var(--white);
  background: var(--blue);
}

.nav-cta {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  line-height: 1;
  color: var(--white);
  background: var(--blue);
  border-radius: 4px;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  content: "";
  background: currentColor;
}

.page-hero,
.home-hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.14) 100%),
    var(--hero-image, url("assets/photos/hero-rain.jpg")) center / cover no-repeat;
}

.home-hero {
  min-height: 88svh;
  display: grid;
  align-items: end;
  padding: 132px 34px 42px;
}

.home-hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.5) 48%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: var(--hero-image, url("assets/photos/hero-rain.jpg")) center / cover no-repeat;
}

.hero-video iframe,
.hero-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78svh);
  height: max(56.25vw, 100svh);
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.hero-video video {
  object-fit: cover;
}

.page-hero {
  min-height: 430px;
  display: grid;
  align-items: end;
  padding: 130px 34px 62px;
}

body[data-page="patrocinadors"] .page-hero {
  min-height: clamp(520px, 62svh, 660px);
  padding-bottom: clamp(72px, 9svh, 98px);
  background-position: center 62%;
}

body[data-page="temporades"] .page-hero {
  min-height: clamp(520px, 62svh, 660px);
  padding-bottom: clamp(72px, 9svh, 98px);
  background-position: center bottom;
}

.hero-inner,
.section-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.home-hero .hero-inner {
  position: relative;
  z-index: 2;
}

.hero-copy { max-width: 760px; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  font-size: 5rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 18px;
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.12;
}

.hero-lead {
  max-width: 720px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}
.button--primary { color: var(--white); background: var(--blue); border-color: var(--blue); }
.button--ghost { color: var(--white); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.42); }
.button--dark { color: var(--white); background: var(--charcoal); border-color: var(--charcoal); }
.button--full { width: 100%; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 58px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stats div {
  min-height: 96px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.43);
}

.hero-stats span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stats strong { color: var(--white); }

.route-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(0, 3fr);
  gap: 0;
  padding: 0;
  color: var(--white);
  background: var(--black);
}

.route-strip p {
  display: flex;
  align-items: center;
  min-height: 86px;
  margin: 0;
  padding: 0 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 900;
  text-transform: uppercase;
}

.route-strip ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-strip li {
  min-height: 86px;
  padding: 20px clamp(22px, 3vw, 52px);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.route-strip strong,
.route-strip span { display: block; }
.route-strip strong { color: var(--blue); }
.route-strip span { color: rgba(255, 255, 255, 0.7); }

.section-pad { padding: 92px 34px; }
.section-pad--soft { background: var(--paper); }
.section-pad--dark { color: var(--white); background: var(--black); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: 58px;
  align-items: center;
}

.copy p,
.section-heading p {
  color: var(--muted);
  font-size: 1.06rem;
}

.copy p { text-align: justify; }
.section-heading .eyebrow { color: var(--gray); }

.section-pad--dark .copy p,
.section-pad--dark .section-heading p { color: rgba(255, 255, 255, 0.72); }

.section-pad--dark .section-heading .eyebrow,
.competition-section .section-heading .eyebrow { color: var(--gray); }

.home-about-title {
  display: inline-block;
  white-space: nowrap;
}

.home-about-section .split {
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.78fr);
  gap: 42px;
}

.home-about-title {
  font-size: clamp(2.45rem, 4.2vw, 3rem);
  line-height: 1;
}

.home-about-copy {
  --home-title-width: 38.5rem;
}

.home-about-copy p {
  text-align: justify;
  text-align-last: left;
  max-width: min(100%, var(--home-title-width));
}

.home-about-image img {
  height: auto;
  aspect-ratio: 3 / 2;
  object-position: center;
}

.photo-pair {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 18px;
  align-items: end;
}

.photo-pair img,
.feature-image img,
.gallery-grid img,
.season-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.photo-pair img:first-child { aspect-ratio: 4 / 5; }
.photo-pair img:last-child { aspect-ratio: 5 / 4; }

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.season-card,
.team-card,
.sponsor-card,
.contact-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-card--dark {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.home-action-card {
  min-height: 214px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.home-action-card:hover,
.home-action-card:focus-visible {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.home-action-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.home-action-card p {
  margin-bottom: 0;
  color: var(--muted);
  transition: color 160ms ease;
}

.home-action-card:hover p,
.home-action-card:focus-visible p {
  color: rgba(255, 255, 255, 0.72);
}

.home-action-card:hover strong,
.home-action-card:focus-visible strong {
  color: var(--blue);
}

.info-card strong,
.season-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.video-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-card {
  overflow: hidden;
  background: var(--black);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-card iframe,
.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-card video {
  height: auto;
  object-fit: cover;
}

.competition-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(28, 123, 179, 0.34), transparent 34%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.80) 0%, rgba(0, 0, 0, 0.90) 100%),
    url("assets/photos/resultats-bg.png") center 48% / cover no-repeat;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.competition-section .section-inner {
  position: relative;
  z-index: 1;
}

.competition-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.58fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 38px;
}

.competition-head .section-heading { margin-bottom: 0; }

.competition-head > p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.06rem;
  text-align: justify;
  text-align-last: left;
}

.competition-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.competition-card {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 30px 26px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.competition-card::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--blue), transparent);
}

.competition-media {
  height: 330px;
  display: grid;
  place-items: center;
  padding: 12px 0 28px;
}

.competition-media img {
  width: min(100%, 310px);
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.34));
}

.competition-meta {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.competition-meta strong,
.competition-meta span {
  display: block;
}

.competition-meta strong {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.competition-meta span {
  color: rgba(255, 255, 255, 0.72);
  text-align: right;
  white-space: nowrap;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--black);
}

.gallery-grid img {
  aspect-ratio: 4 / 3;
  box-shadow: none;
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.035);
  filter: contrast(1.04) saturate(1.04);
}

.gallery-grid--dense {
  grid-auto-flow: dense;
}

.gallery-grid--dense figure:nth-child(8n + 1),
.gallery-grid--dense figure:nth-child(8n + 6) {
  grid-column: span 2;
}

.gallery-grid--dense figure:nth-child(8n + 1) img,
.gallery-grid--dense figure:nth-child(8n + 6) img {
  aspect-ratio: 16 / 9;
}

.gallery-heading {
  max-width: 860px;
}

.gallery-wide {
  max-width: none;
  width: 100%;
}

.gallery-marquee {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 20px;
  scrollbar-color: var(--blue) rgba(0, 0, 0, 0.12);
  scrollbar-width: thin;
}

.gallery-marquee::-webkit-scrollbar {
  height: 9px;
}

.gallery-marquee::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
}

.gallery-marquee::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 999px;
}

.gallery-rail {
  display: grid;
  grid-template-rows: repeat(4, clamp(122px, 8.6vw, 154px));
  width: max-content;
  gap: 8px;
}

.gallery-marquee:hover .gallery-lane,
.gallery-marquee:focus-within .gallery-lane {
  animation-play-state: paused;
}

.gallery-lane {
  display: flex;
  width: max-content;
  animation: gallery-loop 210s linear infinite;
}

.gallery-sequence {
  display: flex;
  gap: 8px;
  padding-right: 8px;
}

.gallery-lane--2,
.gallery-lane--4 {
  animation-duration: 240s;
}

.gallery-sequence figure {
  flex: 0 0 clamp(190px, 14vw, 240px);
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--black);
  box-shadow: var(--shadow);
}

.gallery-sequence .gallery-item--portrait {
  flex-basis: clamp(86px, 7vw, 118px);
}

.gallery-sequence .gallery-item--square {
  flex-basis: clamp(132px, 10vw, 172px);
}

.gallery-sequence .gallery-item--wide {
  flex-basis: clamp(245px, 19vw, 320px);
}

.gallery-sequence .gallery-item--slim {
  flex-basis: clamp(158px, 12vw, 200px);
}

.gallery-sequence img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.006);
  border-radius: 6px;
}

@keyframes gallery-loop {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333333%); }
}

.newsletter-section {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.72)),
    url("assets/gallery/gallery-22.jpg") center / cover no-repeat;
}

.newsletter-section .split {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 590px);
  align-items: center;
  gap: 44px;
}

.newsletter-section .copy {
  max-width: 500px;
}

.newsletter-section .copy h2 {
  max-width: 460px;
  font-size: clamp(2.15rem, 3.2vw, 3rem);
  line-height: 0.98;
}

.newsletter-section .copy p {
  max-width: 430px;
  text-align: left;
}

.newsletter-section .copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.55;
}

.newsletter-viewer {
  display: grid;
  gap: 16px;
  align-self: stretch;
  justify-self: end;
  width: min(100%, 590px);
}

.newsletter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.newsletter-tabs button {
  min-height: 42px;
  padding: 0 18px;
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  cursor: pointer;
}

.newsletter-tabs button:hover,
.newsletter-tabs button.is-active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.flipbook-shell {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: center;
  width: 100%;
}

.newsletter-pageflip-frame {
  width: 100%;
  min-height: 470px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px);
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.42);
}

.newsletter-pageflip-stage {
  width: 100%;
  display: grid;
  place-items: center;
  perspective: 1800px;
}

.newsletter-book {
  width: min(100%, 590px);
  aspect-ratio: 1190.55 / 841.89;
  position: relative;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: 8px;
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.36));
}

.newsletter-book-page {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  background-color: #f7f7f4;
  border-radius: 4px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  cursor: pointer;
  user-select: none;
  transition: transform 850ms cubic-bezier(0.2, 0.62, 0.16, 1), box-shadow 850ms ease;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    inset 22px 0 28px rgba(0, 0, 0, 0.04);
}

.newsletter-book-page:nth-child(odd) {
  right: 0;
  transform-origin: left center;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}

.newsletter-book-page:nth-child(even) {
  left: 0;
  transform-origin: right center;
  transform: rotateY(180deg);
  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}

.newsletter-book-page:nth-child(odd):not(.flipped):hover {
  transform: rotateY(-10deg);
}

.newsletter-book-page:nth-child(even).flipped:hover {
  transform: rotateY(10deg);
}

.newsletter-book-page.flipped:nth-child(odd) {
  transform: rotateY(-180deg);
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.2);
}

.newsletter-book-page.flipped:nth-child(even) {
  transform: rotateY(0deg);
  box-shadow: 10px 0 24px rgba(0, 0, 0, 0.18);
}

.newsletter-book-page::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 68%);
  transition: opacity 220ms ease;
}

.newsletter-book-page:hover::before {
  opacity: 1;
}

.newsletter-book-page::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.12);
}

.newsletter-book-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  background-color: #f7f7f4;
  pointer-events: none;
  user-select: none;
}

.newsletter-book-page.cover img,
.newsletter-book-page.back-cover img {
  object-fit: contain;
}

.flipbook-fallback {
  display: none;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.newsletter-viewer.is-fallback .flipbook-fallback {
  display: block;
}

.flipbook-book-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
}

.flipbook-arrow {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  align-self: center;
}

.flipbook-arrow:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.flipbook-arrow:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.flipbook-arrow:disabled:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.flipbook-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  color: var(--white);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.flipbook-fullscreen svg {
  width: 16px;
  height: 16px;
}

.flipbook-fullscreen:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.flipbook-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  justify-items: center;
  gap: clamp(14px, 2vh, 24px);
  overflow: hidden;
  padding: clamp(14px, 2.2vw, 34px);
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.96), rgba(0, 24, 38, 0.92)),
    url("assets/gallery/gallery-22.jpg") center / cover no-repeat;
}

.flipbook-shell:fullscreen .flipbook-book-wrapper {
  width: min(100%, 1660px);
  height: min(100%, calc(100svh - 148px));
  min-height: 0;
  align-items: center;
  align-self: center;
  gap: clamp(12px, 2vw, 28px);
  grid-template-columns: minmax(0, 1fr);
}

.flipbook-shell:fullscreen .newsletter-pageflip-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 1.4vw, 24px);
  background: rgba(0, 0, 0, 0.62);
}

.flipbook-shell:fullscreen .newsletter-pageflip-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.flipbook-shell:fullscreen .newsletter-book {
  width: min(calc((100svh - 188px) * 1.414), calc(100vw - 92px), 1460px);
  max-width: 100%;
  max-height: calc(100svh - 188px);
}

.flipbook-shell:fullscreen .flipbook-arrow {
  width: clamp(50px, 5vw, 68px);
  height: clamp(50px, 5vw, 68px);
  font-size: clamp(2.3rem, 4vw, 3rem);
}


.season-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.season-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.55) 52%, rgba(0, 0, 0, 0.72) 100%),
    var(--season-card-bg, none) center / cover no-repeat,
    var(--black);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.season-card strong {
  max-width: 18rem;
  color: var(--blue);
  font-size: 0.9rem;
  line-height: 1.35;
}

.season-card h3 {
  margin-top: 10px;
}

.season-card strong,
.season-card h3,
.season-card p {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.season-card p { color: rgba(255, 255, 255, 0.82); }
.season-card .button { margin-top: auto; }

body[data-page="temporades"] .season-card:nth-child(1) { --reveal-delay: 0ms; }
body[data-page="temporades"] .season-card:nth-child(2) { --reveal-delay: 70ms; }
body[data-page="temporades"] .season-card:nth-child(3) { --reveal-delay: 140ms; }
body[data-page="temporades"] .season-card:nth-child(4) { --reveal-delay: 210ms; }
body[data-page="temporades"] .season-card:nth-child(5) { --reveal-delay: 280ms; }
body[data-page="temporades"] .season-card:nth-child(6) { --reveal-delay: 350ms; }
body[data-page="temporades"] .season-card:nth-child(7) { --reveal-delay: 420ms; }
body[data-page="temporades"] .season-card:nth-child(8) { --reveal-delay: 490ms; }
body[data-page="temporades"] .season-card:nth-child(9) { --reveal-delay: 560ms; }
body[data-page="temporades"] .season-card:nth-child(10) { --reveal-delay: 630ms; }

body[data-page="temporades"] .season-card.reveal-in {
  translate: 0 46px;
  filter: blur(8px);
  transition:
    opacity 920ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay, 0ms),
    translate 920ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay, 0ms),
    filter 920ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay, 0ms);
}

body[data-page="temporades"] .season-card.reveal-in.is-visible {
  filter: blur(0);
}

.season-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.season-image {
  position: sticky;
  top: 110px;
}

.season-image img { aspect-ratio: 16 / 9; }

.season-image-intro {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  text-align: justify;
  text-align-last: left;
}

.season-layout .member-list--with-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.season-layout .member-list--with-photos li {
  flex: 0 0 calc(33.333% - 7px);
  max-width: calc(33.333% - 7px);
  flex-direction: column;
  display: flex;
  align-items: stretch;
  grid-template-columns: unset;
  min-height: unset;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.season-layout .member-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 5px 5px 0 0;
}

.season-layout .member-copy {
  padding: 8px 10px;
}

.team-groups {
  display: grid;
  gap: 18px;
}

body[data-page="season"] .team-groups .team-card {
  --reveal-delay: 0ms;
}

.season-story {
  background:
    linear-gradient(180deg, var(--white) 0%, #eef3f6 100%);
}

.season-story-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.season-story-head h2 {
  color: var(--blue);
}

.season-story-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
  text-align: justify;
}

.season-story-gallery {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.9fr;
  grid-auto-rows: clamp(170px, 17vw, 250px);
  gap: 14px;
}

.season-story-photo {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--black);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.season-story-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.22));
}

.season-story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms cubic-bezier(0.2, 0.72, 0.18, 1), filter 520ms ease;
}

.season-story-photo:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.04);
}

.season-story-photo--1 {
  grid-column: span 2;
  grid-row: span 2;
}

.season-story-photo--4 {
  grid-column: span 2;
}

.season-story-photo--5 {
  grid-column: span 1;
}

body[data-page="season"] .team-groups .team-card:nth-child(2) { --reveal-delay: 55ms; }
body[data-page="season"] .team-groups .team-card:nth-child(3) { --reveal-delay: 110ms; }
body[data-page="season"] .team-groups .team-card:nth-child(4) { --reveal-delay: 165ms; }
body[data-page="season"] .team-groups .team-card:nth-child(5) { --reveal-delay: 220ms; }
body[data-page="season"] .team-groups .team-card:nth-child(6) { --reveal-delay: 275ms; }
body[data-page="season"] .team-groups .team-card:nth-child(7) { --reveal-delay: 330ms; }
body[data-page="season"] .team-groups .team-card:nth-child(8) { --reveal-delay: 385ms; }

body[data-page="season"] .team-card.reveal-in {
  filter: blur(8px);
  translate: 0 44px;
  transition:
    opacity 900ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay),
    translate 900ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay),
    filter 900ms cubic-bezier(0.19, 1, 0.22, 1) var(--reveal-delay),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

body[data-page="season"] .team-card.reveal-in.is-visible {
  filter: blur(0);
  translate: 0 0;
}

.team-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.team-card h3 span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.member-list {
  columns: 2;
  column-gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-list--with-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  columns: auto;
}

.member-list li {
  break-inside: avoid;
  padding: 8px 0;
  color: var(--muted);
  border-bottom: 1px solid #edf0f2;
}

.member-list--with-photos li {
  min-height: 230px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #edf0f2;
  border-radius: 6px;
}

.member-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 8px;
  background: #e9eef2;
}

.member-copy {
  display: block;
  min-width: 0;
}

.member-list strong {
  display: block;
  color: var(--ink);
}

.member-list small { color: var(--muted); }

.member-list--with-photos strong,
.member-list--with-photos small {
  overflow-wrap: anywhere;
}

body[data-page="season"] .section-inner {
  --max: 1520px;
}

body[data-page="season"][data-season="10"] .page-hero {
  background-position: center 42%;
}

body[data-page="season"][data-season="10"] .season-image img {
  aspect-ratio: 16 / 9;
  object-position: center 30%;
}

.member-photo--empty {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #e9eef2;
  border-radius: 5px 5px 0 0;
}

.member-list__item--linked {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.member-list__item--linked a {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.member-list__item--linked:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.member-list__item--linked:hover .member-photo {
  opacity: 0.88;
}

.member-list__item--linked .member-copy::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a66c2'%3E%3Cpath d='M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z'/%3E%3C/svg%3E") no-repeat center/contain;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.member-list__item--linked:hover .member-copy::after {
  opacity: 1;
}

.sponsor-tier {
  --tier-accent: var(--blue);
  --tier-card-min-height: 120px;
  --tier-logo-height: 70px;
  --tier-columns: 4;
  --tier-gap: 14px;
  --tier-card-width: calc(25% - var(--tier-gap));
  margin-top: 42px;
}

.sponsor-tier h3 {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--tier-accent);
  text-transform: uppercase;
}

.sponsor-tier h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--tier-accent) 38%, white);
}

.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--tier-gap);
}

.sponsor-card {
  flex: 0 1 var(--tier-card-width);
  min-width: min(100%, 210px);
  min-height: var(--tier-card-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sponsor-card img {
  max-height: var(--tier-logo-height);
  max-width: calc(100% - 40px);
  object-fit: contain;
  width: auto;
  filter: grayscale(100%);
  transition: filter 250ms ease;
}

.sponsor-card--text span {
  color: var(--ink);
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  text-transform: uppercase;
}

.sponsor-card:hover {
  border-color: #c8c8c8;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.sponsor-card:hover img {
  filter: grayscale(0%);
}

.sponsor-tier[data-tier="PREMIUM"] {
  --tier-accent: var(--premium);
  --tier-card-min-height: 170px;
  --tier-logo-height: 96px;
  --tier-columns: 2;
  --tier-gap: 18px;
  --tier-card-width: calc(50% - var(--tier-gap));
}

.sponsor-tier[data-tier="PLATINUM"] {
  --tier-accent: var(--platinum);
  --tier-card-min-height: 152px;
  --tier-logo-height: 88px;
  --tier-columns: 3;
  --tier-gap: 16px;
  --tier-card-width: calc(33.333% - var(--tier-gap));
}

.sponsor-tier[data-tier="GOLD"] {
  --tier-accent: var(--gold);
  --tier-card-min-height: 140px;
  --tier-logo-height: 84px;
  --tier-card-width: calc(25% - var(--tier-gap));
}

.sponsor-tier[data-tier="SILVER"] {
  --tier-accent: var(--silver);
  --tier-card-min-height: 118px;
  --tier-logo-height: 66px;
}

.sponsor-tier[data-tier="BRONZE"] {
  --tier-accent: var(--bronze);
  --tier-card-min-height: 106px;
  --tier-logo-height: 56px;
}

.sponsor-tier[data-tier="COLLABORADOR"] {
  --tier-accent: var(--collab);
  --tier-card-min-height: 96px;
  --tier-logo-height: 50px;
  --tier-columns: 5;
  --tier-card-width: calc(20% - var(--tier-gap));
}

.sponsor-tier[data-tier="SOFTWARE"] {
  --tier-accent: var(--software);
  --tier-card-min-height: 96px;
  --tier-logo-height: 50px;
  --tier-columns: 5;
  --tier-card-width: calc(20% - var(--tier-gap));
}

.sponsorship-contact {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.68) 48%, rgba(0, 0, 0, 0.86) 100%),
    var(--sponsorship-bg, url("assets/photos/IMGP1018.jpg")) center 48% / cover no-repeat;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sponsorship-contact .split {
  align-items: start;
}

.sponsorship-contact .copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.sponsorship-form {
  display: grid;
  gap: 14px;
}

.sponsorship-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sponsorship-form label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.sponsorship-form input,
.sponsorship-form textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--white);
  background: rgba(8, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

.sponsorship-form input:focus,
.sponsorship-form textarea:focus {
  outline: 2px solid rgba(28, 123, 179, 0.55);
  outline-offset: 2px;
}

.sponsorship-form textarea {
  min-height: 140px;
  resize: vertical;
}

.sponsorship-form-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
  gap: 58px;
}

.contact-list {
  display: grid;
  gap: 16px;
}

.contact-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-card dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.contact-card a { color: var(--blue-dark); }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--blue-dark);
  background: #eef6fb;
  border: 1px solid #d3e7f4;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.home-sponsor-strip {
  padding: 34px;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.home-sponsor-track {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
}

.home-sponsor-track img {
  width: 100%;
  height: 64px;
  padding: 8px 10px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.home-sponsor-track img[alt="Condals"] {
  height: 78px;
  transform: scale(1.16);
}

.sponsor-card img[alt="Condals"] {
  max-height: 112px;
  transform: scale(1.14);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  color: var(--white);
  background: var(--black);
  border-radius: 8px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  color: var(--white);
  background: #151719;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  outline: none;
}

.contact-form textarea {
  min-height: 128px;
  resize: vertical;
}

.contact-form [data-form-status] {
  min-height: 1.3em;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 34px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--black);
}

.site-footer img { width: 220px; }
.site-footer p { margin: 0; text-align: center; }
.site-footer a { color: var(--white); font-weight: 900; text-transform: uppercase; }

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 210px 1fr auto auto;
    gap: 18px;
  }
  .brand { width: 210px; }
  .site-nav { gap: 15px; font-size: 0.82rem; }
  h1 { font-size: 4rem; }
  h2 { font-size: 2.45rem; }
  .home-about-title { font-size: 2.35rem; }
  .home-about-section .split { grid-template-columns: 1fr; }
  .cards-grid, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sponsor-tier {
    --tier-card-width: calc(33.333% - var(--tier-gap));
  }
  .sponsor-tier[data-tier="PREMIUM"] { --tier-card-width: calc(50% - var(--tier-gap)); }
  .sponsor-tier[data-tier="PLATINUM"] { --tier-card-width: calc(33.333% - var(--tier-gap)); }
  .sponsor-tier[data-tier="COLLABORADOR"],
  .sponsor-tier[data-tier="SOFTWARE"] { --tier-card-width: calc(25% - var(--tier-gap)); }
  .gallery-grid--dense figure:nth-child(n) { grid-column: auto; }
  .home-sponsor-track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .newsletter-section .split {
    grid-template-columns: 1fr;
  }

  .newsletter-viewer {
    justify-self: center;
  }
  .competition-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .competition-card { min-height: 380px; padding: 24px 20px; }
  .competition-media { height: 290px; }
  .season-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split, .season-layout, .contact-layout { grid-template-columns: 1fr; }
  .season-image { position: static; }
  .season-story-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(150px, 28vw, 220px);
  }
  .season-story-photo--1,
  .season-story-photo--4,
  .season-story-photo--5 {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }

  .site-header {
    --header-height: 76px;
    --header-logo-width: 164px;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: var(--header-height) auto;
    padding: 0 18px;
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    overflow: hidden;
    transition: background 180ms ease, box-shadow 180ms ease;
  }

  .brand {
    width: var(--header-logo-width);
    min-height: 44px;
    grid-column: 1;
    grid-row: 1;
  }
  .menu-toggle {
    display: block;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .language-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .nav-cta { display: none; }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-height: 0;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    border-top: 1px solid transparent;
    transition:
      max-height 260ms cubic-bezier(0.2, 0.72, 0.18, 1),
      opacity 180ms ease,
      transform 260ms cubic-bezier(0.2, 0.72, 0.18, 1),
      padding 260ms cubic-bezier(0.2, 0.72, 0.18, 1),
      border-color 180ms ease;
    pointer-events: none;
  }

  .site-header.is-open {
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  }

  .site-header.is-open .site-nav {
    max-height: 320px;
    padding: 8px 0 14px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    border-top-color: rgba(255, 255, 255, 0.14);
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    min-height: 42px;
    padding: 0 2px;
    font-size: 0.92rem;
  }

  .site-nav a::after {
    bottom: 4px;
    right: auto;
    width: 136px;
  }

  .home-hero, .page-hero {
    padding-left: 18px;
    padding-right: 18px;
    background-position: 60% center;
  }

  h1 { font-size: clamp(2.25rem, 10vw, 2.8rem); }
  h2 { font-size: clamp(1.9rem, 8vw, 2.1rem); }
  .home-about-title { white-space: normal; font-size: clamp(2rem, 8vw, 2.35rem); }

  .hero-stats,
  .route-strip,
  .route-strip ul,
  .photo-pair,
  .video-grid,
  .competition-head,
  .competition-results,
  .cards-grid,
  .gallery-grid,
  .season-grid,
  .sponsor-grid,
  .member-list {
    grid-template-columns: 1fr;
    columns: 1;
  }

  .gallery-rail {
    grid-template-rows: repeat(4, 96px);
  }

  .gallery-sequence figure {
    flex-basis: 150px;
  }

  .gallery-sequence .gallery-item--portrait {
    flex-basis: 70px;
  }

  .gallery-sequence .gallery-item--wide {
    flex-basis: 190px;
  }

  .gallery-sequence .gallery-item--square {
    flex-basis: 104px;
  }

  .newsletter-pageflip-frame {
    min-height: 304px;
    padding: 10px;
  }

  .newsletter-book {
    width: min(100%, 430px);
  }

  .flipbook-book-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .flipbook-arrow {
    width: 40px;
    height: 44px;
    font-size: 2rem;
  }

  .flipbook-shell:fullscreen {
    padding: 10px;
  }

  .flipbook-shell:fullscreen .flipbook-book-wrapper {
    width: 100%;
    height: calc(100svh - 108px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .flipbook-shell:fullscreen .newsletter-pageflip-frame {
    padding: 8px;
  }

  .flipbook-shell:fullscreen .newsletter-book {
    width: min(calc((100svh - 146px) * 1.414), calc(100vw - 28px), 760px);
    max-height: calc(100svh - 146px);
  }

  .flipbook-shell:fullscreen .flipbook-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 42px;
    height: 50px;
    transform: translateY(-50%);
  }

  .flipbook-shell:fullscreen [data-pageflip-prev] { left: 0; }
  .flipbook-shell:fullscreen [data-pageflip-next] { right: 0; }

  .route-strip { padding: 18px; gap: 0; }
  .route-strip p { min-height: auto; padding: 0 0 18px; border-right: 0; }
  .route-strip li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .competition-card { min-height: 360px; }
  .competition-media { height: 280px; }
  .competition-meta, .competition-meta span { text-align: left; }
  .competition-meta { flex-direction: column; gap: 6px; }
  .sponsor-tier[data-tier="PREMIUM"],
  .sponsor-tier[data-tier="PLATINUM"],
  .sponsor-tier[data-tier="GOLD"],
  .sponsor-tier[data-tier="SILVER"],
  .sponsor-tier[data-tier="BRONZE"],
  .sponsor-tier[data-tier="COLLABORADOR"],
  .sponsor-tier[data-tier="SOFTWARE"] {
    --tier-card-width: auto;
    --tier-mobile-min: 150px;
  }
  .sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tier-mobile-min)), 1fr));
    gap: 10px;
  }
  .sponsor-card {
    min-width: 0;
    width: auto;
    flex: none;
    padding: 14px;
  }
  .sponsor-card img {
    max-width: 100%;
  }
  .sponsor-tier[data-tier="PREMIUM"]    { --tier-mobile-min: 220px; --tier-card-min-height: 112px; --tier-logo-height: 66px; }
  .sponsor-tier[data-tier="PLATINUM"]   { --tier-mobile-min: 170px; --tier-card-min-height: 104px; --tier-logo-height: 60px; }
  .sponsor-tier[data-tier="GOLD"]       { --tier-card-min-height: 96px;  --tier-logo-height: 54px; }
  .sponsor-tier[data-tier="SILVER"]     { --tier-card-min-height: 86px;  --tier-logo-height: 46px; }
  .sponsor-tier[data-tier="BRONZE"]     { --tier-card-min-height: 78px;  --tier-logo-height: 40px; }
  .sponsor-tier[data-tier="COLLABORADOR"] { --tier-card-min-height: 76px; --tier-logo-height: 36px; }
  .sponsor-tier[data-tier="SOFTWARE"]   { --tier-card-min-height: 76px;  --tier-logo-height: 36px; }
  .sponsorship-form-grid { grid-template-columns: 1fr; }
  .home-sponsor-strip { padding: 28px 18px; }
  .home-sponsor-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-sponsor-track img { height: 54px; }
  .season-layout .member-list--with-photos li {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
  }
  .season-story-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .season-story-photo--1 {
    grid-row: span 2;
  }
  .section-pad { padding: 68px 18px; }
  .site-footer { grid-template-columns: 1fr; text-align: left; padding: 26px 18px; }
  .site-footer p { text-align: left; }
}

@media (max-width: 420px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.78rem; }
  .button { width: 100%; }
  .hero-actions { width: 100%; }
  .sponsor-tier { margin-top: 34px; }
  .sponsor-card { padding: 12px; }
  .season-layout .member-list--with-photos {
    gap: 8px;
  }
  .season-layout .member-list--with-photos li {
    flex-basis: calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
}

/* ==========================================================
   DYNAMICS V4 · Interacción, polish visual y mapa de fotos
   Inspirado en patrones tipo Magic UI / Frontend Focus, adaptado
   a vanilla HTML/CSS para no meter un build system innecesario.
   ========================================================== */

.scroll-progress {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: var(--scroll-progress, 0%);
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--blue), #64d8ff, var(--blue));
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.65);
}

.site-header::after,
.page-hero::after,
.home-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-hero::after,
.page-hero::after {
  inset: auto -18vw -18vw auto;
  width: min(46vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.24), rgba(0, 174, 239, 0.06) 42%, transparent 70%);
  filter: blur(12px);
  animation: dynamicsGlowDrift 9s ease-in-out infinite alternate;
}

@keyframes dynamicsGlowDrift {
  from { transform: translate3d(-4%, 3%, 0) scale(0.96); opacity: 0.68; }
  to { transform: translate3d(5%, -5%, 0) scale(1.08); opacity: 1; }
}

.reveal-in {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 720ms ease,
    translate 720ms cubic-bezier(0.2, 0.72, 0.18, 1);
}

.reveal-in.is-visible {
  opacity: 1;
  translate: 0 0;
}

.interactive-card {
  position: relative;
  transform-style: preserve-3d;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.interactive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(0, 174, 239, 0.22), transparent 38%);
  transition: opacity 220ms ease;
}

.interactive-card > * {
  position: relative;
  z-index: 1;
}

.interactive-card:hover {
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24), 0 0 34px rgba(0, 174, 239, 0.16);
}

.interactive-card:hover::after {
  opacity: 1;
}

.button,
.nav-cta,
.newsletter-tabs button,
.flipbook-fullscreen {
  position: relative;
  overflow: hidden;
}

.button::before,
.nav-cta::before,
.newsletter-tabs button::before,
.flipbook-fullscreen::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -120%;
  width: 70%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: transform 540ms ease;
}

.button:hover::before,
.nav-cta:hover::before,
.newsletter-tabs button:hover::before,
.flipbook-fullscreen:hover::before {
  transform: translateX(330%) skewX(-18deg);
}

.gallery-marquee {
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.gallery-sequence figure {
  position: relative;
  isolation: isolate;
}

.gallery-sequence figure img,
.competition-media img,
.feature-image img,
.season-image img {
  transition: transform 780ms cubic-bezier(0.2, 0.72, 0.18, 1), filter 780ms ease;
}

.gallery-sequence figure:hover img,
.competition-card:hover .competition-media img,
.feature-image:hover img,
.season-image:hover img {
  transform: scale(1.055);
  filter: saturate(1.12) contrast(1.04);
}

.home-sponsor-track img {
  transition: transform 240ms ease, filter 240ms ease, opacity 240ms ease;
}

.home-sponsor-track img:hover {
  transform: translateY(-3px) scale(1.04);
  filter: none;
}

.media-map-toggle {
  position: fixed;
  z-index: 10000;
  left: 16px;
  bottom: 16px;
  min-height: 36px;
  padding: 0 14px;
  color: var(--white);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(2, 12, 18, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.media-map-toggle:hover,
.media-map-toggle.is-active {
  background: var(--blue);
  border-color: var(--blue);
}

[data-media-key] {
  position: relative;
}

.season-image[data-media-key] {
  position: sticky;
}

body.show-media-map [data-media-key] {
  outline: 2px solid rgba(0, 174, 239, 0.92);
  outline-offset: 4px;
}

body.show-media-map [data-media-key]::before {
  content: attr(data-media-key) " · " attr(data-media-label);
  position: absolute;
  z-index: 50;
  left: 10px;
  top: 10px;
  max-width: min(360px, calc(100% - 20px));
  padding: 7px 10px;
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 174, 239, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

body.show-media-map .home-sponsor-track [data-media-key]::before,
body.show-media-map .sponsor-card[data-media-key]::before {
  font-size: 0.58rem;
  max-width: 240px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-in {
    opacity: 1;
    filter: none;
    translate: 0 0;
  }
}

@media (max-width: 720px) {
  .media-map-toggle {
    left: 10px;
    bottom: 10px;
    font-size: 0.66rem;
  }

  body.show-media-map [data-media-key]::before {
    font-size: 0.58rem;
    max-width: calc(100vw - 48px);
  }
}

.home-sponsor-logo {
  display: grid;
  place-items: center;
  min-width: 0;
}

.home-sponsor-logo:hover img {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(0) invert(1);
}

.back-to-top { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
