/* ==========================================================================
   KOLVIA — sistema de diseño web
   Tokens según Manual de Marca v2: Grafito Esmeralda + Marfil dominan,
   Oro como acento, Champán como soporte sobre oscuro.
   ========================================================================== */

:root {
  --grafito: #16231D;
  --esmeralda: #0B3D2E;
  --esmeralda-2: #0F4A38;
  --oro: #C9A24B;
  --oro-2: #E0BC62;
  --champan: #D9C89E;
  --marfil: #F5F0E4;
  --marfil-2: #ECE5D2;
  --blanco: #FFFFFF;
  --tinta: #16231D;
  --tinta-suave: #4A5A52;
  --linea: rgba(22, 35, 29, .12);
  --linea-oro: rgba(201, 162, 75, .35);

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 20px 50px rgba(11, 61, 46, .16);
  --shadow-sm: 0 6px 18px rgba(22, 35, 29, .10);
  --container: 1180px;
  --gutter: clamp(18px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--marfil);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--oro);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--oro); border-radius: 2px; }
.h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1.02; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.h3 { font-size: clamp(19px, 2vw, 23px); line-height: 1.25; font-weight: 700; }
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--tinta-suave); text-wrap: pretty; }
.dark .lead, .emerald .lead { color: var(--champan); }
.muted { color: var(--tinta-suave); }
.dark .muted, .emerald .muted { color: var(--champan); }
.gold { color: var(--oro); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section-head { display: grid; gap: 16px; max-width: 42em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.split { max-width: none; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
.dark { background: var(--grafito); color: var(--marfil); }
.emerald { background: var(--esmeralda); color: var(--marfil); }
.ivory { background: var(--marfil); }
.ivory-2 { background: var(--marfil-2); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.stack { display: grid; gap: 18px; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .section-head.split { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid { gap: 14px; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1.5px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold { background: var(--oro); color: var(--grafito); }
.btn-gold:hover { background: var(--oro-2); }
.btn-dark { background: var(--grafito); color: var(--marfil); }
.btn-dark:hover { background: var(--esmeralda); }
.btn-ghost { background: transparent; border-color: rgba(217, 200, 158, .5); color: var(--marfil); }
.btn-ghost:hover { border-color: var(--oro); color: var(--oro); }
.btn-ghost-dark { background: transparent; border-color: rgba(22, 35, 29, .3); color: var(--grafito); }
.btn-ghost-dark:hover { border-color: var(--grafito); background: rgba(22, 35, 29, .05); }
.btn-wa { background: #25D366; color: #06210F; }
.btn-wa:hover { background: #33E27A; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.link { font-weight: 600; color: var(--esmeralda); display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.link:hover { color: var(--oro); }
.dark .link, .emerald .link { color: var(--oro); }
.dark .link:hover, .emerald .link:hover { color: var(--oro-2); }
.link::after { content: "→"; transition: transform .2s; }
.link:hover::after { transform: translateX(4px); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500;
  border: 1px solid rgba(217, 200, 158, .35); color: var(--champan);
}
.chip svg { width: 14px; height: 14px; }
.ivory .chip, .ivory-2 .chip { border-color: var(--linea); color: var(--tinta-suave); }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50; height: var(--hdr-h);
  background: rgba(22, 35, 29, .92); color: var(--marfil);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 162, 75, .22);
  transition: background-color .35s, color .35s, border-color .35s;
}
.hdr.is-light { background: rgba(245, 240, 228, .92); color: var(--grafito); border-bottom-color: var(--linea); }
.hdr.is-light .brand-name small { color: var(--esmeralda); }
.hdr .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-pin { height: 38px; width: auto; }
.brand-pin.color { display: none; }
.hdr.is-light .brand-pin.color { display: block; }
.hdr.is-light .brand-pin.white { display: none; }
.brand-name { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-name b { font-size: 19px; letter-spacing: .16em; font-weight: 700; }
.brand-name small { font-size: 9.5px; letter-spacing: .24em; font-weight: 500; color: var(--oro); }
.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; opacity: .9; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav .nav-club { color: var(--oro); font-weight: 600; }
.nav a.btn { margin-left: 6px; padding: 0 18px; opacity: 1; }
.nav a.btn::after { display: none; }
.burger {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(201, 162, 75, .35);
  background: transparent; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.burger span { width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: 49; background: var(--grafito); color: var(--marfil);
  padding: calc(var(--hdr-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.menu.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.menu a.item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; font-size: 22px; font-weight: 600; border-bottom: 1px solid rgba(201, 162, 75, .18);
  opacity: 0; transform: translateY(10px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.menu.is-open a.item { opacity: 1; transform: none; }
.menu.is-open a.item:nth-child(2) { transition-delay: .05s }
.menu.is-open a.item:nth-child(3) { transition-delay: .1s }
.menu.is-open a.item:nth-child(4) { transition-delay: .15s }
.menu.is-open a.item:nth-child(5) { transition-delay: .2s }
.menu.is-open a.item:nth-child(6) { transition-delay: .25s }
.menu a.item small { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--oro); }
.menu .menu-foot { margin-top: auto; display: grid; gap: 12px; }
.menu .menu-foot p { font-size: 13px; color: var(--champan); }
body.menu-open { overflow: hidden; }

@media (max-width: 1020px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
}

/* Barra inferior móvil */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 48;
  display: none; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: rgba(22, 35, 29, .96); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201, 162, 75, .25);
}
.bottombar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 52px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--champan);
}
.bottombar a svg { width: 20px; height: 20px; }
.bottombar a.primary { background: var(--oro); color: var(--grafito); }
.bottombar a.wa { background: #25D366; color: #06210F; }
@media (max-width: 760px) {
  .bottombar { display: grid; }
  body { padding-bottom: 82px; }
  .fab { display: none !important; }
}

/* FAB WhatsApp escritorio */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 47;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius-pill);
  background: #25D366; color: #06210F; font-weight: 600; font-size: 14px;
  box-shadow: 0 14px 40px rgba(6, 33, 15, .35);
  transition: transform .25s var(--ease);
}
.fab:hover { transform: translateY(-3px); }
.fab svg { width: 20px; height: 20px; }

/* ---------- Línea de ruta (elemento de marca) ---------- */
.route {
  display: flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--champan);
}
.route .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--oro); box-shadow: 0 0 0 4px rgba(201, 162, 75, .2); flex: none; }
.route .line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--oro) 0 8px, transparent 8px 14px); position: relative; min-width: 60px; }
.route .line::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 26px; height: 12px; transform: translateY(-50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'><path d='M3 16 L5 9 Q6 7 9 7 L16 7 L21 2.5 L32 2.5 L37 7 L42 8 Q45 9 45 12 L45 16 Z' fill='%23F5F0E4'/><circle cx='12' cy='17' r='3.8' fill='%23F5F0E4'/><circle cx='36' cy='17' r='3.8' fill='%23F5F0E4'/></svg>") no-repeat center / contain;
  animation: drive 6s linear infinite;
}
.ivory .route, .ivory-2 .route { color: var(--tinta-suave); }
.ivory .route .line::after, .ivory-2 .route .line::after { filter: brightness(.2); }
@keyframes drive { from { left: 0; } to { left: calc(100% - 26px); } }

/* ---------- Cards ---------- */
.card {
  background: var(--blanco); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--linea); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--linea-oro); }
.card-dark { background: var(--esmeralda); color: var(--marfil); border-color: rgba(201, 162, 75, .25); }
.card-dark .muted, .card-dark p { color: var(--champan); }
.card-dark .link { color: var(--oro); }
.card-dark .link:hover { color: var(--oro-2); }
.card-gold { background: var(--oro); color: var(--grafito); border-color: var(--oro); }
.card-img { padding: 0; overflow: hidden; }
.card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-img .body { padding: 26px; display: grid; gap: 12px; }
.card ul.ticks { display: grid; gap: 8px; font-size: 14px; }
.card ul.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.card ul.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--oro) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316231D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5L19 7'/></svg>") no-repeat center / 11px; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 7px; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--oro); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(217, 200, 158, .3); color: var(--marfil);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input::placeholder { color: rgba(217, 200, 158, .55); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 3px rgba(201, 162, 75, .28); background: rgba(255, 255, 255, .09); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9A24B' stroke-width='2.5' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field select option { color: var(--grafito); background: var(--marfil); }
.field input[type="date"] { color-scheme: dark; }
.form-light .field input, .form-light .field select { background: var(--blanco); border-color: var(--linea); color: var(--grafito); }
.form-light .field input::placeholder { color: rgba(22, 35, 29, .4); }
.form-light .field input[type="date"] { color-scheme: light; }
.form-light .field select { background-color: var(--blanco); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--oro); flex: none; }
.seg { display: flex; background: rgba(255, 255, 255, .06); border: 1px solid rgba(217, 200, 158, .3); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--champan); font-weight: 500; font-size: 14px; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--oro); color: var(--grafito); font-weight: 600; }
.stepper { display: flex; align-items: center; border: 1px solid rgba(217, 200, 158, .3); border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.stepper button { width: 48px; min-height: 50px; border: 0; background: transparent; color: var(--oro); font-size: 22px; font-weight: 600; }
.stepper button:hover { background: rgba(201, 162, 75, .15); }
.stepper output { flex: 1; text-align: center; font-weight: 600; font-size: 16px; }
.alert { font-size: 13.5px; line-height: 1.55; padding: 12px 14px; border-radius: 10px; border-left: 3px solid var(--oro); background: rgba(201, 162, 75, .14); }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid rgba(201, 162, 75, .3); }
.faq details:last-child { border-bottom: 1px solid rgba(201, 162, 75, .3); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-weight: 600; font-size: 17px; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--oro); }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--oro); flex: none; width: 28px; text-align: center; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; max-width: 46em; color: var(--champan); font-size: 15px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Footer ---------- */
.footer { background: var(--grafito); color: var(--champan); padding: clamp(56px, 7vw, 80px) 0 32px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 10.5px; letter-spacing: .24em; color: var(--oro); font-weight: 600; margin-bottom: 14px; }
.footer a { display: block; padding: 8px 0; font-size: 14px; }
.footer a:hover { color: var(--oro); }
.footer .legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(201, 162, 75, .22); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; font-size: 12px; color: rgba(217, 200, 158, .75); }
@media (max-width: 900px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer .cols { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Carrusel móvil (.scroller): en escritorio no hace nada; en móvil,
   scroll horizontal con snap y "peek" de la siguiente tarjeta ---------- */
.scroller-hint { display: none; }
@media (max-width: 760px) {
  .scroller { display: flex !important; grid-template-columns: none !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; gap: 12px !important; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .scroller::-webkit-scrollbar { display: none; }
  .scroller > * { flex: 0 0 min(84%, 340px); scroll-snap-align: start; scroll-snap-stop: always; scroll-margin-inline-start: var(--gutter); }
  .scroller > *:last-child { margin-right: var(--gutter); }
  .scroller > .reveal { opacity: 1; transform: none; }
  .scroller-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--tinta-suave); }
  .dark .scroller-hint, .emerald .scroller-hint { color: var(--champan); }
  .scroller-dots { display: flex; gap: 6px; }
  .scroller-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .3; transition: opacity .2s, width .2s; }
  .scroller-dots i.is-on { opacity: 1; width: 18px; border-radius: 3px; background: var(--oro); }
}

/* ---------- Utilidades ---------- */
.dato { background: rgba(201, 162, 75, .18); border: 1px dashed var(--oro); border-radius: 6px; padding: 0 6px; font-size: .85em; color: inherit; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 60;
  background: var(--grafito); color: var(--marfil); border: 1px solid var(--oro); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); box-shadow: var(--shadow);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 761px) { .toast { bottom: 90px; } }
