/* ========== TOKENS ========== */
:root {
  /* Brand */
  --burgundy: #7A1F2B;
  --burgundy-deep: #5B1620;
  --burgundy-ink: #3A0E15;
  --gold: #C9A24A;
  --gold-bright: #E6C068;
  --gold-deep: #8E6D26;
  --charcoal: #1A1A1F;
  --charcoal-soft: #26262D;
  --charcoal-line: #33333C;

  /* Neutrals */
  --bone: #F5F1EA;
  --bone-dim: #EAE4D9;
  --paper: #FBF9F5;
  --ink: #14141A;
  --muted: #8A8A94;

  /* Type */
  --display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --body: 'Manrope', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Scale */
  --container: 1360px;
  --radius: 2px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ========== TYPE ========== */
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: currentColor;
  display: inline-block;
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid rgba(201, 162, 74, 0.15);
  background: rgba(26, 26, 31, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav.scrolled {
  background: rgba(26, 26, 31, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: rgba(201, 162, 74, 0.15);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bone);
}
.nav-brand img { height: 36px; width: auto; }
.nav-brand .nb-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-brand .nb-text small {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.nav-brand .nb-text strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--bone);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 999px;
  overflow: hidden;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.lang-toggle button {
  padding: 6px 12px;
  color: var(--bone);
  transition: background 0.2s, color 0.2s;
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--charcoal);
}
.nav-cta {
  background: var(--gold);
  color: var(--charcoal);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}
.nav-cta:hover { background: var(--gold-bright); transform: translateY(-1px); }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 20%, #2B2028 0%, var(--charcoal) 55%, #0E0E12 100%);
  color: var(--bone);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 80%, rgba(122, 31, 43, 0.28), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(201, 162, 74, 0.14), transparent 40%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 162, 74, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 74, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 140px 32px 80px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-copy h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 18px 0 22px;
}
.hero-copy h1 .accent {
  color: var(--gold);
  font-style: italic;
}
.hero-copy h1 .accent-2 {
  color: var(--bone);
  display: block;
}
.hero-copy p.lede {
  font-size: 17px;
  color: rgba(245, 241, 234, 0.75);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 0 10px 40px -10px rgba(201, 162, 74, 0.6);
}
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(201, 162, 74, 0.8); }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid rgba(245, 241, 234, 0.25);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-meta {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(201, 162, 74, 0.18);
}
.hero-meta .stat { }
.hero-meta .stat .num {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}
.hero-meta .stat .lbl {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.6);
  margin-top: 6px;
  display: block;
}

.hero-canvas-wrap {
  position: relative;
  aspect-ratio: 1;
  max-width: 620px;
  margin-left: auto;
  width: 100%;
}
.hero-canvas-wrap canvas { width: 100% !important; height: 100% !important; display: block; }

/* ===== Static 3D logo ===== */
.logo3d-wrap {
  position: relative;
  width: 85%;
  aspect-ratio: 1;
  margin: auto;
  transform-style: preserve-3d;
  perspective: 1800px;
}
.logo3d-halo {
  display: none;
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.logo3d-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform: none;
  animation: logo-float 6s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.logo3d-img {
  width: 96%;
  height: auto;
  user-select: none;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter:
    drop-shadow(0 0 1px rgba(201,162,74,0.95))
    drop-shadow(0 0 12px rgba(201,162,74,0.25))
    drop-shadow(8px 12px 10px rgba(0,0,0,0.7))
    drop-shadow(18px 26px 34px rgba(0,0,0,0.55))
    drop-shadow(32px 56px 80px rgba(0,0,0,0.45));
}
.logo3d-shine {
  display: none;
}
@keyframes shine-rotate { to { transform: rotate(360deg); } }
.logo3d-floor {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -2%;
  height: 50px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.7), transparent 70%);
  filter: blur(14px);
  transform: translateZ(-60px);
}
.hero-canvas-wrap::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -2%;
  transform: translateX(-50%);
  width: 70%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(201, 162, 74, 0.35), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}
.hero-orbit-text {
  position: absolute;
  inset: -6% -6% auto auto;
  width: 112%;
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.5;
}
.hero-orbit-text svg { width: 100%; height: 100%; animation: rotate 42s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.hero-scroll {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: pulse-line 2s ease-in-out infinite;
}
@keyframes pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Marquee at bottom of hero */
.marquee {
  border-top: 1px solid rgba(201, 162, 74, 0.6);
  border-bottom: 1px solid rgba(201, 162, 74, 0.6);
  overflow: hidden;
  padding: 18px 0;
  background: rgba(15, 12, 8, 0.85);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 38s linear infinite;
  white-space: nowrap;
}
.marquee-track > span {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: rgba(245, 241, 234, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track > span::after {
  content: '✦';
  color: var(--gold);
  font-style: normal;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ========== SECTION PRIMITIVES ========== */
.section-pad { padding: 64px 0; }
#projecte, #disciplines, #equip, #competicions {
  scroll-margin-top: 0;
}
#projecte > .container, #disciplines > .container,
#equip > .container, #competicions > .container {
  width: 100%;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 48px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.section-head h2 em { color: var(--burgundy); font-style: italic; }
.section-head p { color: var(--muted); font-size: 16px; max-width: 480px; }

/* ========== PROYECTO ========== */
.proyecto { background: var(--paper); }
.proyecto-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.proyecto-lead {
  font-family: var(--display);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--burgundy-ink);
}
.proyecto-lead em { color: var(--gold-deep); font-style: italic; }
.proyecto-detail p + p { margin-top: 18px; }
.proyecto-detail p { color: #3a3a44; font-size: 15.5px; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 90px;
  border-top: 1px solid var(--bone-dim);
  border-bottom: 1px solid var(--bone-dim);
}
.value {
  padding: 36px 24px;
  border-right: 1px solid var(--bone-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.value:last-child { border-right: none; }
.value .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: 0.15em;
}
.value h4 { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--burgundy-ink); }
.value p { font-size: 13.5px; color: var(--muted); }

/* ========== DISCIPLINAS ========== */
.disciplinas { background: var(--charcoal); color: var(--bone); }
.disciplinas .section-head h2 em { color: var(--gold); }
.disciplinas .section-head p { color: rgba(245, 241, 234, 0.6); }
.disc-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
}
.disc-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}
.disc-card.main {
  background: linear-gradient(140deg, var(--burgundy) 0%, var(--burgundy-deep) 60%, var(--burgundy-ink) 100%);
}
.disc-card.alt {
  background: linear-gradient(140deg, #262630 0%, #1d1d24 100%);
  border: 1px solid rgba(201, 162, 74, 0.22);
}
.disc-illo {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  z-index: -1;
}
.disc-illo svg { width: 100%; height: 100%; }
.disc-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}
.disc-card h3 {
  font-family: var(--display);
  font-size: clamp(36px, 3.2vw, 54px);
  font-weight: 500;
  line-height: 1;
  margin: 14px 0 18px;
  letter-spacing: -0.02em;
}
.disc-card p { color: rgba(245, 241, 234, 0.78); max-width: 520px; font-size: 15px; }
.disc-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 28px;
}
.disc-card .foot .levels { display: flex; gap: 8px; flex-wrap: wrap; }
.disc-card .foot .lvl {
  border: 1px solid rgba(245, 241, 234, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.disc-card .arrow {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--charcoal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.disc-card:hover .arrow { transform: rotate(-45deg); }

/* ========== ENTRENADORES ========== */
.entrenadores { background: var(--bone); }
.coach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.coach {
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bone-dim);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s;
}
.coach:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -30px rgba(122, 31, 43, 0.25);
}
.coach-portrait {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
}
.coach-portrait svg { width: 100%; height: 100%; display: block; }
.coach-portrait .initial {
  position: absolute;
  bottom: 16px; right: 20px;
  font-family: var(--display);
  font-size: 92px;
  font-weight: 500;
  color: rgba(201, 162, 74, 0.9);
  line-height: 1;
  letter-spacing: -0.04em;
}
.coach-portrait .coach-num {
  position: absolute;
  top: 20px; left: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.coach-body { padding: 26px 28px 32px; }
.coach-body h3 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  color: var(--burgundy-ink);
  letter-spacing: -0.02em;
}
.coach-role {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-top: 6px;
}
.coach-body > p {
  color: #555560;
  font-size: 14.5px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bone-dim);
}
.coach-meta {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--bone-dim);
}
.coach-meta .m {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.coach-meta .m strong {
  display: block;
  font-size: 15px;
  font-family: var(--display);
  color: var(--burgundy);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 3px;
  font-weight: 500;
}

/* ========== COMPETICIONES ========== */
.competiciones {
  background: var(--paper);
  border-top: 1px solid var(--bone-dim);
}
.comp-table {
  border-top: 1px solid var(--bone-dim);
}
.comp-empty {
  padding: 32px 16px;
  text-align: center;
  font-family: var(--display);
  font-size: 18px;
  color: var(--muted);
  font-style: italic;
  border-bottom: 1px solid var(--bone-dim);
}
.comp-row {
  display: grid;
  grid-template-columns: 80px 1.5fr 1fr 1fr 120px;
  gap: 24px;
  align-items: center;
  padding: 26px 16px;
  border-bottom: 1px solid var(--bone-dim);
  transition: background 0.25s, padding 0.25s;
  cursor: pointer;
}
.comp-row:hover {
  background: var(--bone);
  padding-left: 28px;
  padding-right: 4px;
}
.comp-row .yr { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--gold-deep); }
.comp-row .evt { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--burgundy-ink); letter-spacing: -0.01em; }
.comp-row .cat { font-size: 13.5px; color: var(--muted); }
.comp-row .loc { font-size: 13.5px; color: var(--muted); }
.comp-row .res {
  text-align: right;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--burgundy);
}
.comp-row .res .medal { color: var(--gold); margin-right: 6px; }

/* ========== GALERÍA ========== */
.galeria { background: var(--charcoal); color: var(--bone); overflow: hidden; }
.galeria .section-head h2 em { color: var(--gold); }
.galeria .section-head p { color: rgba(245, 241, 234, 0.6); }
.gal-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
}
.gal-tile {
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #222228;
}
.gal-tile .ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--burgundy-ink), var(--burgundy) 60%, var(--burgundy-deep));
  position: relative;
  overflow: hidden;
}
.gal-tile .ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(201, 162, 74, 0.35), transparent 50%);
}
.gal-tile .ph.v2 { background: linear-gradient(135deg, #2a2a32, #141418); }
.gal-tile .ph.v2::after { background: radial-gradient(circle at 70% 60%, rgba(201, 162, 74, 0.28), transparent 55%); }
.gal-tile .ph.v3 { background: linear-gradient(135deg, var(--gold-deep), var(--burgundy) 80%); }
.gal-tile .ph.v3::after { background: radial-gradient(circle at 50% 30%, rgba(245, 241, 234, 0.18), transparent 60%); }
.gal-tile .cap {
  position: absolute;
  left: 14px; bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245, 241, 234, 0.85);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.gal-tile .cap span { color: var(--gold); margin-right: 8px; }

.t-a { grid-column: span 5; grid-row: span 2; }
.t-b { grid-column: span 4; grid-row: span 2; }
.t-c { grid-column: span 3; grid-row: span 2; }
.t-d { grid-column: span 3; grid-row: span 2; }
.t-e { grid-column: span 4; grid-row: span 2; }
.t-f { grid-column: span 5; grid-row: span 2; }

/* ========== UBICACIÓN ========== */
.ubicacion { background: var(--paper); }
.ubi-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  border: 1px solid var(--bone-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}
.ubi-info { padding: 56px 48px; }
.ubi-info h3 {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 500;
  color: var(--burgundy-ink);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.ubi-info p { color: #555560; margin-bottom: 32px; }
.ubi-info dl { display: grid; gap: 18px; }
.ubi-info dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--bone-dim); }
.ubi-info dl > div:last-child { border-bottom: none; }
.ubi-info dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  padding-top: 3px;
}
.ubi-info dd { color: var(--burgundy-ink); font-family: var(--display); font-size: 17px; font-weight: 500; line-height: 1.4; }
.ubi-map {
  position: relative;
  background: linear-gradient(135deg, #1f1f26, #2a2a32);
  overflow: hidden;
  min-height: 460px;
}
.ubi-map svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.ubi-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}
.ubi-pin .dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(201, 162, 74, 0.2), 0 0 0 18px rgba(201, 162, 74, 0.08);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(201,162,74,0.5), 0 0 0 0 rgba(201,162,74,0.3); }
  100% { box-shadow: 0 0 0 24px rgba(201,162,74,0), 0 0 0 48px rgba(201,162,74,0); }
}
.ubi-pin .lbl {
  background: var(--charcoal);
  color: var(--gold);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
  border: 1px solid rgba(201, 162, 74, 0.3);
}

/* ========== INSCRIPCIONES / CTA ========== */
.inscripciones {
  background: var(--burgundy-ink);
  color: var(--bone);
  position: relative;
  overflow: hidden;
}
.inscripciones::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(201,162,74,0.25), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(122,31,43,0.6), transparent 50%);
  pointer-events: none;
}
.ins-inner {
  position: relative;
  padding-top: 110px;
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.ins-inner h2 {
  font-family: var(--display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
}
.ins-inner h2 em { color: var(--gold); font-style: italic; }
.ins-inner p { color: rgba(245, 241, 234, 0.75); margin: 26px 0 32px; font-size: 16px; max-width: 480px; }
.ins-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201, 162, 74, 0.18);
  border-radius: 10px;
  transition: background 0.25s, border-color 0.25s;
}
.step:hover { background: rgba(201, 162, 74, 0.08); border-color: var(--gold); }
.step .n {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--charcoal);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}
.step h4 { font-family: var(--display); font-size: 22px; font-weight: 500; }
.step p { font-size: 13px; color: rgba(245,241,234,0.6); margin: 2px 0 0; }
.step .arr { color: var(--gold); }

/* ========== FAQ ========== */
.faq { background: var(--bone); }
.faq-list { border-top: 1px solid var(--bone-dim); }
.faq-item {
  border-bottom: 1px solid var(--bone-dim);
  padding: 28px 8px;
  cursor: pointer;
  transition: padding 0.3s;
}
.faq-item summary {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .q {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  color: var(--burgundy-ink);
  letter-spacing: -0.01em;
}
.faq-item .n { font-family: var(--mono); font-size: 12px; color: var(--gold-deep); letter-spacing: 0.1em; }
.faq-item .plus {
  width: 36px; height: 36px;
  border: 1px solid var(--bone-dim);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--burgundy);
  transition: transform 0.3s, background 0.3s;
}
.faq-item[open] .plus { transform: rotate(45deg); background: var(--burgundy); color: var(--gold); border-color: var(--burgundy); }
.faq-item .a {
  margin-top: 18px;
  margin-left: 60px;
  max-width: 680px;
  color: #555560;
  font-size: 15px;
  animation: fade-down 0.35s ease;
}
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ========== FOOTER / SOCIAL ========== */
.footer {
  background: var(--charcoal);
  color: var(--bone);
  padding: 80px 0 32px;
}
.foot-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(201, 162, 74, 0.18);
}
.foot-brand img { height: 72px; margin-bottom: 20px; }
.foot-brand p { color: rgba(245,241,234,0.6); max-width: 320px; font-size: 14px; }
.foot-col h5 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 18px;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: rgba(245,241,234,0.8); transition: color 0.2s; }
.foot-col a:hover { color: var(--gold); }
.social-row { display: flex; gap: 10px; margin-top: 12px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,74,0.3);
  display: grid;
  place-items: center;
  color: var(--gold);
  transition: all 0.2s;
}
.social-row a:hover { background: var(--gold); color: var(--charcoal); transform: translateY(-2px); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12px;
  color: rgba(245,241,234,0.5);
  letter-spacing: 0.05em;
}

/* ========== FLOATING CONTACT ========== */
.fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.fab-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: all 0.28s cubic-bezier(.2,.8,.2,1);
  transform-origin: bottom right;
}
.fab.open .fab-options { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 999px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid var(--bone-dim);
  transition: transform 0.2s;
}
.fab-opt:hover { transform: translateX(-4px); }
.fab-opt .ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
}
.fab-opt.mail .ico { background: var(--burgundy); }
.fab-opt.wa .ico { background: #25D366; }
.fab-opt .label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.fab-opt .label small {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.fab-opt .label strong {
  font-size: 14px;
  color: var(--burgundy-ink);
  font-weight: 600;
}
.fab-main {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px rgba(122,31,43,0.6), 0 0 0 6px rgba(201,162,74,0.08);
  transition: transform 0.3s, background 0.3s;
  position: relative;
}
.fab-main:hover { transform: scale(1.05); background: var(--burgundy-deep); }
.fab-main svg { transition: transform 0.3s; }
.fab.open .fab-main svg { transform: rotate(135deg); }
.fab-main::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 74, 0.35);
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ========== TWEAKS PANEL ========== */
.tweaks-panel {
  position: fixed;
  bottom: 28px; left: 28px;
  z-index: 70;
  background: white;
  border: 1px solid var(--bone-dim);
  border-radius: 14px;
  padding: 18px 20px;
  width: 280px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
}
.tweaks-panel.show { display: flex; }
.tweaks-panel h5 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--burgundy-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-panel h5 button { font-size: 20px; color: var(--muted); }
.tweak-group { display: flex; flex-direction: column; gap: 8px; }
.tweak-group label { font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tweak-seg { display: flex; border: 1px solid var(--bone-dim); border-radius: 8px; overflow: hidden; }
.tweak-seg button {
  flex: 1;
  padding: 8px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.2s;
}
.tweak-seg button.active { background: var(--burgundy); color: var(--gold); }
.tweak-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--bone-dim); border-radius: 2px; outline: none; }
.tweak-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); cursor: pointer; }

/* ========== DARK MODE ========== */
body.dark { background: var(--charcoal); color: var(--bone); }
body.dark .proyecto, body.dark .entrenadores, body.dark .competiciones, body.dark .ubicacion, body.dark .faq { background: var(--charcoal); color: var(--bone); }
body.dark .section-head h2 { color: var(--bone); }
body.dark .proyecto-lead { color: var(--bone); }
body.dark .proyecto-lead em { color: var(--gold); }
body.dark .proyecto-detail p { color: rgba(245,241,234,0.7); }
body.dark .values-grid, body.dark .value { border-color: rgba(201,162,74,0.2); }
body.dark .value h4 { color: var(--gold); }
body.dark .coach { background: var(--charcoal-soft); border-color: var(--charcoal-line); }
body.dark .coach-body h3 { color: var(--bone); }
body.dark .coach-body > p, body.dark .coach-meta { border-color: var(--charcoal-line); color: rgba(245,241,234,0.7); }
body.dark .coach-meta .m strong { color: var(--gold); }
body.dark .comp-row { border-color: var(--charcoal-line); }
body.dark .comp-row:hover { background: var(--charcoal-soft); }
body.dark .comp-row .evt { color: var(--bone); }
body.dark .comp-row .res { color: var(--gold); }
body.dark .ubi-grid { background: var(--charcoal-soft); border-color: var(--charcoal-line); }
body.dark .ubi-info h3, body.dark .ubi-info dd { color: var(--bone); }
body.dark .ubi-info dl > div { border-color: var(--charcoal-line); }
body.dark .faq-list, body.dark .faq-item { border-color: var(--charcoal-line); }
body.dark .faq-item .q { color: var(--bone); }
body.dark .faq-item .plus { border-color: var(--charcoal-line); color: var(--gold); }
body.dark .faq-item .a { color: rgba(245,241,234,0.7); }

/* ========== RESPONSIVE ========== */
/* Mobile-only elements hidden on desktop */
.nb-abbr { display: none; }
.hero-club-mobile { display: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 120px 24px 60px; gap: 24px; }
  .hero-canvas-wrap { max-width: 380px; margin: 0 auto; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .section-pad { padding: 52px 0; }
  #projecte, #disciplines, #equip, #competicions { min-height: auto; display: block; }
  .proyecto-body { grid-template-columns: 1fr; gap: 40px; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .value:nth-child(2) { border-right: none; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--bone-dim); }
  .disc-grid, .coach-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(6, 1fr); }
  .t-a, .t-b, .t-c, .t-d, .t-e, .t-f { grid-column: span 3; }
  .ubi-grid, .ins-inner { grid-template-columns: 1fr; }
  .ubi-info { padding: 36px 28px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .comp-row { grid-template-columns: 60px 1fr 100px; gap: 12px; padding: 20px 8px; }
  .comp-row .cat, .comp-row .loc { display: none; }
  .hero-meta { gap: 24px; flex-wrap: wrap; }
  .tweaks-panel { display: none !important; }
  .ins-inner { padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 640px) {
  /* Nav: solo el escudo, sin texto */
  .nav { padding: 10px 0; }
  .nav-brand .nb-text { display: none; }
  .nav-right { gap: 10px; }
  .nav-cta { padding: 8px 14px; font-size: 11px; }

  /* Reordenar hero-copy como flex column para poder mover el eyebrow */
  .hero-copy { display: flex; flex-direction: column; }
  .hero-copy .eyebrow { order: 2; margin-top: 0; margin-bottom: 4px; }
  .hero-copy h1 { margin-top: 0; }
  .hero-copy h1 { order: 3; }
  .hero-copy p.lede { order: 4; }
  .hero-copy .hero-ctas { order: 5; }
  .hero-copy .hero-meta { order: 6; }

  /* Titular del club en el hero: logo grande centrado + nombre */
  .hero-club-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 0 0 52px;
    text-align: center;
    order: 1;
  }
  .hero-club-mobile img {
    height: 96px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  .hero-club-mobile-name {
    font-family: var(--display);
    font-size: clamp(26px, 7vw, 34px);
    font-weight: 500;
    color: var(--bone);
    line-height: 1.1;
    letter-spacing: 0.01em;
  }

  /* Ocultar scroll hint que se superpone con stats */
  .hero-scroll { display: none; }

  /* Hero: ocultar órbita en móvil pequeño, simplificar */
  .hero-inner { padding: 96px 20px 48px; gap: 16px; }
  .hero-canvas-wrap { display: none; }
  .hero-copy h1 { font-size: clamp(38px, 11vw, 56px); }
  .hero-copy p.lede { font-size: 15px; margin-bottom: 24px; }
  .hero-ctas { flex-direction: column; gap: 10px; }
  .hero-ctas .btn { justify-content: center; }
  .hero-meta { gap: 20px; margin-top: 28px; }
  .hero-meta .stat .num { font-size: 28px; }

  /* Secciones */
  .section-pad { padding: 44px 0; }
  .container { padding: 0 20px; }
  .ins-inner { padding-top: 52px; padding-bottom: 52px; }
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
}
