/* ---- Tipografía autoalojada (respeta CSP font-src 'self') ---- */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/space-grotesk-400.woff2") format("woff2");
}
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../assets/fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../assets/fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../assets/fonts/inter-500.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../assets/fonts/inter-700.woff2") format("woff2");
}

:root {
    --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ink: #101316;
    --coal: #171b20;
    --graphite: #2d333a;
    --steel: #626d77;
    --line: #d7dde1;
    --line-dark: #3b424a;
    --paper: #f6f7f5;
    --concrete: #eceff0;
    --white: #ffffff;
    --yellow: #f3c734;
    --yellow-dark: #c89516;
    --blue: #55bee8;
    --blue-dark: #15799e;
    --rust: #9b5b38;
    --shadow: 0 24px 70px rgba(13, 17, 21, 0.14);
    --container: 1180px;
    --radius: 8px;
    --header-height: 78px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

/* Bloqueo de scroll propio del modal de servicio (independiente del lightbox,
   para que cerrar el lightbox no desbloquee el scroll si el modal sigue abierto). */
body.service-modal-open {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--white);
    background: var(--ink);
    border-radius: 4px;
    transform: translateY(-160%);
}

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

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    min-height: var(--header-height);
    color: var(--ink);
    background: var(--white);
    border-bottom: 1px solid rgba(16, 19, 22, 0.08);
    transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
    background: var(--white);
    box-shadow: 0 12px 28px rgba(16, 19, 22, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand img {
    width: 46px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.04rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-text small {
    color: var(--steel);
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    color: var(--graphite);
    border-radius: 4px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--ink);
    background: var(--concrete);
}

.site-nav .nav-cta {
    margin-left: 8px;
    color: var(--ink);
    background: var(--yellow);
    border: 1px solid rgba(16, 19, 22, 0.1);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
    background: #ffd852;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    place-items: center;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px auto;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 82vh;
    padding: 154px 0 74px;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: var(--white);
    background: var(--coal);
}

.hero-media,
.hero-media img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 38%;
    transform: scale(1.02);
    filter: brightness(1.09) contrast(1.04) saturate(1.06);
    animation: heroImageDrift 22s ease-in-out infinite alternate;
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(10, 12, 15, 0.9) 0%, rgba(10, 12, 15, 0.68) 36%, rgba(10, 12, 15, 0.12) 72%, rgba(10, 12, 15, 0.02) 100%),
        linear-gradient(180deg, rgba(10, 12, 15, 0.26) 0%, rgba(10, 12, 15, 0.64) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5px;
    background: linear-gradient(90deg, var(--yellow) 0 34%, var(--blue) 34% 62%, var(--white) 62%);
    animation: accentSweep 5s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Etiqueta de sección: estilo "etiqueta de tablero / esquema" monoespaciada entre corchetes */
.eyebrow {
    --eyebrow-accent: var(--yellow-dark);
    display: inline-block;
    margin: 0 0 18px;
    color: var(--blue-dark);
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.eyebrow::before {
    content: "[";
    margin-right: 9px;
    color: var(--eyebrow-accent);
    font-weight: 700;
}

.eyebrow::after {
    content: "]";
    margin-left: 9px;
    color: var(--eyebrow-accent);
    font-weight: 700;
}

.hero-eyebrow {
    color: var(--yellow);
    --eyebrow-accent: var(--blue);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
}

h1 {
    max-width: 880px;
    margin-bottom: 22px;
    font-size: 4.4rem;
    line-height: 0.96;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.hero-title-line {
    display: inline;
}

h2 {
    margin-bottom: 18px;
    font-size: 2.5rem;
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.18rem;
    line-height: 1.22;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.hero-copy {
    max-width: 700px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.13rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 164px;
    padding: 12px 20px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0) scale(0.985);
}

.button-primary {
    color: var(--ink);
    background: var(--yellow);
    border-color: rgba(16, 19, 22, 0.12);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: #ffdb58;
}

.button-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.16);
}

.hero-proof {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    max-width: 980px;
    margin: 44px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.hero-proof div {
    min-height: 112px;
    padding: 18px;
    background: rgba(12, 15, 18, 0.68);
}

.hero-proof dt {
    margin-bottom: 8px;
    color: var(--yellow);
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hero-proof dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    line-height: 1.45;
}

.section {
    padding: 92px 0;
}

.section-copy p,
.section-heading p,
.proof-copy p,
.contact-copy p {
    max-width: 720px;
    color: var(--steel);
    font-size: 1.02rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 64px;
    align-items: start;
}

.vision-panel {
    position: relative;
    padding: 30px;
    color: var(--white);
    background: var(--coal);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.vision-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(var(--yellow), var(--blue));
}

.panel-kicker {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--yellow);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.vision-panel p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
}

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

.check-list li {
    position: relative;
    padding-left: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 10px;
    height: 10px;
    background: var(--yellow);
    border: 2px solid var(--coal);
    box-shadow: 0 0 0 1px var(--yellow);
}

.services {
    background: var(--white);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.55fr);
    gap: 52px;
    align-items: end;
    margin-bottom: 46px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading p:last-child {
    margin-bottom: 4px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 480px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card figure {
    margin: 0;
    min-height: 100%;
    background: var(--concrete);
    overflow: hidden;
}

.service-card img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
    transition: transform 700ms ease, filter 700ms ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 121, 158, 0.28);
    box-shadow: 0 18px 50px rgba(16, 19, 22, 0.1);
}

.service-card:hover img {
    transform: scale(1.045);
    filter: saturate(0.96) contrast(1.04);
}

.service-body {
    padding: 28px;
}

.service-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.service-head h3 {
    margin-bottom: 6px;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--ink);
    background: var(--yellow);
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(16, 19, 22, 0.1);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-icon-solar {
    background: linear-gradient(135deg, var(--yellow), #ffe16a);
}

.service-icon-ambiental {
    color: var(--white);
    background: var(--blue-dark);
}

.service-icon-plans {
    color: var(--white);
    background: var(--graphite);
}

.service-toggle {
    display: none;
    padding: 0;
    color: var(--blue-dark);
    background: transparent;
    border: 0;
    font-size: 0.82rem;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.service-body p {
    color: var(--steel);
    font-size: 0.96rem;
}

.service-detail {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 22px 0 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.service-detail li {
    position: relative;
    padding-left: 18px;
    color: var(--graphite);
    font-size: 0.92rem;
    line-height: 1.45;
}

.service-detail li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 2px;
    background: var(--blue-dark);
}

/* ---- Botón que abre el modal de servicio ---- */
.service-actions {
    margin-top: 22px;
}

.service-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: var(--ink);
    background: var(--yellow);
    border: 0;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.service-open:hover {
    background: #ffe16a;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 19, 22, 0.16);
}

.service-open-arrow {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}

.service-open:hover .service-open-arrow {
    transform: translateX(3px);
}

/* La etiqueta cambia por breakpoint: "Ver proyectos" en escritorio, "Ver detalle" en móvil. */
.service-open [data-label-mobile] {
    display: none;
}

/* ============================================================
   Modal de servicio (descripción + alcance + galería)
   ============================================================ */
.service-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms ease, visibility 0s linear 280ms;
}

.service-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 280ms ease;
}

.service-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 12, 0.92);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.service-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    overflow: hidden;
    background: var(--coal);
    color: var(--white);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
    transform: translateY(16px) scale(0.98);
    opacity: 0;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}

.service-modal.is-open .service-modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.service-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
    transition: background 200ms ease;
}

.service-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.service-modal-close svg {
    width: 20px;
    height: 20px;
}

.service-modal-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 30px 18px;
    padding-right: 64px;
    border-bottom: 1px solid var(--line-dark);
}

.service-modal-head h3 {
    margin: 0;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1.2;
}

.service-modal-body {
    padding: 24px 30px 32px;
    overflow-y: auto;
}

.service-modal-desc {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.6;
}

.service-modal-subtitle {
    margin: 0 0 14px;
    color: var(--yellow);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.service-modal-list {
    display: grid;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.service-modal-list li {
    position: relative;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.94rem;
    line-height: 1.45;
}

.service-modal-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 2px;
    background: var(--yellow);
}

.service-modal-gallery-title {
    padding-top: 22px;
    border-top: 1px solid var(--line-dark);
}

.service-modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.service-shot {
    position: relative;
    padding: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--graphite);
    border: 0;
    border-radius: 6px;
    cursor: zoom-in;
}

.service-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease, opacity 400ms ease;
}

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

.service-shot:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

.application-band {
    padding: 38px 0;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(243, 199, 52, 0.12) 0 1px, transparent 1px),
        linear-gradient(135deg, #111418 0%, #171b20 64%, #1d262c 100%);
    background-size: 24px 100%, auto;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    overflow: hidden;
    position: relative;
}

.application-band::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(var(--yellow), var(--blue));
}

.application-band::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(85, 190, 232, 0.68), transparent);
    animation: accentSweep 4s ease-in-out infinite alternate;
}

.application-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.application-title {
    margin: 0;
    color: var(--yellow);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.application-inner ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.application-inner li {
    position: relative;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.application-inner li::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    background: var(--blue);
    box-shadow: 0 0 0 2px rgba(85, 190, 232, 0.16);
}

.application-inner li:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.28);
}

.process {
    background:
        linear-gradient(90deg, rgba(16, 19, 22, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(16, 19, 22, 0.04) 1px, transparent 1px),
        var(--paper);
    background-size: 42px 42px;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.process-item {
    min-height: 270px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.78);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-item span {
    display: inline-block;
    margin-bottom: 48px;
    color: var(--blue-dark);
    font-size: 0.9rem;
    font-weight: 850;
}

.process-item p {
    margin-bottom: 0;
    color: var(--steel);
    font-size: 0.94rem;
}

.proof {
    background: var(--white);
}

.proof-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.proof-copy {
    position: sticky;
    top: 112px;
}

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

.gallery-item {
    position: relative;
    min-height: 280px;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--concrete);
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(5) {
    transform: translateY(28px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.02);
    transition: transform 700ms ease, filter 700ms ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: saturate(1) contrast(1.05);
}

.gallery-item figcaption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 8px 10px;
    color: var(--white);
    background: rgba(16, 19, 22, 0.82);
    border-left: 4px solid var(--yellow);
    font-size: 0.82rem;
    font-weight: 800;
}

.contact {
    color: var(--white);
    background:
        linear-gradient(110deg, rgba(16, 19, 22, 0.96), rgba(16, 19, 22, 0.9)),
        var(--contact-bg, url("../assets/site/service-solar.jpg")) center / cover;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) 440px;
    gap: 64px;
    align-items: start;
}

.contact .eyebrow {
    color: var(--yellow);
    --eyebrow-accent: var(--blue);
}

.contact-copy p {
    color: rgba(255, 255, 255, 0.76);
}

.contact-panel {
    display: grid;
    gap: 24px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
}

.contact-person {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-person:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.contact-role {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.contact-person h3 {
    color: var(--white);
}

.contact-person p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.contact-person a {
    display: block;
    width: fit-content;
    margin-top: 8px;
    color: var(--white);
    font-weight: 760;
}

.contact-person a:hover,
.contact-person a:focus-visible {
    color: var(--yellow);
}

.site-footer {
    padding: 28px 0;
    color: rgba(255, 255, 255, 0.74);
    background: #090b0d;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-brand {
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer-inner p {
    margin: 0;
    font-size: 0.9rem;
}

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

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 540ms ease, transform 540ms ease;
}

.js .reveal.is-visible,
.js .hero-content.reveal {
    opacity: 1;
    transform: translateY(0);
}

.js .hero-content.reveal {
    animation: heroIntro 680ms ease both;
}

@keyframes heroImageDrift {
    from {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.075) translate3d(-1.2%, 0.8%, 0);
    }
}

@keyframes accentSweep {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 80px 0;
    }
}

@keyframes heroIntro {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.2rem;
    }

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

    .split-layout,
    .section-heading,
    .proof-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .vision-panel,
    .contact-panel {
        max-width: 640px;
    }

    .service-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .service-card img {
        min-height: 300px;
        aspect-ratio: 16 / 9;
    }

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

    .proof-copy {
        position: static;
    }
}

@media (max-width: 780px) {
    :root {
        --header-height: 70px;
    }

    .container {
        width: min(100% - 28px, var(--container));
    }

    .brand img {
        width: 42px;
        height: 34px;
    }

    .brand-text strong {
        font-size: 0.92rem;
    }

    .brand-text small {
        font-size: 0.56rem;
    }

    .nav-toggle {
        display: grid;
    }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 14px;
        right: 14px;
        display: grid;
        gap: 6px;
        padding: 14px;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a,
    .site-nav .nav-cta {
        min-height: 48px;
        margin: 0;
    }

    .hero {
        min-height: 0;
        padding: 118px 0 54px;
        align-items: center;
    }

    .hero-media img {
        object-position: 58% center;
    }

    .hero-shade {
        background:
            linear-gradient(180deg, rgba(10, 12, 15, 0.78) 0%, rgba(10, 12, 15, 0.92) 100%),
            linear-gradient(90deg, rgba(10, 12, 15, 0.74), rgba(10, 12, 15, 0.42));
    }

    h1 {
        max-width: 100%;
        font-size: 2.35rem;
        line-height: 1.04;
        text-wrap: balance;
    }

    .hero-title-line {
        display: block;
    }

    h2 {
        font-size: 1.85rem;
        line-height: 1.14;
    }

    .hero-copy {
        max-width: 34ch;
        font-size: 1rem;
    }

    .hero-eyebrow {
        max-width: 34ch;
    }

    .hero-actions,
    .cf-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .hero-proof {
        grid-template-columns: 1fr;
        margin-top: 34px;
    }

    .hero-proof div {
        min-height: 88px;
    }

    .section {
        padding: 68px 0;
    }

    .split-layout,
    .section-heading,
    .proof-layout,
    .contact-layout {
        gap: 30px;
    }

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

    .service-body,
    .vision-panel,
    .process-item,
    .contact-panel {
        padding: 22px;
    }

    .service-card img {
        min-height: 178px;
    }

    .service-card {
        transform: none;
    }

    .service-card:hover {
        transform: none;
        box-shadow: none;
    }

    .service-head {
        gap: 12px;
        margin-bottom: 12px;
    }

    .service-icon {
        width: 44px;
        height: 44px;
    }

    .service-icon svg {
        width: 26px;
        height: 26px;
    }

    /* En móvil la card muestra solo resumen + botón; el detalle vive en el modal. */
    .service-detail {
        display: none;
    }

    .service-actions {
        margin-top: 18px;
    }

    .service-open {
        width: 100%;
        justify-content: center;
    }

    .service-open [data-label-desktop] {
        display: none;
    }

    .service-open [data-label-mobile] {
        display: inline;
    }

    /* Modal de servicio como hoja que sube desde abajo en móvil. */
    .service-modal {
        padding: 0;
        align-items: flex-end;
    }

    .service-modal-dialog {
        max-width: none;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
        transform: translateY(100%);
    }

    .service-modal.is-open .service-modal-dialog {
        transform: translateY(0);
    }

    .service-modal-head {
        padding: 26px 22px 16px;
        padding-right: 60px;
    }

    .service-modal-head h3 {
        font-size: 1.25rem;
    }

    .service-modal-body {
        padding: 20px 22px 28px;
    }

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

    .application-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .application-inner ul {
        justify-content: flex-start;
    }

    .gallery-item:nth-child(2),
    .gallery-item:nth-child(5) {
        transform: none;
    }

    .gallery-item,
    .gallery-item img {
        min-height: 320px;
    }

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

@media (max-width: 420px) {
    h1 {
        max-width: 100%;
        font-size: 2.05rem;
    }

    .service-body li,
    .application-inner li,
    .process-item p,
    .contact-person p,
    .contact-person a {
        overflow-wrap: anywhere;
    }
}

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

    .reveal,
    .js .reveal,
    .js .hero-content.reveal {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* =====================================================================
   Refinamiento estético v1.1 — grano, foco, etiquetas, galería, lightbox
   ===================================================================== */

/* Grano sutil global (capa fija, no afecta scroll/repaint) */
.grain {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Foco visible coherente para teclado (accesibilidad) */
:focus-visible {
    outline: 2px solid var(--blue-dark);
    outline-offset: 3px;
    border-radius: 3px;
}

.hero :focus-visible,
.contact :focus-visible,
.application-band :focus-visible,
.lightbox :focus-visible {
    outline-color: var(--yellow);
}

/* Sub-rótulos en el mismo lenguaje técnico monoespaciado que las etiquetas de sección */
.panel-kicker,
.contact-role {
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.panel-kicker::before,
.contact-role::before {
    content: "// ";
    opacity: 0.6;
}

.process-item span {
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    font-weight: 600;
    text-transform: uppercase;
}

/* =========================== Galería =========================== */
.gallery-showcase {
    position: relative;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(85, 190, 232, 0.06), transparent 60%),
        var(--paper);
}

/* Filtros: control segmentado con indicador deslizante (tipo "riel eléctrico").
   Una sola fila; si no cabe, se desliza horizontalmente (no se amontona). */
.gallery-filters {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 30px;
    padding: 5px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(16, 19, 22, 0.04);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-padding-inline: 12px;
    overscroll-behavior-x: contain;
}

.gallery-filters::-webkit-scrollbar {
    display: none;
}

.filter-indicator {
    position: absolute;
    top: 5px;
    left: 0;
    width: 0;
    height: 44px;
    z-index: 0;
    background: linear-gradient(135deg, var(--yellow), #ffe06a);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(16, 19, 22, 0.12), 0 6px 16px rgba(243, 199, 52, 0.4);
    transform: translateX(0);
    transition:
        transform 520ms cubic-bezier(0.34, 1.38, 0.5, 1),
        width 520ms cubic-bezier(0.34, 1.38, 0.5, 1),
        height 260ms ease;
    pointer-events: none;
}

.gallery-filter {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    color: var(--steel);
    background: transparent;
    border: 0;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 240ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-filter .filter-label {
    white-space: nowrap;
}

.gallery-filter .filter-ico {
    display: inline-flex;
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: opacity 240ms ease, transform 360ms cubic-bezier(0.34, 1.38, 0.5, 1);
}

.gallery-filter .filter-ico svg {
    width: 100%;
    height: 100%;
}

.gallery-filter:hover {
    color: var(--ink);
}

.gallery-filter:hover .filter-ico {
    opacity: 1;
}

.gallery-filter:active {
    transform: scale(0.96);
}

.gallery-filter.is-active {
    color: var(--ink);
}

.gallery-filter.is-active .filter-ico {
    opacity: 1;
    transform: scale(1.08);
}

/* Sin JS: el indicador no se posiciona, así que el activo recupera fondo sólido. */
.gallery-filter.is-active {
    background: var(--yellow);
}

.js .gallery-filter.is-active {
    background: transparent;
}

.gallery-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    color: var(--steel);
    background: var(--concrete);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: color 240ms ease, background 240ms ease;
}

.gallery-filter.is-active .gallery-filter-count {
    color: var(--ink);
    background: rgba(16, 19, 22, 0.16);
}

/* Escenario contraíble + fundido */
.gallery-stage {
    position: relative;
    overflow: visible;
    transition: max-height 660ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-stage.is-collapsed,
.gallery-stage.is-expanding {
    overflow: hidden;
}

.gallery-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(180deg, rgba(246, 247, 245, 0) 0%, var(--paper) 82%);
    transition: opacity 420ms ease;
}

.gallery-stage.is-collapsed .gallery-fade {
    opacity: 1;
}

/* Botón desplegar/contraer (energía) */
.gallery-reveal-bar {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.gallery-reveal-bar[hidden] {
    display: none;
}

.gallery-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-height: 52px;
    padding: 0 8px 0 22px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    overflow: hidden;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 260ms ease, box-shadow 260ms ease;
}

.gallery-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--yellow) 45%, var(--blue) 70%, transparent);
    transform: translateX(-100%);
    transition: transform 700ms ease;
}

.gallery-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(21, 121, 158, 0.38);
    box-shadow: 0 16px 34px rgba(16, 19, 22, 0.1);
}

.gallery-toggle:hover::after {
    transform: translateX(100%);
}

.gallery-toggle:active {
    transform: translateY(0) scale(0.98);
}

.gallery-toggle-spark {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 0 rgba(243, 199, 52, 0.55);
    animation: nePulse 2.4s ease-out infinite;
}

.gallery-toggle-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    background: var(--ink);
    border-radius: 50%;
    transition: transform 420ms cubic-bezier(0.34, 1.38, 0.5, 1), background 260ms ease;
}

.gallery-toggle-chevron svg {
    width: 18px;
    height: 18px;
}

.gallery-toggle[aria-expanded="true"] .gallery-toggle-chevron {
    transform: rotate(180deg);
    background: var(--blue-dark);
}

@keyframes nePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 199, 52, 0.55);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(243, 199, 52, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 199, 52, 0);
    }
}

@media (max-width: 560px) {
    .gallery-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .gallery-filter {
        padding: 0 12px;
        font-size: 0.8rem;
    }
}

/* Mampostería con columnas CSS */
.gallery-masonry {
    column-count: 3;
    column-gap: 16px;
}

.shot {
    margin: 0 0 16px;
    break-inside: avoid;
}

.shot-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--concrete);
    overflow: hidden;
    cursor: pointer;
    transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 360ms ease, border-color 360ms ease;
}

.shot-trigger img {
    width: 100%;
    height: auto;
    display: block;
    filter: saturate(0.92) contrast(1.02);
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
}

.shot-trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(12, 15, 18, 0.72));
    opacity: 0;
    transition: opacity 360ms ease;
}

.shot-trigger:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 121, 158, 0.32);
    box-shadow: 0 22px 48px rgba(16, 19, 22, 0.16);
}

.shot-trigger:hover img {
    transform: scale(1.06);
    filter: saturate(1.02) contrast(1.05);
}

.shot-trigger:hover::after,
.shot-trigger:focus-visible::after {
    opacity: 1;
}

.shot-tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    padding: 6px 11px;
    color: var(--white);
    background: rgba(16, 19, 22, 0.78);
    border-left: 3px solid var(--yellow);
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 320ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.shot-trigger:hover .shot-tag,
.shot-trigger:focus-visible .shot-tag {
    opacity: 1;
    transform: translateY(0);
}

.shot-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 320ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.shot-zoom svg {
    width: 19px;
    height: 19px;
}

.shot-trigger:hover .shot-zoom,
.shot-trigger:focus-visible .shot-zoom {
    opacity: 1;
    transform: scale(1);
}

/* Cascada de aparición en la galería */
.gallery-masonry .shot:nth-child(3n + 2) {
    transition-delay: 80ms;
}

.gallery-masonry .shot:nth-child(3n + 3) {
    transition-delay: 160ms;
}

.gallery-empty {
    margin: 8px 0 0;
    color: var(--steel);
    font-size: 0.98rem;
}

/* =========================== Lightbox =========================== */
.lightbox {
    position: fixed;
    inset: 0;
    /* Por encima del modal de servicio (130), para poder ampliar desde dentro del modal. */
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms ease, visibility 0s linear 280ms;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 280ms ease;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 12, 0.92);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 1180px;
    width: 100%;
}

.lightbox-figure {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    transform: scale(0.97);
    opacity: 0;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}

.lightbox.is-open .lightbox-figure {
    transform: scale(1);
    opacity: 1;
}

.lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    background: var(--coal);
}

.lightbox-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
}

.lightbox-tag {
    padding: 4px 10px;
    color: var(--ink);
    background: var(--yellow);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.06);
}

.lightbox-btn:active {
    transform: scale(0.95);
}

.lightbox-btn svg {
    width: 22px;
    height: 22px;
}

.lightbox-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 46px;
    height: 46px;
    z-index: 2;
}

@media (max-width: 1080px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 780px) {
    /* Imagen a todo el ancho arriba; flechas en una sola fila, lado a lado, debajo. */
    .lightbox-dialog {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "figure figure"
            "prev next";
        gap: 16px;
        align-items: center;
    }

    .lightbox-figure {
        grid-area: figure;
        width: 100%;
    }

    .lightbox-figure img {
        max-height: 64vh;
    }

    .lightbox-prev {
        grid-area: prev;
        justify-self: end;
    }

    .lightbox-next {
        grid-area: next;
        justify-self: start;
    }

    .lightbox-close {
        top: 0;
        right: 0;
    }
}

@media (max-width: 520px) {
    .gallery-masonry {
        column-count: 1;
    }

    .shot-tag,
    .shot-zoom {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================================
   Carga diferida sin parpadeo: skeleton shimmer + fundido al cargar
   ===================================================================== */
.shot-trigger::before,
.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 80%),
        var(--concrete);
    background-size: 220% 100%, 100% 100%;
    background-repeat: no-repeat;
    background-position: -120% 0, 0 0;
    animation: neShimmer 1.5s ease-in-out infinite;
    transition: opacity 400ms ease;
}

.shot-trigger.is-loaded::before,
.gallery-item.is-loaded::before {
    opacity: 0;
    animation: none;
}

.js .shot-trigger img,
.js .gallery-item img {
    opacity: 0;
    transition: opacity 600ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
}

.shot-trigger.is-loaded img,
.gallery-item.is-loaded img {
    opacity: 1;
}

@keyframes neShimmer {
    0% {
        background-position: -120% 0, 0 0;
    }
    100% {
        background-position: 220% 0, 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shot-trigger::before,
    .gallery-item::before {
        animation: none;
    }
    .js .shot-trigger img,
    .js .gallery-item img {
        opacity: 1;
    }
}

/* =========================== Formulario de contacto =========================== */
.contact-form {
    margin-top: 30px;
    display: grid;
    gap: 16px;
}

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cf-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.cf-field > span {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: -0.01em;
}

.cf-field > span em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 110px;
}

.contact-form select {
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.7) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.7) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.contact-form select option {
    color: var(--ink);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(243, 199, 52, 0.22);
}

.contact-form input:user-invalid,
.contact-form textarea:user-invalid {
    border-color: rgba(214, 110, 90, 0.8);
}

/* Honeypot: oculto para humanos, visible para bots */
.cf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cf-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}

.cf-actions .button {
    min-width: 180px;
}

.cf-note {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    line-height: 1.4;
}

.cf-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.cf-status.is-ok {
    color: #d8f3e3;
    background: rgba(31, 122, 77, 0.28);
    border: 1px solid rgba(31, 122, 77, 0.55);
}

.cf-status.is-error {
    color: #ffd9d1;
    background: rgba(178, 64, 47, 0.28);
    border: 1px solid rgba(178, 64, 47, 0.55);
}

.contact-form.is-sending [data-contact-submit] {
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 560px) {
    .cf-row {
        grid-template-columns: 1fr;
    }
}

.cf-wa-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--yellow);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
