/* ============================================================
   Limpiezas Cáceres · app.css
   Tokens derivados del logo: marino #013d71 · teal #0e96a6–#16b3ae
   Tema claro/oscuro vía data-theme en <html> (JS) con fallback
   a prefers-color-scheme. Sin librerías, sin build step.
   ============================================================ */

:root {
    --navy-900: #06294d;
    --navy: #013d71;
    --navy-600: #0a5a9c;
    --teal: #0e96a6;
    --teal-bright: #16b3ae;
    --aqua: #e0f3f5;

    --bg: #ffffff;
    --bg-soft: #f2f9fa;
    --surface: #ffffff;
    --text: #16293c;
    --text-soft: #46607a;
    --border: #d8e7ee;
    --shadow: 0 8px 24px rgba(1, 61, 113, 0.10);

    --accent: var(--teal);
    --heading: var(--navy);
    --btn-primary-bg: var(--navy);
    --btn-primary-text: #ffffff;
    --footer-bg: var(--navy-900);
    --footer-text: #cfe3ef;

    --radius: 12px;
    --container: 1100px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    --bg: #081c31;
    --bg-soft: #0c2540;
    --surface: #10304f;
    --text: #e8f2f8;
    --text-soft: #a9c3d7;
    --border: #1e4263;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);

    --accent: var(--teal-bright);
    --heading: #dff2f6;
    --btn-primary-bg: var(--teal-bright);
    --btn-primary-text: #04222e;
    --footer-bg: #051527;
    --footer-text: #9db8cc;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3 {
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin: 0 0 0.6em; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.4em; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-600); }
[data-theme="dark"] a:hover { color: #6fd9d4; }

img { max-width: 100%; height: auto; }

ul { padding-left: 1.2em; }

:focus-visible {
    outline: 3px solid var(--teal-bright);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.content-narrow { max-width: 720px; }

.lead { font-size: 1.15rem; color: var(--text-soft); }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.6em;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    background: var(--navy);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; }

/* ---------- Botones ---------- */

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}
.btn-primary:hover {
    color: var(--btn-primary-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-ghost {
    background: transparent;
    color: var(--heading);
    border-color: var(--accent);
}
.btn-ghost:hover { background: var(--aqua); color: var(--navy); }
[data-theme="dark"] .btn-ghost:hover { background: var(--surface); color: var(--heading); }

.btn-small { padding: 0.4rem 1rem; font-size: 0.9rem; }

/* ---------- Cabecera ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--heading);
    text-decoration: none;
    margin-right: auto;
}
.brand img { border-radius: 50%; background: #fff; }

.site-nav ul {
    display: flex;
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.3rem 0.1rem;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--heading);
    white-space: nowrap;
}
.header-phone:hover { color: var(--accent); }

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--heading);
    cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.lang-switch {
    display: flex;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
}
.lang-switch span[aria-current] { color: var(--accent); }
.lang-switch a { color: var(--text-soft); text-decoration: none; }
.lang-switch a:hover { color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0 9px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--heading);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background:
        radial-gradient(1100px 420px at 85% -10%, rgba(22, 179, 174, 0.22), transparent 60%),
        linear-gradient(160deg, var(--aqua), var(--bg) 70%);
    padding: 4.5rem 0 6.5rem;
}

[data-theme="dark"] .hero {
    background:
        radial-gradient(1100px 420px at 85% -10%, rgba(22, 179, 174, 0.18), transparent 60%),
        linear-gradient(160deg, #0b2b49, var(--bg) 75%);
}

.hero-inner { max-width: 760px; }

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-soft);
    max-width: 620px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.6rem 0;
}

.trust-list {
    list-style: none;
    padding: 0;
    margin: 1.8rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.trust-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-list li::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: none;
    background-color: var(--accent);
    -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"/></svg>') center / contain no-repeat;
}

/* Onda firma (del swoosh del logo) */
.wave {
    pointer-events: none;
    line-height: 0;
}
.wave svg { display: block; width: 100%; height: 70px; }

.wave-hero {
    position: absolute;
    inset: auto 0 -1px 0;
    color: var(--bg);
}

/* ---------- Secciones ---------- */

.section { padding: 3.5rem 0; }

.section-sub {
    color: var(--text-soft);
    margin-top: -0.6rem;
    margin-bottom: 2rem;
}

.section-tinted { background: var(--bg-soft); }

.section-cta {
    background: linear-gradient(135deg, var(--navy), var(--teal));
    color: #eafcfd;
    text-align: center;
}
.section-cta h2 { color: #ffffff; }
.section-cta .btn-primary {
    background: #ffffff;
    color: var(--navy);
}

.page-head {
    background: linear-gradient(160deg, var(--aqua), var(--bg));
    padding: 2.8rem 0 2rem;
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .page-head {
    background: linear-gradient(160deg, #0b2b49, var(--bg));
}
.page-head p { color: var(--text-soft); max-width: 640px; margin-bottom: 0; }
.page-head .eyebrow a { color: var(--accent); text-decoration: none; }

/* ---------- Tarjetas ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
}

.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card p { color: var(--text-soft); flex-grow: 1; margin-bottom: 0.6rem; }

.card-title { font-size: 1.15rem; margin: 0 0 0.4em; }

.card-link { font-weight: 700; text-decoration: none; }

.service-icon { color: var(--accent); }

.service-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.service-head h1 { margin: 0; }

/* ---------- Formularios ---------- */

.form { display: grid; gap: 1.1rem; max-width: 560px; }

.form-field { display: grid; gap: 0.35rem; }

.form-field label { font-weight: 700; font-size: 0.95rem; }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 3px solid color-mix(in srgb, var(--teal-bright) 45%, transparent);
    border-color: var(--accent);
}

.form-field [aria-invalid="true"] { border-color: #c0392b; }

.field-error { color: #c0392b; font-size: 0.88rem; margin: 0; }
[data-theme="dark"] .field-error { color: #ff8a7a; }

.form-note { color: var(--text-soft); font-size: 0.85rem; margin: 0; }

.alert {
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
}
.alert-success { background: #e2f6ec; color: #14623c; border: 1px solid #9fdcbd; }
.alert-error { background: #fdebe8; color: #8f2417; border: 1px solid #f3b6ab; }
[data-theme="dark"] .alert-success { background: #0e3a28; color: #a4ecc8; border-color: #1d6b48; }
[data-theme="dark"] .alert-error { background: #46160e; color: #ffb9ad; border-color: #7c2c1d; }

/* Honeypot: invisible para humanos, presente para bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Contacto ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-channels {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.9rem;
}

.channel-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-soft);
}

.map {
    width: 100%;
    height: 280px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    margin-top: 70px;
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.5rem 0 1rem;
}

.site-footer .wave {
    position: absolute;
    top: -69px;
    left: 0;
    right: 0;
    color: var(--footer-bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2rem;
}

.footer-brand { font-weight: 800; font-size: 1.1rem; color: #ffffff; }

.site-footer h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8fb6cf;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }

.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--teal-bright); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.85rem;
}

/* ---------- WhatsApp flotante ---------- */

.whatsapp-float {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 60;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.07); color: #ffffff; }

/* ---------- Banner de cookies ---------- */

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 70;
    max-width: 640px;
    margin-inline: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner .btn { flex: none; background: var(--btn-primary-bg); color: var(--btn-primary-text); border: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .header-phone span { display: none; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: block; }
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
    }
    .site-nav a {
        display: block;
        padding: 0.7rem 0;
        border-bottom: none;
        font-size: 1.05rem;
    }

    .lang-switch { font-size: 0.8rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
