/* ============================================
   LABORATORIO DIESEL MG — estilo v2
   Taller de precisión: rojo de marca + grises originales.
   Ver DESIGN.md. Radios: fotos 0, controles 3px.
   ============================================ */

/* ---------- Fuente autoalojada (Archivo variable, latin) ---------- */

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-var-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-stretch: 75% 100%;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens (paleta original recuperada) ---------- */

:root {
    --red:         #c41e3a;   /* rojo de marca */
    --red-strong:  #a11930;   /* -8% de luminosidad: hover / active */
    --red-tint:    #e13e59;   /* +12% de luminosidad: texto pequeño y foco sobre oscuro (4.5:1) */
    --ink:         #111111;
    --ink-2:       #1a1a1a;
    --ink-deep:    #0c0c0c;   /* footer */
    --steel:       #888888;   /* secundario sobre ink */
    --steel-ink:   #555555;   /* secundario sobre paper */
    --paper:       #f0f0f0;
    --white:       #ffffff;
    --field-line:  #666666;   /* borde de campos: 3:1 sobre ink-2 */

    /* Contexto oscuro por defecto; .section--paper lo redefine */
    --c-bg:        var(--ink);
    --c-text:      var(--paper);
    --c-muted:     var(--steel);
    --line:        rgba(255, 255, 255, .12);
    --c-red:       var(--red-tint);
    --c-focus:     var(--red-tint);

    --font:        "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

    --container:   1200px;
    --gutter:      clamp(1rem, 4vw, 2rem);
    --col-gap:     24px;
    --section-y:   clamp(4rem, 8vw, 7rem);
    --header-h:    84px;
    --radius:      3px;

    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) - 12px + 16px);
    -webkit-text-size-adjust: 100%;
}
html.menu-open { overflow: hidden; }

body {
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    font-stretch: 100%;
    line-height: 1.6;
    color: var(--paper);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
    font-family: var(--font);
    font-weight: 800;
    font-stretch: 80%;
    letter-spacing: -.01em;
    word-spacing: .08em;
    line-height: 1.04;
    color: var(--c-text);
}
h1 { font-size: clamp(2.75rem, 1rem + 4vw, 5rem); }
h2 { font-size: clamp(2rem, 1rem + 3.4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); font-weight: 700; line-height: 1.15; }
h4 { font-size: 1.125rem; font-weight: 700; }

p { max-width: 62ch; }

:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
    width: 22px;
    height: 22px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -5rem;
    z-index: 2000;
    padding: .75rem 1.25rem;
    background: var(--red);
    color: var(--white);
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Contextos de color ---------- */

.section { padding-block: var(--section-y); background: var(--c-bg); color: var(--c-text); }
.section--ink { --c-bg: var(--ink); }
.section--paper,
.section--white {
    --c-bg:    var(--paper);
    --c-text:  var(--ink);
    --c-muted: var(--steel-ink);
    --line:  rgba(17, 17, 17, .16);
    --c-red:   var(--red);
    --c-focus: var(--red);
}
.section--white { --c-bg: var(--white); }

.section-header { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-header p { margin-top: 1.25rem; color: var(--c-muted); }

/* ---------- Botones y enlaces ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s var(--ease-out), transform 160ms var(--ease-out);
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-large { padding: 1rem 2rem; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.link-underline {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .3em;
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { background: var(--red-strong); }
    .link-underline:hover { text-decoration-color: var(--c-red); color: var(--c-red); text-decoration-thickness: 2px; }
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    padding-top: 12px;
    background: var(--ink);
    border-bottom: 1px solid transparent;
    transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}
.site-header.is-scrolled { transform: translateY(-12px); border-bottom-color: var(--line); }

.nav-content { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.logo { display: inline-flex; align-items: center; transform-origin: left center; transition: transform .3s var(--ease-out); }
.logo-img { height: 60px; width: auto; }
.site-header.is-scrolled .logo { transform: scale(.85); }

.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2vw, 2rem); }
.nav-links a {
    position: relative;
    display: block;
    padding-block: .6rem;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--paper);
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: .15rem;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease-out);
}
.nav-links a.active::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
    .nav-links a:hover::after { transform: scaleX(1); }
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--paper);
}
.mobile-menu-btn .icon-close { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-open { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s var(--ease-out), visibility 0s linear .25s;
    overflow-y: auto;
}
.mobile-nav.open { visibility: visible; opacity: 1; transition-delay: 0s; }
.mobile-nav a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    font-weight: 800;
    font-stretch: 80%;
    letter-spacing: -.01em;
    text-decoration: none;
}

/* ---------- Titulares por líneas (máscara) ---------- */

.line { display: block; overflow: hidden; padding-block: .12em; margin-block: -.12em; }
.line__inner { display: block; }
.h1-line { display: block; }

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

.hero { position: relative; overflow: clip; padding-block: clamp(3.5rem, 7vw, 6.5rem); }

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: center;
}
.hero__content { grid-column: 1 / 7; grid-row: 1; }
.hero h1 { margin-bottom: 1.75rem; }
.hero__lead { color: var(--steel); font-size: 1.1875rem; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.25rem; }
.hero__note { margin-top: 1.75rem; font-size: .9375rem; color: var(--steel); }

/* La foto sangra hasta el borde derecho de la ventana */
.hero__media {
    grid-column: 7 / 13;
    grid-row: 1;
    margin-right: calc(-1 * max(var(--gutter), (100vw - var(--container)) / 2));
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; }

/* ---------- Quiénes somos ---------- */

.about-text { columns: 2; column-gap: 3rem; margin-top: clamp(2rem, 4vw, 3rem); max-width: 66rem; }
.about-text p { max-width: none; margin-bottom: 1.1rem; break-inside: avoid; color: var(--c-muted); }
.about-text strong { color: var(--c-text); font-weight: 500; }

.about-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--line);
}
.about-strip li { padding: 1.75rem 1.5rem 0; border-left: 1px solid var(--line); }
.about-strip li:first-child { padding-left: 0; border-left: 0; }
.about-strip h3 { margin-bottom: .5rem; }
.about-strip p { color: var(--c-muted); font-size: .9375rem; }

.lab-facts { margin-top: clamp(3rem, 6vw, 5rem); max-width: 60rem; }
.lab-facts h3 { margin-bottom: 1.25rem; }
.lab-facts dl { border-bottom: 1px solid var(--line); }
.lab-facts dl > div { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 1rem; padding-block: .9rem; border-top: 1px solid var(--line); }
.lab-facts dt { color: var(--c-muted); font-size: .9375rem; }
.lab-facts dd { color: var(--c-text); }
.lab-facts a { text-underline-offset: .25em; text-decoration-thickness: 1px; }

/* ---------- Servicios (filas) ---------- */

.service-list { border-bottom: 1px solid var(--line); }
.service-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    padding-block: 2.25rem;
}
.service-row::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: var(--line);
    transform-origin: left;
}
.service-row::after {
    content: "";
    position: absolute;
    left: -1.25rem; top: 0; bottom: 0;
    width: 2px;
    background: var(--red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .3s var(--ease-out);
}
.service-link { grid-column: 6 / 13; margin-top: 1rem; justify-self: start; }
.service-more { margin-top: 1.75rem; color: var(--c-muted); font-size: .9375rem; }
.service-row h3 { grid-column: 1 / 5; transition: color .2s var(--ease-out); }
.service-row p { grid-column: 6 / 13; color: var(--c-muted); }

@media (hover: hover) and (pointer: fine) {
    .service-row:hover h3 { color: var(--c-red); }
    .service-row:hover::after { transform: scaleY(1); }
}

/* ---------- Equipos (tabla) ---------- */

.equip-table { width: 100%; border-collapse: collapse; text-align: left; }
.equip-table thead th { padding: 0 1.5rem 1rem 0; border-bottom: 1px solid var(--line); color: var(--c-muted); font-size: .9375rem; font-weight: 500; }
.equip-table tbody tr { border-bottom: 1px solid var(--line); }
.equip-table th[scope="row"],
.equip-table td { padding: 1.5rem 1.5rem 1.5rem 0; vertical-align: top; }
.equip-table th[scope="row"] { width: 26%; font-size: 1.25rem; font-weight: 700; font-stretch: 80%; line-height: 1.2; color: var(--c-text); }
.equip-table td:nth-child(2) { width: 20%; color: var(--paper); }
.equip-table td:nth-child(3) { color: var(--c-muted); max-width: 52ch; }
.equip-table .origin { display: block; margin-top: .3rem; color: var(--steel); font-size: .9375rem; font-weight: 400; font-stretch: 100%; }

/* ---------- Consejos ---------- */

.tips-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem clamp(2rem, 5vw, 4.5rem); }
.tip::before { content: ""; display: block; width: 16px; height: 2px; margin-bottom: 1.1rem; background: var(--red); }
.tip h3 { margin-bottom: .75rem; }
.tip p { color: var(--c-muted); }

/* ---------- Sistemas que reparamos (grilla uniforme) ---------- */

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2rem; }

.gallery-media { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 8%; overflow: hidden; background: var(--white); }
.gallery-media picture { display: contents; }
/* Nunca más ancha ni más alta que su tamaño natural: no se pixela */
.gallery-image { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.gallery-card figcaption { padding-top: 1rem; }
.gallery-card h3 { font-size: 1.25rem; }
.gallery-category { display: block; margin-top: .15rem; font-size: .9375rem; font-weight: 500; color: var(--steel-ink); }
.gallery-card figcaption p { margin-top: .5rem; font-size: .9375rem; color: var(--c-muted); }

/* ---------- FAQ ---------- */

.faq-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.faq-layout h2 { grid-column: 1 / 5; }
.faq-list { grid-column: 6 / 13; border-bottom: 1px solid var(--line); }
.faq-item { position: relative; }
.faq-item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: var(--line);
    transform-origin: left;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    list-style: none;
    cursor: pointer;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question h3 { font-size: 1.25rem; }
.faq-icon { color: var(--red); transition: transform .25s var(--ease-out); }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer p { padding-bottom: 1.75rem; color: var(--c-muted); }
@media (hover: hover) and (pointer: fine) {
    .faq-question:hover h3 { color: var(--c-red); }
}

/* ---------- Contacto y ubicación ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.contact-wa { grid-column: 1 / 7; }
.contact-wa h3 { margin-bottom: 1.5rem; }
.wa-buttons { display: grid; gap: .75rem; }
.quick-title { margin-top: 2.25rem; margin-bottom: .75rem; color: var(--steel); font-size: .9375rem; }
.quick-list { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.contact-note { margin-top: 2rem; color: var(--steel); font-size: .9375rem; }

.contact-list { grid-column: 8 / 13; border-bottom: 1px solid var(--line); }
.contact-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: .2rem 1rem;
    padding-block: 1.1rem;
    border-top: 1px solid var(--line);
}
.cl-label { grid-column: 1 / -1; color: var(--steel); font-size: .9375rem; }
.cl-value { color: var(--paper); overflow-wrap: anywhere; }
.cl-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: .35rem; }
.contact-list .hours { grid-column: 1 / -1; font-size: .9375rem; line-height: 1.75; color: var(--steel); }
.contact-list .hours strong { color: var(--paper); font-weight: 500; }
a.cl-value { text-underline-offset: .25em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) {
    a.cl-value:hover { text-decoration-color: var(--red-tint); text-decoration-thickness: 2px; }
}

.map-container {
    position: relative;
    overflow: hidden;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    aspect-ratio: 21 / 9;
    min-height: 300px;
    background: var(--ink-2);
    border: 1px solid var(--line);
}
.map-panel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 1.5rem var(--gutter);
    text-align: center;
}
.map-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-marker { position: relative; width: 16px; height: 16px; background: var(--red); border-radius: var(--radius); rotate: 45deg; }
.map-info { position: relative; display: grid; justify-items: center; gap: 1.25rem; }
.map-address { color: var(--paper); max-width: 34ch; }
.map-iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.1); transition: filter .3s var(--ease-out); }
.map-container:focus-within .map-iframe { filter: none; }
@media (hover: hover) and (pointer: fine) { .map-container:hover .map-iframe { filter: none; } }

/* ---------- Pie ---------- */

.footer { background: var(--ink-deep); color: var(--steel); padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; font-size: .9375rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.5rem 3rem; }
.footer-name { color: var(--paper); font-weight: 700; font-size: 1.125rem; margin-bottom: .35rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-nap { max-width: none; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.footer-bottom { margin-top: .75rem; font-size: .875rem; }
.footer a { text-underline-offset: .25em; text-decoration-thickness: 1px; transition: color .2s var(--ease-out); }
.footer-nav a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--white); } }
.footer a:focus-visible { color: var(--white); }

/* ---------- Páginas de servicio ---------- */

.page-hero { padding-block: clamp(3rem, 6vw, 5.5rem); }
.page-hero h1 { max-width: 20ch; margin-bottom: 1.5rem; }
.crumbs { margin-bottom: 2rem; font-size: .9375rem; color: var(--steel); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .6rem; }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--steel); }
.crumbs a { text-underline-offset: .25em; }
.crumbs [aria-current] { color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--paper); } }

.prose-block { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-block: 2.25rem; border-top: 1px solid var(--line); }
.prose-block:last-child { border-bottom: 1px solid var(--line); }
.prose-block h2 { grid-column: 1 / 5; font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); line-height: 1.15; }
.prose-body { grid-column: 6 / 13; }
.prose-body p { color: var(--c-muted); }
.prose-body p + p, .prose-body p + .prose-list, .prose-list + p { margin-top: 1rem; }
.prose-list li { position: relative; padding-left: 1.25rem; color: var(--c-muted); }
.prose-list li + li { margin-top: .35rem; }
.prose-list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 2px; background: var(--red); }

.page-cta .hero__actions { margin-top: 0; }

/* ---------- WhatsApp flotante (única forma circular) ---------- */

.wa-float {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 80;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--paper);
    transition: background-color .2s var(--ease-out), transform 160ms var(--ease-out);
}
.wa-float svg { width: 24px; height: 24px; }
.wa-float:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { background: var(--red); } }

/* ---------- Página 404 ---------- */

.error-page { min-height: 100vh; display: grid; align-items: center; padding: 4rem var(--gutter); background: var(--ink); }
.error-page > div { width: min(var(--container), 100%); margin-inline: auto; }
.error-page .logo-img { height: 72px; margin-bottom: 2.5rem; }
.error-page h1 { margin-bottom: 1.25rem; }
.error-page p { color: var(--steel); margin-bottom: 2rem; }

/* ============================================
   ANIMACIONES (solo transform, opacity y clip-path)
   Sin JS (.js ausente) todo permanece visible.
   ============================================ */

@keyframes line-up   { from { transform: translateY(100%); } }
@keyframes clip-left { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
@keyframes clip-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes cta-in    { from { opacity: 0; transform: translateY(8px); } }
@keyframes row-in    { from { opacity: 0; transform: translateY(12px); } }
@keyframes draw      { from { transform: scaleX(0); } }
@keyframes fade      { from { opacity: 0; } }
@keyframes faq-open  { from { opacity: 0; transform: translateY(-4px); } }

/* Titulares: ocultos solo hasta que el JS los parte en líneas */
.js [data-split]:not(.is-split) { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
    /* Momento principal (carga) */
    .js [data-split].is-split:not(.is-in) .line__inner { transform: translateY(100%); }
    .js [data-split].is-in .line__inner { animation: line-up var(--line-dur, 500ms) var(--ease-out) calc(var(--i, 0) * 80ms) backwards; }
    .js h1[data-split] { --line-dur: 700ms; }

    .js .hero__media { animation: clip-left 1000ms var(--ease-in-out) backwards; }
    .js [data-hero-cta] { animation: cta-in 400ms var(--ease-out) 300ms backwards; }

    /* Fotos al entrar en vista */
    .js [data-photo]:not(.is-visible) { clip-path: inset(0 0 100% 0); }
    .js [data-photo].is-visible { animation: clip-down 900ms var(--ease-in-out) backwards; }

    /* Filas de listas */
    .js [data-row]:not(.is-visible) { opacity: 0; }
    .js [data-row].is-visible { animation: row-in 450ms var(--ease-out) calc(var(--stagger, 0) * 50ms) backwards; }
    .js .service-row:not(.is-visible)::before,
    .js [data-line]:not(.is-visible)::before { transform: scaleX(0); }
    .js .service-row.is-visible::before,
    .js [data-line].is-visible::before { animation: draw 600ms var(--ease-out) calc(var(--stagger, 0) * 50ms) backwards; }
}

/* Movimiento reducido: sin desplazamientos ni máscaras, solo opacidad en 200ms */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-photo]:not(.is-visible),
    .js [data-row]:not(.is-visible) { opacity: 0; }
    .js [data-photo].is-visible,
    .js [data-row].is-visible,
    .js [data-hero-cta],
    .site-header, .site-header.is-scrolled, .logo, .site-header.is-scrolled .logo { transform: none; }
    .btn:active, .wa-float:active { transform: none; }
    .nav-links a::after, .nav-links a:hover::after { transform: scaleX(1); opacity: 0; transition: opacity .2s linear; }
    .nav-links a.active::after, .nav-links a:hover::after { opacity: 1; }
    .service-row::after { transform: none; opacity: 0; transition: opacity .2s linear; }
    .service-row:hover::after { opacity: 1; }
    .faq-icon, .faq-item[open] .faq-icon { transition: none; transform: none; }
}

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

@media (max-width: 1100px) {
    .about-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-strip li { padding-top: 1.5rem; padding-bottom: 1.5rem; }
    .about-strip li:nth-child(odd) { padding-left: 0; border-left: 0; }
    .about-strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 959px) {
    .hero__grid { display: block; }
    .hero__media { margin: 3rem calc(-1 * var(--gutter)) 0; aspect-ratio: 4 / 3; }

    .about-text { columns: 1; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-row h3 { grid-column: 1 / -1; margin-bottom: .6rem; }
    .service-row p, .service-link { grid-column: 1 / -1; }
    .tips-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .prose-block h2, .prose-body { grid-column: 1 / -1; }
    .prose-block h2 { margin-bottom: .75rem; }
    .faq-layout { display: block; }
    .faq-layout h2 { margin-bottom: 2.5rem; }
    .contact-grid { display: block; }
    .contact-wa { margin-bottom: 3rem; }
}

@media (max-width: 899px) {
    .primary-nav { display: none; }
    .mobile-menu-btn { display: inline-flex; }
}
@media (min-width: 900px) { .mobile-nav { display: none; } }

@media (max-width: 599px) {
    .tips-list { grid-template-columns: minmax(0, 1fr); }
    .about-strip { grid-template-columns: minmax(0, 1fr); }
    .about-strip li, .about-strip li:nth-child(odd) { padding: 1.25rem 0; border-left: 0; border-top: 1px solid var(--line); }
    .about-strip li:first-child { border-top: 0; }
    .gallery-grid { grid-template-columns: minmax(0, 1fr); }
                .lab-facts dl > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
    .equip-table thead { display: none; }
    .equip-table, .equip-table tbody, .equip-table tr, .equip-table th, .equip-table td { display: block; width: auto; }
    .equip-table tbody tr { padding-block: 1.25rem; }
    .equip-table th[scope="row"], .equip-table td { padding: 0; }
    .equip-table td { margin-top: .5rem; }
    .equip-table td::before { content: attr(data-label) ": "; color: var(--steel); }
    .map-container { aspect-ratio: 4 / 3; }
    .hero__actions .btn { flex: 1 1 100%; }
}

/* Sin JavaScript: el menú móvil queda visible y sin botón */
html:not(.js) .mobile-menu-btn { display: none; }
@media (max-width: 899px) {
    html:not(.js) .mobile-nav { position: static; visibility: visible; opacity: 1; padding: 0 var(--gutter) 1.5rem; }
    html:not(.js) .mobile-nav a { font-size: 1.125rem; font-stretch: 100%; font-weight: 500; padding: .6rem 0; }
}
