/* SGGH — versión oscura de alta gama */

:root {
  --bg: #0a0e11;
  --bg-2: #0f1418;
  --surface: #141b20;
  --surface-2: #1a2329;
  --line: rgb(236 232 225 / 10%);
  --line-strong: rgb(236 232 225 / 22%);
  --text: #ece8e1;
  --muted: #9aa3a8;
  --accent: #f36e21;
  --accent-soft: #f9a26f;
  --blue: #4aa3df;
  --sand: #c9a27a;
  --em: #dcbb95;

  --font-sans: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --container: 84rem;
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 22px;

  color-scheme: dark;
}

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

html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.is-loading { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #0a0e11; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--text); color: var(--bg); padding: 0.5rem 1rem; }

.kicker { display: inline-flex; align-items: center; gap: 0.7rem; margin: 0 0 1.5rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.display { font-size: clamp(2.75rem, 7vw, 6.5rem); }
.display-sm { font-size: clamp(2.25rem, 5vw, 4.25rem); }
.display em, .display-sm em { color: var(--em); }
.section-lead { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.125rem); max-width: 32rem; margin: 0; text-wrap: pretty; }
.section { padding: clamp(5rem, 12vw, 10rem) 0; }

/* Botones */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #140a03; }
.btn-accent:hover { background: var(--accent-soft); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; }
.btn-outline { border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }

/* Precarga */
.loader { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: var(--bg); clip-path: inset(0 0 0 0); }
.loader-inner { display: grid; justify-items: center; gap: 1.5rem; }
.loader img { width: 88px; }
.loader-bar { width: 180px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.loader-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.2em; }
.no-js .loader { display: none; }

/* Barra de progreso y grano */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); transform-origin: left; transform: scaleX(0); }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 700;
  pointer-events: none;
  opacity: 0.035;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cabecera */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 200; transition: transform 0.5s var(--ease), background-color 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgb(10 14 17 / 72%); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; filter: drop-shadow(0 2px 10px rgb(0 0 0 / 40%)); }
.brand-name { display: grid; font-weight: 700; letter-spacing: 0.16em; line-height: 1.15; }
.brand-name small { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav-extra { display: none; }
.nav { display: flex; align-items: center; gap: 2.25rem; }
.nav-list { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { position: relative; text-decoration: none; font-size: 0.9rem; color: var(--text); opacity: 0.72; transition: opacity 0.2s; }
.nav-list a:hover, .nav-list a[aria-current="true"] { opacity: 1; }
.nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav-list a:hover::after, .nav-list a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 18px; height: 1.5px; margin: auto; background: var(--text); position: relative; transition: transform 0.3s var(--ease), background-color 0.3s; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-content: end; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transform: scale(1.15); filter: saturate(0.85) contrast(1.05); }
.hero-canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; mix-blend-mode: screen; }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(10 14 17 / 70%) 0%, rgb(10 14 17 / 15%) 30%, rgb(10 14 17 / 55%) 65%, var(--bg) 100%),
    radial-gradient(ellipse at 20% 80%, rgb(10 14 17 / 70%), transparent 60%);
}

.hero-content { padding-top: calc(var(--header-h) + 4rem); padding-bottom: 7.5rem; }
.hero-title { font-size: clamp(3rem, 8.2vw, 8.25rem); font-weight: 400; letter-spacing: -0.045em; margin-bottom: 2.25rem; }
.hero-title em { color: var(--em); }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; }
.hero-lead { max-width: 30rem; margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgb(236 232 225 / 82%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-meta { position: absolute; left: 0; right: 0; bottom: 1.75rem; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.scroll-cue { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.scroll-cue span { position: relative; width: 1px; height: 36px; background: var(--line-strong); overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* Marquesina */
.marquee { padding: 1.4rem 0; border-block: 1px solid var(--line); overflow: hidden; }
.marquee-row { display: flex; overflow: hidden; }
.marquee-track { display: flex; flex: none; align-items: center; gap: 2.25rem; padding-right: 2.25rem; font-size: clamp(1.15rem, 2.2vw, 1.75rem); font-weight: 400; letter-spacing: -0.02em; white-space: nowrap; color: rgb(236 232 225 / 62%); animation: marquee 80s linear infinite; }
.marquee-track i { font-style: normal; font-size: 0.5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Manifiesto */
.sustain-quote .word { opacity: 0.22; transition: opacity 0.2s; }
.no-js .sustain-quote .word { opacity: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.stat { padding: 2rem 1.5rem 0 0; }
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.stat-num { display: flex; align-items: flex-start; font-size: clamp(3rem, 5.6vw, 5.25rem); font-weight: 300; line-height: 1; letter-spacing: -0.05em; }
.stat-num sup { font-size: 0.4em; color: var(--accent); margin-left: 0.1em; }
.stat-label { display: block; margin-top: 0.85rem; color: var(--muted); font-size: 0.95rem; max-width: 14rem; }

/* Capas del terreno */
.strata-section { padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); position: relative; overflow: clip; }
.strata-intro { display: grid; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.strata-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.strata-visual { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: clamp(1.25rem, 2.5vw, 2rem); }
.strata-frame { position: relative; width: min(26rem, calc((100svh - var(--header-h) - 3rem) * 400 / 760)); aspect-ratio: 400 / 760; min-width: 0; }
.strata-svg { width: 100%; height: 100%; border-radius: var(--radius); background: #121a20; border: 1px solid var(--line); }
.stratum { opacity: 0.5; transition: opacity 0.6s var(--ease), filter 0.6s var(--ease); }
.stratum.is-active { opacity: 1; filter: brightness(1.25) saturate(1.2); }
.borehole-track { stroke: rgb(255 255 255 / 12%); stroke-width: 2; stroke-dasharray: 4 6; fill: none; }
.borehole { stroke: var(--accent); stroke-width: 3; fill: none; stroke-dasharray: 650; stroke-dashoffset: 650; }
.strata-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; fill: #e9eef2; fill-opacity: 0.75; }
.rig { filter: drop-shadow(0 2px 6px rgb(0 0 0 / 50%)); }
.borehole-bit { fill: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); }
.drone rect { fill: var(--text); }
.drone path { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.drone { animation: hover 3s ease-in-out infinite; }
@keyframes hover { 50% { transform: translate(124px, 24px); } }

.strata-depth { position: absolute; top: 1.25rem; left: 1.25rem; padding: 0.4rem 0.75rem; border-radius: 999px; background: rgb(10 14 17 / 80%); border: 1px solid var(--line); color: var(--accent-soft); font-size: 0.95rem; font-weight: 600; }
.strata-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; color: var(--muted); }
.strata-legend li { position: relative; padding-left: 1.1rem; border-left: 1px solid var(--line); transition: color 0.4s, border-color 0.4s; }
.strata-legend button { display: grid; gap: 0.15rem; width: 100%; padding: 0.55rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lg-name { font-size: 0.98rem; font-weight: 500; }
.lg-meta { font-size: 0.62rem; color: var(--muted); }
.strata-legend .lg-title { padding: 0 0 0.4rem; border: 0; font-size: 0.66rem; color: var(--muted); }
.strata-legend .lg-gap { margin-top: 1rem; }
.strata-legend .lg-extra .lg-name { font-size: 0.9rem; color: var(--em); }
.strata-legend button:hover { color: var(--text); }
.strata-note { position: absolute; right: 1rem; bottom: 0.75rem; margin: 0; font-size: 0.65rem; color: rgb(236 232 225 / 55%); }
.strata-legend li[data-legend]::before { content: ""; position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--c, var(--line-strong)); opacity: 0.55; transition: opacity 0.4s, transform 0.4s; }
.strata-legend li.is-active { color: var(--text); border-left-color: var(--c); }
.strata-legend li.is-active::before { opacity: 1; transform: scale(1.8); }

.strata-panel { min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: flex-start; padding: 0 0 4rem; opacity: 0.35; transition: opacity 0.6s var(--ease); }
.strata-panel.is-active { opacity: 1; }
.strata-panel:last-child { min-height: 0; padding-bottom: 0; }
.panel-index { color: var(--accent-soft); margin-bottom: 1.25rem; }
.strata-panel h3 { font-size: clamp(1.8rem, 3vw, 2.75rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 1.25rem; }
.strata-panel > p { color: rgb(236 232 225 / 78%); font-size: 1.05rem; line-height: 1.6; max-width: 40rem; margin: 0 0 1.75rem; }
.panel-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.panel-list li { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.panel-list strong { font-weight: 600; }
.panel-list span { color: var(--muted); font-size: 0.95rem; }

/* Equipamiento */
.equipment-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(15rem, 19rem); gap: 1rem; }
.equip { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); isolation: isolate; display: flex; align-items: flex-end; }
.equip img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) brightness(0.8); transform: scale(1.02); transition: transform 1.2s var(--ease), filter 0.6s; }
.equip::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(10 14 17 / 0%) 30%, rgb(10 14 17 / 88%)); }
.equip:hover img { transform: scale(1.08); filter: saturate(1) brightness(0.9); }
.equip-body { padding: 1.4rem; }
.equip-body .mono { color: var(--em); }
.equip-body h3 { margin: 0.4rem 0 0.35rem; font-weight: 500; }
.equip-body p { margin: 0; color: rgb(236 232 225 / 78%); font-size: 0.92rem; max-width: 30rem; }
.equip-xl { grid-column: span 2; grid-row: span 2; }
.equip-xl h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; }
.equip-wide { grid-column: 1 / -1; }
.equip-specs { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.equip-specs li { display: grid; gap: 0.5rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 0.95rem; }
.equip-specs .mono { color: var(--text); }

/* Imagen dentro de cada capa */
.panel-media { margin: 0 0 1.75rem; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 6; background: var(--surface); }
.panel-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); transform: scale(1.06); transition: transform 1.4s var(--ease); }
.strata-panel.is-active .panel-media img { transform: scale(1); }

/* Banda panorámica */
.photo-band { position: relative; height: clamp(22rem, 60svh, 38rem); overflow: hidden; }
.photo-band img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; filter: saturate(0.85) brightness(0.75); }
.photo-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, transparent 25%, transparent 70%, var(--bg) 100%); }
.photo-band-caption { position: absolute; left: 0; right: 0; bottom: 2.5rem; z-index: 1; display: flex; justify-content: space-between; gap: 1rem; color: rgb(236 232 225 / 80%); }

/* Proyectos */
.projects { position: relative; }
.projects-pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; gap: 2.5rem; padding: calc(var(--header-h) + 1rem) 0 2.5rem; overflow: hidden; }
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
.projects-track { display: flex; gap: 1.5rem; padding-inline: max(1.25rem, calc((100vw - var(--container)) / 2)); width: max-content; will-change: transform; }

.project {
  position: relative;
  flex: none;
  width: clamp(300px, 34vw, 520px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  isolation: isolate;
}

.project-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease), filter 0.6s; filter: saturate(0.8) brightness(0.85); }
.project:hover .project-media img, .project:focus-visible .project-media img { transform: scale(1.12); filter: saturate(1) brightness(1); }
.project-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(10 14 17 / 85%)); }
.project-num { position: absolute; top: 1.1rem; left: 1.25rem; z-index: 1; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--text); padding: 0.35rem 0.65rem; border-radius: 999px; background: rgb(10 14 17 / 60%); backdrop-filter: blur(6px); }
.project-metric { position: absolute; left: 1.25rem; bottom: 1rem; z-index: 1; }
.project-metric strong { display: block; font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.project-metric span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(236 232 225 / 75%); }
.project-body { padding: 1.4rem 1.4rem 1.6rem; display: grid; gap: 0.75rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; color: var(--accent-soft); }
.project-body h3 { font-size: 1.3rem; font-weight: 400; letter-spacing: -0.02em; }
.project-more { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; transition: color 0.3s, gap 0.3s; }
.project:hover .project-more { color: var(--text); gap: 0.9rem; }

.projects-progress { display: flex; align-items: center; gap: 1rem; color: var(--muted); }
.projects-progress .bar { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.projects-progress .bar span { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.projects-nav { display: flex; gap: 0.5rem; }
.round-btn { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.round-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.round-btn:disabled { opacity: 0.35; pointer-events: none; }

/* Presencia */
.presence { padding-top: clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; isolation: isolate; }
.presence-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* Metodología */

/* Sostenibilidad */
.sustain { position: relative; overflow: hidden; isolation: isolate; padding: clamp(6rem, 12vw, 10rem) 0; }
.sustain-bg { position: absolute; inset: -15% 0; z-index: -2; }
.sustain-bg img { width: 100%; height: 100%; object-fit: cover; }
.sustain::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(10 14 17 / 55%), transparent 70%), linear-gradient(180deg, var(--bg-2) 0%, rgb(10 14 17 / 62%) 30%, rgb(10 14 17 / 78%) 70%, var(--bg) 100%); }
.sustain-quote { font-size: clamp(1.9rem, 4vw, 3.75rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 400; max-width: 60rem; margin: 0 0 4rem; }
.sustain-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.sustain-list li { display: grid; gap: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.sustain-list .mono { color: var(--em); }
.sustain-list strong { font-size: 1.15rem; font-weight: 500; }
.sustain-list span:last-child { color: rgb(236 232 225 / 72%); font-size: 0.95rem; }
.norms { margin-top: clamp(5rem, 10vw, 8rem); padding: clamp(1.75rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 28px; background: rgb(12 17 21 / 72%); backdrop-filter: blur(14px); }
.norms-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: end; margin-bottom: 2.5rem; }
.norms-head .kicker { grid-column: 1 / -1; margin-bottom: 0; }
.norms-title { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; }
.norms-title em { color: var(--em); }
.norms-head > p:last-child { margin: 0; color: var(--muted); }
.norm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.norm { padding: 1.5rem; background: rgb(14 20 25 / 92%); transition: background-color 0.3s; }
.norm:hover { background: rgb(26 35 41 / 95%); }
.norm-code { margin: 0 0 0.9rem; color: var(--em); }
.norm h3 { margin-bottom: 0.5rem; font-size: 1.15rem; font-weight: 500; }
.norm p:last-child { margin: 0; color: var(--muted); font-size: 0.92rem; }
.norms-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.68rem; }

/* Diferenciales con foco de luz */

/* CTA */
.cta { padding: clamp(6rem, 14vw, 12rem) 0; background: linear-gradient(90deg, rgb(10 14 17 / 94%) 0%, rgb(10 14 17 / 72%) 55%, rgb(10 14 17 / 50%) 100%), linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg-2) 100%), url("../assets/img/cta.webp") center 70% / cover; }
.cta .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3rem; }
.cta-title { font-size: clamp(2.6rem, 6.8vw, 6.75rem); }
.cta-title em { color: var(--em); }

.cta-button {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(8rem, 12vw, 10rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: #140a03;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}

.cta-button:hover { background: var(--accent-soft); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(3rem, 7vw, 7rem); }
.contact-copy > p:not(.kicker) { color: var(--muted); font-size: 1.1rem; max-width: 28rem; margin: 1.5rem 0 0; }
.contact-list { list-style: none; margin: 3rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 7rem 1fr; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.contact-list .mono { color: var(--muted); }
.contact-list a { text-decoration: none; transition: color 0.2s; }
.contact-list a:hover { color: var(--accent-soft); }

.contact-form { display: grid; gap: 1.5rem; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { position: relative; display: block; }

.field input, .field textarea {
  width: 100%;
  padding: 1.6rem 0 0.6rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  border-radius: 0;
  transition: border-color 0.3s;
}

.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field span { position: absolute; left: 0; top: 1.6rem; color: var(--muted); pointer-events: none; transition: transform 0.3s var(--ease), color 0.3s; transform-origin: left top; }
.field input:focus + span, .field input:not(:placeholder-shown) + span, .field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { transform: translateY(-1.35rem) scale(0.78); color: var(--accent-soft); }

.chip-group { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-group legend { margin-bottom: 0.85rem; color: var(--muted); font-size: 0.9rem; }
.chip-group input { position: absolute; opacity: 0; pointer-events: none; }
.chip-group span { display: inline-block; padding: 0.55rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.9rem; cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.chip-group label:hover span { border-color: var(--text); }
.chip-group input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-group input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-note { margin: 0; color: var(--muted); font-size: 0.9rem; min-height: 1.4em; }

/* Pie */

/* Modal de proyecto */
.modal { width: min(100% - 2rem, 72rem); max-height: min(90svh, 52rem); padding: 0; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); color: var(--text); overflow: hidden; }
.modal::backdrop { background: rgb(5 8 10 / 75%); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in 0.6s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(30px) scale(0.98); } }
.modal-inner { display: grid; grid-template-columns: 1fr 1.1fr; max-height: inherit; }
.modal-media { position: relative; margin: 0; min-height: 20rem; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(1.75rem, 4vw, 3rem); overflow-y: auto; display: grid; grid-auto-rows: max-content; gap: 1.5rem; align-content: start; }
.modal-meta { margin: 0; color: var(--accent-soft); }
.modal-body h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); letter-spacing: -0.035em; line-height: 1.08; }
.modal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.modal-metrics div { padding: 1rem; background: var(--surface-2); }
.modal-metrics strong { display: block; font-size: 1.5rem; font-weight: 400; letter-spacing: -0.03em; }
.modal-metrics span { font-size: 0.8rem; color: var(--muted); }
.modal-facts { margin: 0; display: grid; gap: 1rem; }
.modal-facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.modal-facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.modal-facts dd { margin: 0; }

.modal-close { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgb(10 14 17 / 70%); color: var(--text); font-size: 1rem; cursor: pointer; backdrop-filter: blur(6px); }
.modal-close:hover { background: var(--text); color: var(--bg); }

/* Estados iniciales para animaciones (solo con JS activo) */
.js [data-fade] { opacity: 0; transform: translateY(30px); }

@media (prefers-reduced-motion: reduce) {
  .js [data-fade] { opacity: 1; transform: none; }
}

/* Responsive */
@media (width <= 900px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5rem;
    padding: var(--header-h) 1.25rem 2rem;
    background: var(--bg);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.7s var(--ease), visibility 0s 0.7s;
  }

  .nav.is-open { clip-path: inset(0); visibility: visible; transition: clip-path 0.7s var(--ease); }
  .nav-extra { display: grid; gap: 0.5rem; margin-top: auto; color: var(--muted); }
  .nav-extra a { text-decoration: none; }
  .nav .btn { align-self: flex-start; }

  /* backdrop-filter y transform crean un bloque contenedor que encogería el menú fijo */
  .site-header:has(.nav.is-open) { backdrop-filter: none; transform: none; background: transparent; }
  .nav-list { flex-direction: column; gap: 0.5rem; }
  .nav-list a { font-size: clamp(2.2rem, 10vw, 3.25rem); letter-spacing: -0.03em; opacity: 1; }
  .nav-list a::after { display: none; }

  .hero-meta .mono:last-child { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { margin-top: 2rem; }

  .strata-stage { grid-template-columns: 1fr; }
  .strata-visual { position: relative; top: auto; height: auto; grid-template-columns: 1fr; }
  .strata-frame { width: min(100%, calc(62svh * 400 / 760)); justify-self: center; }
  .stratum { opacity: 0.9; }
  .strata-depth { display: none; }
  .strata-legend { display: none; }
  .strata-panel { min-height: auto; padding: 3rem 0 0; opacity: 1; }
  .panel-list li { grid-template-columns: 1fr; gap: 0.25rem; }

  .projects-pin { min-height: auto; padding-top: 5rem; }
  .projects-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: none; }
  .project { width: min(82vw, 420px); scroll-snap-align: center; }
  .projects-progress { display: none; }


  .sustain-list, .norms-head { grid-template-columns: 1fr; }
  .norm-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid, .modal-inner { grid-template-columns: 1fr; }
  .modal { max-height: 92svh; overflow-y: auto; }
  .modal-media { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (width <= 600px) {
  .field-row { grid-template-columns: 1fr; }
  .modal-metrics { grid-template-columns: 1fr; }
  .modal-facts div { grid-template-columns: 1fr; gap: 0.25rem; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.15rem; }
  .hero-content { padding-bottom: 6.5rem; }
  .hero-shade { background: linear-gradient(180deg, rgb(10 14 17 / 60%) 0%, rgb(10 14 17 / 35%) 25%, rgb(10 14 17 / 82%) 60%, var(--bg) 100%); }
}

/* Acciones del modal */
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.5rem; }
.modal-nav { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); }

/* Pie: columnas en pantallas chicas */
@media (width <= 900px) {
  .modal-actions { flex-direction: column; align-items: stretch; }
}

@media (width <= 900px) {
  .equip-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 15rem; }
  .equip-xl { grid-column: 1 / -1; grid-row: span 2; }
  .equip-specs { grid-template-columns: 1fr; }
}

@media (width <= 600px) {
  .equip-grid { grid-template-columns: 1fr; }
  .equip-xl { grid-row: span 1; }
}

.equip-wide img { object-position: 50% 62%; }

/* ---------- Quiénes somos ---------- */
.about { position: relative; overflow: hidden; }
.about > .container { position: relative; }
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about-copy h2 { margin-bottom: 1.5rem; }
.about-lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--text); margin: 0 0 1rem; text-wrap: pretty; }
.about-copy > p:not(.kicker, .about-lead) { color: var(--muted); margin: 0 0 2rem; max-width: 36rem; }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.team-list li { display: grid; gap: 0.2rem; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.team-list strong { font-weight: 500; }
.team-list span { font-size: 0.88rem; color: var(--muted); }
.about-media { position: relative; margin: 0; }
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); filter: saturate(0.85); }
.about-badge { position: absolute; left: -1.5rem; bottom: 2rem; max-width: 17rem; padding: 1.1rem 1.25rem; display: grid; gap: 0.35rem; border-radius: 16px; background: rgb(20 27 32 / 88%); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.about-badge .mono { color: var(--em); }
.about-badge strong { font-weight: 500; line-height: 1.35; }

/* Control de calidad */
.quality { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; margin-top: clamp(5rem, 10vw, 8rem); padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.quality-media { position: relative; padding-bottom: 3rem; }
.quality-main { width: 88%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); filter: saturate(0.85); }
.quality-inset { position: absolute; right: 0; bottom: 0; width: 42%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 6px solid var(--bg); }
.quality-title { font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 1rem; }
.quality-title em { color: var(--em); }
.quality-copy > p:not(.kicker, .quality-iso) { color: var(--muted); margin: 0 0 1.75rem; max-width: 32rem; }
.quality-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.quality-list li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.quality-list .mono { color: var(--em); padding-top: 0.2rem; }
.quality-list strong { font-weight: 500; }
.quality-list p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.93rem; }
.quality-iso { margin: 1.5rem 0 0; color: var(--muted); }

/* ---------- Metodología: evolución del proyecto ---------- */
.method { position: relative; }
.method-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.method-aside { align-self: stretch; }
.method-sticky { position: sticky; top: calc(var(--header-h) + 2rem); }
.method-sticky h2 { margin-bottom: 1.25rem; }
.method-meter { position: relative; width: 11rem; aspect-ratio: 1; margin-top: 2.5rem; }
.method-meter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.meter-track { fill: none; stroke: var(--line); stroke-width: 4; }
.meter-fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 0.6s var(--ease); }
.meter-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 0.2rem; }
.meter-text strong { font-size: 2.4rem; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.meter-text .mono { color: var(--em); }
.method-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.68rem; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.75rem; display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.timeline::before { content: ""; position: absolute; left: 0.45rem; top: 0.5rem; bottom: 0.5rem; width: 1px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: 0.45rem; top: 0.5rem; width: 1px; height: var(--progress, 0%); max-height: calc(100% - 1rem); background: linear-gradient(var(--accent), var(--em)); }
.phase { position: relative; display: grid; gap: 1.25rem; }
.phase-body { opacity: 0.8; transition: opacity 0.6s var(--ease); }
.phase.is-reached .phase-body { opacity: 1; }
.phase:not(.is-reached) .phase-media img { filter: saturate(0.3) brightness(0.55); }
.phase-dot { position: absolute; left: -2.75rem; top: 0.3rem; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s; }
.phase.is-reached .phase-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgb(243 110 33 / 15%); }
.phase-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; }
.phase-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) brightness(0.9); transform: scale(1.06); transition: transform 1.4s var(--ease); }
.phase.is-reached .phase-media img { transform: scale(1); }
.phase-meta { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.6rem; color: var(--em); }
.phase-meta span:last-child { color: var(--muted); }
.phase-body h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 400; letter-spacing: -0.025em; margin-bottom: 0.6rem; }
.phase-body > p:not(.phase-meta, .phase-deliverable) { color: var(--muted); margin: 0 0 1rem; }
.phase-deliverable { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0; padding: 0.6rem 0.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0.92rem; }
.phase-deliverable .mono { color: var(--em); font-size: 0.68rem; }

/* ---------- Diferenciales ---------- */
.diffs { position: relative; background: radial-gradient(ellipse at 80% 0%, rgb(220 187 149 / 6%), transparent 55%); }
.diffs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.diff { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: border-color 0.4s, transform 0.5s var(--ease); }
.diff:hover { border-color: rgb(220 187 149 / 30%); transform: translateY(-4px); }
.diff::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(220 187 149 / 9%), transparent 60%); }
.diff-grid:hover .diff::before { opacity: 1; }
.diff-media { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.diff-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) brightness(0.8); transition: transform 1.2s var(--ease), filter 0.5s; }
.diff:hover .diff-media img { transform: scale(1.06); filter: saturate(0.95) brightness(0.9); }
.diff-body { position: relative; display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.6rem 1.6rem; }
.diff-icon { position: absolute; top: -1.6rem; left: 1.6rem; width: 3.2rem; height: 3.2rem; padding: 0.8rem; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); fill: none; stroke: var(--em); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.diff-body h3 { margin: 1.4rem 0 0.6rem; font-size: 1.35rem; font-weight: 400; letter-spacing: -0.02em; }
.diff-body p:not(.diff-detail) { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.95rem; }
.diff-detail { margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--em); font-size: 0.68rem; }

/* ---------- Fondos sutiles: capas y presencia ---------- */
.strata-section::after { content: ""; position: absolute; right: -10%; bottom: 10%; width: 50rem; height: 50rem; background: radial-gradient(circle, rgb(74 163 223 / 7%), transparent 60%); pointer-events: none; }
.strata-section > .container { position: relative; z-index: 1; }
.presence::before { content: ""; position: absolute; inset: auto 0 0; height: 78%; z-index: -1; background: url("../assets/img/cordillera.svg") center bottom / cover no-repeat; opacity: 0.95; }

/* ---------- Pie institucional ---------- */
.site-footer { position: relative; padding: 5rem 0 2rem; border-top: 1px solid var(--line); overflow: hidden; isolation: isolate; background: linear-gradient(180deg, transparent 0%, rgb(11 17 21 / 85%) 100%); }
.footer-ridge { position: absolute; left: 0; right: 0; bottom: 0; height: 22rem; z-index: -1; background: url("../assets/img/cordillera.svg") center bottom / cover no-repeat; opacity: 0.85; mask-image: linear-gradient(180deg, transparent 0%, #000 35%); }
.footer-brand-band { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer-logo { width: clamp(6rem, 11vw, 9rem); height: auto; padding: 1rem; border-radius: 22px; background: #f4f1ec; }
.footer-name { margin: 0; font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 600; letter-spacing: 0.08em; line-height: 1; }
.footer-fullname { margin: 0.5rem 0 0; font-size: 1.05rem; color: var(--text); }
.footer-tagline { margin: 0.35rem 0 0; font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; color: var(--em); }
.footer-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; color: var(--muted); padding-bottom: 8rem; }
.footer-col .mono { margin: 0 0 1rem; color: var(--muted); }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; color: var(--text); }
.footer-top a { text-decoration: none; color: var(--text); }
.footer-top a:hover { color: var(--em); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--muted); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

@media (width <= 1100px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (width <= 900px) {
  .about-grid, .quality, .method-grid { grid-template-columns: 1fr; }
  .about-media img { aspect-ratio: 4 / 3; }
  .about-badge { left: 1rem; }
  .method-sticky { position: static; }
  .method-meter { display: none; }
  .footer-brand-band { grid-template-columns: auto 1fr; }
  .footer-cta { grid-column: 1 / -1; justify-self: start; }
  .footer-top { grid-template-columns: 1fr 1fr; padding-bottom: 6rem; }
}

@media (width <= 600px) {
  .diff-grid, .team-list { grid-template-columns: 1fr; }
  .footer-brand-band { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .timeline { padding-left: 2rem; }
  .phase-dot { left: -2rem; }
  .phase-meta { flex-direction: column; gap: 0.2rem; }
}

@media (width <= 600px) {
  .norm-grid { grid-template-columns: 1fr; }
}

/* Fondos con más presencia en secciones que eran solo texto */
.method > .container { position: relative; }
.diffs > .container { position: relative; }
.contact { position: relative; isolation: isolate; background: linear-gradient(90deg, rgb(15 20 24 / 97%) 0%, rgb(15 20 24 / 90%) 45%, rgb(15 20 24 / 72%) 100%), linear-gradient(180deg, var(--bg) 0%, transparent 25%, transparent 75%, var(--bg-2) 100%), url("../assets/img/fondo-contacto.webp") center 40% / cover; }

/* ---------- Equipamiento como parte de los servicios ---------- */
.equipment { position: relative; padding-top: clamp(1rem, 2vw, 2rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.layer-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0.85rem 0 0; padding: 0; }
.layer-tags li { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem 0.2rem 0.45rem; border-radius: 999px; background: rgb(10 14 17 / 55%); border: 1px solid rgb(236 232 225 / 14%); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); backdrop-filter: blur(6px); }
.layer-tags li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.l0 { --c: #b39b78; }
.l1 { --c: #a58a66; }
.l2 { --c: #4aa3df; }
.l3 { --c: #8a837a; }
.l4 { --c: #e9a45a; }
.strata-legend li[data-legend="0"] { --c: #b39b78; }
.strata-legend li[data-legend="1"] { --c: #a58a66; }
.strata-legend li[data-legend="2"] { --c: #4aa3df; }
.strata-legend li[data-legend="3"] { --c: #8a837a; }
.strata-legend li[data-legend="4"] { --c: #e9a45a; }

.transversal { margin-top: clamp(4rem, 8vw, 6rem); }
.transversal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.transversal-head .kicker { margin-bottom: 0.75rem; }
.transversal-title { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; }
.transversal-title em { color: var(--em); }
.transversal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tcard { position: relative; display: flex; align-items: flex-end; min-height: 24rem; border-radius: var(--radius); overflow: hidden; isolation: isolate; border: 1px solid var(--line); }
.tcard img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) brightness(0.75); transition: transform 1.2s var(--ease); }
.tcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(10 14 17 / 5%) 20%, rgb(10 14 17 / 92%) 85%); }
.tcard:hover img { transform: scale(1.05); }
.tcard-body { padding: 1.6rem; }
.tcard-body .mono { color: var(--em); }
.tcard-body h4 { margin: 0.45rem 0 0.5rem; font-size: 1.45rem; font-weight: 400; letter-spacing: -0.02em; }
.tcard-body p { margin: 0; color: rgb(236 232 225 / 80%); font-size: 0.95rem; }
.tcard-main h4 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.tcard-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.tcard-list li { padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid rgb(220 187 149 / 35%); color: var(--em); font-size: 0.8rem; }

.photo-band-tall { height: clamp(26rem, 72svh, 46rem); }

@media (width <= 900px) {
  .transversal-grid { grid-template-columns: 1fr; }
  .tcard { min-height: 20rem; }
}

/* Proyectos: resumen en tarjeta y ficha */
.project-summary { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.modal-info { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.modal-info li { display: grid; gap: 0.25rem; }
.modal-info .mono { color: var(--muted); font-size: 0.66rem; }
.modal-info strong { font-weight: 500; font-size: 0.92rem; line-height: 1.35; }

@media (width <= 600px) {
  .modal-info { grid-template-columns: 1fr; }
}

/* Curvas de nivel como relleno general: capa fija detrás de todo el contenido, no se desplaza */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../assets/img/topo.svg") center / cover no-repeat;
  opacity: 0.75;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 35%, rgb(0 0 0 / 35%) 100%);
}

/* ---------- Servicios: introducción e índice ---------- */
.services-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.services-head .display { margin: 0; }
.services-lead .section-lead { max-width: 34rem; }
.services-stats { display: flex; gap: clamp(1.5rem, 4vw, 3rem); list-style: none; margin: 1.75rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); }
.services-stats li { display: grid; gap: 0.2rem; }
.services-stats strong { font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; color: var(--em); }
.services-stats span { font-size: 0.85rem; color: var(--muted); }

.lq { --c: var(--accent); }

.panel-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.panel-tags li { padding: 0.3rem 0.7rem; border-radius: 6px; background: rgb(220 187 149 / 9%); color: var(--em); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; }

/* ---------- Control de calidad destacado ---------- */
.quality-hero { position: relative; margin-top: clamp(5rem, 10vw, 8rem); padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 1rem); }
.quality-hero::before { content: ""; position: absolute; left: 0; top: -1px; width: 8rem; height: 1px; background: var(--accent); }
.quality-hero-head { max-width: 52rem; }
.quality-hero-head h2 { margin-bottom: 1.25rem; }
.quality-lead { margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: rgb(236 232 225 / 85%); }
.quality-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: clamp(2rem, 4vw, 3rem) 0; }
.quality-audience article { padding: 1.25rem 0 0; border-top: 1px solid var(--line-strong); }
.quality-audience .mono { color: var(--em); }
.quality-audience h3 { margin: 0.6rem 0 0.5rem; font-size: 1.3rem; font-weight: 400; letter-spacing: -0.02em; }
.quality-audience p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.quality-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.quality-seal { position: absolute; left: 1rem; top: 1rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem 0.45rem 0.6rem; border-radius: 999px; background: rgb(10 14 17 / 78%); border: 1px solid rgb(220 187 149 / 35%); color: var(--em); backdrop-filter: blur(8px); }
.quality-seal svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentcolor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quality-seal span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; }
.quality-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.quality-steps li { display: grid; gap: 0.4rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.quality-steps .mono { color: var(--em); }
.quality-steps strong { font-weight: 500; font-size: 1.05rem; }
.quality-steps p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.quality-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.quality-foot .tcard-list { margin: 0; }
.quality-foot .mono { margin: 0; color: var(--muted); }

@media (width <= 900px) {
  .services-head, .quality-body, .quality-audience { grid-template-columns: 1fr; }
}

@media (width <= 600px) {
  .quality-steps { grid-template-columns: 1fr; }
  .services-stats { gap: 1.25rem; }
}

/* Entregables y equipos por capa */
.panel-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 1.5rem; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-facts > div { padding: 1.1rem 1.25rem; background: rgb(12 17 21 / 82%); }
.panel-facts .mono { margin: 0 0 0.6rem; color: var(--em); font-size: 0.66rem; }
.panel-facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.panel-facts li { position: relative; padding-left: 0.9rem; font-size: 0.9rem; color: rgb(236 232 225 / 82%); line-height: 1.4; }
.panel-facts li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 4px; height: 4px; border-radius: 50%; background: var(--em); }

@media (width <= 600px) {
  .panel-facts { grid-template-columns: 1fr; }
}

/* Matriz de las 18 especialidades */
.spec-matrix { display: grid; grid-template-columns: repeat(5, 1fr) 0.9fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-col { padding: 0 1.25rem 1.5rem 0; border-right: 1px solid var(--line); }
.spec-col + .spec-col { padding-left: 1.25rem; }
.spec-col:last-child { border-right: 0; padding-right: 0; }
.spec-head { position: relative; display: grid; gap: 0.25rem; width: 100%; padding: 1.4rem 0 1.1rem; margin-bottom: 0.9rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.spec-head::before { content: ""; position: absolute; left: 0; top: -1px; width: 2.5rem; height: 2px; background: var(--c); transition: width 0.4s var(--ease); }
.spec-head:hover::before { width: 100%; }
.spec-head > .mono:first-child { color: var(--muted); font-size: 0.64rem; }
.spec-head strong { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; }
.spec-count { color: var(--em); font-size: 0.62rem; }
.spec-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.spec-col li { display: grid; grid-template-columns: 1.8rem 1fr; font-size: 0.93rem; line-height: 1.35; color: rgb(236 232 225 / 85%); }
.spec-col li .mono { color: var(--c); font-size: 0.68rem; padding-top: 0.15rem; }
.spec-hint { margin: 1.25rem 0 0; color: var(--muted); }

@media (width <= 1100px) {
  .spec-matrix { grid-template-columns: repeat(3, 1fr); }
  .spec-col:nth-child(3n) { border-right: 0; padding-right: 0; }
  .spec-col:nth-child(3n + 1) { padding-left: 0; }
}

@media (width <= 600px) {
  .spec-matrix { grid-template-columns: 1fr 1fr; }
  .spec-col, .spec-col:nth-child(3n), .spec-col:nth-child(3n + 1) { padding: 0 0.75rem 1.25rem 0; border-right: 0; }
  .spec-col:nth-child(even) { padding: 0 0 1.25rem 0.75rem; }
}

/* ---------- Perfil fijado: escenario de una pantalla, las capas se reemplazan al bajar ---------- */
.strata-pinned { position: relative; height: calc(var(--layers, 5) * 85svh + 100svh - var(--header-h)); }
.strata-pinned .strata-stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); padding: 1.5rem 0; align-items: stretch; }
.strata-pinned .strata-visual { position: static; height: 100%; align-items: start; grid-template-rows: minmax(0, 1fr); }
.strata-pinned .strata-frame { height: 100%; width: auto; max-width: 27rem; max-height: calc(27rem * 760 / 400); }
.strata-pinned .strata-panels { display: grid; height: 100%; min-height: 0; }
.strata-pinned .strata-panel { grid-area: 1 / 1; min-height: 0; height: 100%; padding: 0; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), visibility 0s 0.5s; }
.strata-pinned .strata-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.strata-pinned .strata-panel > * { flex-shrink: 0; }
.strata-pinned .panel-media { aspect-ratio: auto; height: clamp(5.5rem, calc(100svh - 44rem), 15rem); margin-bottom: 1rem; }
.strata-pinned .panel-index { margin-bottom: 0.6rem; }
.strata-pinned .strata-panel h3 { font-size: clamp(1.5rem, min(2.6vw, 4.2svh), 2.4rem); margin-bottom: 0.55rem; }
.strata-pinned .strata-panel > p { margin-bottom: 1rem; font-size: 1rem; }
.strata-pinned .panel-list li { padding: 0.55rem 0; }
.strata-pinned .panel-facts { margin-top: 1rem; }
.strata-pinned .panel-facts > div { padding: 0.85rem 1.1rem; }
.strata-pinned .panel-tags { margin-top: 0.9rem; }

@media (height < 1000px) {
  .strata-pinned .panel-tags { display: none; }
  .strata-pinned .strata-panel > p { font-size: 0.95rem; margin-bottom: 0.8rem; }
}

/* ---------- Información extra del escenario: anotaciones, navegación y caso ---------- */

.strata-side { display: flex; flex-direction: column; gap: 1rem; min-height: 0; width: clamp(12.5rem, 15vw, 15rem); }
.strata-pinned .strata-side { height: 100%; overflow: hidden; padding-left: 8px; margin-left: -8px; }
.layer-nav { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; color: var(--muted); }
.layer-nav .round-btn { width: 40px; height: 40px; font-size: 0.95rem; }
.layer-case { display: grid; grid-template-columns: 52px 1fr; gap: 0.75rem; align-items: center; width: 100%; padding: 0.6rem; border: 1px solid var(--line); border-radius: 14px; background: rgb(14 20 25 / 80%); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.layer-case:hover { border-color: rgb(220 187 149 / 40%); background: rgb(26 35 41 / 90%); }
.layer-case img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; }
.layer-case-text { display: grid; gap: 0.15rem; min-width: 0; }
.layer-case-text .mono { font-size: 0.58rem; color: var(--em); }
.layer-case-text strong { font-size: 0.82rem; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.layer-case-meta { font-size: 0.72rem; color: var(--muted); }

@media (width <= 900px) {
  .layer-nav, .layer-case { display: none; }
  }


@media (height < 820px) {
  .strata-pinned .layer-case { display: none; }
}

/* ---------- Señales de avance en el escenario fijo ---------- */
.depth-line { position: absolute; left: 0; right: 0; top: 13%; z-index: 2; height: 0; border-top: 1px dashed rgb(243 110 33 / 70%); pointer-events: none; }
.depth-line::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 28px; background: linear-gradient(180deg, transparent, rgb(243 110 33 / 10%), transparent); }
.depth-line span { position: absolute; right: 0.5rem; top: 0; transform: translateY(-50%); padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--accent); color: #140a03; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }

.strata-legend li[data-legend]::after { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: calc(var(--fill, 0) * 100%); background: var(--c); }

.panel-progress { height: 2px; margin: -0.2rem 0 0.9rem; background: var(--line); border-radius: 2px; overflow: hidden; }
.panel-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--em)); transform-origin: left; transform: scaleX(0); }

.layer-count { display: grid; gap: 0.2rem; flex: 1; min-width: 0; }
.layer-count-num { white-space: nowrap; font-size: 0.8rem; color: var(--text); }
.layer-count small { font-size: 0.58rem; color: var(--em); letter-spacing: 0.06em; }

.strata-pinned .panel-media img { transition: transform 0.25s linear, filter 0.6s; }
.strata-pinned .strata-panel.is-past { transform: translateY(-30px); }
.strata-pinned .strata-panel:not(.is-active, .is-past) { transform: translateY(30px); }

/* Formulario: campo trampa oculto y estados del envío */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note[data-state="sending"] { color: var(--muted); }
.form-note[data-state="ok"] { color: #7fd0a0; }
.form-note[data-state="error"] { color: var(--accent-soft); }
[data-form-submit]:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Ficha de proyecto: galería y lista (las filas no se comprimen con poco alto) ---------- */
.modal-thumbs { position: absolute; left: 1rem; bottom: 1rem; display: flex; gap: 0.5rem; }
.modal-thumbs button { padding: 0; width: 4.5rem; height: 3rem; border: 2px solid rgb(236 232 225 / 35%); border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; transition: border-color 0.3s; }
.modal-thumbs button[aria-pressed="true"], .modal-thumbs button:hover { border-color: var(--accent); }
.modal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.modal-list li { position: relative; padding-left: 1rem; }
.modal-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Inspección técnica (ITO) ---------- */
.ito { position: relative; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 1rem); }
.ito::before { content: ""; position: absolute; left: 0; top: -1px; width: 8rem; height: 1px; background: var(--accent); }
.ito-head { max-width: 52rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.ito-head h2 { margin-bottom: 1.25rem; }
.ito-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ito-media { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; }
.ito-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.ito-media figcaption { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; padding: 0.55rem 0.8rem; border-radius: 12px; background: rgb(10 14 17 / 78%); color: var(--text); font-size: 0.62rem; backdrop-filter: blur(6px); }
.ito-scopes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ito-scopes article { padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.ito-scopes .mono { color: var(--em); }
.ito-scopes h3 { margin: 0.6rem 0 0.5rem; font-size: 1.3rem; font-weight: 400; letter-spacing: -0.02em; }
.ito-scopes p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ito-kpi { margin: 2rem 0 1.5rem; }
.ito-kpi .mono { margin: 0 0 0.25rem; color: var(--muted); }
.ito-case { margin-top: 1.5rem; }

/* ---------- Mapa de faenas ---------- */
.presence-head .section-lead { max-width: 30rem; }
.map-layout { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-bottom: clamp(3rem, 6vw, 5rem); }
.chile-map { position: relative; width: 100%; aspect-ratio: var(--ratio); }
.map-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.map-sea { fill: none; }
.map-region { fill: #172028; stroke: rgb(236 232 225 / 24%); stroke-width: 0.6; stroke-linejoin: round; transition: fill 0.4s, stroke 0.4s; }
.map-region.has-work { fill: #1f2c35; stroke: rgb(220 187 149 / 40%); }
.map-region.is-active { fill: rgb(243 110 33 / 20%); stroke: var(--accent-soft); }
.map-grid { stroke: rgb(236 232 225 / 9%); stroke-dasharray: 2 5; }
.map-grid-label { fill: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-anchor: end; }
.map-inset path { fill: rgb(236 232 225 / 22%); }
.map-inset rect { fill: none; stroke: var(--accent); stroke-width: 0.8; }
.map-inset text { fill: var(--muted); font-family: var(--font-mono); font-size: 8px; text-anchor: middle; text-transform: uppercase; }
.map-leader { fill: none; stroke: rgb(236 232 225 / 28%); stroke-width: 0.7; transition: stroke 0.3s; }
.map-leader.is-active { stroke: var(--accent); stroke-width: 1.1; }
.map-places circle { fill: var(--em); stroke: var(--bg); stroke-width: 0.8; }
.map-pins { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.map-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(243 110 33 / 20%); cursor: pointer; }
.map-pin.is-active .map-dot { background: #fff; box-shadow: 0 0 0 4px var(--accent); }
.map-pin.is-active .map-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2.4s var(--ease) infinite; }
.map-label { position: absolute; transform: translateY(-50%); display: grid; grid-template-columns: auto 1fr; column-gap: 0.5rem; align-items: baseline; max-width: 46%; padding: 0.4rem 0.65rem; border: 1px solid var(--line-strong); border-radius: 10px; background: rgb(14 20 25 / 88%); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.map-label:hover { border-color: var(--em); }
.map-label[aria-pressed="true"] { border-color: var(--accent); background: rgb(40 24 14 / 92%); }
.map-label .mono { grid-row: span 2; color: var(--accent-soft); font-size: 0.62rem; }
.map-label strong { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.map-label small { grid-column: 2; color: var(--muted); font-size: 0.66rem; line-height: 1.25; }
.map-detail { border: 1px solid var(--line); border-radius: var(--radius); background: rgb(20 27 32 / 92%); overflow: hidden; }
.map-detail-media { margin: 0; aspect-ratio: 5 / 2; }
.map-detail-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.map-detail-body { display: grid; gap: 1rem; padding: clamp(1.25rem, 2.5vw, 1.9rem); }
.map-detail-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin: 0; color: var(--accent-soft); }
.map-detail-body h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 400; letter-spacing: -0.025em; }
.map-detail-client { margin: -0.4rem 0 0; color: var(--em); font-size: 0.92rem; }
.map-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.map-detail-metrics div { padding: 0.8rem 0.9rem; background: var(--surface-2); }
.map-detail-metrics strong { display: block; font-size: 1.2rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }
.map-detail-metrics span { font-size: 0.74rem; color: var(--muted); line-height: 1.3; }
.map-detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.map-detail-list li { position: relative; padding-left: 1rem; color: rgb(236 232 225 / 82%); font-size: 0.92rem; line-height: 1.45; }
.map-detail-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.map-detail-places { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.map-detail-places li { padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid rgb(220 187 149 / 35%); color: var(--em); font-size: 0.78rem; }
.map-detail-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.map-detail-nav { display: flex; gap: 0.5rem; }
.map-detail-nav .round-btn { width: 40px; height: 40px; }

/* ---------- Bloques expandibles ---------- */
.expand { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.expand.is-open { grid-template-rows: 1fr; }
.expand-inner { min-height: 0; overflow: hidden; }
.expand-toggle { display: inline-flex; align-items: center; gap: 0.6rem; width: fit-content; margin-top: 1rem; padding: 0.45rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(10 14 17 / 40%); color: var(--text); font: inherit; font-size: 0.82rem; cursor: pointer; transition: border-color 0.3s, color 0.3s; }
.expand-toggle:hover { border-color: var(--em); color: var(--em); }
.expand-icon { position: relative; flex: none; width: 10px; height: 10px; }
.expand-icon::before, .expand-icon::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 2px; border-radius: 1px; background: currentcolor; transition: transform 0.4s var(--ease); }
.expand-icon::after { transform: rotate(90deg); }
[aria-expanded="true"] .expand-icon::after, details[open] > summary .expand-icon::after { transform: rotate(0deg); }
.expand-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.expand-list li { position: relative; padding-left: 1rem; color: rgb(236 232 225 / 82%); font-size: 0.92rem; line-height: 1.45; }
.expand-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--em); }
.expand-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; margin-top: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: rgb(14 20 25 / 72%); }
.expand-cols .mono { margin: 0; color: var(--em); font-size: 0.66rem; }
.expand-cols .expand-list { margin-top: 0.6rem; }
.phase, .norm, .diff, .sustain-list li { cursor: pointer; }
.phase .expand-toggle { display: flex; }
.diff.is-expanded { border-color: rgb(220 187 149 / 35%); }
.norm.is-expanded { background: rgb(26 35 41 / 95%); }
.norm > p:not(.norm-code) { margin: 0; color: var(--muted); font-size: 0.92rem; }
.sustain-list li > span:not(.mono) { color: rgb(236 232 225 / 72%); font-size: 0.95rem; }
.sustain-list .expand-toggle { background: rgb(10 14 17 / 55%); }

/* ---------- Servicios transversales: cuatro tarjetas ---------- */
.tcard-link { display: inline-flex; gap: 0.4rem; margin-top: 0.9rem; color: var(--em); font-size: 0.88rem; text-decoration: none; }
.tcard-link:hover { color: var(--text); }
.spec-col li a { color: inherit; text-decoration: none; transition: color 0.2s; }
.spec-col li a:hover { color: var(--em); }
.contact-phones { display: grid; gap: 0.2rem; }

/* ---------- Preguntas frecuentes ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.faq-head h2 { margin-bottom: 1.25rem; }
.faq-list { border-bottom: 1px solid var(--line); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.3rem 0; list-style: none; font-size: clamp(1.05rem, 1.4vw, 1.2rem); letter-spacing: -0.01em; cursor: pointer; transition: color 0.2s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--em); }
.faq-item p { margin: 0 0 1.4rem; max-width: 46rem; color: var(--muted); }

/* ---------- Clientes: carrusel de logos ---------- */
.clients { padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; }
.clients-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.clients-head .kicker { margin: 0; }
.clients-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; letter-spacing: -0.02em; color: var(--muted); }
.clients-title em { color: var(--em); }
.logo-marquee { padding: 1.75rem 0; border-block: 1px solid var(--line); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.logo-row { overflow: hidden; }
.logo-track { display: flex; width: max-content; animation: logo-scroll 80s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-set { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.logo-set li { display: flex; align-items: center; gap: 0.7rem; padding: 0 clamp(1.75rem, 3.5vw, 3rem); opacity: 0.5; transition: opacity 0.3s; }
.logo-set li:hover { opacity: 1; }
.logo-set img { width: auto; height: 40px; max-width: 13rem; object-fit: contain; }
.logo-word { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; color: #fff; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
  .logo-set[aria-hidden="true"] { display: none; }
  .logo-set { flex-wrap: wrap; row-gap: 1.25rem; }
}

@media (width <= 1100px) {
  .transversal-grid { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); }
}

@media (width <= 900px) {
  .ito-body, .faq-grid, .map-layout { grid-template-columns: 1fr; }
  .ito-media { aspect-ratio: 4 / 3; }
  .chile-map { max-width: 26rem; margin-inline: auto; }
  .faq-head { position: static; }
}

@media (width <= 600px) {
  .transversal-grid, .ito-scopes, .expand-cols { grid-template-columns: 1fr; }
  .map-detail-metrics { grid-template-columns: 1fr; }
  .logo-set img { height: 32px; }
  .map-label small { display: none; }
}

/* ---------- Perfil en celular: línea de sondaje que baja por el costado de las capas ---------- */
.bore-rail { display: none; }
@media (width <= 900px) {
  .strata-frame { width: min(100%, calc(50svh * 400 / 760)); }
  .strata-panels { position: relative; padding-left: 1.6rem; }
  .bore-rail { position: absolute; top: 1.5rem; bottom: 0; left: 0.35rem; display: block; width: 4px; }
  .bore-rail::before { content: ""; position: absolute; inset: 0; border-radius: 2px; background: var(--rail-colors, var(--line)); opacity: 0.2; }
  .bore-rail-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--rail-colors, var(--accent)); clip-path: inset(0 0 calc((1 - var(--rail-p, 0)) * 100%) 0); }
  .bore-rail-bit { position: sticky; top: 55svh; display: block; width: 4px; height: 0; }
  .bore-rail-bit i { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(243 110 33 / 25%); }
  .bore-rail-bit b { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 0.15rem 0.3rem; border-radius: 6px; background: var(--accent); color: #140a03; font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700; white-space: nowrap; writing-mode: vertical-rl; }
  .strata-panel { margin-top: 1.5rem; padding: 1.25rem 1.1rem 1.4rem; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: 18px; background: rgb(14 20 25 / 70%); }
  .strata-panel[data-panel="0"] { --c: #b39b78; }
  .strata-panel[data-panel="1"] { --c: #a58a66; }
  .strata-panel[data-panel="2"] { --c: #4aa3df; }
  .strata-panel[data-panel="3"] { --c: #8a837a; }
  .strata-panel[data-panel="4"] { --c: #e9a45a; }
  .strata-panel .panel-media { aspect-ratio: 16 / 9; margin-bottom: 1.1rem; }
  .strata-panel h3 { font-size: 1.65rem; margin-bottom: 0.75rem; }
  .strata-panel > p { font-size: 0.98rem; margin-bottom: 1.1rem; }
  .panel-list li { padding: 0.8rem 0; }
}

/* Índice de especialidades en celular: tarjetas que se deslizan de lado */
@media (width <= 600px) {
  .spec-matrix { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -1.25rem; padding: 0.25rem 1.25rem 0.75rem; border: 0; scrollbar-width: none; }
  .spec-matrix::-webkit-scrollbar { display: none; }
  .spec-col, .spec-col:nth-child(3n), .spec-col:nth-child(3n + 1), .spec-col:nth-child(even) { flex: 0 0 74%; padding: 0 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: rgb(14 20 25 / 72%); scroll-snap-align: start; }
  .spec-head { padding-top: 1.2rem; }
  .spec-hint::before { content: "Desliza para ver todas las capas → · "; }
}
