/* Sitio de El Chucao. Sin cookies, sin formularios, sin seguimiento. */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ===== COLORES CORPORATIVOS: cambiar solo aquí ===== */
  --blue: #0070F3;
  --navy: #1B2A48;
  --red: #FB3640;
  /* ===== uso en la interfaz ===== */
  --brand: var(--navy);        /* botones principales, paneles fuertes */
  --brand-hover: var(--blue);
  --brand-contrast: #ffffff;
  --link: #0058c8;             /* azul de texto: más oscuro para leer bien */
  --focus: var(--blue);
  --bg: #ffffff;
  --band: #f3f6fb;            /* franjas alternas */
  --surface: #ffffff;
  --ink: #1B2A48;
  --muted: #4f5b75;
  --border: #dbe3f0;
  --footer-bg: #1B2A48;
  --header-h: 76px;
  color-scheme: light;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 4px; touch-action: manipulation; -webkit-tap-highlight-color: rgba(0, 112, 243, .15); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.03em; line-height: 1.1; margin: 0; font-weight: 700; }
p { text-wrap: pretty; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ===== Encabezado fijo ===== */
header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
@supports (background: color-mix(in srgb, red, blue)) {
  header.top { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; height: 52px; width: auto; }
nav.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; }
nav.menu a { color: var(--ink); text-decoration: none; padding: 9px 16px; border-radius: 999px; transition: background-color .15s, color .15s; }
nav.menu a:hover { color: var(--link); background: var(--band); }
nav.menu a.cta { background: var(--brand); color: var(--brand-contrast); font-weight: 600; margin-left: 6px; }
nav.menu a.cta:hover { background: var(--brand-hover); color: var(--brand-contrast); }

@media (max-width: 599px) {
  :root { --header-h: 104px; }
  .brand-logo { height: 40px; }
  header.top .wrap { gap: 4px 12px; padding-top: 8px; padding-bottom: 8px; min-height: 0; }
  nav.menu { width: 100%; font-size: 14px; gap: 2px; }
  nav.menu a { padding: 8px 9px; }
  nav.menu a.cta { margin-left: 0; }
}

/* ===== Botones ===== */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--link); color: var(--link); }
.btn.primary { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-contrast); }

/* ===== Secciones ===== */
section { padding: 80px 0; }
section h2 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
section p.sub { color: var(--muted); font-size: 19px; max-width: 58ch; margin: 0 0 40px; }
#preguntas { background: var(--band); }

/* ===== Portada ===== */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 80px 0 92px; }
.hero > .wrap { position: relative; }
.sonar { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); }
.hero h1 { font-size: clamp(42px, 6.8vw, 80px); line-height: 1.02; letter-spacing: -0.04em; max-width: 15ch; margin-bottom: 24px; }
.hero p.lead { font-size: 21px; color: var(--muted); max-width: 46ch; margin: 0 0 34px; }

/* ===== Servicios: una fila por servicio ===== */
.cards { display: grid; gap: 22px; grid-template-columns: 1fr; }
.card { border-radius: 24px; display: grid; gap: 32px 56px; grid-template-columns: 1fr; align-items: center; }
.card h3 { font-size: 26px; margin-bottom: 12px; letter-spacing: -0.025em; }
.card p { margin: 0 0 16px; }
.card ul { margin: 0 0 28px; padding-left: 20px; }
.card li { margin-bottom: 8px; }
.card li::marker { color: var(--red); }
.card .links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }

/* Club: la fila protagonista */
.card.feature { position: relative; overflow: hidden; padding: 44px 36px; color: #ffffff; background: radial-gradient(70% 110% at 100% 0%, rgba(0, 112, 243, .6), transparent 62%), var(--navy); }
@media (min-width: 860px) { .card.feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); padding: 60px 56px; } }
.card.feature h3 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 16px; }
.card.feature p, .card.feature li { color: #e3ebf8; font-size: 18px; }
.card.feature p { max-width: 44ch; }
.card.feature .links { margin-top: 8px; }
.btn.light { background: #ffffff; color: var(--navy); border-color: #ffffff; min-height: 56px; padding: 0 36px; font-size: 18px; font-weight: 700; }
.btn.light:hover { background: #dfe9ff; border-color: #dfe9ff; color: var(--navy); }
.btn.light:focus-visible { outline-color: #ffffff; }

/* Tarjeta de sellos: el producto, dibujado con CSS */
.stampcard { background: #ffffff; border-radius: 24px; padding: 30px 30px 34px; width: 100%; max-width: 380px; justify-self: center; transform: rotate(-3deg); box-shadow: 0 24px 48px rgba(3, 10, 28, .45); }
.stampcard .dots { display: flex; gap: 8px; margin-bottom: 28px; }
.stampcard .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.stampcard .dots i:first-child { background: var(--red); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stamps span { aspect-ratio: 1; border-radius: 50%; background: var(--blue); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .22); }
.stamps span.new { background: var(--red); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .22), 0 0 0 6px rgba(251, 54, 64, .22); }
.stamps span.empty { background: transparent; box-shadow: none; border: 2px dashed rgba(27, 42, 72, .3); }
/* Con JavaScript: los sellos esperan y se estampan uno a uno al entrar la tarjeta en pantalla */
.js .stamps span:not(.empty) { opacity: 0; transform: scale(.4); }
.js .stampcard.in .stamps span:not(.empty) { animation: stamp .5s cubic-bezier(.2, .9, .3, 1.25) both; }
.js .stampcard.in .stamps span:nth-child(1) { animation-delay: .1s; }
.js .stampcard.in .stamps span:nth-child(2) { animation-delay: .22s; }
.js .stampcard.in .stamps span:nth-child(3) { animation-delay: .34s; }
.js .stampcard.in .stamps span:nth-child(4) { animation-delay: .46s; }
.js .stampcard.in .stamps span:nth-child(5) { animation-delay: .58s; }
.js .stampcard.in .stamps span:nth-child(6) { animation-delay: .7s; }
.js .stampcard.in .stamps span:nth-child(7) { animation-delay: .82s; }
.js .stampcard.in .stamps span:nth-child(8) { animation-delay: 1s; }
@keyframes stamp { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* Hosting: segunda fila protagonista, en azul de marca y en espejo con el club */
.card.feature.alt { background: radial-gradient(70% 110% at 0% 100%, rgba(27, 42, 72, .55), transparent 62%), var(--blue); }
.card.feature.alt p { color: #ffffff; }
@media (min-width: 860px) {
  .card.feature.alt { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .card.feature.alt .browser { order: -1; }
}

/* Ventana de navegador: el sitio alojado, dibujado con CSS */
.browser { background: #ffffff; border-radius: 18px; width: 100%; max-width: 420px; justify-self: center; transform: rotate(3deg); box-shadow: 0 24px 48px rgba(3, 10, 28, .4); overflow: hidden; }
.browser .bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid #e3e9f4; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.browser .bar i:first-child { background: var(--red); }
.browser .bar b { flex: 1; height: 22px; margin-left: 10px; border-radius: 999px; background: #eef2f9; }
.browser .page { padding: 18px 18px 22px; display: grid; gap: 12px; }
.browser .banner { display: block; height: 84px; border-radius: 12px; background: linear-gradient(120deg, var(--blue), var(--navy)); }
.browser .line { display: block; height: 10px; border-radius: 5px; background: #dfe6f2; }
.browser .line.short { width: 62%; }
.browser .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.browser .tiles span { aspect-ratio: 1.15; border-radius: 10px; background: #e3edff; }
.browser .tiles span:nth-child(2) { background: #e6eaf3; }
.browser .tiles span:nth-child(3) { background: #ffe3e5; }
/* Con JavaScript: la página se arma pieza por pieza al entrar la ventana en pantalla */
.js .browser .page > * { opacity: 0; transform: translateY(12px); }
.js .browser.in .page > * { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
.js .browser.in .page > :nth-child(1) { animation-delay: .1s; }
.js .browser.in .page > :nth-child(2) { animation-delay: .3s; }
.js .browser.in .page > :nth-child(3) { animation-delay: .42s; }
.js .browser.in .page > :nth-child(4) { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== Quiénes somos ===== */
#quienes-somos .wrap { display: grid; gap: 14px 64px; grid-template-columns: 1fr; }
@media (min-width: 820px) { #quienes-somos .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } #quienes-somos h2 { margin: 0; } }
#quienes-somos p.sub { font-size: 21px; color: var(--ink); margin: 0; max-width: 54ch; }

/* ===== Cómo trabajamos ===== */
#como-trabajamos { padding-top: 24px; }
.trio { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 44px; } }
.principle { border-top: 3px solid var(--ink); padding-top: 22px; }
.principle h3 { font-size: 24px; margin-bottom: 10px; }
.principle p { margin: 0; color: var(--muted); }

/* ===== Preguntas frecuentes ===== */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-weight: 600; font-size: 19px; position: relative; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 300; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* ===== Contacto ===== */
#contacto { background: var(--blue); color: #ffffff; padding: 88px 0; }
.contact h2 { color: #ffffff; font-size: clamp(34px, 5vw, 52px); margin-bottom: 16px; }
.contact p { margin: 0 0 22px; max-width: 46ch; font-size: 19px; color: #ffffff; }
.contact a.mail { color: #ffffff; font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; text-decoration-thickness: 2px; }
.contact a.mail:hover { text-decoration-thickness: 4px; }
.contact a.mail:focus-visible { outline-color: #ffffff; }

/* ===== Pie de página ===== */
footer { background: var(--footer-bg); color: #c9d3e6; padding: 60px 0 32px; font-size: 15px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
footer h2 { font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.3; color: #ffffff; margin: 0 0 14px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer a { color: #c9d3e6; }
footer a:hover { color: #ffffff; }
footer a:focus-visible { outline-color: #ffffff; }
.foot-logo { display: block; height: 52px; width: auto; margin-bottom: 10px; }
footer .foot-brand p { margin: 8px 0 0; max-width: 34ch; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 14px; }

/* ===== Páginas de texto ===== */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin: 0 0 8px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.02em; }
.doc p, .doc li { max-width: 68ch; }
.muted { color: var(--muted); }

@media (max-width: 599px) {
  section { padding: 60px 0; }
  .hero { padding: 44px 0 64px; }
  #contacto { padding: 64px 0; }
  .card.feature { padding: 36px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, nav.menu a { transition: none; }
}
