/* ============================================================
   Arregla tu App — hoja de estilos
   Estética de «taller»: fondo papel cálido, tinta grafito, acento
   naranja herramienta, etiquetas en monoespaciada. Sin dependencias.
   >>> Si cambias este fichero, sube el ?v= en TODOS los HTML y en
   >>> form-handler.php (los .css se sirven con caché immutable).
   ============================================================ */

@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('/assets/fonts/public-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Public Sans'; src: url('/assets/fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f6f3ee;
  --paper-2: #efe9e0;
  --white: #ffffff;
  --ink: #1d1f24;
  --ink-2: #4a4f5a;
  --ink-3: #6b7080;
  --line: #e2dbd0;
  --line-2: #cfc6b8;
  --brand: #b8430c;        /* naranja herramienta: 5,6:1 sobre blanco */
  --brand-strong: #96360a;
  --brand-tint: #fbe9dd;
  --graphite: #23272f;     /* bloques oscuros */
  --ok: #2b7a3d;
  --wa: #1f8a4c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 25, 20, .06), 0 8px 24px rgba(30, 25, 20, .07);
  --wrap: 1140px;
  --font-head: 'Geist', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
.eyebrow { display: inline-block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); margin-bottom: .9rem; }
.eyebrow::before { content: '// '; color: var(--ink-3); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46em; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-family: var(--font-head); font-weight: 600; font-size: 1rem; padding: .8em 1.4em; border-radius: 8px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #186f3d; color: #fff; }
.btn--sm { font-size: .9rem; padding: .55em 1em; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Cabecera ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(246, 243, 238, .94); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-stuck { border-color: var(--line); box-shadow: 0 4px 18px rgba(30, 25, 20, .06); }
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__dom { font-family: var(--font-mono); font-weight: 400; font-size: .75rem; color: var(--ink-3); letter-spacing: 0; display: block; line-height: 1; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink-2); text-decoration: none; font-family: var(--font-head); font-weight: 550; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.nav .btn { color: #fff; }
.nav__toggle { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); cursor: pointer; }
.nav__toggle span, .nav__toggle::before, .nav__toggle::after { content: ''; position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav__toggle span { top: 20px; }
.nav__toggle::before { top: 13px; }
.nav__toggle::after { top: 27px; }
.nav__toggle[aria-expanded="true"] span { opacity: 0; }
.nav__toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 18px; display: none; box-shadow: 0 12px 24px rgba(30, 25, 20, .08); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; background:
  radial-gradient(circle at 1px 1px, rgba(29, 31, 36, .07) 1px, transparent 0) 0 0 / 22px 22px, var(--paper); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero__note { font-size: .92rem; color: var(--ink-3); }
.hero--inner { padding: 56px 0 44px; }
.hero--inner h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
@media (max-width: 900px) { .hero { padding: 44px 0 40px; } .hero__grid { grid-template-columns: 1fr; gap: 32px; } }

/* Ticket de taller: tarjeta con el «diagnóstico» del hero */
.ticket { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 18px; font-family: var(--font-mono); font-size: .88rem; position: relative; }
.ticket::before { content: ''; position: absolute; top: -1px; left: 22px; right: 22px; height: 4px; background: repeating-linear-gradient(90deg, var(--brand) 0 14px, transparent 14px 22px); }
.ticket__head { display: flex; justify-content: space-between; color: var(--ink-3); border-bottom: 1px dashed var(--line-2); padding-bottom: 10px; margin-bottom: 12px; }
.ticket__row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 6px 0; align-items: start; color: var(--ink); }
.ticket__row b { font-weight: 500; }
.ticket__st { font-size: .78rem; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.st--ko { background: #fde4e1; color: #a1271b; }
.st--wip { background: var(--brand-tint); color: var(--brand-strong); }
.st--ok { background: #e1f3e5; color: var(--ok); }
.ticket__foot { border-top: 1px dashed var(--line-2); margin-top: 12px; padding-top: 10px; color: var(--ink-3); font-size: .8rem; }

/* ---------- GEO answer ---------- */
.geo { margin-top: 26px; padding: 18px 20px; background: var(--white); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; max-width: 46em; }
.geo h2 { font-size: 1.1rem; margin-bottom: .35em; }
.geo p { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section--white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--graphite); color: #e9e6e1; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead, .section--dark p { color: #cfcac2; }
.section--dark a { color: #ffb489; }
.section__head { max-width: 760px; margin-bottom: 42px; }
@media (max-width: 700px) { .section { padding: 60px 0; } }

/* Rejillas de tarjetas (también los hubs: .pains / .pain) */
.grid { display: grid; gap: 20px; }
.grid--3, .pains { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .pains, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .pains, .grid--2, .grid--4 { grid-template-columns: 1fr; } }
.card, .pain { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section--white .card { background: var(--paper); box-shadow: none; }
.card h3 a, .pain h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover, .pain h3 a:hover { color: var(--brand); }
.card p:last-child, .pain p:last-child { margin-bottom: 0; }
.card__tag { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); display: block; margin-bottom: 10px; }
.card__icon { width: 40px; height: 40px; border-radius: 9px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.card__icon svg { width: 22px; height: 22px; }
.card ul { margin: .6em 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: .96rem; }
.card--quote { border-style: dashed; }
.card--quote p { font-style: italic; color: var(--ink-2); }

/* Tecnologías */
.techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tech { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.tech:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-1px); }
.tech b { font-family: var(--font-head); font-weight: 650; }
.tech span { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); }
.tech--more { background: transparent; border-style: dashed; }

/* Pasos del proceso */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: paso; }
.steps li { counter-increment: paso; position: relative; padding-top: 56px; }
.steps li::before { content: '0' counter(paso); position: absolute; top: 0; left: 0; font-family: var(--font-mono); font-size: 1rem; color: #fff; background: var(--brand); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-2); font-size: .97rem; }
.section--dark .steps p { color: #cfcac2; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Listas sí/no */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.checks li::before { content: ''; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%; background: #e1f3e5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%232b7a3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks--no li::before { background: #fde4e1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' fill='none' stroke='%23a1271b' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.panel--accent { border-top: 4px solid var(--brand); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.note { font-size: .9rem; color: var(--ink-3); border-left: 3px solid var(--line-2); padding-left: 12px; margin-top: 18px; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .74rem; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); vertical-align: middle; }
.badge--alto { background: #e1f3e5; color: var(--ok); }
.badge--medio { background: var(--brand-tint); color: var(--brand-strong); }
.badge--bajo { background: #fde4e1; color: #a1271b; }

/* Tabla de hechos */
.facts { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .96rem; }
.facts th, .facts td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { background: var(--paper-2); font-family: var(--font-head); font-weight: 600; }
.facts tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* Conversación de ejemplo */
.chat { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.chat__msg { padding: 12px 16px; border-radius: 14px; max-width: 88%; font-size: .97rem; }
.chat__msg--them { background: var(--white); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat__msg--us { background: var(--brand-tint); align-self: flex-end; border-bottom-right-radius: 4px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-family: var(--font-mono); font-size: 1.4rem; color: var(--brand); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; gap: 32px; } }
.form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } .form { padding: 22px; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; transition: border-color .15s, background .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: var(--white); box-shadow: 0 0 0 3px var(--brand-tint); }
.field .is-invalid, .is-invalid { border-color: #c0392b !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 10px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
#formStatus { margin: 12px 0 0; color: #a1271b; font-weight: 600; min-height: 1em; }
.contact__alt { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Pie ---------- */
.footer { background: var(--graphite); color: #bdb7ae; padding: 56px 0 30px; font-size: .94rem; }
.footer a { color: #e9e6e1; text-decoration: none; }
.footer a:hover { color: #ffb489; }
.footer .logo { color: #fff; }
.footer .logo__dom { color: #9a948b; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h3 { font-size: .8rem; font-family: var(--font-mono); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; color: #9a948b; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer__legal { border-top: 1px solid #3a3f49; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .86rem; }
.footer__legal nav { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Migas ---------- */
.crumbs { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-3); }
.byline { font-size: .9rem; color: var(--ink-3); margin-top: 10px; }

/* ---------- Páginas de prosa y legales ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.legal { padding: 56px 0 80px; }
.legal .prose { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--paper-2); }
.legal table.kv th { width: 200px; }
@media (max-width: 680px) { .legal .prose { padding: 24px 18px; } .legal table { display: block; overflow-x: auto; } }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.wa-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { color: #fff; background: #186f3d; }

/* ---------- Banner de consentimiento ---------- */
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(30, 25, 20, .18); padding: 18px 20px; display: flex; gap: 16px; align-items: center; }
.consent-banner__texto { margin: 0; font-size: .92rem; color: var(--ink-2); }
.consent-banner__acciones { display: flex; gap: 8px; flex: none; }
/* En móvil, banner compacto (≈130 px) para que no tape el botón principal del hero (QA 2026-11-09). */
@media (max-width: 600px) {
  .consent-banner { left: 8px; right: 8px; bottom: 8px; padding: 12px 14px; gap: 10px; flex-direction: column; align-items: stretch; }
  .consent-banner__texto { font-size: .82rem; line-height: 1.45; }
  .consent-banner__acciones .btn { flex: 1; padding: .5em .8em; }
}

/* ---------- Aparición al hacer scroll (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
