/* ============================================================
   HOME — Direction C (flat). Scoped to body.home so the shared
   styles.css keeps serving the other pages untouched.
   ============================================================ */
@font-face {
    font-family: 'Figtree';
    src: url('fonts/figtree-latin-wght.woff2') format('woff2');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

body.home, body.sub {
    --accent: #1f6f4a;
    --ink: #0b0b0b;
    --header-h: 72px;
    --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --text-primary: var(--ink);
    --text-secondary: #3d3d3d;
    --offset-top: var(--header-h);
    background: #fff;
    color: var(--ink);
    font-family: var(--font);
}

/* ---------- Header ---------- */
:is(.home, .sub) header {
    height: var(--header-h);
    padding: 0 2.5rem;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-bottom: 1px solid var(--ink);
}
:is(.home, .sub) header.scrolled { height: var(--header-h); background: #fff; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

:is(.home, .sub) .brand {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.04em;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
:is(.home, .sub) .brand { gap: 0.5rem; }
:is(.home, .sub) .brand img { display: block; width: 56px; height: 28px; }
:is(.home, .sub) .brand-text span { color: var(--accent); }

:is(.home, .sub) .main-nav { flex: 1; justify-content: flex-end; }
:is(.home, .sub) .main-nav ul { display: flex; list-style: none; gap: 0.25rem; }
:is(.home, .sub) .main-nav ul li a {
    display: block;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    border-radius: 0;
    background: none;
}
:is(.home, .sub) .main-nav ul li a:hover { color: var(--accent); background: none; }
:is(.home, .sub) .main-nav ul li a.wa-link { color: var(--accent); }
:is(.home, .sub) .main-nav ul li a.wa-link:hover { text-decoration: underline; text-underline-offset: 4px; }

:is(.home, .sub) .hamburger-btn { box-sizing: content-box; padding: 12px 8px; }
:is(.home, .sub) .hamburger-btn span { background: var(--ink); border-radius: 0; }

/* ---------- Shared buttons / links ---------- */
:is(.home, .sub) .btn {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid var(--ink);
    border-radius: 6px;
}
:is(.home, .sub) .btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
:is(.home, .sub) .btn-accent:hover { background: #fff; color: var(--accent); }
:is(.home, .sub) .btn-outline { background: #fff; border-color: var(--ink); color: var(--ink); }
:is(.home, .sub) .btn-outline:hover { background: var(--ink); color: #fff; }
:is(.home, .sub) .btn-outline:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:is(.home, .sub) .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}
:is(.home, .sub) .text-link:hover { color: var(--accent); }

/* ---------- Hero ---------- */
:is(.home, .sub) .hero {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    border: 0;
}
:is(.home, .sub) .hero::before, :is(.home, .sub) .hero::after { display: none; }

:is(.home, .sub) .hero-inner {
    display: block;
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(var(--offset-top) + 2.5rem) 2.5rem 1.5rem;
    text-align: left;
}
:is(.home, .sub) .hero-col-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
:is(.home, .sub) .hero-col-text, :is(.home, .sub) .hero-col-text > * { text-align: left; }

:is(.home, .sub) .hero-eyebrow {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 1;
    letter-spacing: 0;
    text-transform: none;
}
:is(.home, .sub) .hero-h1 {
    font-size: clamp(2.2rem, 4.6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
    color: var(--ink);
}
:is(.home, .sub) .hero-sub { font-size: 1.25rem; font-weight: 400; line-height: 1.5; color: var(--ink); max-width: none; margin: 0; }
:is(.home, .sub) .hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 0.6rem; }

@media (max-width: 1024px) {
    .home .hero-inner { padding: calc(var(--offset-top) + 1.5rem) 1.5rem 1rem !important; }
    :is(.home, .sub) .main-nav ul li a { padding: 0.7rem 0.55rem; font-size: 0.9rem; }
    :is(.home, .sub) header { padding: 0 1.5rem; }
}

/* Mobile menu (styles.css switches to hamburger at 768px) */
@media (max-width: 768px) {
    :is(.home, .sub) header { height: var(--header-h); padding: 0 1.2rem; }
    :is(.home, .sub) .main-nav {
        top: var(--header-h);
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border-top: 0;
        border-bottom: 1px solid var(--ink);
    }
    :is(.home, .sub) .main-nav ul { flex-direction: column; width: 100%; }
    :is(.home, .sub) .main-nav ul li a { padding: 1rem 0; font-size: 1.1rem; border-bottom: 1px solid #d9d9d9; }
}

@media (max-width: 768px) { :is(.home, .sub) .hamburger-btn { margin-left: auto; } }
:is(.home, .sub) .hamburger-btn { order: 3; }
:is(.home, .sub) .hero-ctas { justify-content: flex-start !important; }

/* ---------- Shared section bits ---------- */
.home .wrap { max-width: 1280px; margin: 0 auto; padding: 0 2.5rem; }
:is(.home, .sub) .label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0; }
:is(.home, .sub) .section-h2 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin: 0 0 2rem; color: var(--ink); }

/* ---------- Qué hago ---------- */
.home .que-hago { display: block; padding: 2rem 0 4rem; }
.home .que-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.home .que-card { border: 1px solid var(--ink); padding: 2.2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.home .que-card h2 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 0; color: var(--ink); }
.home .que-card p:not(.label) { font-size: 1.1rem; color: var(--text-secondary); margin: 0; }
.home .que-card--dark { background: var(--ink); }
.home .que-card--dark h2, .home .que-card--dark p:not(.label) { color: #fff; }
/* Card lists reuse the .seo-list structure with a plain dash marker and a 1px rule above */
.home .que-card .seo-list { margin: 0; padding-top: 1rem; border-top: 1px solid var(--ink); gap: 0.6rem; }
.home .que-card .seo-list li { font-size: 1rem; line-height: 1.4; color: var(--ink); }
.home .que-card .seo-list li::before { content: "–"; top: 0; font-size: 1rem; line-height: inherit; color: var(--accent); }
.home .que-card--dark .seo-list { border-top-color: #fff; }
.home .que-card--dark .seo-list li { color: #fff; }
.home .que-card--dark .seo-list li::before { color: #9fe0bd; }
.home .que-card > img { display: block; width: 100%; height: auto; margin-top: 1rem; border: 1px solid var(--ink); }
.home .que-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.home .que-link:hover { color: #9fe0bd; }
.home .que-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Attention cue on "Ver un ejemplo →" (card 1): reveal.js adds .que-cue when the card has finished entering.
   After a 600ms pause the arrow nudges 5px right and the underline goes 1px → 2px, 3 cycles of 1.2s (4.2s in total), then it stops. */
.home .que-arrow { display: inline-block; transition: transform 150ms ease-out; }
.home .que-link { transition: text-decoration-thickness 150ms ease-out; }
@keyframes que-underline { 0%, 100% { text-decoration-thickness: 1px; } 50% { text-decoration-thickness: 2px; } }
@keyframes que-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.js-reveal .home .que-link.que-cue { animation: que-underline 1.2s ease-in-out 600ms 3; }
.js-reveal .home .que-link.que-cue .que-arrow { animation: que-nudge 1.2s ease-in-out 600ms 3; }
/* Hover (hover-capable devices only) and keyboard focus: persistent state, and the cue stops at once (also on press) */
.home .que-link:focus-visible { text-decoration-thickness: 2px; }
.home .que-link:focus-visible .que-arrow { transform: translateX(4px); }
@media (hover: hover) {
    .home .que-link:hover { text-decoration-thickness: 2px; }
    .home .que-link:hover .que-arrow { transform: translateX(4px); }
    .js-reveal .home .que-link.que-cue:hover, .js-reveal .home .que-link.que-cue:hover .que-arrow { animation: none; }
}
.js-reveal .home .que-link.que-cue:is(:focus, :active),
.js-reveal .home .que-link.que-cue:is(:focus, :active) .que-arrow { animation: none; }
/* Reduced motion: no animation, static stronger underline instead */
@media (prefers-reduced-motion: reduce) {
    .home .que-link { text-decoration-thickness: 2px; transition: none; }
    .home .que-arrow { transition: none; }
    .js-reveal .home .que-link.que-cue, .js-reveal .home .que-link.que-cue .que-arrow { animation: none; }
}
/* External link under the card screenshot */
.home .que-extlink { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.home .que-extlink:hover { color: var(--ink); }
.home .que-extlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Trabajos ---------- */
.home .trabajos { display: block; padding: 0 0 5rem; }
.home .trabajos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.home .work-card { border: 1px solid var(--ink); display: flex; flex-direction: column; background: #fff; position: relative; min-height: 240px; }
.home .work-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* Caption sits over the bottom of the image on flat translucent white (no blur, no gradient) */
.home .work-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.6rem 1rem; background: rgba(255, 255, 255, 0.94); border-top: 1px solid var(--ink); }
.home .work-body h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; margin: 0 0 0.1rem; color: var(--ink); }
.home .work-body p { margin: 0; line-height: 1.4; color: var(--text-secondary); }
.home .work-card--dark { background: var(--ink); color: #fff; padding: 2rem; justify-content: center; gap: 0.4rem; }
.home .work-card--dark .label { color: #9fe0bd; }
.home .work-card--dark .big { font-size: 5rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin: 0; color: #fff; }
.home .work-card--dark p:last-child { font-size: 1.1rem; margin: 0; color: #fff; }

@media (max-width: 1024px) {
    .home .wrap { padding: 0 1.5rem; }
    .home .trabajos-grid { grid-template-columns: 1fr; }
    .home .section-h2 { font-size: 2.2rem; }
}

.home .que-hago, .home .trabajos { margin-top: 0; }

/* ---------- Agente IA ---------- */
.home .agente-ia { display: block; padding: 0 0 5rem; }
.home .agente-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 4rem; align-items: center; }
.home .agente-fig { margin: 0; border: 1px solid var(--ink); background: #fff; }
.home .agente-fig img { display: block; width: 100%; height: auto; }
.home .agente-fig figcaption { padding: 0.6rem 1rem; border-top: 1px solid var(--ink); font-size: 0.9rem; color: var(--ink); }
.home .agente-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
.home .agente-texto .section-h2 { margin: 0; }
.home .agente-texto p:not(.label) { margin: 0; font-size: 1.1rem; line-height: 1.5; color: var(--text-secondary); }
.home .agente-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.home .agente-link:hover { color: var(--accent); }
.home .agente-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1023px) {
    .home .agente-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 1023px) {
    .home .que-grid { grid-template-columns: 1fr; }
    .home .que-card h2 { font-size: 2rem; }
}
:is(.home, .sub) section[id] { scroll-margin-top: var(--header-h); }


/* ============================================================
   Flat restyle of legacy sections (same content, no new text)
   ============================================================ */
:is(.home, .sub) :is(.section-proceso, .section-services, #faq, .section-contacto, .site-footer, .lp-section, .section-portafolio) *,
:is(.home, .sub) :is(.section-proceso, .section-services, #faq, .section-contacto, .site-footer, .lp-section, .section-portafolio) {
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-image: none !important;
    font-family: var(--font);
}
:is(.home, .sub) :is(.section-proceso, .section-services, #faq, .section-contacto) {
    display: block; margin: 0; padding: 0 0 5rem; background: #fff; min-height: 0;
}
:is(.home, .sub) .services-full, :is(.home, .sub) .faq-container, :is(.home, .sub) .contacto-inner { max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 2.5rem; }

/* Banners → headlines (sub = H2, label = small accent) */
.home .services-banner { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; background: none; border: 0; padding: 0; margin: 0 0 2rem; }
.home .services-banner-line { display: none; }
.home .services-banner-label { order: 1; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.home .services-banner-sub { order: 2; font-size: 2.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--ink); text-transform: none; }

/* Cómo trabajo */
.home .proceso-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--ink); }
.home .paso-conector { display: none; }
.home .proceso-step { position: relative; padding: 1.5rem 1.2rem; background: #fff; border: 0; border-right: 1px solid var(--ink); border-radius: 0; text-align: left; }
.home .proceso-step:last-child { border-right: 0; }
.home .paso-numero { position: static; display: block; font-size: 1.1rem; font-weight: 800; color: var(--accent); opacity: 1; margin-bottom: 0.6rem; }
.home .paso-icon { display: none; }
.home .proceso-step h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); margin: 0 0 0.4rem; }
.home .proceso-step p { font-size: 0.95rem; color: var(--text-secondary); margin: 0; }

/* Precios / servicios cards */
:is(.home, .sub) .services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
:is(.home, .sub) .service-card { background: #fff; border: 1px solid var(--ink); border-radius: 0; padding: 1.6rem; }
:is(.home, .sub) .service-card-header { display: flex; align-items: center; }
:is(.home, .sub) .service-card h3, :is(.home, .sub) .service-card-header h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
:is(.home, .sub) .service-card p, :is(.home, .sub) .service-subtitle { color: var(--text-secondary); }
:is(.home, .sub) .price, :is(.home, .sub) .price-seo { color: var(--ink); font-weight: 800; }
:is(.home, .sub) .price-promo, :is(.home, .sub) .price-seo-option, :is(.home, .sub) .price-seo { background: none; border-radius: 0; border-color: var(--ink); }
/* "Consulta precios" text link (replaces the price line): 44px hit area via padding, cancelled by negative margin so the card height stays the same */
:is(.home, .sub) .price-link { display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start; padding: 9px 0; margin: -9px 0; font-size: 1rem; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
:is(.home, .sub) .price-link svg { flex: none; }
:is(.home, .sub) .price-link:hover { color: var(--ink); }
:is(.home, .sub) .price-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Legacy styles.css paints card 3 navy with white text (:nth-child(3), higher specificity) — neutralise */
:is(.home, .sub) .service-card:nth-child(n) { background: #fff; border: 1px solid var(--ink); border-radius: 0; transform: none; transition: none; align-self: start; }
:is(.home, .sub) .service-card:nth-child(n):hover { border-color: var(--ink); transform: none; }
:is(.home, .sub) .service-card:nth-child(n) .service-card-header h3 { color: var(--ink); }
:is(.home, .sub) .service-card:nth-child(n) .acc-trigger { color: var(--ink); }
:is(.home, .sub) .service-card:nth-child(n) .acc-trigger:hover,
:is(.home, .sub) .service-card:nth-child(n) .acc-item.open .acc-trigger { color: var(--accent); }
:is(.home, .sub) .service-card:nth-child(n) .acc-item,
:is(.home, .sub) .service-card:nth-child(n) .acc-item:first-child { border-color: var(--ink); }
:is(.home, .sub) .service-card:nth-child(n) .acc-icon { color: var(--ink); opacity: 1; }
:is(.home, .sub) .service-card:nth-child(n) .acc-panel-inner p { color: var(--text-secondary); }
:is(.home, .sub) .service-card:nth-child(n) .price { color: var(--ink); border-top: 1px solid var(--ink); }
:is(.home, .sub) .service-card .accordion { flex: none; }
:is(.home, .sub) .service-subtitle { font-style: normal; font-size: 0.95rem; margin: 0 0 0.6rem; }
:is(.home, .sub) .seo-list li { color: var(--text-secondary); }
:is(.home, .sub) .seo-list li::before { color: var(--accent); }
:is(.home, .sub) .price-seo-option { color: var(--ink); }
:is(.home, .sub) .price-seo-option strong { color: var(--ink); }
:is(.home, .sub) .acc-item.open .acc-trigger { color: var(--accent); }
:is(.home, .sub) .acc-cta { padding: 0; }

/* Accordions (service + FAQ): rows separated by 1px black */
:is(.home, .sub) .accordion, :is(.home, .sub) .faq-container { border-top: 1px solid var(--ink); }
:is(.home, .sub) .accordion { margin-top: 1rem; }
:is(.home, .sub) .acc-item, :is(.home, .sub) .faq-item { border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; }
:is(.home, .sub) .acc-trigger, :is(.home, .sub) .faq-question {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 52px; padding: 0.9rem 0; background: none; border: 0; border-radius: 0;
    color: var(--ink); font-weight: 700; font-size: 1.05rem; text-align: left; cursor: pointer;
}
:is(.home, .sub) .acc-trigger:hover, :is(.home, .sub) .faq-question:hover { color: var(--accent); background: none; }
:is(.home, .sub) .acc-panel-inner p, :is(.home, .sub) .faq-answer p { color: var(--text-secondary); font-size: 1rem; padding-bottom: 1rem; }
:is(.home, .sub) .acc-cta { display: inline-flex; align-items: center; line-height: normal; background: none; border: 0; border-radius: 0; color: var(--accent); font-weight: 700; text-decoration: underline; min-height: 44px; cursor: pointer; }

/* FAQ answers: auto height when open (the legacy 300px cap clipped them at 200% text) */
:is(.home, .sub) .faq-answer {
    height: 0; max-height: none; overflow: hidden; visibility: hidden; interpolate-size: allow-keywords;
    transition: height 240ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 240ms;
}
:is(.home, .sub) .faq-item.active .faq-answer { height: auto; max-height: none; visibility: visible; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) { :is(.home, .sub) .faq-answer { transition: none; } }

/* FAQ headings */
:is(.home, .sub) #faq .section-header { text-align: left; max-width: 1280px; margin: 0 auto 2rem; padding: 0 2.5rem; }
:is(.home, .sub) #faq .section-header h2 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--ink); }
:is(.home, .sub) #faq .section-subtitle { color: var(--text-secondary); }

/* Contacto */
:is(.home, .sub) .contacto-inner { max-width: 760px; align-items: flex-start; }
:is(.home, .sub) .contacto-header { text-align: left; }
:is(.home, .sub) .contacto-eyebrow { color: var(--accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
:is(.home, .sub) .contacto-title { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--ink); }
:is(.home, .sub) .contacto-sub { color: var(--text-secondary); }
:is(.home, .sub) .contacto-btns { display: grid; grid-template-columns: 1fr; gap: 0.75rem; width: 100%; margin-top: 1.5rem; }
@media (min-width: 600px) { :is(.home, .sub) .contacto-btns { grid-template-columns: repeat(2, 1fr); } }
:is(.home, .sub) .contacto-btns .btn { justify-content: center; gap: 0.6rem; }
:is(.home, .sub) .contacto-btns .btn svg { flex: none; }

/* Footer */
:is(.home, .sub) .site-footer { background: #fff; color: var(--ink); border-top: 1px solid var(--ink); }
:is(.home, .sub) .footer-nav a { color: var(--ink); }
:is(.home, .sub) .footer-nav a:hover { color: var(--accent); }
:is(.home, .sub) .footer-bottom p { color: var(--text-secondary); }
:is(.home, .sub) .footer-bottom { border-top: 1px solid #d9d9d9; }
/* Footer container = header container (full width, same side padding at each breakpoint) */
:is(.home, .sub) .site-footer { padding-left: 2.5rem; padding-right: 2.5rem; }
:is(.home, .sub) .footer-inner, :is(.home, .sub) .footer-bottom { max-width: none; margin-left: 0; margin-right: 0; }
:is(.home, .sub) .footer-bottom { text-align: left; }
@media (max-width: 1024px) { :is(.home, .sub) .site-footer { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (max-width: 768px) { :is(.home, .sub) .site-footer { padding-left: 1.2rem; padding-right: 1.2rem; } }
:is(.home, .sub) .footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Cookie banner: dark flat, readable */
:is(.home, .sub) .cookie-banner { background: var(--ink); border-top: 0; }
:is(.home, .sub) .cookie-banner p { color: #fff; }
:is(.home, .sub) .cookie-banner p a { color: #9fe0bd; }
:is(.home, .sub) #cookie-accept { background: var(--accent); border-radius: 6px; min-height: 44px; }

@media (max-width: 1024px) {
    .home .services-full, :is(.home, .sub) .faq-container, :is(.home, .sub) .contacto-inner, :is(.home, .sub) #faq .section-header { padding: 0 1.5rem; }
    .home .services-grid { grid-template-columns: 1fr; }
    /* The legacy 2rem side padding of the block moves into each step (2rem + the step's 1.2rem), so the dividers reach the outer border and the text stays put */
    .home .proceso-steps { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; }
    .home .proceso-step { border-right: 0; border-bottom: 1px solid var(--ink); padding-left: 3.2rem; padding-right: 3.2rem; }
    .home .proceso-step:last-child { border-bottom: 0; }
    .home .services-banner-sub, :is(.home, .sub) #faq .section-header h2, :is(.home, .sub) .contacto-title { font-size: 2.2rem; }
}
.home .services-banner-sub, .home .services-banner-label { white-space: normal; max-width: 100%; }
.home .proceso-step { display: block; flex: none; width: auto; max-width: none; }
:is(.home, .sub) .acc-item.open .acc-trigger, :is(.home, .sub) .faq-item.active .faq-question { color: var(--accent); }
:is(.home, .sub) .acc-icon, :is(.home, .sub) .faq-icon { color: var(--ink); stroke: currentColor; }
:is(.home, .sub) .faq-answer, :is(.home, .sub) .faq-answer p, :is(.home, .sub) .acc-panel-inner { padding-left: 0; padding-right: 0; }

/* ---------- Scroll reveal (classes added by reveal.js; nothing hidden without JS) ---------- */
.js-reveal .home .rv-solo,
.js-reveal .home .rv-item { opacity: 0; transform: translateY(12px); }
/* The transition lives on the revealed state only, so hiding never animates (no fade-out flash on load) */
.js-reveal .home .rv-solo.rv-in,
.js-reveal .home .rv-in .rv-item {
    opacity: 1; transform: none;
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}
.js-reveal .home .rv-in .rv-d1 { transition-delay: 60ms; }
.js-reveal .home .rv-in .rv-d2 { transition-delay: 120ms; }
.js-reveal .home .rv-in .rv-d3 { transition-delay: 180ms; }
.js-reveal .home .rv-in .rv-d4 { transition-delay: 240ms; }
.js-reveal .home .rv-in .rv-d5 { transition-delay: 300ms; }
/* Hero cards converge on their place together, each from its own side (reveal.js adds rv-in: all three at once side by side, one by one stacked) */
.home .que-hago { --rv-x: 18vw; overflow-x: clip; } /* clip so the sideways start never makes a horizontal scrollbar */
@supports not (overflow: clip) { .home .que-hago { overflow-x: hidden; } }
.js-reveal .home .que-card { opacity: 0; transform: var(--rv-from); }
.js-reveal .home .que-card:nth-child(1) { --rv-from: translateX(calc(var(--rv-x) * -1)) scale(0.6); }
.js-reveal .home .que-card:nth-child(2) { --rv-from: translateY(-60px) scale(0.6); }
.js-reveal .home .que-card:nth-child(3) { --rv-from: translateX(var(--rv-x)) scale(0.6); }
.js-reveal .home .que-card.rv-in {
    opacity: 1; transform: none;
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* The "Cómo trabajo" title fades slower than the shared reveal (opacity only; the rise keeps the shared 400ms) */
.js-reveal .home .section-proceso.rv-in .services-banner { transition: opacity 900ms ease-out, transform 400ms ease-out; }
/* Process steps unroll right to left: the block stays put and is uncovered from its right edge (reveal.js adds rv-unroll, then rv-in, then rv-unroll-done when it ends) */
.js-reveal .home .rv-unroll { clip-path: inset(0 0 0 100%); }
.js-reveal .home .rv-unroll.rv-in {
    clip-path: inset(0 0 0 0);
    transition: clip-path 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* End state = the no-animation state: no clip-path, layer hint or transition left on the block, so its 1px borders never depend on a clip (Safari could leave the last clipped frame unpainted) */
.js-reveal .home .rv-unroll.rv-in.rv-unroll-done { clip-path: none; will-change: auto; transition: none; }
@media (prefers-reduced-motion: reduce) {
    .js-reveal .home .rv-solo,
    .js-reveal .home .rv-item,
    .js-reveal .home .que-card { opacity: 1; transform: none; transition: none; }
}
@media print {
    .js-reveal .home .rv-solo,
    .js-reveal .home .rv-item,
    .js-reveal .home .que-card { opacity: 1; transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce), print {
    .js-reveal .home .rv-unroll { clip-path: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
    .js-reveal .home .section-proceso.rv-in .services-banner { transition: none; }
}

/* ---------- Contact buttons: entry, press, hover fill ---------- */
/* Entry mirrors the shared reveal (12px rise, 400ms ease-out, 60ms stagger) but as a keyframe animation, so press and hover transitions on the same element stay independent */
@keyframes rv-btn-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
:is(.home, .sub) .contacto-btns { --btn-ease: cubic-bezier(0.23, 1, 0.32, 1); }
:is(.home, .sub) .contacto-btns .btn { position: relative; overflow: hidden; isolation: isolate; }
:is(.home, .sub) .contacto-btns .btn,
.js-reveal .home .rv-in .contacto-btns .btn.rv-item { transition: transform 120ms ease-out; }
:is(.home, .sub) .contacto-btns .btn-outline,
.js-reveal .home .rv-in .contacto-btns .btn-outline.rv-item { transition: color 250ms var(--btn-ease), transform 120ms ease-out; }
.js-reveal .home .contacto-btns .btn.rv-item { opacity: 0; transform: none; }
.js-reveal .home .rv-in .contacto-btns .btn.rv-item { opacity: 1; animation: rv-btn-in 400ms ease-out backwards; }
.js-reveal .home .rv-in .contacto-btns .btn.rv-d1 { animation-delay: 60ms; }
.js-reveal .home .rv-in .contacto-btns .btn.rv-d2 { animation-delay: 120ms; }
.js-reveal .home .rv-in .contacto-btns .btn.rv-d3 { animation-delay: 180ms; }
:is(.home, .sub) .contacto-btns .btn:active,
.js-reveal .home .rv-in .contacto-btns .btn.rv-item:active { transform: scale(0.97); }
:is(.home, .sub) .contacto-btns .btn-outline::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--ink); transform: scaleX(0); transform-origin: left;
    transition: transform 250ms var(--btn-ease);
}
/* Neutralise the shared instant hover swap so a tap on touch devices never leaves a sticky hover; the fill only runs where hover exists */
:is(.home, .sub) .contacto-btns .btn-outline:hover { background: #fff; color: var(--ink); }
:is(.home, .sub) .contacto-btns .btn-accent:hover { background: var(--accent); color: #fff; }
/* Keyboard focus snaps (no slide): keyboard-initiated state changes are not animated */
:is(.home, .sub) .contacto-btns .btn-outline:focus-visible,
.js-reveal .home .rv-in .contacto-btns .btn-outline.rv-item:focus-visible { color: #fff; transition: transform 120ms ease-out; }
:is(.home, .sub) .contacto-btns .btn-outline:focus-visible::before { transform: scaleX(1); transition: none; }
@media (hover: hover) and (pointer: fine) {
    :is(.home, .sub) .contacto-btns .btn-outline:hover { color: #fff; }
    :is(.home, .sub) .contacto-btns .btn-outline:hover::before { transform: scaleX(1); }
    :is(.home, .sub) .contacto-btns .btn-accent:hover { background: #fff; color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
    :is(.home, .sub) .contacto-btns .btn,
    :is(.home, .sub) .contacto-btns .btn-outline,
    :is(.home, .sub) .contacto-btns .btn-outline::before,
    .js-reveal .home .rv-in .contacto-btns .btn.rv-item,
    .js-reveal .home .rv-in .contacto-btns .btn-outline.rv-item { transition: none; animation: none; }
    :is(.home, .sub) .contacto-btns .btn:active,
    .js-reveal .home .rv-in .contacto-btns .btn.rv-item:active { transform: none; }
}
@media (prefers-reduced-motion: reduce), print {
    .js-reveal .home .contacto-btns .btn.rv-item { opacity: 1; }
}

/* ---------- Floating WhatsApp button (home and city landings) ----------
   56px circle: a deliberate exception to "no pills / no icons". z-index 900 sits above the content and below
   the mobile menu (999), the header (1000) and the cookie banner (9999); --cookie-h lifts it above the banner. */
.wa-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(var(--cookie-h, 0px) + max(16px, env(safe-area-inset-bottom)));
    z-index: 900;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: #fff;
    border: 1px solid #0b0b0b;
    border-radius: 50%;
    box-shadow: none;
    transition: bottom 200ms ease, opacity 200ms ease, visibility 0s, background-color 150ms ease, transform 120ms ease-out;
}
.wa-float svg { flex: none; width: 28px; height: 28px; }
/* Hidden only while script.js is in charge (html.js-wa): without JS the button stays visible */
.js-wa .wa-float:not(.is-on) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: bottom 200ms ease, opacity 200ms ease, visibility 0s linear 200ms;
}
@media (hover: hover) { .wa-float:hover { background: #0b0b0b; } }
.wa-float:active { transform: scale(0.97); }
.wa-float:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .wa-float, .js-wa .wa-float:not(.is-on) { transition: none; }
}
/* On narrow screens the last footer line would end up under the button at the bottom of the page: leave room for it */
@media (max-width: 768px) {
    body:has(> .wa-float) .site-footer { padding-bottom: calc(80px + max(16px, env(safe-area-inset-bottom))); }
}
