/* Mireloworld — estilos del sitio. Tipografías alojadas en local (sin llamadas a Google). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --black: #05060e;
  --navy: #15297c;
  --ink: #05060e;
  --ink-2: #15297c;
  --ink-3: #1c3590;
  --line-dark: #2a44a0;
  --paper: #f3f8fb;
  --paper-2: #e1f1f5;
  --white: #ffffff;
  --text-dark: #15297c;
  --text-soft: #4c5f86;
  --text-on-ink: #ffffff;
  --text-on-ink-soft: #b4c3ea;
  --signal: #0cbccc;
  --signal-ink: #15297c;
  --signal-bright: #3dd4e0;
  --focus: #3dd4e0;
  --radius-panel: 28px;
  --radius-field: 10px;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1160px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--paper);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; display: block; }
[id] { scroll-margin-top: 84px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: var(--signal-ink); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--signal); color: var(--black); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Bandas ---------- */
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--ink { background: var(--ink); color: var(--text-on-ink); }
.band--ink a:not(.btn) { color: var(--signal-bright); }
.band--navy { background: var(--navy); }
.band--white { background: var(--white); }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 56ch; color: var(--text-soft); }
.band--ink .lead { color: var(--text-on-ink-soft); }

.h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 700; max-width: 20ch; }
.h2--wide { max-width: 26ch; }
.h2 + .lead { margin-top: 1.1rem; }
.matrix-hint { display: none; margin: 1.5rem 0 0; font-size: .9rem; color: var(--text-soft); }
.matrix-note { margin: .8rem 0 0; font-size: .92rem; color: var(--text-soft); max-width: 70ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.5rem;
  font: 600 1rem/1.2 var(--font-body);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn--primary { background: var(--signal); color: var(--black); }
.btn--primary:hover { background: #09a3b1; }
.btn--sun { background: var(--signal); color: var(--black); }
.btn--sun:hover { background: #09a3b1; }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.band--ink .btn--ghost { color: var(--text-on-ink); }
.btn--ghost:hover { background: rgba(61, 212, 224, .18); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 6, 14, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-on-ink);
}
.site-header__row { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text-on-ink) !important; font: 700 1.3rem/1 var(--font-head); letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-weight: 300; color: var(--signal-bright); }
.nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.nav a { color: var(--text-on-ink-soft); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--white); }
.site-header .btn { min-height: 42px; padding: .5rem 1.15rem; font-size: .95rem; }
.header-cta { margin-left: auto; }
.nav + .header-cta { margin-left: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(61, 212, 224, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 212, 224, .09) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
  color: var(--text-on-ink);
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 750; letter-spacing: -0.035em; max-width: 17ch; }
.hero .lead { margin-top: 1.4rem; color: var(--text-on-ink-soft); }
.hero a:not(.btn) { color: var(--signal-bright); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__note { margin-top: 1.1rem; font-size: .95rem; color: var(--text-on-ink-soft); max-width: 46ch; }

/* Demo de conversación */
.phone {
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-panel);
  box-shadow: 0 30px 80px -30px rgba(12, 188, 204, .5);
  overflow: hidden;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}
.phone__bar { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; background: var(--ink-3); border-bottom: 1px solid var(--line-dark); }
.phone__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--signal); color: var(--black); display: grid; place-items: center; font: 700 .95rem var(--font-head); flex: none; }
.phone__who { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.phone__who small { display: block; font-weight: 400; color: var(--text-on-ink-soft); font-size: .8rem; }
.phone__time { margin-left: auto; font: 600 1.05rem var(--font-head); color: var(--signal-bright); }
.phone__body { padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; min-height: 340px; }
.msg { max-width: 86%; padding: .65rem .9rem; border-radius: 18px; font-size: .96rem; line-height: 1.45; }
.msg--them { align-self: flex-start; background: var(--ink-3); border-bottom-left-radius: 6px; }
.msg--you { align-self: flex-end; background: var(--signal); color: var(--black); border-bottom-right-radius: 6px; }
.msg a { color: var(--white) !important; font-weight: 600; text-decoration: underline; }
.msg--done {
  align-self: stretch; max-width: none; background: transparent;
  border: 1.5px dashed var(--signal-bright); color: var(--signal-bright);
  border-radius: 14px; text-align: center; font-weight: 600;
}
.phone__foot { padding: .65rem 1.1rem .9rem; font-size: .82rem; color: var(--text-on-ink-soft); border-top: 1px solid var(--line-dark); }

.demo-run .msg { opacity: 0; transform: translateY(8px); }
.demo-run .msg.in { opacity: 1; transform: none; transition: opacity .35s, transform .35s; }
.typing { align-self: flex-start; display: none; gap: 4px; padding: .8rem .9rem; background: var(--ink-3); border-radius: 18px; border-bottom-left-radius: 6px; }
.typing.on { display: inline-flex; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-on-ink-soft); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Problema ---------- */
.problem { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding-block: 1.5rem; border-top: 1.5px solid var(--ink); }
.rows li:last-child { border-bottom: 1.5px solid var(--ink); }
.rows h3 { font-size: 1.45rem; font-weight: 650; margin-bottom: .4rem; }
.rows p { margin: 0; color: var(--text-soft); max-width: 52ch; }

/* ---------- Recorrido del cliente ---------- */
.journey { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); }
.journey__intro { position: sticky; top: 100px; align-self: start; }
.path { list-style: none; margin: 0; padding: 0 0 0 2.25rem; position: relative; }
.path::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: var(--line-dark); }
.path li { position: relative; padding-bottom: 2.4rem; }
.path li:last-child { padding-bottom: 0; }
.path li::before {
  content: ""; position: absolute; left: -2.25rem; top: .35rem;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--signal-bright);
}
.path li.is-sun::before { border-color: var(--signal-bright); background: var(--signal-bright); }
.path h3 { font-size: 1.5rem; font-weight: 650; margin-bottom: .35rem; }
.path p { margin: 0 0 .5rem; color: var(--text-on-ink-soft); max-width: 54ch; }
.path .what { font-size: .96rem; color: var(--text-on-ink); }

/* ---------- Paquetes ---------- */
.matrix-wrap { position: relative; margin-top: 2.5rem; overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--white); }
.matrix { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .98rem; }
.matrix caption { text-align: left; padding: 1rem 1.25rem; font-size: .92rem; color: var(--text-soft); caption-side: bottom; }
.matrix th, .matrix td { padding: .95rem 1.1rem; text-align: center; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.matrix thead th { background: var(--ink); color: var(--text-on-ink); font: 650 1.1rem var(--font-head); vertical-align: bottom; }
.matrix thead th small { display: block; margin-top: .25rem; font: 400 .82rem/1.35 var(--font-body); color: var(--text-on-ink-soft); }
.matrix th[scope="row"] { text-align: left; font-weight: 500; width: 34%; }
.matrix td { color: var(--signal-ink); font-weight: 700; }
.matrix td.no { color: #98a8c4; font-weight: 400; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix .col-highlight { background: #e1f1f5; }
.matrix thead .col-highlight { background: var(--signal); color: var(--black); }
.matrix__cta td { padding: 1.1rem; }
.extras { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1.5px solid var(--ink); }
.extras div { padding: 1.25rem 1.25rem 0 0; }
.extras h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: .3rem; }
.extras p { margin: 0; font-size: .95rem; color: var(--text-soft); }
.price-note { margin-top: 2rem; padding: 1.1rem 1.4rem; background: var(--paper-2); border-radius: 14px; max-width: 70ch; }
.price-note p { margin: 0; }

/* ---------- Sectores ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 1.8rem; }
.tab {
  font: 600 1rem/1.2 var(--font-body); padding: .7rem 1.2rem; border-radius: 999px;
  border: 1.5px solid var(--line-dark); background: transparent; color: var(--text-on-ink); cursor: pointer; min-height: 44px;
}
.tab:hover { background: rgba(61, 212, 224, .18); }
.tab[aria-selected="true"] { background: var(--signal); border-color: var(--signal); color: var(--black); }
.sector { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.sector[hidden] { display: none; }
.sector h3 { font-size: 1.7rem; font-weight: 650; margin-bottom: .8rem; }
.sector p { color: var(--text-on-ink-soft); max-width: 50ch; }
.sector ul { padding-left: 1.2rem; margin: 0 0 1rem; color: var(--text-on-ink); }
.sector li { margin-bottom: .35rem; }
.sample { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: 20px; padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.sample small { color: var(--text-on-ink-soft); font-size: .82rem; }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.5vw, 2rem); counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(s); display: block; font: 750 2.6rem/1 var(--font-head); color: var(--signal-ink); margin-bottom: .6rem; }
.steps h3 { font-size: 1.25rem; font-weight: 650; margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--text-soft); font-size: .98rem; }

/* ---------- Honestidad ---------- */
.honest { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); margin-top: 2.5rem; }
.honest h3 { font-size: 1.35rem; font-weight: 650; margin-bottom: .8rem; }
.honest ul { margin: 0; padding-left: 1.2rem; }
.honest li { margin-bottom: .55rem; color: var(--text-on-ink-soft); }
.honest li strong { color: var(--text-on-ink); font-weight: 600; }
.case { margin-top: 3rem; padding: 1.6rem 1.8rem; border: 1.5px solid var(--signal-bright); border-radius: 20px; max-width: 760px; }
.case h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.case p { margin: 0; color: var(--text-on-ink-soft); }

/* ---------- Diagnóstico (formulario) ---------- */
.diag { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.diag ul { padding-left: 1.2rem; color: var(--text-on-ink); margin: 1.2rem 0 1.6rem; }
.diag li { margin-bottom: .4rem; }
.form { background: var(--white); color: var(--text-dark); border-radius: var(--radius-panel); padding: clamp(1.4rem, 3vw, 2.2rem); }
.form h3 { font-size: 1.5rem; margin-bottom: 1.1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--text-dark);
  padding: .7rem .85rem; border: 1.5px solid #bccbe8; border-radius: var(--radius-field); background: var(--white);
  min-height: 46px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--signal); }
.field .hint { font-size: .85rem; color: var(--text-soft); margin-top: .25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--text-soft); margin: .4rem 0 1.2rem; }
.check input { width: 22px; height: 22px; margin-top: .1rem; flex: none; accent-color: var(--signal); }
.hp { position: absolute; left: -9999px; }
.form__status { margin-top: 1rem; font-weight: 600; }
.form__status[data-state="error"] { color: #b3261e; }
.form__ok { text-align: left; }
.form__ok h3 { margin-bottom: .6rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 2.2rem; max-width: 820px; }
.faq details { border-top: 1.5px solid var(--ink); }
.faq details:last-child { border-bottom: 1.5px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font: 650 1.2rem/1.3 var(--font-head); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font: 400 1.8rem/1 var(--font-body); color: var(--signal-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 1.3rem; color: var(--text-soft); max-width: 62ch; }

/* ---------- CTA final y pie ---------- */
.final { text-align: left; }
.final .h2 { max-width: 22ch; }
.final .hero__actions { margin-top: 1.8rem; }
.site-footer { background: var(--ink); color: var(--text-on-ink-soft); padding-block: 2.5rem; border-top: 1px solid var(--line-dark); font-size: .95rem; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.site-footer a { color: var(--text-on-ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-footer p { margin: 0 0 .4rem; }

/* ---------- Páginas legales ---------- */
.legal { padding-block: 3rem 5rem; max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .5rem; }
.legal h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: #15297c; }
.legal .updated { color: var(--text-soft); font-size: .95rem; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1rem 0; }
.legal th, .legal td { text-align: left; padding: .6rem .8rem; border: 1px solid #cfe0e8; vertical-align: top; }
.todo { background: #d6eef2; color: #15297c; outline: 1px dashed var(--signal); padding: 0 .3em; border-radius: 4px; font-weight: 600; }
.draft-note { background: #d6eef2; color: #15297c; padding: .8rem 1rem; border-radius: 10px; font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .problem, .journey, .diag, .sector, .honest { grid-template-columns: 1fr; }
  .journey__intro { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .extras { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero h1 { max-width: 16ch; }
}
@media (max-width: 640px) {
  .matrix-hint { display: block; }
  .matrix { min-width: 620px; font-size: .9rem; }
  .matrix th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--white); width: 150px; min-width: 150px; box-shadow: 1px 0 0 var(--paper-2); }
  .matrix thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--ink); width: 150px; min-width: 150px; }
  .matrix th, .matrix td { padding: .8rem .7rem; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .steps, .extras, .form__row { grid-template-columns: 1fr; }
  .site-header .btn { padding-inline: .9rem; font-size: .88rem; }
  .brand { font-size: 1.15rem; }
  .brand svg { width: 28px; height: 28px; }
  .hero__actions .btn { width: 100%; }
  .phone__body { min-height: 0; }
  .sector h3 { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-run .msg { opacity: 1; transform: none; }
  .typing i { animation: none; }
  * { transition: none !important; }
}

/* Bandas oscuras: filas de texto legibles */
.band--ink .rows li { border-color: var(--line-dark); }
.band--ink .rows p { color: var(--text-on-ink-soft); }
.band--ink .lead { color: var(--text-on-ink-soft); }
