/* Intelligent Reservoir — estilos del sitio (mismo sistema visual que xpectra-web) */
:root {
  --bg: #061018;
  --bg2: #091722;
  --panel: #0c1d29;
  --line: rgba(169, 221, 235, .15);
  --text: #f3f8fa;
  --muted: #8da7b2;
  --cyan: #20d6ef;
  --cyan2: #75efff;
  --lime: #b8ef64;
  --max: 1280px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, Arial, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
section[id] { scroll-margin-top: 82px; }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; }

.page-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 82px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  background: rgba(6, 16, 24, .78); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: flex; align-items: center; gap: 12px; }
/* Logo IR como máscara (img/ir-mark.svg + img/ir-wordmark.svg): toma el color del tema */
.brand-mark { width: 36px; height: 38px; flex: none; background: var(--cyan); -webkit-mask: url(/img/ir-mark.svg) center / contain no-repeat; mask: url(/img/ir-mark.svg) center / contain no-repeat; }
.brand-word { width: 134px; height: 32px; flex: none; background: var(--text); -webkit-mask: url(/img/ir-wordmark.svg) left center / contain no-repeat; mask: url(/img/ir-wordmark.svg) left center / contain no-repeat; }
.desktop-nav { display: flex; gap: 34px; }
.desktop-nav a { font-size: 13px; color: #b9cbd2; transition: .25s; position: relative; }
.desktop-nav a:hover { color: white; }
.desktop-nav a[aria-current="page"] { color: var(--cyan); }
.desktop-nav a[aria-current="page"]:after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 1px; background: var(--cyan); }
.header-actions { display: flex; gap: 15px; align-items: center; }
.language-toggle { background: transparent; color: #728d98; border: 0; display: flex; gap: 7px; font: 700 11px Inter, sans-serif; cursor: pointer; padding: 8px; }
.language-toggle span.active { color: var(--cyan); }
.theme-toggle { background: transparent; border: 1px solid var(--line); color: #728d98; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0; transition: .25s; }
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-moon, .logo-on-light { display: none; }
[data-theme="light"] .icon-sun, [data-theme="light"] .logo-on-dark { display: none; }
[data-theme="light"] .icon-moon, [data-theme="light"] .logo-on-light { display: block; }

/* ---------- Buttons ---------- */
.button {
  border: 0; background: var(--cyan); color: #001219; font-weight: 800; padding: 16px 22px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: .25s; cursor: pointer; font-family: inherit; font-size: 14px;
}
.button:hover { background: var(--cyan2); transform: translateY(-2px); }
.button-small { padding: 12px 17px; font-size: 12px; }
.button-outline { background: transparent; color: var(--text); border: 1px solid rgba(32, 214, 239, .55); }
.button-outline:hover { background: rgba(32, 214, 239, .1); }
.arrow { font-size: 18px; }
.menu-toggle { display: none; background: none; border: 0; width: 34px; cursor: pointer; }
.menu-toggle span { display: block; height: 1px; background: white; margin: 7px 0; }
.mobile-menu { display: none; }

/* ---------- Layout ---------- */
.section { max-width: var(--max); margin: auto; padding: 120px 28px; }
h1, h2, h3, h4 { font-family: "Space Grotesk", Inter, sans-serif; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.eyebrow > span:first-child { width: 28px; height: 1px; background: var(--cyan); }
.text-link { font-size: 13px; display: flex; gap: 12px; color: #d6e4e8; }
.text-link:hover { color: var(--cyan); }

/* ---------- Hero (inicio) ---------- */
.hero { min-height: 100vh; padding-top: 155px; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 55px; }
.hero h1 { font-size: clamp(50px, 6vw, 85px); line-height: .98; letter-spacing: -.055em; margin: 25px 0 28px; }
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--cyan); }
.hero-copy > p { color: #a9bdc5; font-size: 18px; line-height: 1.7; max-width: 650px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 32px; margin-top: 38px; }
.hero-stats { display: flex; gap: 46px; margin-top: 68px; border-top: 1px solid var(--line); padding-top: 28px; }
.hero-stats div { display: flex; flex-direction: column; gap: 5px; }
.hero-stats strong { font: 600 28px "Space Grotesk", sans-serif; }
.hero-stats span { font-size: 11px; color: var(--muted); }

.hero-visual { aspect-ratio: 1 / 1; position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-visual:before { content: ""; position: absolute; inset: 7%; background: radial-gradient(circle, rgba(32, 214, 239, .12), transparent 62%); filter: blur(10px); }
.radar-ring { position: absolute; border: 1px solid rgba(91, 224, 243, .22); border-radius: 50%; }
.ring-one { inset: 15%; }
.ring-two { inset: 27%; border-style: dashed; animation: spin 18s linear infinite; }
.ring-three { inset: 38%; }
.scan-line { position: absolute; width: 35%; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); left: 50%; transform-origin: left; animation: scan 5s linear infinite; box-shadow: 0 0 8px var(--cyan); }
.core-orb { width: 28%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--cyan); display: grid; place-items: center; box-shadow: 0 0 40px rgba(32, 214, 239, .2), inset 0 0 30px rgba(32, 214, 239, .15); position: relative; }
.core-orb:before, .core-orb:after { content: ""; position: absolute; inset: -12px; border: 1px solid rgba(32, 214, 239, .35); border-radius: 50%; animation: pulse 3s ease-out infinite; }
.core-orb:after { animation-delay: 1.5s; }
.core-orb .brand-mark { width: 46%; height: 46%; }
.data-card { position: absolute; background: rgba(10, 29, 40, .8); backdrop-filter: blur(12px); border: 1px solid rgba(102, 229, 245, .22); padding: 14px 16px; min-width: 150px; box-shadow: 0 20px 45px rgba(0, 0, 0, .2); }
.data-card small { display: block; color: var(--cyan); font-size: 9px; letter-spacing: .16em; }
.data-card strong { display: block; font: 600 17px "Space Grotesk", sans-serif; margin: 7px 0 2px; }
.data-card span { font-size: 9px; color: var(--muted); }
.card-ms { top: 17%; right: 2%; }
.card-xrf { bottom: 17%; left: 0; }
.card-hmse { bottom: 4%; right: 9%; }
.live-pill { position: absolute; top: 8%; left: 13%; font-size: 9px; letter-spacing: .15em; color: #b7d2d8; display: flex; gap: 8px; align-items: center; }
.live-pill i { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 8px var(--lime); }
.well-path { position: absolute; inset: 0; }
.path-node { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.n1 { left: 20%; top: 38%; }
.n2 { left: 31%; top: 66%; }
.n3 { right: 27%; top: 25%; }
.n4 { right: 18%; top: 60%; }

/* ---------- Page hero (páginas internas) ---------- */
/* Foto de fondo (--photo) fundida con el fondo por la izquierda y abajo */
.page-hero { --gutter: max(28px, calc((100vw - var(--max)) / 2)); position: relative; isolation: isolate; min-height: 620px; padding: 190px var(--gutter) 110px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
/* La foto llega solo hasta el borde del contenido (mismo margen que el header), con el borde derecho difuminado */
.page-hero:before { content: ""; position: absolute; top: 0; bottom: 0; right: var(--gutter); left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * .3); z-index: -2; background: var(--photo) center / cover no-repeat; opacity: .85; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.page-hero:after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 30%, rgba(6, 16, 24, .55) 60%, rgba(6, 16, 24, .15)), linear-gradient(transparent 55%, var(--bg)); }
.page-hero h1 { font-size: clamp(46px, 5.6vw, 80px); line-height: 1; letter-spacing: -.05em; margin: 25px 0 24px; max-width: 820px; }
.page-hero p { color: #a9bdc5; font-size: 18px; line-height: 1.7; max-width: 640px; margin: 0; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; background: #08141d; }
.marquee-track { display: flex; align-items: center; gap: 30px; width: max-content; animation: marquee 30s linear infinite; color: #6e8994; font-size: 10px; letter-spacing: .18em; }
.marquee-track i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }

/* ---------- Section headings ---------- */
.section-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 65px; }
.section-heading.compact { grid-template-columns: 1fr 1.5fr; }
.section-number { color: var(--cyan); font: 600 12px "Space Grotesk", sans-serif; margin-right: 16px; }
.eyebrow-text { font-size: 10px; font-weight: 800; letter-spacing: .18em; color: #a6bbc3; }
.section-heading h2, .split h2, .about h2, .contact h2, .team h2 { font-size: clamp(38px, 4.7vw, 67px); line-height: 1.05; letter-spacing: -.045em; margin: 0; }
.section-heading p { grid-column: 2; color: var(--muted); line-height: 1.75; max-width: 700px; margin: 0; }

/* ---------- Propuesta (flow panel) ---------- */
.flow-panel { display: grid; grid-template-columns: 1fr .8fr 1fr; min-height: 410px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(18, 44, 57, .45), rgba(7, 18, 27, .6)); position: relative; overflow: hidden; }
.flow-panel:before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(32, 214, 239, .09), transparent 40%); }
.flow-inputs, .flow-outputs { padding: 38px; display: flex; flex-direction: column; justify-content: center; gap: 14px; z-index: 1; }
.flow-inputs div { border: 1px solid var(--line); padding: 18px; display: grid; grid-template-columns: 34px 1fr; gap: 2px; }
.flow-inputs span { grid-row: 1 / 3; color: var(--cyan); font-size: 10px; }
.flow-inputs strong { font-size: 13px; }
.flow-inputs small { color: var(--muted); font-size: 9px; }
.flow-center { display: grid; place-content: center; justify-items: center; text-align: center; border-inline: 1px solid var(--line); z-index: 1; padding: 28px; }
.flow-center .brand-mark { width: 54px; height: 58px; margin-bottom: 14px; }
.pulse-logo { font: 700 22px "Space Grotesk", sans-serif; }
.pulse-logo span { color: var(--cyan); }
.flow-center p { font-size: 9px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.flow-outputs div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 17px 4px; font-size: 12px; }
.flow-outputs span { color: var(--cyan); }

/* ---------- Tarjetas con icono (pozo, servicios, desarrollos) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.info-card { grid-column: span 2; min-height: 280px; padding: 28px; background: rgba(11, 29, 40, .72); border: 1px solid var(--line); transition: .35s; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.info-card:hover { transform: translateY(-8px); border-color: rgba(32, 214, 239, .5); background: #0d2431; }
.info-card:after { content: ""; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(32, 214, 239, .12); border-radius: 50%; right: -75px; bottom: -75px; }
.info-card.wide { grid-column: span 3; }
.card-top { display: flex; justify-content: space-between; color: var(--cyan); font-size: 11px; }
.card-icon { width: 44px; height: 44px; border: 1px solid rgba(32, 214, 239, .4); position: relative; flex: none; }
/* Iconos de img/icons/*.svg usados como máscara: toman el color del tema */
.card-icon:before { content: ""; position: absolute; inset: 7px; background: var(--cyan); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.info-card h3 { font-size: 25px; letter-spacing: -.02em; margin: 36px 0 14px; }
.info-card p { color: #94aab3; font-size: 13px; line-height: 1.65; margin: 0; }
.info-card p + p { margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 25px; }
.tags span { font-size: 8px; color: #82a5b1; border: 1px solid var(--line); padding: 6px 8px; letter-spacing: .06em; }
.info-card .quote { color: var(--text); font: 600 15px/1.45 "Space Grotesk", sans-serif; margin-bottom: 12px; }

/* Servicios: lista compacta de 12 */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service { display: flex; flex-direction: column; gap: 26px; min-height: 190px; padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(11, 29, 40, .5); transition: .3s; }
.service:hover { background: #0c212d; }
.service .card-top { align-items: flex-start; }
.service h3 { font-size: 18px; letter-spacing: -.01em; line-height: 1.25; margin: auto 0 0; }
.service small { color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

/* Desarrollos: logotipo (wordmark) como máscara */
.dev-logo { height: 34px; width: 100%; margin: 34px 0 18px; background: var(--text); -webkit-mask: var(--icon) left center / contain no-repeat; mask: var(--icon) left center / contain no-repeat; }
.dev-logo.tall { height: 56px; }
/* Tarjeta destacada XPECTRA-iD */
.featured-card { grid-column: span 6; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 38px; border: 1px solid rgba(32, 214, 239, .45); background: linear-gradient(120deg, rgba(32, 214, 239, .12), rgba(11, 29, 40, .72) 55%); position: relative; overflow: hidden; }
.featured-card .badge { justify-self: start; }
/* El display lo deciden .logo-on-dark / .logo-on-light según el tema */
.xp-logo-wrap { margin: 26px 0 18px; height: 30px; }
.xp-logo { height: 30px; width: auto; }
.featured-card p { color: #a9bdc5; font-size: 15px; line-height: 1.7; margin: 0 0 26px; max-width: 640px; }
.featured-card .tags { padding-top: 0; margin: 0 0 30px; }
.featured-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 300px; justify-self: center; width: 100%; }
.featured-visual img { width: 62%; border-radius: 50%; position: relative; z-index: 1; }
.featured-visual .radar-ring { inset: 4%; }
.featured-visual .radar-ring.ring-two { inset: 16%; }
.badge { font-size: 9px; font-weight: 800; letter-spacing: .16em; color: #001219; background: var(--lime); padding: 6px 9px; display: inline-block; }
.ecosystem { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 42px; margin-top: 14px; padding: 22px 28px; border: 1px solid var(--line); background: rgba(9, 23, 33, .6); }
.ecosystem span { font-size: 10px; font-weight: 800; letter-spacing: .18em; color: #a6bbc3; margin-right: auto; }
.ecosystem img { height: 22px; width: auto; opacity: .85; }

/* ---------- Split (texto + foto) ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.split.reverse { grid-template-columns: .85fr 1.15fr; }
.split.reverse .split-media { order: 2; }
/* Foto integrada: se funde con el fondo por la izquierda y arriba/abajo, esquinas cian */
.split-media { position: relative; isolation: isolate; }
.split-media:before { content: ""; position: absolute; inset: -8% -4% -8% 20%; z-index: -1; background: radial-gradient(ellipse at 70% 50%, rgba(32, 214, 239, .16), transparent 65%); filter: blur(20px); }
.split-media:after { content: ""; position: absolute; inset: -10px -10px -10px 38%; pointer-events: none; background: linear-gradient(var(--cyan), var(--cyan)) top right / 26px 1px, linear-gradient(var(--cyan), var(--cyan)) top right / 1px 26px, linear-gradient(var(--cyan), var(--cyan)) bottom right / 26px 1px, linear-gradient(var(--cyan), var(--cyan)) bottom right / 1px 26px; background-repeat: no-repeat; opacity: .8; }
.split-photo { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%), linear-gradient(transparent, #000 9%, #000 93%, transparent), linear-gradient(90deg, transparent 50%, #000 62%); -webkit-mask-composite: source-in, source-over; mask-image: linear-gradient(90deg, transparent, #000 30%), linear-gradient(transparent, #000 9%, #000 93%, transparent), linear-gradient(90deg, transparent 50%, #000 62%); mask-composite: intersect, add; }
.split-media .data-card { z-index: 1; }
.card-a { top: 6%; left: -2%; }
.card-b { bottom: -6%; left: 8%; }
.split-copy > div:first-child, .about-copy > div:first-child, .team-copy > div:first-child { margin-bottom: 32px; }
.split-copy p, .about-copy p, .team-copy p { color: var(--muted); line-height: 1.75; }
.split-copy ul { padding: 0; margin: 35px 0 0; list-style: none; }
.split-copy li { display: flex; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.split-copy li > span { color: var(--cyan); font-size: 10px; }
.split-copy li div { display: flex; flex-direction: column; gap: 6px; }
.split-copy li strong { font-size: 13px; }
.split-copy li small { color: var(--muted); line-height: 1.5; }

/* ---------- Escenarios (fila) ---------- */
.industry-row { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.industry-row div { min-height: 170px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); transition: .3s; }
.industry-row div:last-child { border: 0; }
.industry-row div:hover { background: #0c212d; }
.industry-row span { font-size: 9px; color: var(--cyan); }
.industry-row strong { font: 600 20px "Space Grotesk", sans-serif; }

/* ---------- About / métrica ---------- */
.about { display: grid; grid-template-columns: 1.3fr .7fr; gap: 90px; align-items: end; }
.about-copy p { max-width: 760px; }
.about-metric { border-left: 1px solid var(--cyan); padding: 10px 0 10px 30px; display: flex; flex-direction: column-reverse; gap: 10px; }
.about-metric strong { font: 600 82px "Space Grotesk", sans-serif; color: var(--cyan); }
.about-metric span { color: var(--muted); font-size: 11px; max-width: 210px; line-height: 1.5; }

/* ---------- Historia (línea de tiempo) ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); position: relative; }
.timeline article { padding: 34px 28px; border-right: 1px solid var(--line); background: rgba(11, 29, 40, .5); position: relative; }
.timeline article:last-child { border-right: 0; }
.timeline article:before { content: ""; position: absolute; top: -5px; left: 28px; width: 9px; height: 9px; background: var(--cyan); transform: rotate(45deg); box-shadow: 0 0 10px var(--cyan); }
.timeline .year { font: 600 44px "Space Grotesk", sans-serif; color: var(--cyan); letter-spacing: -.03em; }
.timeline h3 { font-size: 20px; margin: 10px 0 16px; }
.timeline p { color: #94aab3; font-size: 13px; line-height: 1.7; margin: 0 0 12px; }
.timeline p:last-child { margin: 0; }

/* ---------- Misión / Visión ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.mv-grid article { padding: 44px 38px; background: rgba(11, 29, 40, .72); position: relative; overflow: hidden; }
.mv-grid article + article { border-left: 1px solid var(--line); }
.mv-grid article:first-child { background: linear-gradient(160deg, rgba(32, 214, 239, .1), rgba(11, 29, 40, .72) 55%); }
.mv-grid h3 { font-size: 32px; letter-spacing: -.03em; margin: 40px 0 16px; }
.mv-grid p { color: #a9bdc5; font-size: 15px; line-height: 1.8; margin: 0; }
.values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.values span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line); padding: 10px 14px; background: rgba(9, 23, 33, .6); }
.values span:before { content: ""; display: inline-block; width: 6px; height: 6px; border: 1px solid var(--cyan); transform: rotate(45deg); margin-right: 10px; vertical-align: 1px; }

/* ---------- Equipo ---------- */
.team { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: center; }
.team-copy p { max-width: 640px; }
.alma { border: 1px solid var(--line); background: rgba(9, 23, 33, .6); padding: 30px; }
.alma h4 { font: 600 15px "Space Grotesk", sans-serif; margin: 0 0 20px; }
.alma h4 span { color: var(--cyan); font-size: 10px; margin-right: 10px; }
/* alma-maters.webp trae fondo transparente y logos claros: franja oscura fija en ambos temas */
.alma figure { margin: 0; background: #06121a; border: 1px solid var(--line); padding: 18px; }
.alma img { display: block; width: 100%; height: auto; }
.associations { display: flex; gap: 8px; margin-top: 18px; }
.associations span { flex: 1; text-align: center; font: 600 15px "Space Grotesk", sans-serif; border: 1px solid var(--line); padding: 14px 0; color: var(--cyan); }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 7 / 4; object-fit: cover; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.04); }

/* ---------- Contact ---------- */
.contact { max-width: none; padding-inline: max(28px, calc((100vw - var(--max)) / 2)); background: linear-gradient(135deg, #0a2935, #06141d); border-top: 1px solid rgba(32, 214, 239, .2); }
.contact-inner { max-width: var(--max); margin: auto; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.contact-copy h2 { margin: 22px 0; }
.contact-copy > p { color: #9bb0b8; line-height: 1.7; }
.contact-lines { list-style: none; padding: 0; margin: 34px 0 0; }
.contact-lines li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; }
.contact-lines li span { color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.contact-lines a:hover { color: var(--cyan); }
.contact-form { background: rgba(4, 16, 23, .55); padding: 32px; border: 1px solid var(--line); position: relative; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-form label { display: flex; flex-direction: column; gap: 9px; font-size: 9px; letter-spacing: .12em; color: #8ca4ae; text-transform: uppercase; }
.contact-form input, .contact-form select, .contact-form textarea { background: transparent; border: 0; border-bottom: 1px solid #34505c; color: white; padding: 11px 0; font: 12px Inter, sans-serif; outline: none; border-radius: 0; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-bottom-color: var(--cyan); }
.contact-form select option { background: #07151e; }
.contact-form > label { margin: 24px 0; }
.contact-form .button { width: 100%; }
.contact-form .button:disabled { opacity: .6; cursor: wait; transform: none; }
.contact-form .hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 9px; color: #637d87; margin: 12px 0 0; }
.form-note.success { color: var(--lime); }
.form-note.error { color: #ff6b6b; }

/* Banda CTA hacia /contact/ */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-band h2 { margin: 18px 0 0; }
.cta-band .button { flex: none; white-space: nowrap; }

/* Ubicaciones */
.locations { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.locations article { padding: 34px 30px; border-right: 1px solid var(--line); background: rgba(11, 29, 40, .5); transition: .3s; }
.locations article:last-child { border-right: 0; }
.locations article:hover { background: #0c212d; }
.locations small { color: var(--cyan); font-size: 10px; }
.locations h3 { font-size: 34px; letter-spacing: -.03em; margin: 34px 0 6px; }
.locations p { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.locations a { font: 600 14px "Space Grotesk", sans-serif; border-top: 1px solid var(--line); padding-top: 16px; display: block; }
.locations a:hover { color: var(--cyan); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: auto; padding: 56px 28px 0; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-inner p { color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 340px; margin: 18px 0 0; }
.footer-inner h4 { font: 800 10px Inter, sans-serif; letter-spacing: .18em; color: #a6bbc3; margin: 6px 0 18px; }
.footer-inner ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; font-size: 13px; }
.footer-inner ul a { color: #b9cbd2; }
.footer-inner ul a:hover { color: var(--cyan); }
.footer-bottom { max-width: var(--max); margin: auto; min-height: 90px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #728b95; font-size: 10px; }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; display: grid; place-content: center; text-align: center; justify-items: center; padding: 120px 28px; }
.not-found strong { font: 600 clamp(90px, 16vw, 180px)/1 "Space Grotesk", sans-serif; color: var(--cyan); letter-spacing: -.06em; }
.not-found p { color: var(--muted); margin: 18px 0 34px; }

/* ---------- Tema claro ---------- */
/* Tokens + colores fijos del tema oscuro que necesitan su par claro. */
[data-theme="light"] {
  --bg: #f4f8fa;
  --bg2: #eaf1f4;
  --panel: #ffffff;
  --line: rgba(8, 48, 64, .14);
  --text: #0b1c25;
  --muted: #50707c;
  --cyan: #087f93;
  --cyan2: #0a97ad;
  --lime: #a6e052;
  color-scheme: light;
}
[data-theme="light"] .page-grid { background-image: linear-gradient(rgba(6, 40, 56, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 40, 56, .05) 1px, transparent 1px); }
[data-theme="light"] .site-header { background: rgba(244, 248, 250, .85); border-bottom-color: rgba(8, 48, 64, .1); }
[data-theme="light"] .desktop-nav a { color: #3d5a66; }
[data-theme="light"] .desktop-nav a:hover { color: var(--text); }
[data-theme="light"] .desktop-nav a[aria-current="page"] { color: var(--cyan); }
[data-theme="light"] .button { color: #fff; }
[data-theme="light"] .button-outline { color: var(--text); border-color: rgba(8, 127, 147, .55); }
[data-theme="light"] .button-outline:hover { background: rgba(8, 127, 147, .08); }
[data-theme="light"] .menu-toggle span { background: var(--text); }
[data-theme="light"] .mobile-menu { background: var(--bg); }
[data-theme="light"] .hero-copy > p, [data-theme="light"] .live-pill, [data-theme="light"] .page-hero p { color: #3f5d69; }
[data-theme="light"] .page-hero:before { opacity: .55; }
[data-theme="light"] .page-hero:after { background: linear-gradient(90deg, var(--bg) 32%, rgba(244, 248, 250, .7) 62%, rgba(244, 248, 250, .25)), linear-gradient(transparent 55%, var(--bg)); }
[data-theme="light"] .text-link { color: var(--text); }
[data-theme="light"] .data-card { background: rgba(255, 255, 255, .88); border-color: rgba(8, 127, 147, .25); box-shadow: 0 20px 45px rgba(8, 48, 64, .1); }
[data-theme="light"] .radar-ring { border-color: rgba(8, 127, 147, .25); }
[data-theme="light"] .marquee { background: var(--bg2); }
[data-theme="light"] .marquee-track, [data-theme="light"] .eyebrow-text, [data-theme="light"] .ecosystem span, [data-theme="light"] .footer-inner h4 { color: #4d6a75; }
[data-theme="light"] .flow-panel { background: linear-gradient(145deg, #ffffff, #e8f1f5); }
[data-theme="light"] .info-card, [data-theme="light"] .service, [data-theme="light"] .timeline article, [data-theme="light"] .mv-grid article,
[data-theme="light"] .locations article, [data-theme="light"] .alma, [data-theme="light"] .ecosystem, [data-theme="light"] .values span { background: var(--panel); }
[data-theme="light"] .mv-grid article:first-child { background: linear-gradient(160deg, rgba(8, 127, 147, .08), #ffffff 55%); }
[data-theme="light"] .featured-card { background: linear-gradient(120deg, rgba(8, 127, 147, .1), #ffffff 55%); border-color: rgba(8, 127, 147, .45); }
[data-theme="light"] .info-card:hover, [data-theme="light"] .service:hover, [data-theme="light"] .locations article:hover { background: #f0f7fa; border-color: rgba(8, 127, 147, .5); }
[data-theme="light"] .industry-row div:hover { background: #e6f1f5; }
[data-theme="light"] .info-card p, [data-theme="light"] .tags span, [data-theme="light"] .timeline p, [data-theme="light"] .mv-grid p,
[data-theme="light"] .featured-card p, [data-theme="light"] .contact-copy > p { color: #4d6a75; }
/* Logos PNG blancos (ecosistema): se oscurecen en tema claro */
[data-theme="light"] .ecosystem img { filter: brightness(0) saturate(100%); opacity: .7; }
[data-theme="light"] .contact { background: linear-gradient(135deg, #dcedf3, #f4f8fa); border-top-color: rgba(8, 127, 147, .2); }
[data-theme="light"] .contact-form { background: rgba(255, 255, 255, .75); }
[data-theme="light"] .contact-form label, [data-theme="light"] .form-note { color: #557380; }
[data-theme="light"] .contact-form input, [data-theme="light"] .contact-form select, [data-theme="light"] .contact-form textarea { color: var(--text); border-bottom-color: #a9bfc8; }
[data-theme="light"] .contact-form select option { background: #fff; }
[data-theme="light"] .form-note.success { color: #4f8f12; }
[data-theme="light"] .footer-inner ul a { color: #3d5a66; }
[data-theme="light"] .footer-bottom { color: #557380; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: .7; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline article:nth-child(2) { border-right: 0; }
  .timeline article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-menu { display: flex; position: fixed; z-index: 45; top: 82px; left: 0; right: 0; background: #07141d; padding: 28px; flex-direction: column; gap: 24px; transform: translateY(-130%); transition: .35s; border-bottom: 1px solid var(--line); }
  .mobile-menu.open { transform: none; }
  .mobile-menu a[aria-current="page"] { color: var(--cyan); }
  .hero { grid-template-columns: 1fr; padding-top: 135px; }
  .hero-visual { max-width: 650px; width: 100%; margin: auto; }
  .page-hero { min-height: 540px; }
  .page-hero:before { left: var(--gutter); opacity: .5; }
  .section-heading, .section-heading.compact { grid-template-columns: 1fr; }
  .section-heading p { grid-column: 1; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .info-card, .info-card.wide { grid-column: auto; }
  .featured-card { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .featured-visual { display: none; }
  .split, .split.reverse, .about, .team, .contact-inner { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .industry-row { grid-template-columns: repeat(2, 1fr); }
  .industry-row div { border-bottom: 1px solid var(--line); }
  .flow-panel { grid-template-columns: 1fr; }
  .flow-center { min-height: 180px; border-block: 1px solid var(--line); border-inline: 0; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .mv-grid, .locations { grid-template-columns: 1fr; }
  .mv-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .locations article { border-right: 0; border-bottom: 1px solid var(--line); }
  .locations article:last-child { border-bottom: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .split-media .data-card { display: none; }
  .site-header { padding: 0 16px; }
  .site-header .button-small { display: none; }
  .brand-word { width: 112px; }
  .section { padding: 90px 16px; }
  .page-hero { --gutter: 16px; padding: 150px var(--gutter) 70px; min-height: 480px; }
  .page-hero p { font-size: 15px; }
  .hero { padding-top: 120px; }
  .hero h1 { font-size: 47px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-stats { gap: 18px; justify-content: space-between; }
  .hero-stats strong { font-size: 22px; }
  .hero-stats span { font-size: 8px; }
  .data-card { transform: scale(.8); }
  .card-ms { right: -7%; }
  .card-xrf { left: -8%; }
  .card-grid { grid-template-columns: 1fr; }
  .info-card { min-height: 0; }
  .featured-card { padding: 26px 20px; }
  .flow-inputs, .flow-outputs { padding: 22px; }
  .split { gap: 45px; }
  .industry-row { grid-template-columns: 1fr; }
  .industry-row div { min-height: 110px; }
  .service-grid { grid-template-columns: 1fr; }
  .service { min-height: 0; flex-direction: row; align-items: center; gap: 18px; padding: 18px 20px; }
  .service .card-top { order: -1; }
  .service .card-top > span { display: none; }
  .service h3 { margin: 0; }
  .timeline { grid-template-columns: 1fr; }
  .timeline article { border-right: 0; border-bottom: 1px solid var(--line); }
  .timeline article:last-child { border-bottom: 0; }
  .mv-grid article { padding: 30px 22px; }
  .gallery { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .about-metric strong { font-size: 65px; }
  .ecosystem span { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; padding: 48px 16px 0; }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; padding: 30px 16px; }
}
