/* Layout: banda oscura de portada con la tienda a la derecha; luego secciones claras a ancho de lectura, logos en franjas y contacto al cierre */
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --ink: #142033;
  --muted: #586274;
  --line: #E2E5EA;
  --accent: #F28B2D;
  --accent-dark: #C96E1A;
  --on-accent: #FFFFFF;
  --accent-ink: #B9620F;
  --accent-soft: rgba(242, 139, 45, .12);
  --band: #142033;
  --band-ink: #FFFFFF;
  --band-muted: #AEB8C7;
  --logo-filter: grayscale(1) brightness(0);
  --logo-opacity: .5;
  --ok: #157F4A;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1420; --surface: #152031; --ink: #EEF1F5; --muted: #9AA5B5; --line: #24324A;
    --accent: #F28B2D; --accent-ink: #F5A55C; --accent-soft: rgba(245, 165, 92, .14);
    --band: #0A1019; --band-ink: #FFFFFF; --band-muted: #9AA5B5;
    --logo-filter: grayscale(1) brightness(0) invert(1); --logo-opacity: .6; --ok: #4ADE80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1420; --surface: #152031; --ink: #EEF1F5; --muted: #9AA5B5; --line: #24324A;
  --accent: #F28B2D; --accent-ink: #F5A55C; --accent-soft: rgba(245, 165, 92, .14);
  --band: #0A1019; --band-ink: #FFFFFF; --band-muted: #9AA5B5;
  --logo-filter: grayscale(1) brightness(0) invert(1); --logo-opacity: .6; --ok: #4ADE80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(92px + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.band .eyebrow { color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; }
.section { padding-block: 88px; }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 720px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 800; }
.section-head:not(:has(h2)) { margin-bottom: 22px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .nav a.btn-primary { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: var(--on-accent); font-weight: 700; }
.nav a.btn-primary:hover { color: var(--on-accent); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }

/* Encabezado */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--band); color: var(--band-ink); border-bottom: 1px solid rgba(255,255,255,.08); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.top img { height: 38px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--band-muted); }
.nav a:hover { color: var(--band-ink); }
.nav .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 860px) { .nav .hide-sm { display: none; } }

/* Portada */
.hero { background: var(--band); color: var(--band-ink); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: clamp(20px, 3.5vh, 36px) clamp(28px, 6vh, 72px); }
/* La portada se ajusta también al alto de la pantalla, para que se vea completa en notebooks */
.hero h1 { font-size: clamp(34px, min(5.6vw, 7.4vh), 66px); font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--band-muted); margin-top: clamp(12px, 2.2vh, 22px); }
.hero-cta { display: inline-grid; grid-auto-columns: 1fr; gap: clamp(8px, 1.2vh, 12px); margin-top: clamp(16px, 3vh, 32px); max-width: 100%; }
.hero-photo { position: relative; min-width: 0; }
.hero-photo img, .hero-photo video { width: 100%; aspect-ratio: 4 / 3.3; max-height: 56vh; object-fit: cover; border-radius: 22px; display: block; }
.tag-ref { position: absolute; left: 14px; bottom: 14px; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(10,16,25,.72); color: #fff; }
.hero-note { position: absolute; right: -14px; top: 28px; background: var(--surface); color: var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.28); display: grid; gap: 2px; max-width: 220px; }
.hero-note b { font-family: var(--font-display); font-size: 26px; font-stretch: 112%; }
.hero-note span { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 40px 56px; }
  .hero-note { right: 12px; top: 12px; }
}

/* KPIs */
.kpis { border-bottom: 1px solid var(--line); background: var(--surface); }
.kpis .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.kpi { padding-block: 34px; padding-inline: 8px 24px; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 4px; align-items: center; align-content: center; }
.kpi .kpi-ico { grid-row: span 2; color: var(--accent); display: grid; place-items: center; }
.kpi .kpi-ico svg { width: 56px; height: 56px; stroke-width: 1.5; }
.kpi b, .kpi > span:last-child { grid-column: 2; }
.kpi > span:last-child { align-self: start; }
.kpi b { align-self: end; }
.kpi + .kpi { border-left: 1px solid var(--line); padding-left: 28px; }
.kpi b { font-family: var(--font-display); font-stretch: 115%; font-weight: 900; font-size: clamp(34px, 4.4vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 15px; }
@media (max-width: 720px) {
  .kpis .wrap { grid-template-columns: 1fr; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line); padding-left: 8px; }
}

/* Servicio */
.service { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; }
.service h3 { font-size: 21px; font-weight: 750; }
.service p { color: var(--muted); }
.ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; }
@media (max-width: 720px) { .service { grid-template-columns: 1fr; } }

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { counter-increment: s; padding: 22px 22px 0 0; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-weight: 900; font-size: 15px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #1A1206; margin-top: -40px; }
.steps h3 { font-size: 19px; font-weight: 750; }
.steps p { color: var(--muted); font-size: 16px; }
/* En pantallas angostas los pasos van en vertical, unidos por una línea */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li { position: relative; padding: 4px 0 30px 54px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin-top: 0; }
  .steps li::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--ink); opacity: .9; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li:last-child::after { display: none; }
}

/* Segmentos */
.segments { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.seg { border-radius: 20px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); }
.seg img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.seg-body { padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.seg-title { display: flex; align-items: center; gap: 14px; }
.seg h3 { font-size: 24px; font-weight: 800; }
.seg-body > p { color: var(--muted); }
.seg-list-title { font-weight: 700; color: var(--ink); margin-top: 4px; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { padding-left: 34px; position: relative; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: .12em; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); }
.checks li::after { content: ""; position: absolute; left: 7px; top: calc(.12em + 6px); width: 8px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.seg .btn { align-self: flex-start; margin-top: auto; }
.seg .checks { margin-bottom: 8px; }
.seg .btn-ghost { color: var(--ink); }
.ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--accent-soft) 0 14px, transparent 14px 28px), var(--bg); color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .segments { grid-template-columns: 1fr; } }

/* Compra */
.buy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.buy figure { margin: 0; display: grid; gap: 14px; }
.buy img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); display: block; }
.buy figcaption { display: grid; gap: 4px; }
.buy b { font-family: var(--font-display); font-stretch: 112%; font-size: 20px; }
.buy span { color: var(--muted); font-size: 16px; }
@media (max-width: 720px) { .buy { grid-template-columns: 1fr; } }

/* Logos */
.logos-block { display: grid; gap: 36px; }
.logo-row { display: grid; gap: 14px; }
.logo-row h3 { font: 700 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logo-grid div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 110px; display: grid; place-items: center; padding: 22px; }
.logo-grid img { max-width: 100%; max-height: 44px; width: auto; filter: var(--logo-filter); opacity: var(--logo-opacity); transition: opacity .2s; }
.logo-grid div:hover img { opacity: .9; }
.logo-grid.four { grid-template-columns: repeat(4, 1fr); }
.logo-grid .txt { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; color: var(--muted); font-size: 18px; text-align: center; }
@media (max-width: 720px) { .logo-grid, .logo-grid.four { grid-template-columns: repeat(2, 1fr); } }

/* Cinta de clientes */
.marquee { overflow: hidden; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: cinta 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track div { flex: 0 0 auto; width: 220px; height: 112px; display: grid; place-items: center; padding: 0 28px; }
.marquee-track img { max-width: 100%; max-height: 40px; width: auto; filter: var(--logo-filter); opacity: var(--logo-opacity); transition: opacity .2s; }
.marquee-track img.tall { max-height: 62px; }
.marquee-track div:hover img { opacity: .9; }
.marquee-track .txt { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; color: var(--muted); font-size: 18px; line-height: 1.2; text-align: center; }
@keyframes cinta { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* Mapa */
/* Franja de Santiago: color apagado, velo del fondo y bordes que se funden con la página */
.map-band { position: relative; background: var(--band); }
.map-band img { width: 100%; height: clamp(100px, min(17vw, 22vh), 240px); object-fit: cover; object-position: center 60%; display: block; filter: saturate(.7); }
.map-band::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 0%, transparent 70%, var(--band) 100%),
    color-mix(in srgb, var(--band) 25%, transparent); }

/* Preguntas */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 650; padding: 18px 28px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 24px; color: var(--accent-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; max-width: 68ch; }

/* Contacto */
/* Dos columnas que comparten filas: los encabezados y los contenidos parten a la misma altura */
.contact { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; column-gap: 48px; row-gap: 28px; align-items: start; }
.contact-col { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 28px; min-width: 0; }
.contact-col .faq { max-width: none; align-content: start; align-self: start; }
#contacto { grid-column: 1; grid-row: 1 / span 2; }
#preguntas { grid-column: 2; grid-row: 1 / span 2; }
.contact .lead { font-size: 17px; }
.contact-aside { display: grid; gap: 12px; align-content: start; }
.contact-aside .mail { font-weight: 650; user-select: all; }
form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 18px; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 0; }
.reasons legend { font-weight: 700; margin-bottom: 10px; }
.reason { position: relative; }
.reason input { position: absolute; opacity: 0; }
.reason label { display: grid; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; height: 100%; }
.reason label b { font-size: 15px; }
.reason label span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.reason input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.reason input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font: 400 16px/1.4 var(--font-body); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.form-foot small { color: var(--muted); }
.done { display: grid; gap: 8px; text-align: center; padding: 30px 10px; }
.done b { font-family: var(--font-display); font-stretch: 112%; font-size: 26px; color: var(--ok); }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  #preguntas { grid-column: 1; grid-row: 1 / span 2; }
  #contacto { grid-column: 1; grid-row: 3 / span 2; margin-top: 40px; }
}
@media (max-width: 560px) { .reasons, .fields { grid-template-columns: 1fr; } }

/* Pie */
footer { background: var(--band); color: var(--band-muted); font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-block: 52px 36px; }
footer img { height: 34px; width: auto; }
footer h4 { color: var(--band-ink); font-size: 14px; margin: 0 0 10px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--band-ink); }
.legal { border-top: 1px solid rgba(255,255,255,.1); }
.legal .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 18px; font-size: 13px; grid-template-columns: none; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr 1fr; } }

/* Base para las páginas internas (la portada recibe su propio reset al publicarse) */
body { margin: 0; }
img { max-width: 100%; }

/* Encabezado de páginas internas */
.page-head { background: var(--band); color: var(--band-ink); }
.page-head .wrap { padding-block: 56px 52px; display: grid; gap: 14px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 900; max-width: 18ch; }
.page-head .lead { color: var(--band-muted); }
.crumbs { font-size: 14px; color: var(--band-muted); }
.crumbs a { text-decoration: none; color: var(--band-muted); }
.crumbs a:hover { color: var(--band-ink); }

/* Listado del blog */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; transition: transform .15s; }
.post-card:hover { transform: translateY(-2px); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-card div { padding: 24px; display: grid; gap: 10px; align-content: start; }
.post-card h2 { font-size: 22px; font-weight: 800; }
.post-card p { color: var(--muted); font-size: 16px; }
.post-card small { color: var(--accent-ink); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* Artículo */
.article { max-width: 720px; margin: 0 auto; padding-block: 56px 88px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.article figure { margin: 0 0 36px; }
.article figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; display: block; }
.article figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.article h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin-top: 40px; }
.article h3 { font-size: 20px; font-weight: 750; margin-top: 26px; }
.article p { margin-top: 14px; font-size: 18px; line-height: 1.7; }
.article .intro { font-size: 21px; color: var(--ink); }
.article .cta-box { margin-top: 48px; background: var(--band); color: var(--band-ink); border-radius: 20px; padding: 30px; display: grid; gap: 14px; justify-items: start; }
.article .cta-box h2 { margin: 0; font-size: 26px; }
.article .cta-box p { margin: 0; color: var(--band-muted); font-size: 17px; }

/* Ilustraciones de "Así se compra" */
.buy figure { align-content: start; }
.illus { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); }
.il-tile { fill: var(--surface); }
.il-soft { fill: var(--accent-soft); }
.il-acc { fill: var(--accent); }
.il-acc-stroke { stroke: var(--accent); }
.il-dark { fill: var(--il-device, #1B2638); }
.il-dark-stroke { stroke: var(--il-device, #1B2638); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --il-device: #3A4A66; } }
:root[data-theme="dark"] { --il-device: #3A4A66; }

/* Formularios: campo trampa para bots y mensajes */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done .error { color: #D9534F; }
.form-narrow { max-width: 560px; margin-top: 28px; }

/* Textos legales */
.legal-text h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 48px; }
.legal-text h2:first-child { margin-top: 0; }
.legal-text h3 { font-size: 19px; margin-top: 28px; }
.legal-text h4 { font-size: 17px; margin-top: 18px; }
.legal-text p, .legal-text li { font-size: 16px; line-height: 1.7; color: var(--muted); }
.legal-text p { margin-top: 10px; }
.legal-text ul, .legal-text ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-text .bullet { padding-left: 4px; }
