/* GSM Ingeniería — hoja de estilos principal */

:root {
    --bosque: #12321f;
    --bosque-2: #1b4a2e;
    --hoja: #2f7d4a;
    --hoja-hover: #276b3f;
    --brote: #9fd067;
    --oro: #c4a864;

    --bg: #eff4ee;
    --surface: #ffffff;
    --surface-2: #e4ece2;
    --text: #13261a;
    --text-2: #56665c;
    --line: rgba(19, 38, 26, 0.12);
    --accent: var(--hoja);
    --on-accent: #ffffff;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 18px 40px -18px rgba(18, 50, 31, 0.35);

    --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --wide: 118%;
    --container: 1240px;
    --nav-h: 76px;

    color-scheme: light;

    /* compatibilidad con estilos antiguos del CMS */
    --accent-green: var(--hoja);
    --accent-gold: var(--oro);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --bg-surface: var(--surface);
    --bg-base: var(--bg);
    --border-color: var(--line);
}

[data-theme="dark"] {
    --bg: #0d1d13;
    --surface: #142a1c;
    --surface-2: #1a3424;
    --text: #e9f1e8;
    --text-2: #a3b5a8;
    --line: rgba(233, 241, 232, 0.12);
    --accent: #5fae6c;
    --on-accent: #0d1d13;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .3s ease, color .3s ease;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; }

:focus-visible { outline: 3px solid var(--brote); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.skip-link {
    position: absolute; left: 1rem; top: -60px; z-index: 9999;
    background: var(--brote); color: var(--bosque); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
.display {
    font-stretch: var(--wide);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: .95;
}
.section-title {
    font-stretch: var(--wide);
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}
.section-lead { color: var(--text-2); font-size: 1.125rem; max-width: 56ch; margin-top: .9rem; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 52px; padding: 0 1.6rem;
    border-radius: 999px;
    font-weight: 700; font-size: 1rem; line-height: 1;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brote); color: var(--bosque); }
.btn-primary:hover { background: #b4de80; }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--hoja-hover); }
[data-theme="dark"] .btn-solid:hover { background: #73c180; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-line { border: 1.5px solid var(--line); color: var(--text); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-white { background: #fff; color: var(--bosque); }
.btn-white:hover { background: var(--brote); }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; }

.link-more {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--accent); font-weight: 700; padding: .3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease;
}
.link-more:hover { border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 1000;
    height: var(--nav-h);
    transition: background-color .3s ease, box-shadow .3s ease, color .3s ease;
    color: #fff;
}
.site-header.is-solid,
.no-hero .site-header {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
    color: var(--text);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand-name { font-stretch: var(--wide); font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brand-name b { color: var(--oro); font-weight: 800; }
.brand-name span { font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 0; margin-left: auto; }
.nav-link {
    position: relative; padding: .55rem .8rem; border-radius: 999px;
    font-size: .95rem; font-weight: 600; opacity: .88; white-space: nowrap;
    transition: opacity .2s ease, background-color .2s ease;
}
.nav-link:hover { opacity: 1; background: rgba(127,127,127,.14); }
.nav-link.active { opacity: 1; }
.nav-link.active::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem;
    height: 2px; border-radius: 2px; background: var(--brote);
}
.is-solid .nav-link.active::after, .no-hero .nav-link.active::after { background: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-grid; place-items: center; font-size: 1.05rem;
    transition: background-color .2s ease;
}
.icon-btn:hover { background: rgba(127,127,127,.16); }
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.nav-cta { min-height: 44px; padding: 0 1.2rem; font-size: .92rem; }
.menu-toggle { display: none; }

/* Drawer móvil */
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 1500; background: rgba(8, 20, 12, .55);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1600;
    width: min(360px, 88vw);
    background: var(--surface); color: var(--text);
    padding: 1.25rem 1.5rem 2rem;
    display: flex; flex-direction: column; gap: 1.5rem;
    transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
    overflow-y: auto;
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
    font-stretch: var(--wide); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
    padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.drawer nav a.active { color: var(--accent); }
.drawer .btn { width: 100%; }

/* ---------- Hero (inicio y páginas) ---------- */
.hero-immersive {
    position: relative; isolation: isolate;
    min-height: max(640px, 100svh);
    color: #fff;
    display: flex; flex-direction: column; justify-content: flex-end;
    overflow: hidden;
    background: var(--bosque);
}
.hero-immersive.page-hero { min-height: max(460px, 68svh); }

.hero-backgrounds { position: absolute; inset: 0; z-index: -1; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide:first-child { opacity: 1; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; object-fit: cover; }
.hero-slide.active img { animation: kenburns 9s ease-out both; }
.hero-slide:nth-child(even).active img { animation-name: kenburns-b; }
@keyframes kenburns { from { transform: scale(1.16) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
@keyframes kenburns-b { from { transform: scale(1.16) translate(-1.5%, -1%); } to { transform: scale(1) translate(0, 0); } }

.hero-overlay, .hero-overlay-center {
    position: absolute; inset: 0; z-index: 9; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10,26,16,.55) 0%, rgba(10,26,16,0) 26%),
        linear-gradient(0deg, rgba(10,26,16,.92) 0%, rgba(10,26,16,.55) 38%, rgba(10,26,16,0) 70%),
        linear-gradient(90deg, rgba(10,26,16,.55) 0%, rgba(10,26,16,0) 60%);
}

.hero-body {
    position: relative; z-index: 10;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem;
}
.hero-title {
    font-stretch: var(--wide); font-weight: 800;
    font-size: clamp(2.7rem, 7vw, 6.6rem);
    line-height: .92; letter-spacing: -0.035em;
}
.page-hero .hero-title { font-size: clamp(2.5rem, 6.4vw, 5.6rem); max-width: 16ch; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-desc { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.86); max-width: 52ch; margin-top: 1.4rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* Secuencia de entrada (único momento animado) */
.js .hero-title .line > span { transform: translateY(105%); }
.js .hero-desc, .js .hero-buttons, .js .hero-controls { opacity: 0; transform: translateY(14px); }
.hero-ready .hero-title .line > span { transform: none; transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.hero-ready .hero-title .line-2 > span { transition-delay: .12s; }
.hero-ready .hero-desc, .hero-ready .hero-buttons, .hero-ready .hero-controls { opacity: 1; transform: none; transition: opacity .7s ease .45s, transform .7s ease .45s; }
.hero-ready .hero-buttons { transition-delay: .55s; }
.hero-ready .hero-controls { transition-delay: .7s; }

/* Controles del carrusel */
.hero-controls { display: flex; flex-direction: column; align-items: flex-end; gap: .8rem; min-width: 220px; }
.hero-controls[hidden] { display: none; }
.hero-count { font-stretch: var(--wide); font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
.hero-count .total { opacity: .6; }
.hero-bars { display: flex; gap: 6px; width: 100%; }
.hero-bar {
    flex: 1; height: 22px; display: flex; align-items: center; padding: 0;
}
.hero-bar::before {
    content: ""; display: block; width: 100%; height: 3px; border-radius: 3px;
    background: rgba(255,255,255,.3);
    background-image: linear-gradient(var(--brote), var(--brote));
    background-repeat: no-repeat; background-size: var(--fill, 0%) 100%;
}
.hero-bar.done::before { --fill: 100%; }
.hero-bar.current::before { animation: barfill var(--dur, 6s) linear forwards; }
@keyframes barfill { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
.hero-arrows { display: flex; gap: .4rem; }
.hero-arrows button {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.45); color: #fff;
    transition: background-color .2s ease, border-color .2s ease;
}
.hero-arrows button:hover { background: rgba(255,255,255,.14); border-color: #fff; }

/* Cinta de novedades */
.ticker {
    position: relative; z-index: 10;
    display: flex; align-items: stretch;
    background: rgba(12, 32, 20, .72);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.12);
    min-height: 56px;
}
.ticker-label {
    flex-shrink: 0; display: flex; align-items: center; gap: .55rem;
    padding: 0 1.4rem; background: var(--brote); color: var(--bosque);
    font-weight: 800; font-size: .95rem;
}
.ticker-label .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--bosque); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee var(--ticker-dur, 40s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: .7rem; padding: 0 2.2rem; white-space: nowrap; font-weight: 600; color: rgba(255,255,255,.92); }
.ticker-item i { color: var(--brote); font-size: .8rem; }
.ticker-item small { color: rgba(255,255,255,.6); font-weight: 500; font-size: .9rem; }
.ticker-item:hover { color: #fff; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); flex-wrap: wrap; }

/* Novedades */
.news-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1.25rem; }
.news-side { display: grid; gap: 1.25rem; grid-auto-rows: 1fr; }
.news-card {
    position: relative; display: block; width: 100%; text-align: left;
    border-radius: var(--radius); overflow: hidden; background: var(--surface);
    box-shadow: var(--shadow); cursor: pointer;
}
.news-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card:hover img { transform: scale(1.04); }
.news-feature { min-height: 560px; color: #fff; }
.news-feature .news-media { position: absolute; inset: 0; }
.news-feature::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10,26,16,.92) 0%, rgba(10,26,16,.2) 55%, rgba(10,26,16,0) 100%);
}
.news-feature .news-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(1.5rem, 3vw, 2.4rem); }
.news-feature h3 { font-stretch: var(--wide); font-size: clamp(1.7rem, 3vw, 2.6rem); letter-spacing: -0.03em; margin: .7rem 0 .5rem; max-width: 20ch; }
.news-small { display: grid; grid-template-columns: 42% 1fr; min-height: 0; }
.news-small .news-media { min-height: 170px; overflow: hidden; }
.news-small .news-body { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; justify-content: center; }
.news-small h3 { font-size: 1.3rem; margin: .55rem 0 .35rem; letter-spacing: -0.02em; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; }
.tag {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .7rem; border-radius: 999px;
    background: var(--surface-2); color: var(--accent); font-weight: 700; font-size: .82rem;
}
.news-feature .tag { background: rgba(255,255,255,.16); color: #fff; }
.tag-new { background: var(--brote); color: var(--bosque); }
.news-feature .tag-new { background: var(--brote); color: var(--bosque); }
.news-loc { color: var(--text-2); font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.news-feature .news-loc { color: rgba(255,255,255,.8); }
.news-date { color: var(--text-2); }
.news-feature .news-date { color: rgba(255,255,255,.75); }
.news-empty { padding: 3rem; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--text-2); text-align: center; }

/* Servicios (lista en inicio) */
.svc-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.svc-item {
    display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start;
    padding: 1.5rem .25rem; border-bottom: 1px solid var(--line);
    transition: background-color .2s ease;
}
.svc-item:hover { background: var(--surface); }
.svc-item i { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 1.15rem; }
.svc-item h3 { font-size: 1.25rem; letter-spacing: -0.015em; }
.svc-item p { color: var(--text-2); font-size: .98rem; margin-top: .25rem; }

/* Cifras */
.stats-band { background: var(--bosque); color: #fff; position: relative; overflow: hidden; }
.stats-band .section-title { color: #fff; }
.stats-band .section-lead { color: rgba(255,255,255,.7); }
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255,255,255,.14); border-left: 1px solid rgba(255,255,255,.14);
}
.stat {
    padding: clamp(1.6rem, 3vw, 2.4rem);
    border-right: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14);
    display: flex; flex-direction: column; gap: .4rem; align-items: flex-start;
}
.stat i { color: var(--brote); font-size: 1.3rem; margin-bottom: .6rem; }
.stat h3 { font-stretch: var(--wide); font-size: clamp(2.6rem, 5vw, 4rem); letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.stat p { color: rgba(255,255,255,.75); font-size: 1.02rem; }
.stat button { margin-top: .8rem; color: var(--brote); font-weight: 700; font-size: .95rem; display: inline-flex; gap: .45rem; align-items: center; padding: .2rem 0; border-bottom: 2px solid transparent; }
.stat button:hover { border-color: currentColor; }
.stats-logo { position: absolute; right: -60px; top: -40px; width: 360px; opacity: .06; pointer-events: none; filter: grayscale(1) brightness(3); }

/* Clientes */
.logos-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos-track { display: flex; gap: 1.25rem; width: max-content; animation: marquee 45s linear infinite; }
.logos-marquee:hover .logos-track { animation-play-state: paused; }
.cliente-card {
    flex-shrink: 0; width: 220px; height: 120px; padding: 1.4rem;
    display: grid; place-items: center; text-align: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.cliente-card img { max-width: 100%; max-height: 72px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .3s ease, opacity .3s ease; }
.cliente-card:hover img { filter: none; opacity: 1; }
[data-theme="dark"] .cliente-card { background: #f4f7f3; }
.cliente-placeholder { color: var(--text-2); font-weight: 600; font-size: .95rem; }
[data-theme="dark"] .cliente-placeholder { color: #3d4a41; }
.clientes-grid-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.clientes-grid-page .cliente-card { width: auto; height: 150px; }

/* CTA */
.cta {
    position: relative; overflow: hidden;
    background: var(--hoja); color: #fff;
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; position: relative; z-index: 1; }
.cta h2 { font-stretch: var(--wide); font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -0.035em; line-height: .98; max-width: 16ch; }
.cta p { color: rgba(255,255,255,.85); margin-top: 1rem; font-size: 1.1rem; max-width: 48ch; }
.cta-actions { display: flex; flex-direction: column; gap: .7rem; }
.cta-mark { position: absolute; right: 4%; bottom: -30%; width: 420px; opacity: .12; filter: brightness(0) invert(1); pointer-events: none; }

/* Footer */
.site-footer { background: var(--bosque); color: rgba(255,255,255,.78); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; }
.site-footer .brand-name { color: #fff; }
.footer-about { margin-top: 1.1rem; max-width: 34ch; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; font-weight: 700; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--brote); }
.footer-contact li { display: flex; gap: .7rem; align-items: baseline; margin-bottom: .6rem; }
.footer-contact i { color: var(--brote); width: 18px; }
.footer-bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .92rem; color: rgba(255,255,255,.55); }

/* ---------- Bloques alternados (Nosotros, Servicios, Equipo, EHS) ---------- */
.blocks { display: grid; gap: clamp(3.5rem, 7vw, 6rem); }
.service-block { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.service-block .block-img-container {
    grid-row: 1; grid-column: 1 / 9; height: clamp(320px, 42vw, 520px);
    border-radius: var(--radius); overflow: hidden; background: var(--surface-2);
}
.service-block .block-img-container img { width: 100%; height: 100%; object-fit: cover; }
.service-block .block-card {
    grid-row: 1; grid-column: 7 / 13; z-index: 2;
    background: var(--surface); border-radius: var(--radius);
    padding: clamp(1.8rem, 3.5vw, 3rem); box-shadow: var(--shadow);
}
.service-block.left .block-img-container { grid-column: 5 / 13; }
.service-block.left .block-card { grid-column: 1 / 7; }
.block-card h2 { font-stretch: var(--wide); font-size: clamp(1.7rem, 2.8vw, 2.3rem); letter-spacing: -0.03em; margin-bottom: 1rem; }
.block-card h2 i { color: var(--accent); margin-right: .5rem; font-size: .8em; }
.block-card p, .block-card .eq-desc { color: var(--text-2); }
.block-card .eq-desc p + p { margin-top: .8rem; }
.block-card .cargo { color: var(--accent); font-weight: 700; margin: -.4rem 0 1rem; }
.block-card .link-more { margin-top: 1.2rem; }
.feature-list { margin-top: 1.4rem; display: grid; gap: .55rem; }
.feature-list li { display: flex; gap: .7rem; align-items: baseline; }
.feature-list i { color: var(--accent); }
.team-block-noimg .block-card { grid-column: 3 / 11; }
.block-img-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4rem; color: var(--accent); opacity: .5; }

/* Chips de navegación */
.chip-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.chip {
    padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--line);
    font-weight: 600; font-size: .95rem; transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Proyectos ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cat-tile {
    position: relative; overflow: hidden; min-height: 420px; border-radius: var(--radius);
    color: #fff; text-align: left; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.8rem; isolation: isolate;
}
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.cat-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10,26,16,.9) 0%, rgba(10,26,16,.15) 60%); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile i { font-size: 1.6rem; color: var(--brote); margin-bottom: .9rem; }
.cat-tile strong { font-stretch: var(--wide); font-size: clamp(1.6rem, 2.5vw, 2.2rem); letter-spacing: -0.03em; line-height: 1; }
.cat-tile span { color: rgba(255,255,255,.75); margin-top: .5rem; }
.cat-all { margin-top: 1.25rem; display: flex; justify-content: center; }

.portfolio-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.portfolio-toolbar h2 { font-stretch: var(--wide); font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.03em; }
.portfolio-apple-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.portfolio-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; text-align: left; display: flex; flex-direction: column; }
.portfolio-img-wrapper { height: 260px; overflow: hidden; background: var(--surface-2); }
.portfolio-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.portfolio-card:hover img { transform: scale(1.04); }
.portfolio-body { padding: 1.4rem 1.5rem 1.6rem; }
.portfolio-title { font-size: 1.35rem; margin: .7rem 0 .4rem; letter-spacing: -0.02em; }
.portfolio-loc { color: var(--text-2); display: flex; gap: .45rem; align-items: center; font-size: .95rem; }

/* Modal de proyectos */
.project-modal-overlay {
    position: fixed; inset: 0; z-index: 3000; background: rgba(6, 16, 10, .78);
    display: flex; align-items: center; justify-content: center; padding: 1.25rem;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.project-modal-overlay.active { opacity: 1; visibility: visible; }
.project-modal-content {
    position: relative; width: min(1180px, 100%); max-height: 92vh; overflow: auto;
    background: var(--surface); border-radius: var(--radius);
    display: grid; grid-template-columns: 1.5fr 1fr;
    transform: translateY(16px); transition: transform .35s ease;
}
.project-modal-overlay.active .project-modal-content { transform: none; }
.modal-close-btn {
    position: absolute; top: .9rem; right: .9rem; z-index: 5;
    width: 44px; height: 44px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow);
}
.modal-gallery { position: relative; background: #08140d; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.modal-main-img-wrapper { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.modal-main-img { width: 100%; height: 100%; object-fit: cover; }
.modal-arrow {
    position: absolute; top: calc(50% - 40px); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--bosque);
}
.modal-arrow.prev { left: 1.6rem; }
.modal-arrow.next { right: 1.6rem; }
.modal-thumbnails { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; }
.modal-thumbnails img, .modal-thumbnails > div { width: 80px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .6; flex-shrink: 0; }
.modal-thumbnails .active { opacity: 1; }
.modal-details { padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; gap: 1rem; }
.modal-details h2 { font-stretch: var(--wide); font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.03em; padding-right: 2.5rem; }
.modal-tag { align-self: flex-start; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--text-2); }
.modal-meta i { color: var(--accent); margin-right: .3rem; }
.modal-details h4 { font-size: 1rem; margin-top: .5rem; }
#modal-description { color: var(--text-2); white-space: pre-line; }
.btn-modal-action { margin-top: auto; align-self: flex-start; }

/* Modal de texto (cifras, nosotros, EHS) */
.info-modal {
    position: fixed; inset: 0; z-index: 3000; background: rgba(6, 16, 10, .72);
    display: flex; align-items: center; justify-content: center; padding: 1.25rem;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.info-modal.active { opacity: 1; visibility: visible; }
.info-modal-box {
    position: relative; width: min(640px, 100%); max-height: 85vh; overflow-y: auto;
    background: var(--surface); border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 3rem);
    transform: translateY(16px); transition: transform .35s ease;
}
.info-modal.active .info-modal-box { transform: none; }
.info-modal-box h2 { font-stretch: var(--wide); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; margin-bottom: 1rem; padding-right: 2.5rem; }
.info-modal-body { color: var(--text-2); line-height: 1.75; }
.info-modal-body strong { color: var(--text); }
.info-modal-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); }

/* ---------- EHS ---------- */
.ehs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.ehs-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ehs-card .ehs-media { height: 230px; overflow: hidden; }
.ehs-card img { width: 100%; height: 100%; object-fit: cover; }
.ehs-card .ehs-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.ehs-card h3 { font-size: 1.35rem; letter-spacing: -0.02em; display: flex; gap: .6rem; align-items: center; }
.ehs-card h3 i { color: var(--accent); }
.ehs-card .link-more { margin-top: auto; align-self: flex-start; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.contact-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem 1.6rem; }
.contact-row { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: center; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row > i { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 1.1rem; }
.contact-row h4 { font-size: .9rem; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.contact-row p { font-size: 1.12rem; font-weight: 700; }
.contact-row a:hover { color: var(--accent); }
.map-frame { margin-top: 1.25rem; border-radius: var(--radius); overflow: hidden; height: 260px; background: var(--surface-2); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Utilidades ---------- */
.bg-surface { background: var(--surface); }
.text-center { text-align: center; }
.muted { color: var(--text-2); }
.state-msg { padding: 3rem 0; text-align: center; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .nav-links, .nav-cta { display: none; }
    .menu-toggle { display: inline-grid; }
    .nav-actions { margin-left: auto; }
}
@media (max-width: 900px) {
    .hero-body { grid-template-columns: 1fr; }
    .hero-controls { align-items: flex-start; min-width: 0; width: 100%; }
    .news-grid { grid-template-columns: 1fr; }
    .news-feature { min-height: 440px; }
    .svc-list { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-inner { grid-template-columns: 1fr; }
    .cta-actions { flex-direction: row; flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .service-block, .service-block.left { display: flex; flex-direction: column; }
    .service-block .block-img-container { width: 100%; height: 300px; }
    .service-block .block-card { width: calc(100% - 2rem); margin-top: -70px; }
    .cat-tiles, .ehs-cards { grid-template-columns: 1fr; }
    .cat-tile { min-height: 260px; }
    .project-modal-content { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    :root { --nav-h: 66px; }
    .brand img { height: 38px; }
    .brand-name { font-size: 1.12rem; }
    .news-small { grid-template-columns: 1fr; }
    .news-small .news-media { height: 190px; }
    .stat { padding: 1.3rem 1.1rem; }
    .stat h3 { font-size: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-buttons .btn { flex: 1 1 100%; }
    .ticker-label { padding: 0 1rem; font-size: .88rem; }
    .portfolio-apple-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .hero-buttons .btn-primary, .cta-mark, .stats-logo { animation: none; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .ticker-track, .logos-track { animation: none !important; }
    .ticker-viewport, .logos-marquee { overflow-x: auto; }
}


/* ============================================================
   Header que se adapta al espacio disponible
   ============================================================ */
.site-header.hide-cta .nav-cta { display: none; }
.site-header.use-burger .nav-links { display: none; }
.site-header.use-burger .menu-toggle { display: inline-grid; }
.site-header.use-burger .nav-actions { margin-left: auto; }
.site-header { transition: background-color .3s ease, box-shadow .3s ease, color .3s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
.site-header.is-hidden { transform: translateY(-100%); }
.nav-link { padding: .55rem .7rem; white-space: nowrap; }
.nav-link::after {
    content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .25rem;
    height: 2px; border-radius: 2px; background: var(--brote);
    transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.is-solid .nav-link::after, .no-hero .nav-link::after { background: var(--accent); }
@media (max-width: 1500px) {
    .brand-name { font-size: 1.2rem; }
    .nav-link { padding: .5rem .6rem; font-size: .92rem; }
    .nav-link::after { left: .6rem; right: .6rem; }
    .nav-inner { gap: 1rem; }
}

/* ============================================================
   Dinamismo: botones
   ============================================================ */
.btn {
    position: relative; overflow: hidden; isolation: isolate;
    transform: translate(var(--mx, 0px), var(--my, 0px));
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%);
    transform: translateX(-130%); transition: transform .8s ease;
}
.btn:hover::before { transform: translateX(130%); }
.btn:hover { transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 3px)); box-shadow: 0 14px 26px -12px rgba(18, 50, 31, .55); }
.btn:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(.96); box-shadow: none; }
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(159, 208, 103, .8); }
.btn-ghost:hover, .btn-line:hover { box-shadow: none; }
.btn-ghost::before { background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.25) 50%, transparent 65%); }
.btn.with-arrow::after {
    content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .85em;
    display: inline-block; width: 0; opacity: 0; margin-left: -.6rem; overflow: hidden;
    transform: translateX(-10px);
    transition: width .3s ease, opacity .3s ease, transform .3s cubic-bezier(.2,.8,.2,1), margin .3s ease;
}
.btn.with-arrow:hover::after { width: 1em; opacity: 1; margin-left: 0; transform: none; }
.btn .ripple {
    position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
    background: rgba(255,255,255,.55); transform: scale(0); animation: ripple .65s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.hero-buttons .btn-primary { animation: ringpulse 2.8s ease-out 2.4s infinite; }
@keyframes ringpulse {
    0% { box-shadow: 0 0 0 0 rgba(159, 208, 103, .6); }
    70%, 100% { box-shadow: 0 0 0 18px rgba(159, 208, 103, 0); }
}
.link-more::after {
    content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8em;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.link-more:hover::after { transform: translateX(5px); }
.chip { transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s ease, color .2s ease, background-color .2s ease; }
.chip:hover { transform: translateY(-2px); }
.brand img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.brand:hover img { transform: translateY(-2px) scale(1.08) rotate(-3deg); }
.icon-btn { transition: background-color .2s ease, transform .25s ease; }
.icon-btn:hover { transform: scale(1.08); }
.footer-links a, .footer-contact a { display: inline-block; transition: color .2s ease, transform .25s ease; }
.footer-links a:hover { transform: translateX(4px); }

/* ============================================================
   Dinamismo: tarjetas y bloques
   ============================================================ */
.news-card, .portfolio-card, .ehs-card, .cat-tile {
    transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
}
.news-card:hover, .portfolio-card:hover, .ehs-card:hover, .cat-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 50px -24px rgba(18, 50, 31, .55);
}
.ehs-card img { transition: transform .6s ease; }
.ehs-card:hover img { transform: scale(1.06); }
.service-block .block-img-container img { transition: transform .8s ease; }
.service-block:hover .block-img-container img { transform: scale(1.04); }
.service-block .block-card { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease; }
.service-block:hover .block-card { box-shadow: 0 30px 50px -24px rgba(18, 50, 31, .5); }
.svc-item > i { transition: background-color .25s ease, color .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.svc-item:hover > i { background: var(--accent); color: var(--on-accent); transform: rotate(-8deg) scale(1.08); }
.svc-item > div { transition: transform .3s ease; }
.svc-item:hover > div { transform: translateX(6px); }
.stat { transition: background-color .3s ease; }
.stat:hover { background: rgba(255,255,255,.05); }
.stat > i { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.stat:hover > i { transform: translateY(-4px) scale(1.15); }
.contact-row > i { transition: background-color .25s ease, color .25s ease, transform .3s ease; }
.contact-row:hover > i { background: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.cta-mark { animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(2deg); } }
.stats-logo { animation: floaty 12s ease-in-out infinite; }

/* Barra de avance de lectura */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none;
    background: linear-gradient(90deg, var(--hoja), var(--brote));
    transform-origin: left; transform: scaleX(var(--p, 0));
}

/* Parallax del hero */
.hero-backgrounds { inset: -8% 0; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

/* ============================================================
   Aparición al hacer scroll (solo cuando el JS las activa)
   ============================================================ */
.reveal {
    opacity: 0;
    transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1);
    transition-delay: calc(var(--i, 0) * 110ms);
}
.reveal-up { transform: translateY(34px); }
.reveal-left { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }
.reveal-zoom { transform: scale(.94); }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 900px) {
    .reveal-left, .reveal-right { transform: translateY(30px); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
    .btn::before, .ripple { display: none; }
    .hero-backgrounds { transform: none; }
}

.contact-layout > * { min-width: 0; }
.contact-row > div { min-width: 0; }
.contact-row p { overflow-wrap: anywhere; font-size: clamp(1rem, 4.4vw, 1.12rem); }
.footer-contact li > a, .footer-contact li > span { min-width: 0; overflow-wrap: anywhere; }
.site-header .nav-inner { max-width: 1560px; }
