/* Layout: una sola página en bandas horizontales; el corte hidrogeológico del inicio marca el tono y se repite como línea de nivel freático entre secciones. */
:root {
  --paper: #F3F8F9;
  --card: #FFFFFF;
  --ink: #16323B;
  --muted: #4A6670;
  --drop: #BCD9E2;
  --drop-soft: #E2EFF3;
  --accent: #2A7486;
  --accent-ink: #FFFFFF;
  --line: #D2E2E7;
  --band: #16323B;
  --band-ink: #E8F2F4;
  --band-muted: #A9C4CB;
  --soil-1: #D9CDB4;
  --soil-2: #C7B48F;
  --soil-3: #A9A08C;
  --water: #5FA9BD;
  --font-display: "Segoe UI", "Open Sans", Arial, sans-serif;
  --font-body: "Segoe UI", "Open Sans", Arial, sans-serif;
  --font-mono: "Segoe UI", "Open Sans", Arial, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.6rem);
  --step-4: clamp(2.3rem, 5vw, 3.6rem);
  --radius: 14px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F2128; --card: #152C34; --ink: #E4EFF2; --muted: #9DB6BE;
    --drop: #2D5562; --drop-soft: #1A3640; --accent: #8DCBDA; --accent-ink: #0F2128;
    --line: #24414B; --band: #0A181D; --band-ink: #E4EFF2; --band-muted: #9DB6BE;
    --soil-1: #4A4434; --soil-2: #5B5038; --soil-3: #3F3C35; --water: #6FB8CC;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F2128; --card: #152C34; --ink: #E4EFF2; --muted: #9DB6BE;
  --drop: #2D5562; --drop-soft: #1A3640; --accent: #8DCBDA; --accent-ink: #0F2128;
  --line: #24414B; --band: #0A181D; --band-ink: #E4EFF2; --band-muted: #9DB6BE;
  --soil-1: #4A4434; --soil-2: #5B5038; --soil-3: #3F3C35; --water: #6FB8CC;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--paper);
}
img { max-width: 100%; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--water); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(56px, 8vw, 104px); }
.band-alt { background: var(--drop-soft); }
.band-dark { background: var(--band); color: var(--band-ink); }
.band-dark .lead, .band-dark .muted { color: var(--band-muted); }
.band-dark a { color: var(--drop); }

.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.band-dark .eyebrow { color: var(--drop); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 4vw, 48px); max-width: 760px; }

/* Cabecera */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav a:hover { color: var(--accent); }
.nav .btn { color: var(--accent-ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; font-weight: 600; padding: 6px 12px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; text-align: center; border-bottom: none; }
}

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-weight: 600; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent);
  font-family: var(--font-body); font-size: 1rem; cursor: pointer; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Portada */
.hero { padding-block: clamp(40px, 6vw, 80px) 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.section-svg { width: 100%; height: auto; display: block; }
.hero-photo { width: 100%; height: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); display: block; }
.field-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.field-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 12px; min-width: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.gallery img.chart, .case-img.chart, .need-photo.chart { object-fit: contain; background: #FFFFFF; }
.case-img { width: calc(100% + 52px); margin: -26px -26px 4px; max-width: none; height: 210px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.case { overflow: hidden; }
.case-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: calc(100% + 52px); margin: -26px -26px 4px; background: #FFFFFF; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.case-duo img { width: 100%; height: 380px; object-fit: contain; display: block; background: #FFFFFF; }
@media (max-width: 620px) { .case-duo { grid-template-columns: 1fr; } .case-duo img { height: 200px; } }
.need-photo { width: calc(100% + 52px); margin: -26px -26px 6px; max-width: none; height: 170px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.rs-figure img { width: 100%; height: auto; border-radius: 12px; display: block; }
@media (max-width: 860px) { .field-grid { grid-template-columns: 1fr; } .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } }
.hero-media { min-height: 360px; border-radius: var(--radius); background: var(--drop-soft); background-size: cover; background-position: center; }
.hero-media:empty { display: none; }
.hero-grid:has(.hero-media:empty) { grid-template-columns: 1fr; max-width: 760px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 36px; border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 48px); }
.fact strong { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.service svg { width: 40px; height: 40px; color: var(--accent); }
.service ul { margin: 4px 0 0; padding-left: 1.1em; color: var(--muted); }
.service li + li { margin-top: 2px; }
@media (max-width: 980px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .services { grid-template-columns: 1fr; } }


/* Bloques por necesidad */
.needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.need { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 90px; }
.need svg { width: 40px; height: 40px; color: var(--accent); }
.need p { color: var(--muted); }
.need-feature { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.need-feature svg { color: var(--drop); }
.need-feature p { color: var(--band-muted); }
.chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 0.9rem; background: var(--drop-soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; }
.need-feature .chips li { background: var(--drop); color: #16323B; }
.needs .need:first-child { order: 0; }
@media (max-width: 980px) { .needs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .needs { grid-template-columns: 1fr; } }
.btn-light, .band-dark .btn-light { background: var(--drop); border-color: var(--drop); color: #16323B; }

/* Teledetección */
.rs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.rs-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rs-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.rs-list li::before { content: ""; width: 12px; height: 12px; margin-top: 8px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--drop); }
.rs-proof { border-left: 3px solid var(--drop); padding: 4px 0 4px 18px; color: var(--band-muted); }
.rs-proof b { color: var(--band-ink); }
.rs-figure { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rs-figure figcaption { font-family: var(--font-body); font-size: 0.85rem; color: var(--band-muted); }
@media (max-width: 860px) { .rs-grid { grid-template-columns: 1fr; } }

/* Sectores */
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sector { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 3px solid var(--accent); min-width: 0; }
.sector p { color: var(--muted); }
@media (max-width: 980px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sectors { grid-template-columns: 1fr; } }

/* Casos */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-wide { grid-column: 1 / -1; }
.case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.case dl { margin: 0; display: grid; gap: 10px; }
.case dt { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.case dd { margin: 0; color: var(--muted); }
.case .tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
@media (max-width: 980px) { .cases { grid-template-columns: 1fr; max-width: 640px; } }

/* Método */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: paso; }
.step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step::before { counter-increment: paso; content: "0" counter(paso); font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; }
.step p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Sobre mí */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-logo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; justify-content: center; }
.about-logo img { width: 210px; }
.about-copy { display: flex; flex-direction: column; gap: 16px; max-width: 68ch; min-width: 0; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.creds span { font-size: 0.92rem; background: var(--drop-soft); border-radius: 999px; padding: 5px 14px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about-logo { max-width: 300px; } }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); }
.contact-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.contact-line { display: flex; flex-direction: column; }
.contact-line span { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-muted); }
.contact-line a, .contact-line b { font-size: var(--step-1); font-weight: 600; color: var(--band-ink); text-decoration: none; overflow-wrap: anywhere; }
form { display: grid; gap: 14px; background: var(--card); color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); min-width: 0; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 0.9rem; color: var(--muted); align-items: start; }
.check input { margin-top: 4px; }
.form-status { font-size: 0.95rem; color: var(--muted); }
.hidden-field { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }

.site-footer { padding-block: 28px; font-size: 0.92rem; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); }

.watertable { display: block; width: 100%; height: 18px; color: var(--water); }

/* Páginas de servicio */
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.svc-hero { padding-block: clamp(32px, 5vw, 64px); }
.svc-hero .hero-grid { align-items: start; }
.svc-figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.svc-figure img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); display: block; }
.svc-figure img.chart { object-fit: contain; background: #FFFFFF; }
.svc-figure figcaption { font-size: 0.9rem; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); }
.cols > div { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.steps li::before { content: counter(step); font-weight: 700; font-size: 1.4rem; color: var(--accent); }
.steps li span { color: var(--muted); }
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--muted); }
.cta-band .wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.more-link { font-weight: 600; margin-top: auto; padding-top: 6px; }
.need-feature .more-link { color: var(--drop); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.hero-actions .more-link { margin-top: 0; padding-top: 0; align-self: center; }
.svc-hero h1 { font-size: var(--step-3); }
.svc-wide { max-width: 820px; margin: clamp(28px, 4vw, 48px) auto 0; }
.svc-figure img { height: auto; } .svc-figure img.chart { max-height: none; }
.svc-wide img.chart { max-height: 560px; width: auto; max-width: 100%; margin-inline: auto; }
.need-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; }
.need-wide .need-photo { width: 100%; margin: 0; height: auto; border-radius: 10px; order: 2; }
.need-wide .need-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 980px) { .need-wide { grid-template-columns: 1fr; } .need-wide .need-photo { order: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .need-feature .chips li { color: var(--ink); } }
:root[data-theme="dark"] .need-feature .chips li { color: var(--ink); }
