/* =========================================================
   Club de Parapente Cerro del Medio · estilos base
   Tailwind (CDN) cubre utilidades; aquí van componentes,
   navegación móvil y ajustes de accesibilidad.
   ========================================================= */

:root {
  --bottombar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; }
html { scroll-padding-top: 84px; }

body { background-color: #0a0d12; }

/* Espacio para la barra inferior en móvil */
@media (max-width: 1023.98px) {
  body { padding-bottom: calc(var(--bottombar-h) + var(--safe-b)); }
  html { scroll-padding-top: 76px; }
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #7dd66b; color: #0a0d12; font-weight: 600;
  padding: 10px 14px; border-radius: 999px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; outline: none; }

:focus-visible {
  outline: 2px solid #7dd66b;
  outline-offset: 3px;
  border-radius: 8px;
}

/* Área táctil mínima 44px (Apple HIG / WCAG 2.5.5) */
.tap-target { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.tap-target-lg { min-height: 52px; }

/* Evita que hijos de grid (iframes, tabs sin salto) ensanchen la columna en móvil */
.grid > * { min-width: 0; }

/* ---------- Componentes ---------- */
.section { position: relative; padding: 4.5rem 0; }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }

.container-x { margin: 0 auto; max-width: 80rem; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container-x { padding-left: 1.25rem; padding-right: 1.25rem; } }
@media (min-width: 1024px) { .container-x { padding-left: 2rem; padding-right: 2rem; } }

.section-head {
  display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem;
}
@media (min-width: 1024px) {
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 3rem; }
}

.eyebrow {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: #7dd66b; margin-bottom: .75rem;
}
.h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.05;
}
.label {
  font-size: 10px; letter-spacing: .25em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

.sunset-text {
  background: linear-gradient(90deg, #ffd166 0%, #ff8a3d 35%, #ff4f8b 70%, #b57bff 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.btn-primary, .btn-secondary, .btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px;
  font-weight: 500; transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn-primary { background: #fff; color: #0a0d12; }
.btn-primary:hover { background: #7dd66b; }
.btn-secondary { border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn-secondary:hover { border-color: #fff; }
.btn-accent { background: #7dd66b; color: #0a0d12; }
.btn-accent:hover { background: #a8e89a; }
.btn-primary:active, .btn-secondary:active, .btn-accent:active { transform: scale(.98); }

.link-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid rgba(255,255,255,.15); border-radius: 1rem;
  padding: 1rem 1.25rem; min-height: 64px; transition: border-color .2s;
}
.link-card:hover { border-color: rgba(125,214,107,.7); }
.link-card__label { display: block; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: rgba(255,255,255,.5); }

.info-card, .stat-card, .contact-card {
  border: 1px solid rgba(255,255,255,.1); border-radius: 1rem;
  background: rgba(23,29,38,.6); padding: 1.25rem;
}
.contact-card { border-radius: 1.5rem; padding: 1.5rem; display: block; transition: border-color .2s; }
.contact-card:hover { border-color: rgba(125,214,107,.6); }
@media (min-width: 640px) { .contact-card { padding: 1.75rem; } }

.stat { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(1.75rem, 5vw, 2.25rem); color: #7dd66b; }
.stat__label { color: rgba(255,255,255,.6); font-size: .875rem; margin-top: .25rem; }

.step {
  display: flex; gap: 1rem; padding: 1.25rem; border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.1); background: #10151c;
}
@media (min-width: 640px) { .step { gap: 1.25rem; padding: 1.5rem; } }
.step__num { font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.75rem; color: #7dd66b; width: 2.5rem; flex-shrink: 0; line-height: 1.2; }
.step--warn { border-color: rgba(252,211,77,.3); background: rgba(252,211,77,.05); }

/* Tabs (panel de condiciones) */
.tab {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  min-height: 40px; padding: 0 .9rem; border-radius: 999px;
  font-size: .8rem; color: rgba(255,255,255,.65);
  transition: background .2s, color .2s;
}
.tab:hover { color: #fff; }
.tab.is-active { background: rgba(255,255,255,.1); color: #fff; }
.tabpanel[hidden] { display: none; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Navegación desktop ---------- */
.nav-link { position: relative; padding: .25rem 0; transition: color .2s; }
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: #7dd66b; border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-link.is-active::after { transform: scaleX(1); }

#topnav.is-scrolled {
  background: rgba(10, 13, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ---------- Drawer móvil ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer[hidden] { display: none; }
.drawer__backdrop {
  position: absolute; inset: 0; background: rgba(5,7,10,.6);
  opacity: 0; transition: opacity .25s ease;
}
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(88vw, 400px);
  display: flex; flex-direction: column;
  background: #0f141b;
  border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -30px 0 80px -30px rgba(0,0,0,.8);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

.drawer-link {
  display: grid; grid-template-columns: 2.25rem 1fr; grid-template-rows: auto auto;
  column-gap: .5rem; align-items: center;
  padding: .85rem .75rem; border-radius: .9rem;
  font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.25rem; color: #fff;
  min-height: 56px; transition: background .15s;
}
.drawer-link:hover, .drawer-link:active { background: rgba(255,255,255,.06); }
.drawer-link.is-active { background: rgba(125,214,107,.1); }
.drawer-num { grid-row: 1 / span 2; font-size: .7rem; letter-spacing: .2em; color: #7dd66b; }
.drawer-link.is-active .drawer-num { color: #a8e89a; }
.drawer-hint { grid-column: 2; font-family: Inter, sans-serif; font-size: .8rem; color: rgba(255,255,255,.5); }

/* ---------- Barra inferior móvil ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottombar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(10,13,18,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.bottombar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: rgba(255,255,255,.6); font-size: 10.5px; letter-spacing: .02em;
  transition: color .15s;
}
.bottombar__item svg { width: 22px; height: 22px; }
.bottombar__item.is-active { color: #fff; }
.bottombar__item.is-active svg { color: #7dd66b; }
.bottombar__item--accent svg {
  width: 40px; height: 40px; padding: 9px; margin-top: -14px; border-radius: 999px;
  background: #7dd66b; color: #0a0d12;
  box-shadow: 0 10px 24px -8px rgba(125,214,107,.6);
}
.bottombar__item--accent { color: #7dd66b; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

#heroImg { transition: transform .2s linear; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0d12; }
::-webkit-scrollbar-thumb { background: #2a3342; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3b4659; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-floaty, .animate-pulseDot { animation: none !important; }
  .drawer__panel, .drawer__backdrop, .nav-link::after { transition: none; }
  #heroImg { transition: none; transform: none !important; }
}
