/* ===== Tokens (colores del escudo GEM) ===== */
:root {
  --blue: #0a5bb5;
  --blue-deep: #0a2a5e;
  --navy: #071634;
  --violet: #9497f7;
  --violet-soft: #e9eafe;
  --red: #c8372d;
  --ink: #111421;
  --muted: #545a72;
  --paper: #ffffff;
  --paper-alt: #f4f5fc;
  --line: #dfe1f2;

  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --shadow: 0 18px 40px -20px rgba(10, 42, 94, .35);
  --glow: 0 0 40px rgba(148, 151, 247, .28), inset 0 0 0 999px rgba(148, 151, 247, .07);
  --gutter: 16px;
  --max: 1160px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1;
  margin: 0 0 .4em;
}
h2 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
h2 span { color: var(--blue); }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .8em;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .9em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}
.btn-primary { background: #25d366; color: #06301a; box-shadow: 0 12px 28px -12px rgba(37, 211, 102, .7); }
.btn-primary:hover { background: #2fe072; }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-light { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 22, 52, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 151, 247, .18);
  color: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: .04em;
}
.brand img { width: 44px; height: 44px; }
.brand strong { color: var(--violet); font-weight: 400; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  display: none;
  flex-direction: column;
  padding: .5rem var(--gutter) 1.25rem;
  background: var(--navy);
  border-bottom: 1px solid rgba(148, 151, 247, .18);
}
.site-nav.is-open { display: flex; }
.site-nav a {
  padding: .8rem 0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-nav a:hover { color: var(--violet); }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav a { padding: 0; border: 0; font-size: .95rem; }
  .site-nav .nav-cta {
    padding: .55em 1.2em;
    border-radius: 999px;
    background: var(--violet);
    color: var(--navy);
    font-weight: 600;
  }
  .site-nav .nav-cta:hover { background: #fff; color: var(--navy); }
}

/* ===== Hero ===== */
.hero {
  --hero-bg: #04060c; /* casi negro, igual al fondo de la foto */
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(900px 600px at 0% 100%, rgba(10, 91, 181, .45), transparent 65%),
    var(--hero-bg);
  display: flex;
  align-items: flex-end;
  min-height: min(100svh, 920px);
  padding: 0 0 3.5rem;
}
/* Celular: la foto ocupa la parte superior y se funde en negro hacia el texto */
.hero-photo {
  position: absolute;
  inset: 0 0 auto 0;
  height: 72%;
  z-index: -1;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4, 6, 12, .15) 0%, rgba(4, 6, 12, .35) 45%, var(--hero-bg) 100%);
}
.hero-inner { position: relative; padding-top: 40svh; }
.hero-text { max-width: 38rem; }
.hero-badge {
  width: clamp(84px, 14vw, 120px);
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .6));
}
.hero .eyebrow { color: var(--violet); }
.hero h1 {
  font-size: clamp(3.6rem, 12vw, 7rem);
  margin-bottom: .25em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .5);
}
.hero h1 span {
  color: var(--violet);
  text-shadow: 0 0 40px rgba(148, 151, 247, .5);
}
.subtitle {
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.35;
  max-width: 34rem;
  margin-bottom: .9rem;
}
.subtitle span { color: var(--violet); font-style: italic; }
.lead {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: rgba(255, 255, 255, .82);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}
.lead strong { color: #fff; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--red));
}

/* Escritorio: foto a la derecha, fundida hacia el texto de la izquierda */
@media (min-width: 900px) {
  .hero { align-items: center; min-height: min(calc(100vh - 68px), 820px); padding: 3.5rem 0 4rem; }
  .hero-photo { inset: 0 0 0 auto; width: 52%; height: 100%; }
  .hero-photo img { object-position: 50% 72%; }
  .hero h1 { font-size: clamp(3.6rem, 8vw, 6.2rem); }
  .hero-badge { margin-bottom: 1rem; }
  .hero-photo::after {
    background:
      linear-gradient(to right, var(--hero-bg) 0%, rgba(4, 6, 12, .55) 30%, rgba(4, 6, 12, 0) 65%),
      linear-gradient(to top, var(--hero-bg) 0%, rgba(4, 6, 12, 0) 25%);
  }
  .hero-inner { padding-top: 0; }
}

/* ===== Secciones ===== */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); }

/* Nosotros */
.about {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.about-media {
  justify-self: center;
  position: relative;
  width: min(100%, 440px);
  margin: 0 0 3rem;
}
.about-photo {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow), 12px 12px 0 var(--violet);
}
/* Ilustración del lema como "sello" sobre la foto */
.about-badge {
  position: absolute;
  left: 0;
  bottom: -44px;
  width: 34%;
  padding: .5rem;
  border-radius: 50%;
  background: #fefeef; /* mismo crema que el fondo de la ilustración */
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  clip-path: circle(50%);
}
.about-text p { color: var(--muted); }
.about-text em { color: var(--ink); font-weight: 600; }
.pill-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.pill-list li {
  padding: .45em 1em;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--blue-deep);
  font-size: .9rem;
  font-weight: 600;
}
@media (min-width: 900px) {
  .about { grid-template-columns: .9fr 1.1fr; gap: 4rem; }
}

/* Alianza Peñarol (acento aurinegro) */
.alliance {
  --gold: #f5c518;
  position: relative;
  color: #fff;
  background:
    radial-gradient(700px 420px at 0% 50%, rgba(245, 197, 24, .14), transparent 65%),
    #0b0b0d;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}
/* Franja a rayas aurinegras arriba */
.alliance::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 28px, #0b0b0d 28px 56px);
}
.alliance-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.alliance-media {
  justify-self: center;
  width: min(100%, 420px);
}
.alliance-media img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 25px 50px -20px rgba(0, 0, 0, .8), 12px 12px 0 var(--gold);
}
.alliance .eyebrow { color: var(--gold); }
.alliance h2 { color: #fff; }
.alliance h2 span { color: var(--gold); }
.alliance h2 .x { color: rgba(255, 255, 255, .5); }
.alliance-quote {
  position: relative;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--gold);
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}
.alliance-quote strong { color: #fff; }
@media (min-width: 900px) {
  .alliance-inner { grid-template-columns: .85fr 1.15fr; gap: 4.5rem; }
}

/* Clases */
.wide-photo {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: clamp(200px, 32vw, 380px);
}
.wide-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }

.cards {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
}
.card:hover, .contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  /* sombra + halo violeta + tinte suave sobre todo el recuadro */
  box-shadow: var(--shadow), var(--glow);
}
.card-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--violet);
  opacity: .7;
  margin-bottom: .3rem;
}
.card h3 { font-size: 2.1rem; color: var(--blue-deep); }
.card p { color: var(--muted); margin: 0; }

/* Galería */
/* Celular: 2 columnas; las fotos anchas ocupan toda la fila */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.gallery figure {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-alt);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery figure { transition: box-shadow .35s ease; }
.gallery figure:hover { box-shadow: 0 0 40px rgba(148, 151, 247, .35); }
.gallery img { transition: transform .6s ease, filter .35s ease; }
.gallery figure:hover img { transform: scale(1.04); filter: brightness(1.1); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem .9rem .7rem;
  background: linear-gradient(transparent, rgba(7, 22, 52, .8));
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
}
.g-a, .g-c, .g-d { grid-column: span 2; aspect-ratio: 16 / 9; }
.g-b, .g-e { aspect-ratio: 3 / 4; }
.g-c, .g-d { order: 1; } /* las dos verticales quedan juntas en celular */
.g-b img { object-position: 50% 30%; }

/* Escritorio: mosaico de 4 columnas */
@media (min-width: 820px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 1rem; }
  .gallery figure { aspect-ratio: auto; }
  .g-a { grid-column: 1 / 4; grid-row: 1 / 3; }
  .g-b { grid-column: 4;     grid-row: 1 / 3; }
  .g-c { grid-column: 1 / 3; grid-row: 3; }
  .g-d { grid-column: 3;     grid-row: 3; }
  .g-e { grid-column: 4;     grid-row: 3; }
  .g-d img { object-position: 40% 50%; }
}

/* Federal 2026 */
.federal {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(200, 55, 45, .45), transparent 60%),
    linear-gradient(100deg, rgba(10, 42, 94, .97) 30%, rgba(10, 42, 94, .55) 70%, rgba(10, 91, 181, .35)),
    url("imagenes/web/esgrima-asalto.jpg") right 40% / cover no-repeat;
  padding: clamp(3.5rem, 7vw, 5rem) 0;
}
.federal .eyebrow { color: #ffb3ad; }
.federal h2 { color: #fff; }
.federal p:last-child { color: rgba(255, 255, 255, .85); max-width: 36rem; margin: 0; }
.federal-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 820px) {
  .federal-inner { grid-template-columns: 1fr auto; gap: 3rem; }
}

/* Sponsors (mismo estilo que la franja Federal, con otra foto de fondo) */
.sponsors {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(700px 400px at 0% 100%, rgba(148, 151, 247, .35), transparent 60%),
    linear-gradient(100deg, rgba(10, 42, 94, .97) 30%, rgba(10, 42, 94, .6) 70%, rgba(10, 91, 181, .4)),
    url("imagenes/web/esgrima-perfil.jpg") right 30% / cover no-repeat;
  padding: clamp(3.5rem, 7vw, 5rem) 0;
}
.sponsors .eyebrow { color: var(--violet); }
.sponsors h2 { color: #fff; }
.sponsors p:last-child { color: rgba(255, 255, 255, .85); max-width: 30rem; margin: 0; }
.sponsors-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.sponsor-logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.sponsor-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 150px;
  padding: .6rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}
.sponsor-logos li.is-dark { background: #000; }
.sponsor-logos li:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 0 40px rgba(148, 151, 247, .45); }
.sponsor-logos img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
@media (max-width: 480px) {
  .sponsor-logos { flex-wrap: nowrap; gap: .75rem; }
  .sponsor-logos li { flex: 1 1 0; width: auto; height: 120px; }
}
@media (min-width: 820px) {
  .sponsors-inner { grid-template-columns: 1fr auto; gap: 3rem; }
}

/* Contacto */
.contact-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .contact-grid { grid-template-columns: repeat(4, 1fr); } }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  margin-bottom: .9rem;
}
.contact-icon svg { width: 26px; height: 26px; fill: #fff; }
.contact-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: .03em;
  line-height: 1.1;
  color: var(--blue-deep);
  word-break: break-word;
}
.contact-note { font-size: .9rem; color: var(--muted); }

/* En celular: ícono a la izquierda, tarjetas más compactas */
@media (max-width: 639px) {
  .contact-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 1rem;
    padding: 1.25rem;
  }
  .contact-icon { grid-row: span 3; margin: 0; }
  .contact-value { font-size: 1.6rem; }
}

.map {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  height: clamp(280px, 40vw, 460px);
  background: var(--paper-alt);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  padding: 3rem 0 2rem;
  font-size: .95rem;
}
.footer-inner {
  display: grid;
  gap: 1.75rem;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.1;
}
.footer-brand span { font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--violet); }
.footer-copy {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}
@media (min-width: 820px) {
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; }
  .footer-links { justify-content: flex-end; }
  .footer-copy { grid-column: 1 / -1; }
}

/* ===== Logo que se ilumina al pasar el mouse ===== */
.brand img, .hero-badge, .footer-brand img {
  transition: filter .35s ease, transform .35s ease;
}
.brand:hover img, .hero-badge:hover, .footer-brand:hover img {
  filter:
    drop-shadow(0 0 8px var(--violet))
    drop-shadow(0 0 18px rgba(148, 151, 247, .55))
    brightness(1.2);
  transform: scale(1.06);
}

/* ===== Cursor personalizado (solo con mouse; lo activa script.js) ===== */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input, .has-cursor textarea { cursor: text !important; }
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  width: 10px; height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fff 0%, var(--violet) 75%);
  box-shadow: 0 0 10px var(--violet), 0 0 22px rgba(148, 151, 247, .55);
  opacity: 0;
  transition:
    width .3s cubic-bezier(.4, 0, .2, 1),
    height .3s cubic-bezier(.4, 0, .2, 1),
    background-color .3s ease, border-color .3s ease, box-shadow .3s ease,
    opacity .25s ease;
  will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hidden { opacity: 0; }
.cursor.is-hover {
  width: 50px; height: 50px;
  background: rgba(148, 151, 247, .12);
  border: 2px solid var(--violet);
  box-shadow: 0 0 30px rgba(148, 151, 247, .3);
}
.cursor.is-down { width: 34px; height: 34px; }

/* ===== Animación de entrada ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .contact-card { transition: none; }
}
