/* club.css — hoja de la web pública «B catálogo» (DEC-208).
   Transcrita del mockup aprobado docs/mockups/2026-10-06-club-catalogo/index.html.
   Solo la usan las plantillas que extienden base_publico.html; el staff sigue con theme.css.
   CSP: sin <style> ni style= en las plantillas; la fuente va autohospedada. */

@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/static/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/static/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green-900: #063D2E;
  --green-800: #0A4F3B;
  --green-700: #0B6148;
  --green-100: #E2F2EA;
  --green-50:  #F1F8F4;
  --sun: #FFC633;            /* acento: CTA y subrayado; texto encima siempre --green-900 (7,8:1) */
  --sun-press: #F2B300;
  --ink: #14211C;
  --ink-2: #4E5C56;          /* 7,0:1 sobre blanco */
  --line: rgba(20,33,28,.16);
  --paper: #FFFFFF;
  --paper-2: #F4F6F5;
  --error: #B3261E;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --control-h: 52px;
  --max: 1200px;
  --shadow: 0 1px 2px rgba(6,61,46,.06), 0 8px 24px -6px rgba(6,61,46,.12);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--green-700); }
:focus-visible { outline: 3px solid var(--green-900); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--s-6); }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control-h); padding: 0 var(--s-6); border-radius: var(--r-pill); border: 2px solid transparent;
  font: 700 16px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn-sun { background: var(--sun); color: var(--green-900); }
.btn-sun:hover { background: var(--sun-press); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-sm { height: 40px; padding: 0 var(--s-5); font-size: 14px; }

/* ---------- barra ---------- */
.pub-bar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pub-bar .wrap { height: 68px; display: flex; align-items: center; gap: var(--s-8); }
.logo { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--green-700); display: grid; place-items: center; color: var(--sun); }
.logo-mark svg { width: 22px; height: 22px; stroke-width: 2.4; }
.logo b { display: block; font-size: 15px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.logo small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.pub-bar nav { display: flex; gap: var(--s-6); margin-left: auto; }
.pub-bar nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.pub-bar nav a:hover { color: var(--green-700); }

/* ---------- secciones ---------- */
.section { padding: var(--s-20) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s-6); margin-bottom: var(--s-8); flex-wrap: wrap; }
.section h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.section .sub { color: var(--ink-2); font-size: 17px; max-width: 52ch; margin-top: var(--s-3); }
/* ---------- pie ---------- */
.pub-foot { background: var(--green-900); color: rgba(255,255,255,.75); font-size: 14px; padding: var(--s-10) 0; border-top: 1px solid rgba(255,255,255,.1); }
.pub-foot .wrap { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; align-items: center; }
.pub-foot nav { display: flex; gap: var(--s-6); }
.pub-foot a { color: #fff; text-decoration: none; }

.credito { font-size: 12px; opacity: .7; flex-basis: 100%; }

/* ---------- lectura de textos legales ---------- */
.legal-wrap { max-width: 760px; padding-block: var(--s-16); }
.legal-wrap h1, .legal-wrap h2 { letter-spacing: -.02em; margin: 1.4em 0 .5em; }
.legal-wrap p, .legal-wrap li { color: var(--ink-2); margin-bottom: .8em; }
.legal-version { font-size: 14px; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .pub-bar nav { display: none; }
  .pub-bar .wrap .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: var(--s-4); }
  .section { padding: var(--s-16) 0; }
  .logo small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* =========================================================
   Portada B (Task 4, DEC-208) — transcrito del mockup, sin la vista de ejemplo
   (.badge-ej / body.demo) y con la foto de Ñuble en el hero.
   ========================================================= */

/* ---------- hero ---------- */
.hero {
  color: #fff; position: relative; overflow: hidden;
  /* Velo fuerte a la izquierda (contraste del texto) y liviano a la derecha: los
     Nevados de Chillán se ven detrás de la tarjeta de socio. */
  background: linear-gradient(100deg, rgba(6,61,46,.95) 0, rgba(10,79,59,.85) 42%, rgba(10,79,59,.35) 75%, rgba(10,79,59,.15) 100%),
              url("/static/img/hero-nuble.jpg") center 30%/cover, var(--green-900);
}
.hero .wrap { display: grid; grid-template-columns: 1.3fr .9fr; gap: var(--s-12); align-items: center; padding-top: var(--s-20); padding-bottom: var(--s-20); position: relative; z-index: 1; }
.kicker { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); margin-bottom: var(--s-5); }
.hero h1 { font-size: clamp(40px, 5vw, 62px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; margin-bottom: var(--s-6); }
.hero h1 em { font-style: normal; text-decoration: underline var(--sun); text-decoration-thickness: .1em; text-underline-offset: .14em; text-decoration-skip-ink: none; }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: rgba(255,255,255,.86); max-width: 36ch; margin-bottom: var(--s-8); }
.hero-actions { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.trust { display: flex; gap: var(--s-6); margin-top: var(--s-10); flex-wrap: wrap; }
.trust div { display: flex; align-items: center; gap: var(--s-2); font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9); }
.trust svg { color: var(--sun); width: 20px; height: 20px; }

/* ---------- tarjeta de socio ---------- */
.pass-stage { position: relative; display: grid; place-items: center; }
.pass {
  width: 100%; max-width: 420px; aspect-ratio: 1.586; border-radius: 22px; padding: var(--s-6);
  background: linear-gradient(135deg, #FFD45C 0%, var(--sun) 45%, #F0B000 100%);
  color: var(--green-900); display: grid; grid-template-rows: auto 1fr auto; position: relative; overflow: hidden;
  box-shadow: 0 40px 70px -25px rgba(0,0,0,.55);
}
.pass::before { content: ""; position: absolute; inset: 0; opacity: .14; background: repeating-radial-gradient(circle at 110% 120%, transparent 0 20px, var(--green-900) 20px 21px); }
.pass > * { position: relative; }
.pass-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.pass-top .chip { width: 38px; height: 28px; border-radius: 6px; background: rgba(6,61,46,.18); }
.pass-name { align-self: end; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pass-foot { display: flex; justify-content: space-between; align-items: end; margin-top: var(--s-3); }
.pass-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.pass-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ta-r { text-align: right; }

/* ---------- catálogo ---------- */
.count { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.count b { color: var(--ink); }
/* Los filtros solo sirven con JS (club.js): sin JS se ve el catálogo completo, sin botones muertos. */
.chips { display: none; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-2); margin-bottom: var(--s-8); scrollbar-width: none; }
.js .chips { display: flex; }
.chips::-webkit-scrollbar { display: none; }
.chip-f {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper);
  font: 600 14px/1 var(--font); color: var(--ink); white-space: nowrap; cursor: pointer; transition: all .15s;
}
.chip-f svg { width: 18px; height: 18px; }
.chip-f:hover { border-color: var(--green-700); }
.chip-f[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6);
  display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s-2); min-height: 236px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: var(--s-3); }
.ico { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--green-100); color: var(--green-700); display: grid; place-items: center; }
.ico svg { width: 28px; height: 28px; }
.card h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-4); margin-top: var(--s-2); border-top: 1px dashed var(--line); font-size: 14px; }
.soon { color: var(--ink-2); font-weight: 600; display: inline-flex; gap: var(--s-2); align-items: center; }
.soon svg { width: 16px; height: 16px; }
.deal { font-size: 15px; font-weight: 700; color: var(--green-700); }

.notice { margin-top: var(--s-6); display: flex; gap: var(--s-3); align-items: center; background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); font-size: 15px; color: var(--ink); }
.notice svg { color: var(--green-700); }

/* ---------- cómo funciona ---------- */
.how { background: var(--paper-2); }
.how h2 { text-align: center; }
.how .sub { text-align: center; margin: var(--s-3) auto var(--s-12); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); position: relative; }
.steps::before { content: ""; position: absolute; top: 44px; left: 16%; right: 16%; border-top: 2px dashed rgba(11,97,72,.3); }
.step { text-align: center; position: relative; }
.step-ico { width: 88px; height: 88px; margin: 0 auto var(--s-5); border-radius: 50%; background: var(--paper); border: 2px solid var(--green-100); color: var(--green-700); display: grid; place-items: center; position: relative; box-shadow: var(--shadow); }
.step-ico svg { width: 36px; height: 36px; }
.step-ico b { position: absolute; top: -4px; right: -4px; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: var(--green-900); font-size: 14px; font-weight: 800; display: grid; place-items: center; }
.step h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: var(--s-2); }
.step p { color: var(--ink-2); max-width: 28ch; margin: 0 auto; }

/* ---------- centros adheridos ---------- */
.centro-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8); display: flex; gap: var(--s-6); align-items: center; max-width: 560px; }
.centro-card img { width: 160px; height: auto; }
.centro-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.centro-card p { display: flex; align-items: center; gap: var(--s-2); color: var(--ink-2); font-weight: 600; margin-top: var(--s-1); }
.centro-card p svg { width: 18px; height: 18px; color: var(--green-700); }

/* ---------- inscripción ---------- */
.join { background: var(--green-900); color: #fff; }
.join .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--s-16); align-items: start; }
.join h2 { color: #fff; }
.join .sub { color: rgba(255,255,255,.8); }
.join-side .pass { margin-top: var(--s-10); }
.join-side ul { list-style: none; padding: 0; margin-top: var(--s-10); display: grid; gap: var(--s-4); }
.join-side li { display: flex; gap: var(--s-3); align-items: center; font-weight: 600; }
.join-side li svg { color: var(--sun); }
.form-card { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: var(--s-8); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.form-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: var(--s-1); }
.form-card .note { color: var(--ink-2); font-size: 14px; margin-bottom: var(--s-6); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: var(--s-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-card input:not([type=checkbox]), .form-card select {
  width: 100%; height: var(--control-h); padding: 0 var(--s-4); border: 1px solid rgba(20,33,28,.24); border-radius: var(--r-sm);
  font: 500 16px/1 var(--font); color: var(--ink); background: var(--paper); appearance: none; -webkit-appearance: none;
}
.form-card input::placeholder { color: #7A8782; font-weight: 400; }
.form-card input:not([type=checkbox]):focus, .form-card select:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(11,97,72,.18); }
.prefix { position: relative; }
.prefix span { position: absolute; left: var(--s-4); top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; pointer-events: none; }
.form-card .prefix input { padding-left: 56px; }
.help { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.help:empty { display: none; }
.form-card input.has-error, .field.has-error input { border-color: var(--error); box-shadow: 0 0 0 4px rgba(179,38,30,.12); }
.field.has-error .help { color: var(--error); }
.field.is-ok .help { color: var(--green-700); font-weight: 600; }
.error-text { display: flex; align-items: center; gap: 6px; color: var(--error); font-size: 13px; font-weight: 600; margin-top: 6px; }
.error-text svg { width: 16px; height: 16px; flex: none; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-4); border-radius: var(--r-sm); background: var(--paper-2); margin: var(--s-5) 0; font-size: 14px; }
.consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--green-700); }
.form-card .btn { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacidad { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-4); color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.privacidad svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---------- preguntas ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: var(--s-3); }
.faq-list details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.faq-list summary { list-style: none; cursor: pointer; padding: var(--s-5) var(--s-6); font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 24px; font-weight: 500; color: var(--green-700); line-height: 1; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 var(--s-6) var(--s-5); color: var(--ink-2); }
.faq h2 { text-align: center; margin-bottom: var(--s-10); }

/* ---------- responsive de la portada ---------- */
@media (max-width: 980px) {
  /* Una sola columna: el texto blanco queda sobre cualquier zona de la foto, así que el
     velo la cubre entera con la misma opacidad alta para no perder contraste. */
  .hero { background: linear-gradient(rgba(6,61,46,.92), rgba(10,79,59,.9)), url("/static/img/hero-nuble.jpg") center/cover, var(--green-900); }
  .hero .wrap, .join .wrap { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: var(--s-12); padding-bottom: var(--s-16); gap: var(--s-12); }
  .pass-stage { max-width: 420px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .join-side .pass { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: var(--s-3); }
  .card { min-height: 0; grid-template-columns: 56px 1fr; grid-template-rows: auto; column-gap: var(--s-4); row-gap: var(--s-1); padding: var(--s-5); }
  .card-top { grid-row: span 3; margin: 0; }
  .card-foot { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; gap: var(--s-10); }
  .steps::before { display: none; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: var(--s-6) var(--s-5); }
  .hero-actions .btn { flex: 1 1 100%; }
  .trust { gap: var(--s-3); flex-direction: column; }
  .centro-card { flex-direction: column; align-items: flex-start; padding: var(--s-6); }
  .centro-card img { width: 140px; }
}

/* Gracias y ya socio (DEC-208) */
.done-zone { padding: var(--s-16) 0; display: grid; align-items: center; }
body.pub { min-height: 100vh; display: flex; flex-direction: column; }
body.pub > main { flex: 1; }
.done { text-align: center; max-width: 520px; margin: 0 auto; }
.done .ok { width: 72px; height: 72px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; margin: 0 auto var(--s-5); }
.done .ok svg { width: 36px; height: 36px; stroke-width: 2.5; }
.done h1 { font-size: clamp(26px, 5vw, 34px); margin-bottom: var(--s-3); }
.done p { color: var(--ink-2); margin-bottom: var(--s-2); }
.done .btn { margin-top: var(--s-6); }
.btn-dark { color: var(--green-900); border-color: var(--green-900); }
.btn-dark:hover { color: var(--green-900); border-color: var(--green-900); background: var(--green-100); }

/* Foco: verde oscuro sobre claro (≥10:1); amarillo solo sobre superficies oscuras. */
.hero :focus-visible, .join-side :focus-visible, .pub-foot :focus-visible { outline-color: var(--sun); }
.form-card :focus-visible { outline-color: var(--green-900); }
.pass-nota { margin-top: var(--s-3); font-size: 13px; color: rgba(255,255,255,.78); }
.pub-foot .credito a { text-decoration: underline; }
