:root {
    --ink: #0f172a;
    --muted: #475569;
    --paper: #ffffff;
    --soft: #f8f7f4;
    --brand: #1e293b;
    --cta: #0f5b66;
    --cta-hover: #0b434b;
    --accent: #3d6b57;
    --focus: #0f5b66;
    --border: #e2dfd8;
    --success: #176b3a;
    --danger: #9a2f2f;
    --warning-bg: #fff6d8;
    --warning-ink: #4d3a00;
    --shadow: 0 1rem 2.5rem rgb(30 41 59 / 10%);
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* Cifras de ancho fijo: alinean la columna de importes. Segoe UI ya las usa
       por omisión, pero San Francisco no, así que sin esto la columna se
       desalinearía en Apple. */
    font-variant-numeric: tabular-nums;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.65;
}

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

a {
    color: var(--cta);
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--cta-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* Sobre el azul corporativo el teal del foco no llega a 3:1, así que ahí el
   indicador pasa a blanco. */
.hero :focus-visible,
.site-footer :focus-visible,
.skip-link:focus-visible {
    outline-color: #fff;
}

h1,
h2,
h3 {
    line-height: 1.2;
    text-wrap: balance;
}

h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
}

h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
}

h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

p,
ul,
ol {
    margin-top: 0;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    background: var(--brand);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.review-notice {
    padding: 0.75rem clamp(1rem, 4vw, 3rem);
    color: var(--warning-ink);
    background: var(--warning-bg);
    border-bottom: 1px solid #e7ce72;
    font-weight: 700;
    text-align: center;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 5rem;
    padding: 1rem clamp(1rem, 4vw, 4rem);
    border-bottom: 1px solid var(--border);
    background: var(--paper);
}

.brand {
    color: var(--brand);
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list a {
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
}

.phone-link {
    padding: 0.65rem 0.9rem;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: stretch;
    min-height: 34rem;
    color: #fff;
    background: var(--brand);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 8vw, 7rem) clamp(1.25rem, 7vw, 7rem);
}

.hero-copy > p:not(.eyebrow) {
    max-width: 44rem;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 25rem;
    object-fit: cover;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--border);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.2rem;
    border: 2px solid transparent;
    border-radius: 0.55rem;
    font: inherit;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--cta);
    border-color: var(--cta);
}

.button-primary:hover {
    background: var(--cta-hover);
    border-color: var(--cta-hover);
}

.hero .button-primary {
    color: var(--cta);
    background: #fff;
    border-color: #fff;
}

.button-secondary {
    color: #fff;
    background: transparent;
    border-color: #fff;
}

.section,
.page-intro,
.contact-layout {
    width: min(100% - 2rem, 76rem);
    margin-inline: auto;
}

.section,
.page-intro {
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section-muted {
    width: 100%;
    padding-inline: max(1rem, calc((100% - 74rem) / 2));
    background: var(--paper);
}

.data-warning,
.form-message {
    padding: 1rem 1.1rem;
    border-radius: 0.5rem;
    border: 1px solid;
}

.data-warning {
    color: var(--warning-ink);
    background: var(--warning-bg);
    border-color: #e7ce72;
}

.table-scroll {
    margin-block: 1.5rem 3rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
}

table {
    width: 100%;
    min-width: 52rem;
    border-collapse: collapse;
    background: #fff;
}

caption {
    padding: 1rem;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
}

th,
td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

thead th {
    color: #fff;
    background: var(--brand);
    border-top: 0;
}

tbody tr:nth-child(even) {
    background: var(--soft);
}

.status-tag {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.15rem 0.5rem;
    color: var(--warning-ink);
    background: var(--warning-bg);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.service-card,
.faq-grid article,
.form-panel {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.service-card img {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
}

.service-card ul,
.check-list {
    padding-left: 1.2rem;
}

.service-card li + li,
.check-list li + li {
    margin-top: 0.45rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    min-height: 11rem;
    padding: 4.5rem 1.25rem 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    counter-increment: step;
}

.steps li::before {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    content: counter(step);
    font-weight: 850;
}

.faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-intro {
    max-width: 58rem;
    text-align: center;
}

.page-intro h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(22rem, 1.2fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.form-group + .form-group {
    margin-top: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 800;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--muted);
    border-radius: 0.4rem;
    font: inherit;
}

textarea {
    resize: vertical;
}

.field-help,
.privacy-note,
.field-help {
    margin-top: 0.35rem;
}

.form-message-success {
    color: var(--success);
    background: #edf9f1;
    border-color: #8cc7a3;
}

.form-message-error {
    color: var(--danger);
    background: #fff0f0;
    border-color: #dca2a2;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    padding: 2.5rem 1rem;
    color: #fff;
    background: var(--brand);
    text-align: center;
}

.site-footer a {
    color: #fff;
}

.legal-page {
    width: min(100% - 2rem, 66rem);
    margin-inline: auto;
    padding-block: 3rem 5rem;
}

.legal-content {
    overflow-wrap: anywhere;
}

.legal-content h2,
.legal-content h3 {
    margin-top: 2rem;
}

.error-page {
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    place-content: center;
    text-align: center;
}

/* La tabla necesita 52rem y la sección solo deja 2rem de margen, así que por
   debajo de ~54rem desbordaba en horizontal y recortaba el texto. Aquí cada fila
   pasa a ser una ficha apilada con su etiqueta, sin scroll lateral. */
@media (max-width: 56rem) {
    .table-scroll {
        overflow-x: visible;
        border: 0;
        border-radius: 0;
    }

    table,
    caption,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    table {
        min-width: 0;
        background: transparent;
    }

    caption {
        padding-inline: 0;
    }

    /* El encabezado sigue existiendo para quien navega con lector de pantalla. */
    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    tbody tr,
    tbody tr:nth-child(even) {
        margin-block-end: 1rem;
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 0.65rem;
    }

    tbody th[scope="row"] {
        padding: 0.85rem 1rem;
        color: #fff;
        background: var(--brand);
        border-top: 0;
    }

    tbody td {
        padding: 0.85rem 1rem;
        border-top: 1px solid var(--border);
    }

    tbody td::before {
        content: attr(data-label);
        display: block;
        margin-block-end: 0.2rem;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@media (max-width: 62rem) {
    .site-header {
        flex-direction: column;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-image {
        max-height: 26rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 44rem) {
    html {
        scroll-behavior: auto;
    }

    .nav-list,
    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-list {
        text-align: center;
    }

    .phone-link,
    .button {
        width: 100%;
    }

    .hero-copy {
        padding: 3.5rem 1.25rem;
    }

    .hero-image {
        min-height: 14rem;
    }

    .faq-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .section,
    .page-intro {
        width: min(100% - 1.25rem, 76rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
