/*
   site.css — Chavaias 2026-09
   Sistema común para home, fichas de empleados digitales, asesorías, contacto y gracias.
   Sustituye a styles.css + apple-theme.css en las páginas reconstruidas.
*/

:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-tint: #eef4fb;
    --ink: #1d1d1f;
    --ink-2: #424245;
    --muted: #6e6e73;
    --line: #d9d9de;
    --blue: #0066cc;
    --blue-dark: #004f9e;
    --blue-soft: #e6f0fa;
    --green: #1a7f4b;
    --green-soft: #e7f5ed;
    --amber: #9a5b00;
    --amber-soft: #fdf1dc;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --night: #081630;
    --night-2: #0E2449;
    --night-3: #16325E;
    --lamp: #FFB547;
    --ok-light: #7FE0A8;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --wrap: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(0, 102, 204, 0.45);
    outline-offset: 2px;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; font-family: var(--font-display); }
h1 { font-size: clamp(2rem, 4.3vw, 3.15rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; font-weight: 700; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 650; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.eyebrow {
    display: inline-block;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--blue);
    margin: 0 0 12px;
}
.lead { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--ink-2); line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- HEADER ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-nav {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-inline: 20px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: 0.04em; font-size: 0.98rem; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--ink); }
.nav-group { position: relative; }
.nav-group > button {
    font: inherit; font-size: 0.95rem; color: var(--ink-2); background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.nav-group > button::after { content: " ▾"; font-size: 0.75em; }
.nav-drop {
    position: absolute; top: 100%; left: -14px; min-width: 250px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    padding: 8px; display: none;
}
.nav-group:hover .nav-drop, .nav-group:focus-within .nav-drop { display: grid; }
.nav-drop a { padding: 9px 12px; border-radius: 8px; display: block; }
.nav-drop a:hover { background: var(--bg-soft); }
.nav-drop small { display: block; color: var(--muted); font-size: 0.8rem; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
    display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
    width: 42px; height: 38px; cursor: pointer; padding: 0; color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; margin: auto; display: block; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute; top: 58px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 20px 18px; max-height: calc(100vh - 58px); overflow-y: auto;
    }
    .site-header.open .nav-menu { display: flex; }
    .nav-menu > a, .nav-group > button { padding: 12px 0; border-bottom: 1px solid var(--bg-soft); text-align: left; width: 100%; }
    .nav-drop { position: static; display: grid; box-shadow: none; border: 0; padding: 0 0 8px 10px; min-width: 0; }
    .nav-group > button::after { content: ""; }
    .nav-group > button { font-weight: 650; color: var(--ink); cursor: default; }
    .nav-cta .btn-sm-text { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
    padding: 14px 24px; border-radius: 999px; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--ease-out);
    text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #17804a; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row.center { justify-content: center; }

/* ---------- SECTIONS ---------- */
.section { padding-block: 84px; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: 14px; }
@media (max-width: 640px) { .section { padding-block: 60px; } }

/* ---------- HERO ---------- */
.hero { padding-block: 72px 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; max-width: 620px; }
.hero-price { margin-top: 18px; font-size: 0.95rem; color: var(--ink-2); }
.hero-price strong { color: var(--ink); }
.trust-line { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 0.9rem; color: var(--muted); padding: 0; list-style: none; }
.trust-line li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.hero-card {
    background: var(--bg-soft); border-radius: 22px; padding: 22px; border: 1px solid var(--line);
}
.hero-card h3 { font-size: 1rem; margin-bottom: 14px; color: var(--muted); font-weight: 600; }
.chat-demo { display: grid; gap: 10px; font-size: 0.92rem; }
.chat-demo .b { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 12px; max-width: 92%; }
.chat-demo .u { background: var(--blue); color: #fff; border-radius: 14px 14px 4px 14px; padding: 10px 12px; max-width: 88%; justify-self: end; }
.chat-demo .meta { font-size: 0.78rem; color: var(--muted); }
.chat-demo .ok { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 0.85rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero { padding-block: 44px 40px; } }

/* ---------- GRIDS & CARDS ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
    display: flex; flex-direction: column; gap: 10px;
}
.section-soft .card { border-color: transparent; }
.card p { color: var(--ink-2); margin: 0; }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 600; text-decoration: none; }
a.card { text-decoration: none; color: inherit; transition: border-color .2s, transform .2s, box-shadow .2s; }
a.card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .pain { font-size: 0.95rem; color: var(--muted); }
.tag {
    display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: var(--blue-soft); color: var(--blue);
}
.tag-pilot { background: var(--amber-soft); color: var(--amber); }
.tag-ok { background: var(--green-soft); color: var(--green); }

/* Sistemas por sector */
.system-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.system-card h3 { font-size: 1.4rem; }
.system-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.97rem; }
.system-card li { margin-bottom: 6px; }
.system-card .btn-row { margin-top: auto; }
.system-price { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--bg-soft); color: var(--ink-2); font-size: 0.95rem; }
.system-price strong { color: var(--ink); font-size: 1.05rem; }

/* Empleados digitales */
.job-card { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.job-head { display: flex; align-items: center; gap: 14px; }
.job-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.job-head .role { font-size: 0.85rem; color: var(--muted); display: block; }
.job-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.97rem; }
.job-card li { margin-bottom: 4px; }
.job-card .more { margin-top: auto; font-weight: 600; text-decoration: none; }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.steps li::before {
    content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { font-size: 0.95rem; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- PRECIOS ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.price-card.featured { border: 2px solid var(--blue); box-shadow: var(--shadow); }
.price-card .badge { position: absolute; top: -12px; left: 24px; background: var(--blue); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; }
.price-card h3 { font-size: 1.15rem; }
.price-card .for { color: var(--muted); font-size: 0.93rem; margin: 0; }
.price { display: flex; flex-direction: column; gap: 2px; padding-block: 8px; border-block: 1px solid var(--bg-soft); }
.price .setup { font-size: 0.95rem; color: var(--ink-2); }
.price .monthly { font-size: 2.1rem; font-weight: 750; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.price .monthly small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.95rem; color: var(--ink-2); }
.price-card li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.price-card .btn { margin-top: auto; }
.price-note { margin-top: 22px; font-size: 0.92rem; color: var(--muted); text-align: center; }

/* Tabla de tramos (Sistema por tamaño de despacho/clínica) */
.price-grid-systems { margin-bottom: 18px; }
.tier-table { display: grid; border: 1px solid var(--bg-soft); border-radius: 14px; overflow: hidden; margin: 6px 0 4px; }
.tier-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; padding: 11px 16px; align-items: center; border-top: 1px solid var(--bg-soft); }
.tier-row:first-child { border-top: none; }
.tier-head { background: var(--bg-soft); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.tier-name { font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.tier-setup { font-size: 0.86rem; color: var(--ink-2); }
.tier-monthly { font-size: 1.02rem; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.tier-monthly small, .tier-setup small { font-weight: 500; color: var(--muted); font-size: 0.78em; }
@media (max-width: 480px) { .tier-row { grid-template-columns: 1fr 1fr; row-gap: 2px; } .tier-row .tier-name { grid-column: 1 / -1; } .tier-head span:not(:first-child) { text-align: right; } }

/* Bloque "por qué este precio" */
.price-justify { margin-top: 14px; padding: 16px 18px; background: var(--bg-soft); border-radius: 14px; }
.price-justify h4 { font-size: 0.92rem; margin: 0 0 8px; }
.price-justify ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.87rem; color: var(--ink-2); }
.price-justify li::before { content: "→ "; color: var(--blue); font-weight: 700; }

.pilot {
    margin-top: 30px; background: var(--ink); color: #fff; border-radius: 22px; padding: 32px;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
}
.pilot h3 { color: #fff; font-size: 1.45rem; margin-bottom: 10px; }
.pilot p { color: #d2d2d7; margin: 0 0 10px; }
.pilot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #f5f5f7; }
.pilot li::before { content: "✓ "; color: #6ee7a0; font-weight: 700; }
.pilot .btn-primary { background: #fff; color: var(--ink); }
.pilot .btn-primary:hover { background: #e8e8ed; }
@media (max-width: 760px) { .pilot { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- TABLA ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 600px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--bg-soft); }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg-soft); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td.us { font-weight: 650; color: var(--ink); background: var(--blue-soft); }

/* ---------- FUNDADOR ---------- */
.founder { display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: center; }
.founder img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; }
.founder blockquote { margin: 0 0 16px; font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
@media (max-width: 640px) { .founder { grid-template-columns: 1fr; text-align: center; } .founder img { margin-inline: auto; width: 140px; height: 140px; } .founder .btn-row { justify-content: center; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

/* ---------- CTA FINAL ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 760px; margin-inline: auto; }
.cta-band p { max-width: 620px; margin: 16px auto 28px; color: var(--ink-2); font-size: 1.1rem; }

/* ---------- LABORATORIO ---------- */
.lab-card { background: #fff; border: 1px dashed #b9b9c0; border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.lab-card p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.lab-card a { font-weight: 600; text-decoration: none; margin-top: auto; }

/* ---------- FICHAS DE EMPLEADO ---------- */
.agent-hero { padding-block: 60px 48px; }
.agent-hero .portrait { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; background: var(--bg-soft); }
.save-box { background: var(--green-soft); border-radius: 14px; padding: 16px 20px; color: var(--ink); max-width: 680px; margin-bottom: 26px; }
.save-box strong { color: var(--green); }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.before-after > div { padding: 26px; }
.before-after .before { background: var(--bg-soft); }
.before-after h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.before-after .before h3 { color: var(--muted); }
.before-after .after h3 { color: var(--green); }
.before-after ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.before-after li { margin-bottom: 6px; }
@media (max-width: 700px) { .before-after { grid-template-columns: 1fr; } }
.audio-demo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; max-width: 760px; }
.audio-line { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; }
.audio-line .who { font-size: 0.8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.audio-line .who.bot { color: var(--blue); }
.audio-line p { margin: 0 0 6px; font-size: 0.95rem; color: var(--ink-2); }
.audio-line audio { width: 100%; height: 34px; }
@media (max-width: 560px) { .audio-line { grid-template-columns: 1fr; gap: 4px; } }
.notice { background: var(--amber-soft); color: #5c3a00; border-radius: 12px; padding: 14px 18px; font-size: 0.93rem; }

/* ---------- FORMULARIO ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
    font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
    border: 1px solid #c7c7cc; border-radius: 10px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.form-legal { font-size: 0.85rem; color: var(--muted); margin: 14px 0 0; }
.form-error { color: #b42318; font-size: 0.9rem; margin-top: 10px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.side-box { background: var(--bg-soft); border-radius: 18px; padding: 24px; display: grid; gap: 14px; }
.side-box h3 { font-size: 1.05rem; }
.side-box ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.95rem; }
.side-box .big-phone { font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding-block: 44px 30px; font-size: 0.93rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- LEGAL ---------- */
.legal h1 { margin-bottom: 24px; }
.legal h3 { margin: 32px 0 10px; font-size: 1.15rem; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal div { margin: 16px 0; }

/* Banner de cookies (clases que crea js/cookies.js) */
.ch-cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200; max-width: 560px; margin-inline: auto; background: #1d1d1f; color: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.ch-cookie-banner.hide { display: none; }
.ch-cookie-content { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ch-cookie-text { flex: 1 1 260px; }
.ch-cookie-text p { margin: 0; color: #e5e5ea; font-size: 0.92rem; }
.ch-cookie-text a { color: #9ecbff; }
.ch-cookie-tag { display: none; }
.ch-cookie-actions { display: flex; gap: 10px; }
.ch-cookie-btn { font: inherit; font-size: 0.92rem; font-weight: 600; border-radius: 999px; padding: 9px 16px; cursor: pointer; border: 1px solid #5a5a5f; background: transparent; color: #fff; }
.ch-cookie-btn.primary { background: #fff; color: #1d1d1f; border-color: #fff; }


/* =====================================================================
   2026-09 · Turno de noche (hero), amanecer con el scroll, micro-demos
   y transiciones entre páginas. Todo respeta prefers-reduced-motion.
   ===================================================================== */

/* ---------- Hero nocturno ---------- */
.hero-night {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 58%, var(--night-3) 100%);
    padding-block: 72px 84px;
}
.hero-night .night-sky {
    position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        radial-gradient(1.2px 1.2px at 8% 14%, rgba(255,255,255,.75) 50%, transparent 52%),
        radial-gradient(1px 1px at 22% 32%, rgba(255,255,255,.5) 50%, transparent 52%),
        radial-gradient(1.4px 1.4px at 37% 9%, rgba(255,255,255,.7) 50%, transparent 52%),
        radial-gradient(1px 1px at 52% 24%, rgba(255,255,255,.45) 50%, transparent 52%),
        radial-gradient(1.2px 1.2px at 66% 12%, rgba(255,255,255,.65) 50%, transparent 52%),
        radial-gradient(1px 1px at 78% 36%, rgba(255,255,255,.4) 50%, transparent 52%),
        radial-gradient(1.3px 1.3px at 91% 18%, rgba(255,255,255,.7) 50%, transparent 52%),
        radial-gradient(1px 1px at 14% 58%, rgba(255,255,255,.35) 50%, transparent 52%),
        radial-gradient(1px 1px at 46% 66%, rgba(255,255,255,.3) 50%, transparent 52%),
        radial-gradient(1px 1px at 84% 72%, rgba(255,255,255,.35) 50%, transparent 52%),
        radial-gradient(640px 360px at 78% 30%, rgba(255,181,71,.13), transparent 70%),
        radial-gradient(520px 320px at 12% 90%, rgba(0,102,204,.35), transparent 70%);
}
/* El amanecer: una capa que aparece mientras el hero sale de pantalla. */
.hero-night::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
    background: linear-gradient(180deg, #F6C88C 0%, #F3DCC4 42%, #F5F5F7 100%);
}
@supports (view-timeline: --a block) {
    @media (prefers-reduced-motion: no-preference) {
        /* Línea de tiempo del propio hero: el amanecer empieza cuando su parte baja ya se ha visto entera. */
        .hero-night { view-timeline: --hero block; }
        .hero-night::after { animation: dawn linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
        .hero-night .night-sky { animation: dusk linear both; animation-timeline: --hero; animation-range: exit 0% exit 80%; }
    }
}
@keyframes dawn { to { opacity: 0.92; } }
@keyframes dusk { to { opacity: 0.2; } }

.hero-night h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.hero-night .eyebrow { color: var(--lamp); }
.hero-night .lead { color: rgba(255,255,255,.84); }
.hero-night .hero-price { color: rgba(255,255,255,.78); }
.hero-night .hero-price strong { color: #fff; }
.hero-night .trust-line { color: rgba(255,255,255,.72); }
.hero-night .trust-line li::before { color: var(--ok-light); }
.hero-night .btn-primary { background: #1a7fe6; }
.hero-night .btn-primary:hover { background: #0066cc; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: #fff; color: var(--night); border-color: #fff; }
.hero-night a:focus-visible { outline-color: rgba(255,181,71,.85); }

/* ---------- Consola «Turno de noche» ---------- */
.shift {
    background: rgba(10, 26, 54, .78);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    padding: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
.shift-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.shift-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.shift-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-light); }
.shift-clock { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--lamp); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.shift-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev {
    display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08);
}
.ev img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.1); }
.ev p { margin: 0; }
.ev-meta { font-size: 0.8rem; color: rgba(255,255,255,.62); }
.ev-meta b { color: #fff; font-weight: 600; margin-right: 4px; }
.ev .ev-msg { margin: 3px 0 6px; font-size: 0.93rem; color: #fff; line-height: 1.4; }
.ev-status { font-size: 0.86rem; line-height: 1.35; }
.ev-working { color: var(--lamp); }
.ev-working::after { content: "…"; }
.ev-ok { color: var(--ok-light); font-weight: 600; }
.ev-ok::before { content: "✓ "; }
.ev.done .ev-working, .ev:not(.done) .ev-ok { display: none; }
.shift-note { margin: 12px 2px 0; font-size: 0.78rem; color: rgba(255,255,255,.5); }

@media (prefers-reduced-motion: no-preference) {
    .shift.is-live .shift-title::before { animation: live-pulse 2s linear infinite; }
    .ev.enter { animation: ev-in 420ms var(--ease-out) both; }
    .ev.just-done .ev-ok { animation: ok-in 260ms var(--ease-out) both; }
    .ev:not(.done) .ev-working::after { animation: dots 1.2s linear infinite; }
}
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(127,224,168,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(127,224,168,0); } }
@keyframes ev-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
@keyframes ok-in { from { opacity: 0; transform: translateY(3px); } }
@keyframes dots { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

@media (max-width: 860px) {
    .hero-night { padding-block: 48px 64px; }
    .shift { padding: 14px; }
}

/* ---------- Micro-demos de las tarjetas de agentes ---------- */
.stage {
    position: relative; height: 104px; margin: -6px -6px 6px; border-radius: 14px; overflow: hidden;
    background: linear-gradient(180deg, var(--night-2), var(--night-3));
    display: flex; align-items: center; justify-content: center;
}
/* Reposo = composición final. Solo se anima al pasar el ratón, con el foco o al verse en móvil. */
.stage * { animation-play-state: paused !important; }
.stage.play *, .job-card:focus-within .stage * { animation-play-state: running !important; }
@media (hover: hover) and (pointer: fine) {
    .job-card:hover .stage * { animation-play-state: running !important; }
}

.stage-silas { flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 16px; }
.st-bubble { font-size: 0.8rem; padding: 5px 10px; border-radius: 12px; max-width: 78%; line-height: 1.3; }
.st-in { align-self: flex-start; background: rgba(255,255,255,.14); color: #fff; border-bottom-left-radius: 4px; animation: s-in 4.5s var(--ease-out) infinite; }
.st-out { align-self: flex-end; background: #1a7fe6; color: #fff; border-bottom-right-radius: 4px; animation: s-out 4.5s var(--ease-out) infinite; }
.st-chip { align-self: center; font-size: 0.74rem; font-weight: 600; color: var(--night); background: var(--ok-light); padding: 3px 10px; border-radius: 999px; animation: s-chip 4.5s var(--ease-out) infinite; }
@keyframes s-in   { 0%, 100% { opacity: 1; transform: none; } 6% { opacity: 0; transform: translateY(6px); } 16% { opacity: 1; transform: none; } }
@keyframes s-out  { 0%, 100% { opacity: 1; transform: none; } 6%, 36% { opacity: 0; transform: translateY(6px); } 46% { opacity: 1; transform: none; } }
@keyframes s-chip { 0%, 100% { opacity: 1; transform: none; } 6%, 62% { opacity: 0; transform: scale(0.94); } 72% { opacity: 1; transform: none; } }

.stage-dora { gap: 18px; }
.st-doc { position: relative; width: 58px; height: 76px; background: #fff; border-radius: 6px; padding: 9px 8px; display: grid; gap: 6px; align-content: start; overflow: hidden; }
.st-doc i { display: block; height: 5px; border-radius: 3px; background: #d5dbe5; }
.st-doc i:nth-child(1) { width: 60%; background: #9fb3cf; }
.st-doc i:nth-child(3) { width: 80%; }
.st-doc i:nth-child(5) { width: 45%; background: #9fb3cf; }
.st-beam {
    position: absolute; left: calc(50% - 88px); width: 70px; height: 3px; top: 14px; border-radius: 2px;
    background: var(--lamp); box-shadow: 0 0 12px 2px rgba(255,181,71,.7); opacity: 0;
    animation: d-beam 4.5s var(--ease-in-out) infinite;
}
.st-fields { display: grid; gap: 5px; font-size: 0.76rem; font-weight: 600; color: var(--ok-light); }
.st-fields span:nth-child(1) { animation: d-f1 4.5s var(--ease-out) infinite; }
.st-fields span:nth-child(2) { animation: d-f2 4.5s var(--ease-out) infinite; }
.st-fields span:nth-child(3) { animation: d-f3 4.5s var(--ease-out) infinite; }
@keyframes d-beam { 0%, 8% { opacity: 0; transform: translateY(0); } 12% { opacity: 1; } 56% { opacity: 1; transform: translateY(72px); } 62%, 100% { opacity: 0; transform: translateY(72px); } }
@keyframes d-f1 { 0%, 100% { opacity: 1; transform: none; } 6%, 30% { opacity: 0; transform: translateX(-4px); } 38% { opacity: 1; transform: none; } }
@keyframes d-f2 { 0%, 100% { opacity: 1; transform: none; } 6%, 42% { opacity: 0; transform: translateX(-4px); } 50% { opacity: 1; transform: none; } }
@keyframes d-f3 { 0%, 100% { opacity: 1; transform: none; } 6%, 54% { opacity: 0; transform: translateX(-4px); } 62% { opacity: 1; transform: none; } }

.stage-gaia { flex-direction: column; gap: 10px; }
.st-wave { display: flex; align-items: center; gap: 4px; height: 44px; }
.st-wave i { display: block; width: 5px; height: 44px; border-radius: 3px; background: linear-gradient(180deg, #9ecbff, #1a7fe6); transform: scaleY(var(--h, .5)); animation: g-wave 1.1s var(--ease-in-out) infinite; }
.st-wave i:nth-child(1)  { --h: .30; animation-delay: -0.1s; }
.st-wave i:nth-child(2)  { --h: .55; animation-delay: -0.5s; }
.st-wave i:nth-child(3)  { --h: .80; animation-delay: -0.2s; }
.st-wave i:nth-child(4)  { --h: .45; animation-delay: -0.7s; }
.st-wave i:nth-child(5)  { --h: .95; animation-delay: -0.3s; }
.st-wave i:nth-child(6)  { --h: .60; animation-delay: -0.9s; }
.st-wave i:nth-child(7)  { --h: .85; animation-delay: -0.4s; }
.st-wave i:nth-child(8)  { --h: .40; animation-delay: -0.6s; }
.st-wave i:nth-child(9)  { --h: .70; animation-delay: -0.15s; }
.st-wave i:nth-child(10) { --h: .50; animation-delay: -0.8s; }
.st-wave i:nth-child(11) { --h: .35; animation-delay: -0.45s; }
.st-wave i:nth-child(12) { --h: .20; animation-delay: -0.65s; }
.st-call { font-size: 0.76rem; font-weight: 600; color: #fff; opacity: .85; }
@keyframes g-wave { 0%, 100% { transform: scaleY(var(--h, .5)); } 50% { transform: scaleY(calc(var(--h, .5) * 0.35 + 0.1)); } }

@media (prefers-reduced-motion: reduce) {
    .stage * { animation: none !important; }
    .st-beam { display: none; }
}

/* ---------- Transiciones entre páginas (View Transitions) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}
