/* ==========================================================
   Carpe Diem Energía - Hoja de estilos
   ========================================================== */

:root {
    /* Colores de marca (tomados del logo) */
    --brand-teal: #1E9A8A;
    --brand-lime: #9BC53D;
    --primary: #13756A;
    --primary-dark: #0E5C53;
    --gradient: linear-gradient(135deg, #1E9A8A 0%, #8DC63F 100%);

    /* Neutros */
    --ink: #0E2A2D;
    --text: #44575B;
    --muted: #6B7D80;
    --surface: #F3F8F6;
    --border: #E2ECE8;
    --white: #FFFFFF;

    /* Tipografía y forma */
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 8px rgba(14, 42, 45, .06);
    --shadow: 0 12px 32px rgba(14, 42, 45, .08);
    --shadow-lg: 0 24px 60px rgba(14, 42, 45, .14);

    --header-h: 84px;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}

h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

p {
    margin: 0 0 1rem;
}

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 16px;
    color: var(--white);
}

:focus-visible {
    outline: 3px solid var(--brand-lime);
    outline-offset: 3px;
}

.text-gradient {
    background: linear-gradient(90deg, #6EE0C6, #C6EA6A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--lg {
    padding: 16px 30px;
    font-size: 1rem;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(19, 117, 106, .3);
}

.btn--primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 12px 28px rgba(19, 117, 106, .4);
}

.btn--ghost {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .5);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.btn--ghost:hover {
    background: var(--white);
    color: var(--ink);
}

.btn--light {
    background: var(--white);
    color: var(--primary-dark);
}

.btn--light:hover {
    color: var(--ink);
    box-shadow: var(--shadow);
}

.btn--outline-light {
    border-color: rgba(255, 255, 255, .7);
    color: var(--white);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, .15);
    color: var(--white);
}

.icon-chip {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient);
    color: var(--white);
    font-size: 1.3rem;
    box-shadow: 0 8px 18px rgba(30, 154, 138, .28);
}

/* ---------- Barra superior ---------- */
.topbar {
    background: var(--ink);
    color: rgba(255, 255, 255, .78);
    font-size: .85rem;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.topbar__group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.topbar a {
    color: rgba(255, 255, 255, .78);
}

.topbar a:hover {
    color: var(--white);
}

.topbar i {
    margin-right: 8px;
    color: var(--brand-lime);
}

/* ---------- Cabecera ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s, border-color .3s;
}

.header.is-scrolled {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.header__logo img {
    height: 52px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav__link {
    position: relative;
    padding: 8px 14px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform .25s;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--primary);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    transform: scaleX(1);
}

.nav__cta {
    margin-left: 12px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .3s, opacity .3s;
}

.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;
    display: flex;
    align-items: center;
    min-height: min(86vh, 780px);
    padding: 120px 0 170px;
    color: var(--white);
    overflow: hidden;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(8, 28, 31, .92) 0%, rgba(8, 28, 31, .7) 45%, rgba(8, 28, 31, .25) 100%),
        linear-gradient(0deg, rgba(8, 28, 31, .5) 0%, transparent 40%);
}

.hero__content {
    max-width: var(--container);
}

.hero h1 {
    max-width: 820px;
    margin-bottom: 22px;
    font-size: clamp(2.2rem, 4.8vw, 3.5rem);
    color: var(--white);
}

.hero h1 .text-gradient {
    display: block;
}

.hero__lead {
    max-width: 600px;
    margin-bottom: 34px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, .85);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero__phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    color: rgba(255, 255, 255, .8);
}

.hero__phone:hover {
    color: var(--white);
}

.hero__phone i {
    color: var(--brand-lime);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
    font-size: .85rem;
    font-weight: 600;
}

.badge i {
    color: var(--brand-lime);
}

/* ---------- Destacados ---------- */
.highlights {
    position: relative;
    z-index: 2;
    margin-top: -100px;
}

.highlights__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.highlight {
    display: flex;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.highlight h3 {
    margin-bottom: 4px;
}

.highlight p {
    margin: 0;
    font-size: .95rem;
}

/* ---------- Secciones ---------- */
.section {
    padding: 110px 0;
}

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

.section__head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}

.section__head .eyebrow::after {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient);
}

.section__head p {
    font-size: 1.1rem;
}

/* ---------- Sobre nosotros ---------- */
.about {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 72px;
    align-items: center;
}

.about__media {
    position: relative;
}

.about__media img {
    width: 100%;
    aspect-ratio: 4 / 4.4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about__media::before {
    content: "";
    position: absolute;
    top: -18px;
    left: -18px;
    width: 55%;
    height: 55%;
    border-radius: var(--radius-lg);
    background: var(--gradient);
    opacity: .18;
    z-index: -1;
}

.about__badge {
    position: absolute;
    right: -24px;
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.about__badge i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--gradient);
    color: var(--white);
    font-size: 1.2rem;
}

.about__badge strong {
    display: block;
    color: var(--ink);
    line-height: 1.3;
}

.about__badge span {
    font-size: .875rem;
    color: var(--muted);
}

.about__points {
    display: grid;
    gap: 20px;
    margin: 28px 0;
}

.point {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
}

.point > i {
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 1.3rem;
    color: var(--primary);
}

.point h3 {
    margin-bottom: 4px;
}

.point p {
    margin: 0;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.tags li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
}

.tags i {
    color: var(--primary);
}

/* ---------- Servicios ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform .35s, box-shadow .35s;
}

.service:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service__img {
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.service__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.service:hover .service__img img {
    transform: scale(1.06);
}

.service__body {
    position: relative;
    padding: 0 28px 30px;
}

.service__body .icon-chip {
    margin: -26px 0 18px;
    border: 4px solid var(--white);
    width: 60px;
    height: 60px;
    box-sizing: content-box;
    border-radius: 18px;
}

.service__body p {
    margin: 0;
}

/* ---------- Cómo trabajamos ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 30px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.step::after {
    content: "";
    position: absolute;
    top: 52px;
    right: -25px;
    width: 26px;
    height: 2px;
    background: var(--border);
}

.step:last-child::after {
    display: none;
}

.step__num {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.step p {
    margin: 0;
    font-size: .95rem;
}

/* ---------- CTA ---------- */
.cta {
    padding: 0 0 20px;
}

.cta__box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 56px 60px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #0F5F56 0%, #13756A 45%, #4E9A35 100%);
    color: rgba(255, 255, 255, .9);
}

.cta__box::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.cta__box h2 {
    margin-bottom: 8px;
    color: var(--white);
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

.cta__box p {
    margin: 0;
    font-size: 1.1rem;
}

.cta__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

/* ---------- Contacto ---------- */
.contact {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 56px;
    align-items: center;
}

.contact__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.contact-card {
    display: flex;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

a.contact-card:hover {
    border-color: var(--brand-teal);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    color: var(--text);
}

.contact-card > i {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--primary);
    font-size: 1.1rem;
}

.contact-card span {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.contact-card strong {
    display: block;
    color: var(--ink);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.contact-card small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    line-height: 1.4;
}

.contact__media img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.map {
    margin-top: 64px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.map iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

/* ---------- Pie ---------- */
.footer {
    margin-top: 40px;
    padding-top: 80px;
    background: var(--ink);
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.4fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
}

.footer__title {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--white);
}

.footer a {
    color: rgba(255, 255, 255, .7);
}

.footer a:hover {
    color: var(--brand-lime);
}

.footer__brand img {
    width: 170px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--white);
}

.footer__links {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__contact li {
    display: flex;
    gap: 12px;
    line-height: 1.5;
}

.footer__contact i {
    margin-top: 4px;
    color: var(--brand-lime);
}

.footer__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.footer__gallery img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.footer__bottom {
    padding-top: 24px;
    padding-bottom: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .875rem;
}

.footer__bottom p {
    margin: 0;
}

/* ---------- Volver arriba ---------- */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s, visibility .3s, transform .3s, background .2s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ---------- Página 404 ---------- */
.error-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--header-h) - 300px);
    padding: 100px 0;
    text-align: center;
}

.error-page .error-page__code {
    margin: 0;
    font-size: clamp(6rem, 18vw, 10rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page p {
    max-width: 480px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
}

/* ---------- Botones secundarios ---------- */
.btn--outline {
    border-color: var(--border);
    background: var(--white);
    color: var(--ink);
}

.btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* ---------- Pie: enlaces legales ---------- */
.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__legal .link-button {
    color: rgba(255, 255, 255, .7);
}

.footer__legal .link-button:hover {
    color: var(--brand-lime);
}

/* ---------- Contacto: aviso de privacidad ---------- */
.contact__privacy {
    display: flex;
    gap: 12px;
    margin: 24px 0 0;
    font-size: .85rem;
    line-height: 1.6;
    color: var(--muted);
}

.contact__privacy i {
    margin-top: 3px;
    color: var(--primary);
}

/* ---------- Mapa bloqueado hasta aceptar cookies ---------- */
.map__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 380px;
    padding: 40px 24px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(30, 154, 138, .12), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(155, 197, 61, .14), transparent 45%),
        var(--surface);
}

.map__placeholder > i {
    margin-bottom: 8px;
    font-size: 2.6rem;
    color: var(--primary);
}

.map__placeholder p {
    max-width: 440px;
    color: var(--text);
}

.map__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    padding: 22px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    animation: cookie-in .4s ease;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner__text strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--ink);
}

.cookie-banner__text strong i {
    color: var(--primary);
}

.cookie-banner__text p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.6;
}

.cookie-banner__actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

.cookie-banner__actions .btn {
    min-width: 118px;
}

@keyframes cookie-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

/* ---------- Páginas legales ---------- */
.page-hero {
    padding: 64px 0 56px;
    background:
        radial-gradient(circle at 85% 20%, rgba(155, 197, 61, .25), transparent 40%),
        linear-gradient(120deg, #0E2A2D 0%, #11463F 100%);
    color: rgba(255, 255, 255, .8);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: .875rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, .8);
}

.breadcrumb a:hover {
    color: var(--brand-lime);
}

.breadcrumb i {
    font-size: .65rem;
    opacity: .6;
}

.legal {
    padding-top: 64px;
}

.legal__wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 64px;
    align-items: start;
}

.legal__nav {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.legal__nav h2 {
    margin-bottom: 12px;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.legal__nav ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal__nav a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
}

.legal__nav a:hover,
.legal__nav a.is-current {
    background: var(--white);
    color: var(--primary);
}

.legal__nav a.is-current {
    box-shadow: var(--shadow-sm);
}

.legal__content {
    max-width: 780px;
    min-width: 0;
}

.legal__content h2 {
    margin: 48px 0 16px;
    font-size: 1.4rem;
}

.legal__content > h2:first-child {
    margin-top: 0;
}

.legal__content ul {
    display: grid;
    gap: 10px;
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.legal__content li::marker {
    color: var(--brand-teal);
}

.legal__content a:not(.btn) {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal__content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--surface);
    font-size: .85em;
    color: var(--ink);
}

.legal__data {
    display: grid;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.legal__data div {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 14px 20px;
}

.legal__data div:nth-child(odd) {
    background: var(--surface);
}

.legal__data dt {
    font-weight: 700;
    color: var(--ink);
}

.legal__data dd {
    margin: 0;
}

.legal__table {
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.legal__table table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .9rem;
}

.legal__table th,
.legal__table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.legal__table th {
    background: var(--surface);
    font-weight: 700;
    color: var(--ink);
}

.legal__table tr:last-child td {
    border-bottom: 0;
}

/* ---------- Animaciones de entrada ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
    transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .about {
        gap: 48px;
    }

    .about__badge {
        right: 16px;
    }

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

@media (max-width: 991px) {
    .legal__wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .legal__nav {
        position: static;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__actions .btn {
        flex: 1;
    }

    :root {
        --header-h: 72px;
    }

    .topbar {
        display: none;
    }

    .header__logo img {
        height: 44px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 20px 24px;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .25s, transform .25s, visibility .25s;
    }

    .nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav__link {
        padding: 14px 8px;
        border-bottom: 1px solid var(--border);
    }

    .nav__link::after {
        display: none;
    }

    .nav__cta {
        margin: 16px 0 0;
    }

    .highlights__grid,
    .services {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights__grid .highlight:last-child {
        grid-column: 1 / -1;
    }

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

    .about__media {
        max-width: 560px;
    }

    .contact__media {
        display: none;
    }

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

    .step::after {
        display: none;
    }

    .cta__box {
        flex-direction: column;
        align-items: flex-start;
        padding: 44px 36px;
    }

    .section {
        padding: 80px 0;
    }
}

@media (max-width: 640px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 18px;
    }

    .legal__data div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 0 18px;
    }

    .hero {
        min-height: auto;
        padding: 80px 0 140px;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .highlights__grid,
    .services,
    .steps,
    .contact__cards {
        grid-template-columns: 1fr;
    }

    .highlight {
        padding: 22px;
    }

    .about__badge {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -40px 16px 0;
    }

    .cta__box {
        padding: 36px 24px;
    }

    .cta__actions,
    .cta__actions .btn {
        width: 100%;
    }

    .map iframe {
        height: 300px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}
