/* =========================================================================
   Montalb Tech — estilos del sitio (mobile-first)
   Paleta del manual de identidad: azul noche #162134, lavanda #BDC5E6,
   niebla #DADCEE y gris #BABAC4.
   Tipografías: Source Serif 4 para títulos y cifras, Inter para el texto.
   Ambas tienen licencia SIL Open Font License 1.1 (ver LICENCIAS/).
   ========================================================================= */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta del manual */
  --night: #162134;
  --dawn: #bdc5e6;
  --mist: #dadcee;
  --steel: #babac4;
  /* Tonos derivados */
  --night-2: #1d2a42;
  --night-3: #2c3b59;
  --dawn-hover: #ccd2ee;
  --dawn-deep: #8f9bcc;
  --haze: #eef0f8;
  --line: #d5d8e8;
  --field: #8a91a8;
  --ink: var(--night);
  --ink-2: #47506b;
  --ink-3: #5b6380;
  --on-night: #b4bcdc;
  --danger: #b3261e;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --maxw: 80rem;
  --gutter: clamp(1.5rem, 5vw, 2.5rem);
  --header-h: 64px;
  --radius: 2px;
}
@media (min-width: 1024px) { :root { --header-h: 72px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 300;
  margin: 0 0 0.5em;
  color: inherit;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 1.9rem + 4.2vw, 6rem); line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.25rem, 1.75rem + 2.1vw, 3.375rem); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.5625rem, 1.42rem + 0.5vw, 1.875rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.005em; }
strong { font-weight: 600; }

:focus-visible { outline: 2px solid var(--night); outline-offset: 3px; }
.on-night :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .bare :focus-visible { outline-color: var(--dawn); }

.icon { width: 1.2em; height: 1.2em; flex: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--dawn); color: var(--night); padding: 0.75rem 1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 52px; padding: 0.75rem 1.6rem;
  border: 0; border-radius: var(--radius);
  font-family: var(--sans); font-size: 1rem; font-weight: 560; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn .icon { width: 1.2rem; height: 1.2rem; }
.btn-light, .btn-wa { background: var(--dawn); color: var(--night); }
.btn-light:hover, .btn-wa:hover { background: var(--dawn-hover); }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: #24324f; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 560; color: var(--night);
  text-decoration: underline; text-decoration-color: var(--dawn-deep);
  text-decoration-thickness: 2px; text-underline-offset: 0.42em;
}
.text-link .icon { width: 1.05em; height: 1.05em; }
.text-link:hover { text-decoration-color: currentColor; }
.on-night .text-link { color: #fff; text-decoration-color: var(--dawn); }
.on-night .text-link:hover { text-decoration-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; margin-top: 2.25rem; }
.btn-row .text-link { min-height: 52px; }
@media (max-width: 479px) {
  .btn-row { gap: 0.5rem 2rem; }
  .btn-row .btn { width: 100%; }
}

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--night); color: #fff;
  border-bottom: 1px solid var(--night-3);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; padding: 0.35rem 0; }
.brand img { width: 146px; height: auto; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 44px; padding: 0.5rem 0.25rem 0.5rem 0.75rem; margin-right: -0.25rem;
  background: none; border: 0; color: #fff;
  font: 500 1rem/1 var(--sans); cursor: pointer;
}
.menu-toggle .icon { width: 1.35rem; height: 1.35rem; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }
.no-js .menu-toggle { display: none; }

/* Navegación móvil */
.site-nav { display: none; }
.no-js .header-inner { flex-wrap: wrap; }
.no-js .site-nav { display: block; width: 100%; padding-bottom: 1.5rem; }
.menu-open { overflow: hidden; }
.menu-open .site-nav {
  display: flex; flex-direction: column;
  position: fixed; inset: calc(var(--header-h) + 1px) 0 0 0; z-index: 49;
  background: var(--night); overflow-y: auto; overscroll-behavior: contain;
  padding: 0.75rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
}
.nav-list { list-style: none; }
.nav-list > li { border-bottom: 1px solid var(--night-3); }
.nav-list a {
  display: flex; align-items: center; min-height: 58px; padding: 0.5rem 0;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.2;
  color: #fff; text-decoration: none;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--dawn); }
.nav-label { display: block; padding: 1.1rem 0 0.4rem; font-size: 0.9rem; font-weight: 500; color: var(--on-night); }
.nav-sub { list-style: none; padding-bottom: 0.85rem; }
.nav-sub a {
  min-height: 46px; padding-left: 1rem; border-left: 1px solid var(--night-3);
  font-family: var(--sans); font-size: 1.05rem; font-weight: 450; color: #e7eaf6;
}
.nav-sub a[aria-current="page"] { border-left-color: var(--dawn); }
.nav-sub-toggle { display: none; }
.nav-cta { margin-top: 2rem; width: 100%; }

/* Navegación escritorio */
@media (min-width: 1024px) {
  .brand img { width: 168px; }
  .menu-toggle { display: none; }
  .site-nav, .menu-open .site-nav, .no-js .site-nav {
    display: flex; align-items: center; gap: 1.25rem;
    position: static; padding: 0; background: none; overflow: visible; width: auto;
  }
  .no-js .header-inner { flex-wrap: nowrap; }
  .nav-list { display: flex; align-items: center; gap: 0.25rem; }
  .nav-list > li { border: 0; position: relative; }
  .nav-list > li > a, .nav-sub-toggle {
    display: inline-flex; align-items: center; gap: 0.3rem;
    min-height: 44px; padding: 0.4rem 0.75rem;
    font: 500 0.95rem/1 var(--sans); color: #fff; background: none; border: 0; cursor: pointer;
    text-decoration: none;
  }
  .nav-list > li > a:hover, .nav-sub-toggle:hover, .nav-list > li > a[aria-current="page"] {
    color: #fff; text-decoration: underline; text-decoration-color: var(--dawn);
    text-decoration-thickness: 2px; text-underline-offset: 0.6em;
  }
  .nav-label { display: none; }
  .nav-sub-toggle .icon { width: 1rem; height: 1rem; transition: transform .15s ease; }
  .nav-sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .nav-sub {
    display: none; position: absolute; top: calc(100% + 14px); left: 0; width: 22rem;
    padding: 0.5rem; background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radius);
    box-shadow: 0 24px 48px rgba(6, 12, 24, .35);
  }
  .nav-sub-toggle[aria-expanded="true"] + .nav-sub { display: block; }
  .no-js .has-sub:hover .nav-sub, .no-js .has-sub:focus-within .nav-sub { display: block; }
  .nav-sub a {
    min-height: 0; padding: 0.7rem 0.85rem; border: 0;
    font: 450 0.95rem/1.35 var(--sans); color: #fff;
  }
  .nav-sub a:hover { background: var(--night-3); color: #fff; }
  .nav-sub a[aria-current="page"] { color: var(--dawn); }
  .nav-cta { margin: 0; width: auto; min-height: 44px; padding: 0.55rem 1.15rem; font-size: 0.95rem; }
  .nav-cta-more {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* ---------- Bloques en azul noche ---------- */
.on-night { background: var(--night); color: #fff; }
.on-night .lead { color: var(--on-night); }

/* Líneas: curvas de nivel, el sello visual de la marca */
.lines { position: relative; isolation: isolate; overflow: hidden; }
.lines::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3rem; height: 78%; z-index: -1; pointer-events: none;
  background: url("../img/lineas.svg") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
          mask-image: linear-gradient(to bottom, transparent, #000 45%);
}

/* ---------- Inicio ---------- */
.hero { padding: clamp(4.75rem, 2rem + 9vw, 9.375rem) 0 clamp(6rem, 2.5rem + 11vw, 11.875rem); }
.hero h1 { max-width: 19ch; margin-bottom: 0.5em; }
.lead { font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.45rem); line-height: 1.5; color: var(--ink-2); max-width: 34rem; }

/* Presentación y cifras */
.intro-band { background: var(--haze); padding-block: clamp(5.5rem, 10vw, 7.5rem); }
.statement {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.875rem); line-height: 1.5;
  text-align: center; max-width: 50rem; margin: 0 auto clamp(3.5rem, 7vw, 4.5rem); text-wrap: balance;
}
.stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.stats li {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.75rem 0.6rem; border-top: 1px solid #c9cde3;
}
.stat-value {
  font-family: var(--serif); font-weight: 300; font-size: clamp(2.875rem, 2.2rem + 2.8vw, 4.5rem);
  line-height: 1; letter-spacing: -0.02em; margin-bottom: 0.75rem; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 1.03rem; line-height: 1.4; text-wrap: balance; }
.stat-source { margin-top: 0.3rem; font-size: 0.85rem; line-height: 1.4; color: var(--ink-3); text-wrap: balance; }
@media (min-width: 1000px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats li { border-top: 0; border-left: 1px solid #b3b8d6; padding: 0.6rem 1.25rem 1.1rem; }
  .stats li:first-child { border-left: 0; }
}

/* Servicio destacado: imagen + texto a dos columnas */
.feature { display: grid; }
.feature-media { display: grid; place-items: center; background: var(--mist); padding: clamp(3.5rem, 9vw, 5rem) var(--gutter); }
.feature-body { display: flex; align-items: center; }
.feature-body > div { padding: clamp(3.75rem, 9vw, 5.5rem) var(--gutter); max-width: 40rem; }
.feature-body h2 { margin-bottom: 0.45em; }
.feature-body p { color: var(--on-night); font-size: 1.125rem; }
.feature-body .btn-row { margin-top: 1.25rem; }
@media (min-width: 1000px) {
  .feature { grid-template-columns: 1fr 1fr; min-height: 560px; }
  .feature-media { padding: 5rem; }
  .feature-body > div { padding: 5rem 5.5rem; }
}

/* Cadena de procesos */
.chain {
  margin: 0; width: 100%; max-width: 27rem; padding: 1.4rem 1.4rem 0.6rem;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 70px rgba(22, 33, 52, .16);
  font-variant-numeric: tabular-nums;
}
.chain-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.7rem; }
.chain-title { margin: 0; font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.chain-state { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--ink-3); white-space: nowrap; }
.chain-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--night); }
.chain-steps { list-style: none; }
.chain-step {
  display: grid; grid-template-columns: 24px 1fr auto; column-gap: 0.8rem; align-items: center;
  padding: 0.8rem 0; border-top: 1px solid #eceef6; font-size: 0.95rem; line-height: 1.35;
}
.chain-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--dawn); color: var(--night); }
.chain-dot .icon { width: 14px; height: 14px; stroke-width: 3; }
.chain-time { font-size: 0.875rem; color: var(--ink-3); }

/* La cadena se completa paso a paso al aparecer en pantalla (solo con JavaScript y si no se pidió reducir el movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .chain.is-armed .chain-dot { background: #fff; box-shadow: inset 0 0 0 1.5px var(--steel); }
  .chain.is-armed .chain-dot .icon, .chain.is-armed .chain-time, .chain.is-armed .chain-state { opacity: 0; }
  .chain.is-live .chain-dot { animation: chain-done .4s ease-out both; animation-delay: calc(var(--i) * .55s + .2s); }
  .chain.is-live .chain-dot .icon, .chain.is-live .chain-time { animation: chain-in .3s ease-out both; animation-delay: calc(var(--i) * .55s + .4s); }
  .chain.is-live .chain-state { animation: chain-in .4s ease-out 2.45s both; }
}
@keyframes chain-done {
  from { background: #fff; box-shadow: inset 0 0 0 1.5px var(--steel); }
  to { background: var(--dawn); box-shadow: inset 0 0 0 1.5px var(--dawn); }
}
@keyframes chain-in { from { opacity: 0; } to { opacity: 1; } }

/* Lista de servicios */
.services-list { list-style: none; display: grid; }
.services-list li { border-top: 1px solid var(--night); }
.service-link { display: block; height: 100%; padding: 1.4rem 0 2.25rem; color: inherit; text-decoration: none; }
.service-link h3 { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 0 0 0.55rem; }
.service-link h3 .icon { width: 1.15rem; height: 1.15rem; margin-top: 0.3em; color: var(--dawn-deep); }
.service-link p { margin: 0; color: var(--ink-2); max-width: 32rem; }
.service-link:hover h3 span { text-decoration: underline; text-decoration-color: var(--dawn-deep); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.service-link:hover h3 .icon { color: var(--night); }
@media (min-width: 860px) {
  .services-list { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 7.5rem); }
.section-haze { background: var(--haze); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }
.section-head h2 { margin-bottom: 0.4em; }
.section-head p { color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; }

/* Pasos (secuencias reales) */
.steps { list-style: none; counter-reset: step; display: grid; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem;
  padding: 1.5rem 0 1.75rem; border-top: 1px solid var(--night);
}
.steps li::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--serif); font-weight: 300; font-size: 2.5rem; line-height: 1;
}
.steps h3 { font-size: clamp(1.3rem, 1.2rem + 0.4vw, 1.5rem); margin: 0.2rem 0 0.4rem; }
.steps p { margin: 0; color: var(--ink-2); }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 2.5rem; }
  /* Subgrid: títulos y textos de los pasos quedan alineados aunque un título ocupe dos líneas */
  .steps li { grid-row: span 3; grid-template-columns: 1fr; grid-template-rows: subgrid; row-gap: 0; padding-bottom: 0; }
  .steps li::before { grid-row: auto; font-size: 3.25rem; margin-bottom: 1.5rem; }
}

/* Nosotros */
.about-grid { display: grid; gap: 3.5rem; }
.prose { max-width: 38rem; }
.about-grid .prose p { color: var(--ink-2); }
.about-grid h3 { font-size: 1.5rem; margin-top: 2.25rem; }
.about-grid > div > h3:first-child { margin-top: 0; }
.tools { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tools li { padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 0.92rem; }
.team { list-style: none; border-top: 1px solid var(--night); margin-top: 1rem; }
.team li { padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.team-name { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.2; }
.team .role { display: block; margin: 0.3rem 0 0.35rem; font-weight: 550; font-size: 0.97rem; }
.team p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.05fr 0.95fr; gap: 5rem; }
  .about-grid > div:last-child { padding-top: 0.6rem; }
}

/* Banda de cierre */
.cta-band { padding-block: clamp(5rem, 11vw, 8rem); }
.cta-band h2 { max-width: 21ch; }
.cta-band p { color: var(--on-night); max-width: 36rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; }

/* ---------- Páginas internas ---------- */
.page-hero { padding: clamp(2.25rem, 6vw, 4rem) 0 clamp(4.5rem, 10vw, 7.5rem); }
.page-hero h1 { font-size: clamp(2.5rem, 1.75rem + 3.2vw, 4.75rem); max-width: 15ch; }
.page-hero.lines::before { opacity: 0.6; height: 85%; }
.breadcrumb { margin-bottom: clamp(2.25rem, 6vw, 4rem); font-size: 0.9rem; color: var(--on-night); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--dawn-deep); }
.breadcrumb a { color: #fff; text-decoration-color: var(--dawn-deep); }
.breadcrumb a:hover { text-decoration-color: #fff; }

.topic { display: grid; gap: 1.75rem; padding-block: clamp(3.25rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.topic:first-child { border-top: 0; }
.section .topic:first-child { padding-top: 0; }
.section .topic:last-child { padding-bottom: 0; }
.topic h2 { font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.625rem); }
.topic .intro p { color: var(--ink-2); }
@media (min-width: 900px) {
  .topic { grid-template-columns: 0.9fr 1.1fr; gap: 5rem; align-items: start; }
}

.checks { list-style: none; border-top: 1px solid var(--night); }
.checks li { display: grid; grid-template-columns: 1.375rem 1fr; gap: 1rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.checks .icon {
  width: 1.375rem; height: 1.375rem; padding: 0.25rem; margin-top: 0.1rem;
  border-radius: 50%; background: var(--dawn); color: var(--night); stroke-width: 3;
}
.checks strong { display: block; }
.checks span { color: var(--ink-2); }

/* Resultados */
.ledger { list-style: none; border-top: 1px solid var(--night); }
.ledger li { display: grid; gap: 0.4rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.ledger-value {
  font-family: var(--serif); font-weight: 300; font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
  line-height: 1; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ledger-sector { display: block; font-weight: 600; color: var(--ink); }
.ledger-text { margin: 0; color: var(--ink-2); max-width: 40rem; }
@media (min-width: 720px) {
  .ledger li { grid-template-columns: 9rem 1fr; align-items: baseline; }
}
.footnote { margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-3); max-width: 46rem; }

/* Tabla de niveles */
.levels { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.levels caption { text-align: left; font-size: 0.9rem; color: var(--ink-3); padding-bottom: 0.85rem; }
.levels th, .levels td { text-align: left; vertical-align: top; padding: 1rem 0.85rem; border-bottom: 1px solid var(--line); }
.levels thead th { background: var(--night); color: #fff; font-weight: 600; font-size: 0.95rem; }
.levels tbody th { font-weight: 600; width: 28%; }
.levels td { color: var(--ink-2); }
@media (max-width: 719px) {
  .levels thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .levels, .levels tbody, .levels tr, .levels th, .levels td { display: block; width: 100%; }
  .levels caption { display: block; width: auto; }
  .levels tbody { border-top: 1px solid var(--night); }
  .levels tr { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .levels tbody th, .levels td { border: 0; padding: 0.2rem 0; }
  .levels tbody th { width: auto; font-size: 1.02rem; margin-bottom: 0.35rem; }
  .levels td { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem; }
  .levels td::before { content: attr(data-label); font-weight: 600; color: var(--ink); }
}

/* Tipos de proyecto y portafolio */
.kinds { list-style: none; display: grid; border-top: 1px solid var(--night); }
.kinds li { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.kinds h3 { font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.625rem); margin-bottom: 0.35rem; }
.kinds p { margin: 0; color: var(--ink-2); }
@media (min-width: 860px) {
  .kinds { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; border-top: 0; }
  .kinds li { border-top: 1px solid var(--night); border-bottom: 0; padding-top: 1.5rem; }
}
.work { list-style: none; display: grid; gap: 3rem; }
.work figure { margin: 0 0 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--haze); }
.work img { width: 100%; aspect-ratio: 1040 / 565; object-fit: cover; object-position: top; }
.work h3 { margin-bottom: 0.35rem; }
.work p { color: var(--ink-2); margin-bottom: 0.25rem; }
.work .text-link { min-height: 44px; }
@media (min-width: 860px) { .work { grid-template-columns: 1fr 1fr; gap: 3rem; } }

/* ---------- Contacto ---------- */
.channels { list-style: none; display: grid; gap: 0.75rem; margin-top: 2.5rem; }
.channel {
  display: grid; grid-template-columns: 2.75rem 1fr; gap: 0.15rem 1rem; align-items: center;
  height: 100%; padding: 1rem 1.15rem; border: 1px solid var(--night-3); border-radius: var(--radius);
  background: var(--night-2); color: #fff; text-decoration: none;
}
.channel:hover { border-color: var(--dawn); }
.channel .glyph { grid-row: span 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius); background: var(--dawn); color: var(--night); }
.channel .glyph .icon { width: 1.35rem; height: 1.35rem; }
.channel strong { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.channel span { font-size: 0.9rem; color: var(--on-night); }
@media (min-width: 860px) { .channels { grid-template-columns: repeat(3, 1fr); } }

.contact-grid { display: grid; gap: 4rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.05fr 0.95fr; gap: 5rem; align-items: start; } }

.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 560; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.75rem 0.9rem;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--field); border-radius: var(--radius);
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field select {
  appearance: none; padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.2rem) 1.45rem, calc(100% - 0.85rem) 1.45rem;
  background-size: 0.35rem 0.35rem; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--night); box-shadow: 0 0 0 3px var(--dawn); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.two-col { display: grid; gap: 1.15rem; }
@media (min-width: 600px) { .two-col { grid-template-columns: 1fr 1fr; } }
.form-note { margin: 0; font-size: 0.9rem; color: var(--ink-3); }
.form .btn { justify-self: start; }
@media (max-width: 479px) { .form .btn { width: 100%; } }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-bottom: 1.25rem; padding: 1rem 1.15rem; border-radius: var(--radius); font-weight: 560; }
.form-status[hidden] { display: none; }
.form-status.is-ok { background: var(--haze); color: var(--night); border: 1px solid var(--dawn); }
.form-status.is-error { background: #fdecea; color: #7f1d1d; border: 1px solid #f5c2bd; }

/* Preguntas frecuentes */
.faq { border-top: 1px solid var(--night); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: 1.15rem 0; font-family: var(--serif); font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.375rem); font-weight: 400; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 1.25rem; height: 1.25rem; color: var(--ink-2); transition: transform .2s ease; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding: 0 0 1.3rem; color: var(--ink-2); max-width: 44rem; }

/* ---------- Pie de página ---------- */
.site-footer {
  background: var(--night); color: #fff; border-top: 1px solid var(--night-3);
  padding: clamp(3.5rem, 8vw, 5rem) 0 calc(6.5rem + env(safe-area-inset-bottom));
}
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand img { width: 160px; margin-bottom: 1.25rem; }
.footer-brand p { color: var(--on-night); max-width: 22rem; font-size: 0.97rem; }
.site-footer h2 { margin-bottom: 0.85rem; font-family: var(--sans); font-size: 0.95rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.footer-links { list-style: none; display: grid; gap: 0.1rem; }
.footer-links a { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 40px; color: #dfe3f2; font-size: 0.97rem; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--dawn); }
.footer-links .icon { width: 1.1rem; height: 1.1rem; color: var(--dawn); }
.footer-links .plain { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 40px; color: var(--on-night); font-size: 0.94rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--night-3); font-size: 0.88rem; color: var(--on-night); }
@media (min-width: 860px) {
  .site-footer { padding-bottom: 3rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.15fr; gap: 3rem; }
}

/* ---------- Libro de Reclamaciones ---------- */
.lr-wrap { max-width: 54rem; }
.lr-form { gap: 1.5rem; }
.lr-head { padding-top: 1.25rem; border-top: 1px solid var(--night); }
.lr-head h2, .lr-result h2 { font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.625rem); margin-bottom: 1.1rem; }
.lr-meta { display: grid; gap: 0.9rem 2rem; margin: 0; }
@media (min-width: 600px) { .lr-meta { grid-template-columns: 1fr 1fr; } }
.lr-meta dt { font-size: 0.88rem; color: var(--ink-3); }
.lr-meta dd { margin: 0.15rem 0 0; font-weight: 560; overflow-wrap: anywhere; }
.lr-block { display: grid; gap: 1.15rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.lr-block legend {
  float: left; width: 100%; margin: 0; padding: 1.75rem 0 0; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem); font-weight: 400; line-height: 1.25;
}
.lr-num { color: var(--ink-3); }
.field-label { font-weight: 560; }
.lr-group { display: grid; gap: 0.6rem; }
.field textarea.short { min-height: 6rem; }
.choices { display: grid; gap: 0.6rem; }
.choices-row { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.choice {
  display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1rem;
  background: #fff; border: 1px solid var(--field); border-radius: var(--radius); cursor: pointer;
}
.choice input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--night); }
.choice strong { display: block; font-weight: 600; }
.choice:has(input:checked) { border-color: var(--night); box-shadow: inset 0 0 0 1px var(--night); }
.choice:focus-within { box-shadow: 0 0 0 3px var(--dawn); }
.lr-muted { margin: 0; font-size: 0.95rem; color: var(--ink-3); }
.lr-notes { padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }
.lr-notes p { margin: 0 0 0.5rem; }
.lr-result { margin-bottom: 2.25rem; }
.lr-result p { max-width: 40rem; color: var(--ink-2); }
.lr-result-error ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.lr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.5rem; }
.lr-actions [hidden] { display: none; }
.lr-copia { overflow-x: auto; }
.lr-aviso { display: inline-block; margin-top: 1.75rem; line-height: 0; }
.footer-brand .lr-aviso img { width: 168px; height: auto; margin: 0; }
@media print {
  .site-header, .site-footer, .wa-float, .page-hero, .lr-actions, .skip-link { display: none !important; }
  .section { padding: 0 !important; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; z-index: 40;
  right: max(1rem, env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--dawn); color: var(--night); text-decoration: none;
  box-shadow: 0 0 0 2px var(--night), 0 12px 28px rgba(22, 33, 52, .3);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float:hover { background: var(--dawn-hover); }
.wa-float.is-hidden { opacity: 0; visibility: hidden; transform: translateY(12px) scale(.92); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
@media (prefers-reduced-motion: reduce) { .wa-float, .wa-float.is-hidden { transition: none; transform: none; } }
.menu-open .wa-float { display: none; }

/* ---------- 404 ---------- */
.notfound { min-height: 62vh; display: grid; align-content: center; padding-block: 5rem; }
.notfound h1 { max-width: 14ch; }

/* ---------- Página de enlaces (bio de redes) ---------- */
.bare { position: relative; isolation: isolate; background: var(--night); color: #fff; min-height: 100vh; min-height: 100svh; }
.bare::before {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; z-index: -1; pointer-events: none; opacity: 0.7;
  background: url("../img/lineas.svg") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
          mask-image: linear-gradient(to bottom, transparent, #000 60%);
}
.links-page {
  width: 100%; max-width: 30rem; margin-inline: auto;
  padding: clamp(2.25rem, 8vw, 3.5rem) var(--gutter) calc(3rem + env(safe-area-inset-bottom));
}
.links-logo { width: 168px; margin-bottom: 2.25rem; }
.links-page h1 { font-size: clamp(2.1rem, 1.6rem + 2.2vw, 2.75rem); line-height: 1.08; margin-bottom: 0.45em; }
.links-page .lead { color: var(--on-night); font-size: 1.1rem; margin-bottom: 2rem; }
.links { list-style: none; display: grid; gap: 0.75rem; }
.link-btn {
  display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 0.1rem 0.9rem; align-items: center;
  min-height: 70px; padding: 0.8rem 1rem; border: 1px solid var(--night-3); border-radius: var(--radius);
  background: var(--night-2); color: #fff; text-decoration: none;
}
.link-btn:hover { border-color: var(--dawn); }
.link-btn .glyph { grid-row: span 2; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius); background: var(--night-3); color: var(--dawn); }
.link-btn .glyph .icon { width: 1.25rem; height: 1.25rem; }
.link-btn strong { font-size: 1.05rem; line-height: 1.3; }
.link-btn span.sub { grid-column: 2; font-size: 0.9rem; color: var(--on-night); }
.link-btn .chev { grid-row: span 2; grid-column: 3; color: var(--on-night); }
.link-btn.is-primary { background: var(--dawn); border-color: var(--dawn); color: var(--night); }
.link-btn.is-primary .glyph { background: var(--night); color: var(--dawn); }
.link-btn.is-primary span.sub, .link-btn.is-primary .chev { color: var(--night-3); }
.links-foot { margin-top: 2.25rem; font-size: 0.9rem; color: var(--on-night); }
.links-foot a { color: #fff; text-decoration-color: var(--dawn); }
