/* ==========================================================================
   OTT — Organización Técnica Triviño · site.css
   Paleta tomada del logotipo: navy de la "O", azul agua de las olas,
   gris grafito de la "T". Tipografía: Montserrat (titulares) + Source Sans 3.
   ========================================================================== */

:root {
  --navy: #0A2A4C;
  --navy-2: #071E37;
  --agua: #1F78C1;
  --agua-d: #155F9E;
  --celeste: #4FB3E8;
  --grafito: #5B6672;
  --ink: #15253A;
  --niebla: #EEF3F8;
  --line: #D5DFEA;
  --white: #FFFFFF;
  --wa: #1FAF54;

  --f-display: "Montserrat", system-ui, sans-serif;
  --f-body: "Source Sans 3", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --header-h: 72px;

  --r-sm: 6px;
  --r-md: 10px;
  --shadow: 0 18px 40px -18px rgba(10, 42, 76, .35);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--agua-d); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--navy); margin: 0; line-height: 1.12; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure, blockquote { margin: 0; }
::selection { background: var(--celeste); color: var(--navy-2); }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-mist { background: var(--niebla); }
.h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); font-weight: 700; letter-spacing: -.015em; max-width: 22ch; }
.h3 { font-size: 1.35rem; font-weight: 700; }
.lead { font-size: clamp(1.1rem, 1.4vw, 1.25rem); color: var(--grafito); max-width: 60ch; }
.muted { color: var(--grafito); font-size: .95rem; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .h2 { margin-bottom: .5em; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--agua); --fg: #fff; --bd: var(--agua);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.35em;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem; letter-spacing: .005em;
  color: var(--fg); background: var(--bg); border: 2px solid var(--bd); border-radius: var(--r-sm);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary:hover { --bg: var(--agua-d); --bd: var(--agua-d); }
.btn-lg { min-height: 54px; padding: .85em 1.6em; font-size: 1rem; }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .875rem; }
.btn-ghost-light { --bg: transparent; --fg: #fff; --bd: rgba(255,255,255,.55); }
.btn-ghost-light:hover { --bd: #fff; --bg: rgba(255,255,255,.08); }
.btn-light { --bg: #fff; --fg: var(--navy); --bd: #fff; }
.btn-light:hover { --bg: var(--niebla); --bd: var(--niebla); }
.btn-outline { --bg: transparent; --fg: var(--agua-d); --bd: var(--agua); }
.btn-outline:hover { --bg: var(--agua); --fg: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--agua-d); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Barra de progreso ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--agua), var(--celeste)); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, transform .35s var(--ease);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -16px rgba(10,42,76,.4); }
.header.is-hidden { transform: translateY(-100%); }
.header-in { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: auto; height: 40px; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: .95rem; color: var(--navy); line-height: 1.15; max-width: 14ch; }
.nav { display: flex; gap: 4px; }
.nav a { position: relative; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: var(--r-sm); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--agua); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--agua-d); }
.burger { display: none; width: 46px; height: 46px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--navy); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }
.mobile-menu { display: grid; gap: 4px; padding: 8px var(--gutter) 24px; border-top: 1px solid var(--line); background: #fff; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 14px 4px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--navy); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 18s var(--ease) forwards; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,30,55,.95) 0%, rgba(10,42,76,.88) 45%, rgba(10,42,76,.74) 100%),
    linear-gradient(0deg, rgba(7,30,55,.6), transparent 40%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  min-height: min(calc(100svh - var(--header-h)), 820px);
  padding-block: clamp(56px, 8vw, 104px);
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--celeste); margin-bottom: 18px; font-size: 1.05rem; }
.hero-eyebrow svg { width: 18px; height: 18px; }
.hero-title { color: #fff; font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; max-width: 16ch; margin-bottom: 22px; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%); animation: wordUp .9s var(--ease) forwards; animation-delay: calc(var(--i) * 55ms + 150ms); }
@keyframes wordUp { to { transform: translateY(0); } }
.hero-lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: rgba(255,255,255,.86); max-width: 52ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.js .hero-lead, .js .hero-actions, .js .hero-eyebrow { opacity: 0; transform: translateY(14px); animation: fadeUp .8s var(--ease) forwards; }
.js .hero-eyebrow { animation-delay: .05s; }
.js .hero-lead { animation-delay: .55s; }
.js .hero-actions { animation-delay: .7s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* Red de tuberías isométrica */
.hero-network { width: 100%; height: auto; overflow: visible; }
.net-grid { opacity: .7; }
.net-pipes path { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--ease) forwards; }
.net-pipes path:nth-child(1) { animation-delay: .3s; }
.net-pipes path:nth-child(2) { animation-delay: .7s; }
.net-pipes path:nth-child(3) { animation-delay: .8s; animation-duration: 1.6s; }
.net-pipes path:nth-child(4) { animation-delay: 1.3s; }
.net-pipes path:nth-child(5) { animation-delay: 1.5s; }
.net-pipes path:nth-child(6) { animation-delay: 1.7s; }
.net-pipes path:nth-child(7) { animation-delay: 2.1s; stroke-width: 2.5; }
.net-pipes path:nth-child(8) { animation-delay: 2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.net-flow path { fill: none; stroke: var(--celeste); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 10 44; opacity: 0; animation: flowIn .6s 2.6s forwards, flow 1.5s linear infinite; filter: drop-shadow(0 0 4px rgba(79,179,232,.8)); }
@keyframes flow { to { stroke-dashoffset: -54; } }
@keyframes flowIn { to { opacity: 1; } }
.net-nodes circle { fill: var(--celeste); stroke: var(--navy); stroke-width: 3; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop .5s var(--ease) forwards; animation-delay: 2.3s; }
.net-nodes circle:nth-child(n+2) { animation-delay: 2.5s; }
@keyframes pop { to { transform: scale(1); } }
.net-labels text { fill: rgba(255,255,255,.72); font-family: var(--f-body); font-size: 14px; opacity: 0; animation: flowIn .6s 2.6s forwards; }

/* ---------- Cifras ---------- */
.facts { padding-block: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding-left: 18px; border-left: 3px solid var(--line); }
.stat:first-child { border-left-color: var(--agua); }
.stat dd { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-prefix, .stat-suffix { font-size: .55em; font-weight: 700; color: var(--agua-d); }
.stat dt { color: var(--grafito); font-size: .98rem; line-height: 1.35; max-width: 24ch; }
.standards { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0 0; color: var(--grafito); }
.standards span { margin-right: 6px; }
.standards b { font-family: var(--f-display); font-size: .85rem; color: var(--navy); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* ---------- Estudio ---------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.studio-copy .h2 { margin-bottom: .6em; }
.studio-copy > p:not(.lead) { max-width: 60ch; }
.facts-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin-top: 32px; }
.facts-list div { border-top: 2px solid var(--navy); padding-top: 10px; }
.facts-list dt { font-size: .9rem; color: var(--grafito); }
.facts-list dd { font-weight: 600; color: var(--navy); }
.studio-media { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.studio-photo { overflow: hidden; border-radius: var(--r-sm); background: var(--niebla); }
.studio-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.studio-photo:hover img { transform: scale(1.04); }
.studio-photo-1 { grid-row: 1 / 3; aspect-ratio: 3 / 4.2; }
.studio-photo-2, .studio-photo-3 { aspect-ratio: 4 / 3.4; }
.studio-quote { grid-column: 1 / -1; background: var(--navy); color: #fff; border-radius: var(--r-sm); padding: 22px 26px; position: relative; }
.studio-quote p { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
.studio-quote footer { margin-top: 6px; color: rgba(255,255,255,.7); font-size: .95rem; }

/* ---------- Servicios ---------- */
.group-title { font-size: 1.1rem; color: var(--grafito); font-weight: 700; margin: 0 0 18px; }
.group-title:not(:first-of-type) { margin-top: 56px; }
.core-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.core-card {
  display: grid; grid-template-columns: 44% 1fr; text-align: left; padding: 0; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: border-color .25s, box-shadow .3s, transform .3s var(--ease);
}
.core-card:hover { border-color: var(--agua); box-shadow: var(--shadow); transform: translateY(-3px); }
.core-media { position: relative; display: block; background: var(--niebla); min-height: 200px; overflow: hidden; }
.core-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.core-card:hover .core-media img { transform: scale(1.06); }
.core-body { display: flex; flex-direction: column; gap: 6px; padding: 24px; }
.core-name { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); line-height: 1.2; }
.core-sub { color: var(--grafito); }
.core-more { margin-top: auto; padding-top: 18px; font-weight: 700; color: var(--agua-d); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.core-card:hover .core-more { text-decoration-color: currentColor; }
.special-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.special-item {
  display: grid; grid-template-columns: 64px 1fr 20px; align-items: center; gap: 16px;
  padding: 18px 18px 18px 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .25s, background-color .25s;
}
.special-item:hover { border-color: var(--agua); }
.svc-icon { width: 64px; height: auto; color: var(--agua); transition: transform .4s var(--ease); }
.svc-icon * { vector-effect: non-scaling-stroke; }
.svc-icon g { stroke-width: 2.4; }
.special-item:hover .svc-icon { transform: scale(1.08); }
.svc-icon-lg { width: 70%; margin: auto; position: absolute; inset: 0; }
.special-name { display: block; font-family: var(--f-display); font-weight: 700; color: var(--navy); line-height: 1.25; }
.special-sub { display: block; color: var(--grafito); font-size: .95rem; line-height: 1.35; margin-top: 2px; }
.chev { width: 20px; height: 20px; color: var(--grafito); transition: transform .25s var(--ease), color .25s; }
.special-item:hover .chev { transform: translateX(3px); color: var(--agua); }

/* ---------- Proceso (tubería que se llena) ---------- */
.steps-wrap { position: relative; --fill: 0; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; position: relative; }
.pipe { position: absolute; top: 20px; left: 22px; right: 22px; height: 8px; border-radius: 8px; background: var(--niebla); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.pipe-water {
  position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--fill));
  background: repeating-linear-gradient(90deg, var(--agua) 0 18px, var(--celeste) 18px 30px);
  background-size: 30px 100%;
  animation: stream 0.9s linear infinite;
}
@keyframes stream { to { background-position: 30px 0; } }
.step { position: relative; }
.step-valve {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; position: relative; z-index: 1;
  font-family: var(--f-display); font-weight: 800; color: var(--grafito);
  background: #fff; border: 3px solid var(--line); border-radius: 50%;
  transition: background-color .4s, border-color .4s, color .4s, transform .4s var(--ease);
}
.step.is-on .step-valve { background: var(--agua); border-color: var(--agua); color: #fff; transform: scale(1.06); box-shadow: 0 0 0 6px rgba(79,179,232,.22); }
.step-title { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--grafito); margin: 0; }

/* ---------- Proyectos ---------- */
.project-list { display: grid; gap: clamp(48px, 7vw, 88px); }
.project { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.project-alt .project-media { order: 2; }
.project-media { overflow: hidden; border-radius: var(--r-sm); aspect-ratio: 16 / 11; background: var(--line); }
.project-media img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.project-body .h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 14px; }
.project-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 32px; margin: 22px 0 26px; padding: 16px 0; border-block: 1px solid var(--line); }
.project-meta dt { font-size: .88rem; color: var(--grafito); }
.project-meta dd { font-weight: 700; color: var(--navy); }

/* ---------- Galería ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { min-height: 42px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--agua); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.masonry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 16vw, 210px); grid-auto-flow: dense; gap: 12px; }
.m-item { transition: opacity .35s, transform .35s var(--ease); }
.m-item.is-tall { grid-row: span 2; }
.m-item.is-wide { grid-column: span 2; }
.m-item.is-out { opacity: 0; transform: scale(.97); }
.m-item[hidden] { display: none; }
.m-btn { display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; border-radius: var(--r-sm); overflow: hidden; background: var(--niebla); }
.m-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.m-btn:hover img { transform: scale(1.05); }
.m-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; text-align: left; color: #fff; font-weight: 600; background: linear-gradient(0deg, rgba(7,30,55,.85), transparent); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease); }
.m-btn:hover .m-cap, .m-btn:focus-visible .m-cap { opacity: 1; transform: none; }

/* ---------- Asesoría ---------- */
.advisory { background: var(--navy); color: #fff; padding-block: clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.advisory::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px); background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.advisory-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 64px); align-items: center; position: relative; }
.advisory .h2 { color: #fff; margin-bottom: .5em; }
.advisory .lead { color: rgba(255,255,255,.82); margin-bottom: 28px; }
.advisory-media { background: #fff; border-radius: var(--r-md); padding: 12px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.advisory-media img { border-radius: var(--r-sm); width: 100%; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-form-wrap .h2 { margin-bottom: .4em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 28px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; color: var(--navy); font-size: .98rem; }
.opt { font-weight: 400; color: var(--grafito); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #B9C7D6; border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--agua); box-shadow: 0 0 0 4px rgba(31,120,193,.18); }
.field-error { display: none; margin: 0; color: #B42318; font-size: .92rem; font-weight: 600; }
.field.is-invalid input, .field.is-invalid select { border-color: #B42318; }
.field.is-invalid .field-error, .field-error.is-shown { display: block; }
.field-check { grid-template-columns: 22px 1fr; align-items: start; gap: 12px; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--agua); }
.field-check label { font-weight: 400; color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { margin: 0; color: var(--agua-d); font-weight: 600; }
.contact-side { background: var(--niebla); border-radius: var(--r-md); padding: clamp(24px, 3vw, 36px); }
.contact-side .h3 { font-size: 1.15rem; margin-bottom: 14px; }
.contact-side .h3:not(:first-child) { margin-top: 28px; }
.contact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cl-label { color: var(--grafito); font-size: .92rem; padding-top: 1px; }
.contact-list a { font-weight: 600; color: var(--navy); text-decoration: none; word-break: break-word; }
.contact-list a:hover { color: var(--agua-d); text-decoration: underline; }
.schedule { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.schedule th, .schedule td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.schedule th { font-weight: 600; color: var(--navy); width: 48%; }
.map { margin-top: 20px; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-2); color: rgba(255,255,255,.75); padding-top: clamp(48px, 6vw, 72px); }
.footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand img { width: 220px; height: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.footer-h { font-size: 1rem; color: #fff; margin-bottom: 12px; }
.footer-list li { margin-bottom: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 20px 28px; border-top: 1px solid rgba(255,255,255,.14); font-size: .92rem; }
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer .link { color: rgba(255,255,255,.9); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 12px 28px -10px rgba(0,0,0,.45);
  transition: transform .3s var(--ease);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ping 2.6s ease-out infinite; }
.wa-float:hover { transform: scale(1.07); }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.55); opacity: 0; } }

/* ---------- Diálogos ---------- */
.dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 40px 80px -30px rgba(7,30,55,.6); overflow: auto; }
.dialog[open] { animation: dlgIn .35s var(--ease); }
.dialog::backdrop { background: rgba(7,30,55,.62); backdrop-filter: blur(3px); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialog-close-form { position: sticky; top: 0; height: 0; z-index: 2; }
.dialog-close { position: absolute; right: 12px; top: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.dialog-media { background: var(--niebla); }
.dialog-media img { width: 100%; max-height: 320px; object-fit: cover; }
.dialog-media:empty { display: none; }
.dialog-body { padding: clamp(24px, 4vw, 36px); }
.dialog-kicker { color: var(--agua-d); font-weight: 700; margin-bottom: 6px; }
.dialog-sub { color: var(--grafito); font-size: 1.1rem; }
.dialog-h { font-size: 1rem; margin: 22px 0 10px; }
.dialog-text .dialog-body { padding-top: 32px; }
.dialog-text .h3 { margin-bottom: 16px; padding-right: 40px; }
.ticks { display: grid; gap: 8px; margin-bottom: 26px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--agua); border-bottom: 2.5px solid var(--agua); transform: rotate(-45deg); }

.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7,30,55,.97); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; animation: lbIn .3s ease; }
.lightbox::backdrop { background: transparent; }
@keyframes lbIn { from { opacity: 0; } }
.lb-figure { display: grid; justify-items: center; gap: 12px; padding: 56px 0 24px; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; border-radius: 4px; transition: opacity .25s; }
.lb-figure img.is-loading { opacity: 0; }
.lb-figure figcaption { text-align: center; color: rgba(255,255,255,.85); padding-inline: 12px; }
.lb-count { color: rgba(255,255,255,.55); margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb-nav, .lb-close { display: grid; place-items: center; width: 52px; height: 52px; margin: auto; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; transition: background-color .2s; }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.18); }
.lb-nav svg { width: 26px; height: 26px; }
.lb-close { position: absolute; top: 14px; right: 14px; font-size: 1.8rem; line-height: 1; }

/* ---------- Revelado al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: inline-block; }
  .header-cta { display: none; }
  .special-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .core-card { grid-template-columns: 1fr; }
  .core-media { aspect-ratio: 16 / 9; min-height: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; }
  .hero-network { max-width: 400px; justify-self: center; margin-top: 8px; }
  .masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .studio-grid, .advisory-grid, .contact-grid { grid-template-columns: 1fr; }
  .project, .project-alt { grid-template-columns: 1fr; }
  .project-alt .project-media { order: 0; }
  .steps { grid-template-columns: 1fr; gap: 36px; padding-left: 72px; }
  .pipe { top: 22px; bottom: 22px; left: 20px; right: auto; width: 8px; height: auto; }
  .pipe-water { transform-origin: 50% 0; transform: scaleY(var(--fill)); background: repeating-linear-gradient(180deg, var(--agua) 0 18px, var(--celeste) 18px 30px); background-size: 100% 30px; animation-name: streamY; }
  @keyframes streamY { to { background-position: 0 30px; } }
  .step-valve { position: absolute; left: -72px; top: -4px; margin: 0; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand-name { display: none; }
  .brand img { height: 36px; }
  .core-grid, .special-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .facts-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .net-labels { display: none; }
  .hero-network { max-width: 280px; }
  .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 8px; }
  .m-item.is-wide { grid-column: span 1; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: 16px; z-index: 2; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
  .lb-figure { padding: 64px 8px 88px; }
  .contact-list li { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .net-flow path { opacity: 0 !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-title .w > span { transform: none; }
}
