/* ============================================================
   pages.css — capa de diseño compartida
   La cargan: nosotros.html, crowdfunding.html, porque.html
   Aplica fundamentos: tipografia Anton/Inter, jerarquia,
   aparicion al hacer scroll, hover, bocadillos (tooltips).
   Depende de las variables + fuentes ya definidas en main.css.
   ============================================================ */

/* ── Tipografia: titulares a Anton, cuerpo a Inter ──────────── */
.page-title {
  font-family: var(--font-hero) !important;   /* gana sobre nosotros.css (Hippie Marker !important) */
  text-transform: uppercase;
  letter-spacing: .015em;
  color: var(--text);
  border-bottom: none !important;             /* quita la linea completa; usamos acento centrado */
  padding-bottom: .5rem;
  position: relative;
}
/* Acento verde bajo el titulo — crece al aparecer */
.page-title::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  margin: .55rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-dim), var(--green-bright));
  transition: width .8s cubic-bezier(.2,.7,.2,1) .1s;
}
html.pg-anim .page-title.is-in::after,
html.pg-shown .page-title::after { width: 66px; }
html:not(.pg-anim) .page-title::after { width: 66px; }   /* sin JS: visible */

.nos-sub {
  font-family: var(--font-hero) !important;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--green-dim);
}
.nos-lead { font-family: var(--font-ui); }

/* ── Hero de Quienes Somos (nos-hero) ───────────────────────── */
.nos-hero-card h2 {
  font-family: var(--font-hero) !important;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5vw, 3.6rem) !important;
  letter-spacing: .03em;
  line-height: 1;
}
.nos-hero-card p { font-family: var(--font-ui); }
/* Etiqueta tipo eyebrow que se puede añadir al hero */
.pg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin: 0 0 1rem;
}
.pg-eyebrow::before {
  content: "";
  width: 30px; height: 2px;
  background: var(--green-bright);
}

/* ── Hero de Apoyanos (cf-hero) ─────────────────────────────── */
.cf-hero {
  position: relative;
  overflow: hidden;
}
.cf-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 140%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,230,57,.22) 0%, transparent 60%);
  pointer-events: none;
  animation: cfGlow 9s ease-in-out infinite;
}
@keyframes cfGlow {
  0%,100% { opacity: .55; transform: translateY(0) scale(1); }
  50%     { opacity: 1;   transform: translateY(6%) scale(1.06); }
}
.cf-hero-inner { position: relative; z-index: 1; }
.cf-hero h1 {
  font-family: var(--font-hero) !important;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4rem) !important;
  letter-spacing: .02em;
  line-height: .98;
  color: #fff !important;
}
.cf-hero h1 .hl { color: var(--green-bright); }
.cf-hero p { font-family: var(--font-ui); }
/* Barra de progreso del hero: brillo que recorre */
.cf-progress-wrap { position: relative; overflow: hidden; }
.cf-progress-bar { position: relative; overflow: hidden; }
.cf-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-100%);
  animation: cfShine 2.6s ease-in-out infinite;
}
@keyframes cfShine {
  0%   { transform: translateX(-100%); }
  60%,100% { transform: translateX(300%); }
}

/* ════════════════════════════════════════════════════════════
   APARICION AL HACER SCROLL (reveal)
   El estado oculto se aplica por SELECTOR, gateado por html.pg-anim
   (una clase que un script inline pone antes del primer paint) →
   sin parpadeo. pages.js solo añade .is-in cuando entra en pantalla.
   Fallback: html.pg-shown lo muestra todo si el JS fallara.
   Excluye mapas y graficos (Leaflet/Chart.js se miden solos).
   ════════════════════════════════════════════════════════════ */
html.pg-anim :is(
  .page-title, .nos-lead, .nos-stat, .nos-market-card,
  .cf-tier-card, .reward-band, .cta-strip, .bike-band,
  .bike-slider, .foto-credits, .nos-banner-full, .pg-reveal
) {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
html.pg-anim :is(
  .page-title, .nos-lead, .nos-stat, .nos-market-card,
  .cf-tier-card, .reward-band, .cta-strip, .bike-band,
  .bike-slider, .foto-credits, .nos-banner-full, .pg-reveal
).is-in {
  opacity: 1;
  transform: none;
}
html.pg-shown :is(
  .page-title, .nos-lead, .nos-stat, .nos-market-card,
  .cf-tier-card, .reward-band, .cta-strip, .bike-band,
  .bike-slider, .foto-credits, .nos-banner-full, .pg-reveal
) {
  opacity: 1 !important;
  transform: none !important;
}

/* Numero de las stats: pequeño "pop" al aparecer la tarjeta */
html.pg-anim .nos-stat.is-in .nos-stat-num { animation: pgPop .6s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes pgPop {
  from { transform: scale(.6); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

/* Respeta a quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html.pg-anim :is(
    .page-title, .nos-lead, .nos-stat, .nos-market-card,
    .cf-tier-card, .reward-band, .cta-strip, .bike-band,
    .bike-slider, .foto-credits, .nos-banner-full, .pg-reveal
  ) { opacity: 1 !important; transform: none !important; transition: none !important; }
  .cf-hero::before, .cf-progress-bar::after { animation: none; }
}

/* ════════════════════════════════════════════════════════════
   HOVER — vida al pasar el raton
   ════════════════════════════════════════════════════════════ */
/* Tarjetas de estadistica (porque) */
.nos-stat {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  cursor: default;
}
.nos-stat:hover {
  transform: translateY(-6px);
  border-color: var(--green-bright);
  box-shadow: 0 14px 34px rgba(0,230,57,.18);
}
.nos-stat:hover .nos-stat-num {
  text-shadow: 0 0 18px rgba(0,230,57,.55);
}

/* Tarjetas de mercado (border-top) */
.nos-market-card {
  transition: transform .25s ease, box-shadow .25s ease;
}
.nos-market-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Fotos sueltas: zoom suave y foco */
.bike-band { position: relative; }
.bike-band img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.bike-band:hover img { transform: scale(1.06); }

/* Filas de tabla: barra verde a la izquierda al pasar */
.data-table tbody tr {
  transition: background .18s ease, box-shadow .18s ease;
}
.data-table tbody tr:hover {
  box-shadow: inset 3px 0 0 var(--green-bright);
}

/* Tarjetas de nivel (Apoyanos): elevar y resaltar */
.cf-tier-card { cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.cf-tier-card:hover {
  transform: translateY(-8px);
  border-color: var(--green);
  box-shadow: 0 18px 44px rgba(0,0,0,.14);
}
.cf-tier-card:hover .cf-select-btn { transform: translateY(-1px); }

/* ════════════════════════════════════════════════════════════
   BOCADILLOS / TOOLTIPS  →  añade data-tip="texto" a cualquier elemento
   ════════════════════════════════════════════════════════════ */
[data-tip] { position: relative; }
[data-tip]::after,
[data-tip]::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}
[data-tip]::after {
  content: attr(data-tip);
  transform: translate(-50%, 6px);
  width: max-content;
  max-width: 240px;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  padding: .55rem .8rem;
  border-radius: 10px;
  border: 1px solid rgba(0,230,57,.5);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
[data-tip]::before {   /* flechita del bocadillo */
  content: "";
  bottom: calc(100% + 3px);
  transform: translate(-50%, 6px);
  border: 7px solid transparent;
  border-top-color: var(--dark);
}
[data-tip]:hover::after,
[data-tip]:hover::before,
[data-tip]:focus::after,
[data-tip]:focus::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ════════════════════════════════════════════════════════════
   SISTEMA DE BANDAS / SECCIONES  — estructura editorial
   Bandas a todo el ancho con fondo alterno + contenedor centrado.
   ════════════════════════════════════════════════════════════ */
.pg-band {
  padding: clamp(3rem, 7vw, 6rem) 1.5rem;
  position: relative;
}
.pg-band--alt  { background: var(--off-white); }
.pg-band--dark { background: var(--dark); color: #fff; }
.pg-band--tight { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.pg-wrap { max-width: 1120px; margin: 0 auto; width: 100%; }
.pg-wrap--narrow { max-width: 820px; }

/* Titular de hero (para bandas dark que actuan de portada de pagina) */
.pg-hero-title {
  font-family: var(--font-hero);
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: .01em;
  color: #fff;
  margin: 0 0 1.1rem;
}
.pg-hero-sub {
  font-family: var(--font-ui);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  color: rgba(255,255,255,.78);
  margin: 0;
}

/* Cabecera de seccion (eyebrow + titulo + intro) */
.pg-head { text-align: center; max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.pg-head .pg-eyebrow { justify-content: center; }
.pg-head h2 {
  font-family: var(--font-hero);
  text-transform: uppercase;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: .01em;
  color: var(--text);
  margin: 0 0 1rem;
}
.pg-band--dark .pg-head h2 { color: #fff; }
.pg-head > p {
  font-family: var(--font-ui);
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 640px;
}
.pg-band--dark .pg-head > p { color: rgba(255,255,255,.72); }

/* Split texto + media (2 columnas) */
.pg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.pg-split-text .pg-eyebrow { margin-bottom: .8rem; }
.pg-split-text h2 {
  font-family: var(--font-hero);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  margin: 0 0 1.2rem;
  color: var(--text);
}
.pg-split-text p {
  font-family: var(--font-ui);
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 1rem;
  font-size: 1.02rem;
}
.pg-split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  border: 2px solid var(--green-bright);
}
.pg-split-media img,
.pg-split-media picture {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.pg-split-media:hover img { transform: scale(1.06); }

/* Rejilla de valores / features */
.pg-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}
.pg-feature {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.6rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.pg-feature:hover { transform: translateY(-6px); border-color: var(--green); box-shadow: var(--shadow-md); }
.pg-feature-ic {
  font-size: 1.9rem; line-height: 1;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,230,57,.1);
  border: 1.5px solid rgba(0,230,57,.35);
  border-radius: 14px;
  margin-bottom: 1rem;
}
.pg-feature h3 {
  font-family: var(--font-hero);
  text-transform: uppercase;
  font-size: 1.18rem;
  letter-spacing: .01em;
  color: var(--text);
  margin: 0 0 .5rem;
}
.pg-feature p { font-family: var(--font-ui); color: var(--text-muted); font-size: .95rem; line-height: 1.6; margin: 0; }

/* En bandas: el slider/banda de foto no necesita su margen propio grande */
.pg-band .bike-slider,
.pg-band .bike-band { margin-top: 0; margin-bottom: 0; }
.pg-band .foto-credits { margin-top: 2rem; }

/* ════════════════════════════════════════════════════════════
   FOTO A SANGRE (cinematografica) — como la home: imagen full-bleed
   + gradiente + texto encima. NADA de marcos/recuadros.
   ════════════════════════════════════════════════════════════ */
.pg-photoband {
  position: relative;
  min-height: clamp(380px, 60vh, 620px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a0d0a;
}
.pg-photoband > picture,
.pg-photoband > picture img,
.pg-photoband > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
/* Zoom lento al aparecer */
.pg-photoband:hover > picture img,
.pg-photoband:hover > img { transform: scale(1.04); }
.pg-photoband > picture img,
.pg-photoband > img { transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.pg-photoband::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(6,9,6,.92) 0%, rgba(6,9,6,.35) 45%, rgba(6,9,6,.12) 72%, rgba(6,9,6,.5) 100%),
    linear-gradient(to right, rgba(6,9,6,.6) 0%, rgba(6,9,6,0) 60%);
}
.pg-photoband-inner {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem);
}
.pg-photoband .pg-eyebrow { margin-bottom: .85rem; }
.pg-photoband h2 {
  font-family: var(--font-hero);
  text-transform: uppercase;
  color: #fff;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 0 0 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.pg-photoband p {
  font-family: var(--font-ui);
  color: rgba(255,255,255,.9);
  line-height: 1.7;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 56ch;
  margin: 0;
}

/* Banda a todo el ancho, sin padding lateral (para slider/foto a sangre) */
.pg-band--flush { padding-left: 0; padding-right: 0; }

/* Permite que el full-bleed salga del .page-content (porque); el body ya recorta scroll */
.page-content { overflow-x: visible !important; }
.pg-photoband.is-flush {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Fuera el marco neon de TODAS las fotos (look limpio, no "recuadro") */
.bike-slider,
.bike-band {
  border: none;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}
/* A sangre real: rompe el contenedor y ocupa todo el ancho de pantalla */
.bike-slider.is-flush,
.bike-band.is-flush {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
/* Caption del slider un poco mas fino */
.bike-slider .bs-cap {
  font-family: var(--font-hero);
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Split media: quitar borde neon, sombra elegante */
.pg-split-media {
  border: none;
  box-shadow: 0 24px 60px rgba(0,0,0,.30);
}

/* nos-hero: sin background-attachment fixed (va a tirones / rompe headless) */
.nos-hero { background-attachment: scroll !important; }

@media (max-width: 760px) {
  .pg-split { grid-template-columns: 1fr; }
  .pg-split--media-left .pg-split-media { order: -1; }
}

/* ── Boton "sube arriba" (lo inyecta pages.js) ──────────────── */
.pg-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--green-bright);
  background: var(--dark);
  color: var(--green-bright);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease, color .2s ease;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.pg-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.pg-top:hover { background: var(--green-bright); color: #06240f; }

@media (max-width: 540px) {
  .pg-top { width: 42px; height: 42px; right: .9rem; bottom: .9rem; }
  [data-tip]::after { max-width: 190px; font-size: .74rem; }
}

/* ════════════════════════════════════════════════════════════
   MÓVIL / UX — sistema de bandas, photobands, features, tooltips
   (solo @media; el escritorio no se toca)
   ════════════════════════════════════════════════════════════ */

/* ── Tablet / móvil grande (≤860px) ─────────────────────────── */
@media (max-width: 860px) {
  .pg-band { padding: clamp(2.6rem, 6vw, 4rem) 1.25rem; }
  .pg-head { margin-bottom: 2rem; }
  .pg-head h2 { font-size: clamp(1.7rem, 6vw, 2.6rem); }
  .pg-feature-grid { gap: 1rem; }

  /* Foto a sangre: alto controlado (no gigante) y texto con aire */
  .pg-photoband { min-height: clamp(340px, 64vh, 520px); }
  .pg-photoband-inner { padding: 2rem 1.25rem 2.25rem; }
  .pg-photoband h2 { font-size: clamp(1.7rem, 6.2vw, 2.6rem); }

  .pg-hero-title { font-size: clamp(2rem, 7vw, 3rem); }
}

/* ── Móvil (≤540px) ─────────────────────────────────────────── */
@media (max-width: 540px) {
  .pg-band { padding: 2.3rem 1.05rem; }
  .pg-band--tight { padding-top: 1.6rem; }
  .pg-head { margin-bottom: 1.5rem; }
  .pg-head > p { font-size: .96rem; line-height: 1.65; }
  .pg-eyebrow { font-size: .68rem; letter-spacing: .16em; }

  /* Tarjetas de valores: mas compactas pero con buen tap */
  .pg-feature { padding: 1.35rem 1.15rem; }
  .pg-feature-ic { width: 48px; height: 48px; font-size: 1.5rem; border-radius: 12px; margin-bottom: .8rem; }
  .pg-feature h3 { font-size: 1.05rem; }
  .pg-feature p { font-size: .92rem; }

  /* Photoband: legible y compacto en vertical */
  .pg-photoband { min-height: 60vh; }
  .pg-photoband-inner { padding: 1.6rem 1.05rem 1.9rem; }
  .pg-photoband h2 { margin-bottom: .7rem; }
  .pg-photoband p { font-size: .95rem; line-height: 1.6; }
  /* Gradiente inferior algo mas fuerte para que el texto respire sobre foto */
  .pg-photoband::after {
    background:
      linear-gradient(to top, rgba(6,9,6,.95) 0%, rgba(6,9,6,.55) 38%, rgba(6,9,6,.2) 75%, rgba(6,9,6,.45) 100%);
  }

  .pg-hero-title { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  .pg-hero-sub { font-size: 1rem; }

  /* Slider a sangre en vertical: proporcion mas alta (no tan panoramico) */
  .bike-slider.is-flush { aspect-ratio: 4 / 3; }
  .bike-band.is-flush { aspect-ratio: 3 / 2; }

  /* Tooltips en tactil: sin hover; si aparecen, que no desborden */
  [data-tip]::after { max-width: min(80vw, 230px); white-space: normal; }

  /* Feedback tactil sutil (verde de marca) */
  a, button, .cf-tier-card, .nos-stat, [data-tip] { -webkit-tap-highlight-color: rgba(0,230,57,.18); }
}

/* ── Móvil pequeño (≤380px) ─────────────────────────────────── */
@media (max-width: 380px) {
  .pg-band { padding: 2rem .9rem; }
  .pg-photoband h2 { font-size: 1.6rem; }
  .pg-photoband p { font-size: .9rem; }
  .pg-feature-ic { width: 44px; height: 44px; font-size: 1.35rem; }
}
