/* ==========================================================================
   DRENVO — sistema visual
   Industrial-minimalista: blanco dominante, tipografía negra, acentos rojos,
   azul técnico puntual, líneas finas y fotografía a sangre.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #FFFFFF;
  --black: #1F1F1F;
  --dark: #424242;
  --red: #ED1738;
  --red-dark: #C8102E;
  --blue: #009BC8;
  --gray: #F6F6F6;
  --border: #E9E9E9;
  --muted: #6B6B6B;
  --footer: #161616;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1440px;
  --section: clamp(72px, 9vw, 136px);
  --header-h: 90px;

  --fs-xxl: clamp(2.6rem, 1.4rem + 5.6vw, 6.2rem);
  --fs-xl: clamp(2.1rem, 1.3rem + 3.4vw, 4.4rem);
  --fs-lg: clamp(1.75rem, 1.2rem + 2.2vw, 3.1rem);
  --fs-md: clamp(1.25rem, 1.05rem + .8vw, 1.65rem);
  --fs-body: 1.0625rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--red); color: #fff; }

.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 {
  position: absolute; left: 12px; top: -60px; z-index: 200; padding: 12px 18px;
  background: var(--black); color: #fff; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; color: #fff; }

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

/* ---------- Tipografía editorial ---------- */
.h-xxl { font-size: var(--fs-xxl); font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.h-xl  { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.h-lg  { font-size: var(--fs-lg); font-weight: 750; letter-spacing: -.03em; }
.h-md  { font-size: var(--fs-md); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.lead  { font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); line-height: 1.55; color: var(--dark); font-weight: 450; }
.muted { color: var(--muted); }
.prose p { color: var(--dark); }
.prose h2 { font-size: var(--fs-md); margin-top: 2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; letter-spacing: -.01em; }
.prose ul { margin: 0 0 1.2em; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: .45em; color: var(--dark); }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--red); }
.prose a { color: var(--black); text-decoration: underline; }
.prose a:hover { color: var(--red); }

.label {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red);
}
.label__num { color: var(--red); }
.label__sep { color: var(--border); font-weight: 400; }
.label span:last-child { color: var(--black); }
.label--plain span:last-child { color: var(--red); }
.section--dark .label span:last-child, .cta .label span:last-child { color: #fff; }

.rule { display: block; width: 56px; height: 2px; background: var(--red); border: 0; margin: 28px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px; border: 1px solid transparent; border-radius: 0;
  font-size: .95rem; font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--black); border-color: var(--black); }
.btn--ghost:hover { background: var(--black); color: #fff; }
.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--light:hover { background: #fff; color: var(--black); }
.btn--block { width: 100%; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-size: .95rem;
}
.link-arrow .icon { width: 20px; height: 20px; color: var(--red); transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(5px); }
.link-btn { background: none; border: 0; padding: 0; text-align: left; }
.link-btn:hover { color: var(--red); }

.icon { width: 22px; height: 22px; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0;
  background: transparent; border: 1px solid transparent; color: var(--black);
}
.icon-btn:hover { color: var(--red); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--white);
  border-bottom: 1px solid var(--border); transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border), 0 10px 30px -18px rgba(0,0,0,.25); }
.site-header__inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
}
.brand { display: block; line-height: 0; }
.brand img { width: 150px; height: auto; }
.nav { justify-self: center; }
.nav__list { display: flex; gap: clamp(16px, 1.9vw, 34px); }
.nav__link {
  position: relative; display: block; padding: 10px 0; font-size: .95rem; font-weight: 600;
  text-decoration: none; color: var(--black); white-space: nowrap;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--red); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__mobile-extra { display: none; }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.btn--header { min-height: 46px; padding: 0 22px; font-size: .9rem; }
.menu-toggle { display: none; }
.menu-toggle__open, .menu-toggle__close { display: grid; place-items: center; line-height: 0; }
.menu-toggle__close { display: none; }

@media (max-width: 1239px) {
  :root { --header-h: 76px; }
  .site-header__inner { grid-template-columns: auto 1fr; }
  .brand img { width: 132px; }
  .site-header__actions { justify-self: end; }
  .menu-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; background: var(--white);
    justify-self: stretch; align-self: stretch; width: auto;
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    padding: 24px var(--gutter) 32px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--border); }
  .nav__link { padding: 16px 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
  .nav__link::after { display: none; }
  .nav__mobile-extra { display: block; }
  .nav__mobile-meta { margin-top: 20px; font-size: var(--fs-sm); color: var(--muted); }
  body.menu-open { overflow: hidden; }
  body.menu-open .menu-toggle__open { display: none; }
  body.menu-open .menu-toggle__close { display: grid; }
}
@media (max-width: 640px) {
  .btn--header { display: none; }
}

/* ---------- Búsqueda ---------- */
.search {
  width: 100%; max-width: none; height: auto; max-height: 100vh; margin: 0; padding: 0; border: 0;
  background: var(--white); color: var(--black); border-bottom: 1px solid var(--border);
}
.search::backdrop { background: rgba(31,31,31,.45); }
.search__inner { max-width: 960px; margin-inline: auto; padding: 28px var(--gutter) 36px; }
.search__form { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--black); }
.search__icon { color: var(--red); }
.search__form input {
  flex: 1; min-width: 0; height: 64px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); font-weight: 600; color: var(--black);
}
.search__results { margin-top: 12px; max-height: 60vh; overflow-y: auto; }
.search__results li { border-bottom: 1px solid var(--border); }
.search__results a { display: block; padding: 14px 0; text-decoration: none; }
.search__results strong { display: block; font-size: 1.05rem; }
.search__results span { font-size: var(--fs-sm); color: var(--muted); }
.search__empty { padding: 14px 0; color: var(--muted); }

/* ---------- Migas ---------- */
.crumbs-bar { padding-top: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: #BDBDBD; }
.crumbs a { text-decoration: none; }
.crumbs [aria-current] { color: var(--black); }

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section--gray { background: var(--gray); }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--border { border-top: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .h-xl, .section-head .h-lg { margin: 0; }
.section-head__aside { color: var(--dark); }
.section-head__aside p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Hero de inicio ---------- */
.hero__top { padding-block: clamp(48px, 6vw, 96px) clamp(40px, 5vw, 72px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px 72px; align-items: end; }
.hero__title { margin: 0; }
.hero__title em { font-style: normal; color: var(--red); }
.hero__aside { display: grid; gap: 28px; padding-bottom: 10px; }
.hero__aside .lead { margin: 0; }
.hero__ring { width: 92px; height: 92px; }
.hero__ring .spin { transform-origin: 50% 50%; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero__ring .spin { animation: none; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { position: relative; background: #1a1612; }
.hero__media img { width: 100%; height: clamp(320px, 38vw, 550px); object-fit: cover; }
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; gap: 16px; padding: 16px var(--gutter);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.85); background: linear-gradient(transparent, rgba(0,0,0,.45));
}
.hero__caption span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--red); vertical-align: 1px; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__ring { width: 72px; height: 72px; order: -1; }
  .hero__media img { height: auto; aspect-ratio: 4 / 3.4; }
}
@media (max-width: 560px) { .hero__caption span:last-child { display: none; } }

/* ---------- Hero de páginas internas ---------- */
.page-hero { padding-block: clamp(40px, 5vw, 80px) 0; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 72px; align-items: end; padding-bottom: clamp(40px, 5vw, 72px); }
.page-hero__title { margin: 0; }
.page-hero__aside .lead { margin-bottom: 26px; }
.page-hero__media img { width: 100%; height: clamp(260px, 32vw, 460px); object-fit: cover; }
.page-hero--plain .page-hero__grid { border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .page-hero__grid { grid-template-columns: 1fr; } }

/* ---------- Bloques dividos ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(40px, 7vw, 120px); }
.split--even { grid-template-columns: 1fr 1fr; }
.split--center { align-items: center; }
@media (max-width: 900px) { .split, .split--even { grid-template-columns: 1fr; } }

.intro__media { margin-top: clamp(48px, 6vw, 96px); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 20px; align-items: end; }
.intro__media figure { margin: 0; }
.intro__media img { width: 100%; object-fit: cover; }
.intro__media .main img { aspect-ratio: 16 / 9; }
.intro__media .side img { aspect-ratio: 3 / 4; }
.intro__facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); margin-top: 40px; }
.intro__facts div { padding: 22px 20px 0 0; }
.intro__facts dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.intro__facts dd { margin: 0; font-weight: 600; font-size: .98rem; }
figcaption { margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); letter-spacing: .02em; }
@media (max-width: 700px) {
  .intro__media { grid-template-columns: 1fr; }
  .intro__media .side { display: none; }
  .intro__facts { grid-template-columns: 1fr; }
}

/* ---------- Servicios (grilla editorial) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.svc {
  position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--white); text-decoration: none; color: var(--black);
}
.svc__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--gray); }
.svc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.svc:hover .svc__media img { transform: scale(1.04); }
.svc__body { display: flex; flex-direction: column; flex: 1; padding: 28px clamp(22px, 2.4vw, 36px) 32px; }
.svc__num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; color: var(--red); margin-bottom: 14px; }
.svc__title { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); margin-bottom: 12px; }
.svc__text { color: var(--dark); font-size: .98rem; margin-bottom: 26px; }
.svc__more { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--border); font-size: .9rem; font-weight: 700; }
.svc__more .icon { color: var(--red); transition: transform .3s var(--ease); }
.svc:hover { color: var(--black); }
.svc:hover .svc__title { color: var(--red); }
.svc:hover .svc__more .icon { transform: translateX(6px); }
.svc::before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 3px; background: var(--red); z-index: 2; transition: width .45s var(--ease); }
.svc:hover::before { width: 100%; }
@media (max-width: 1023px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Sistemas (sección técnica) ---------- */
.systems { position: relative; overflow: hidden; }
.systems__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--border); }
.systems .wrap { position: relative; }
.sys-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sys { position: relative; }
.sys__media { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--black); }
.sys__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sys:hover .sys__media img { transform: scale(1.05); }
.sys__tag { position: absolute; top: 14px; left: 14px; padding: 6px 10px; background: var(--white); font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.sys__cross { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; color: #fff; opacity: .9; }
.sys__title { font-size: 1.2rem; margin: 20px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.sys__title::before { content: ""; width: 8px; height: 8px; background: var(--blue); flex: none; transform: translateY(-2px); }
.sys p { color: var(--dark); font-size: .95rem; }
@media (max-width: 1023px) { .sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sys-grid { grid-template-columns: 1fr; } .sys__media { aspect-ratio: 4 / 3; } }

/* ---------- Destacado ---------- */
.feature { background: var(--gray); }
.feature__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
.feature__text { padding: var(--section) clamp(24px, 5vw, 96px) var(--section) 0; }
.feature__media { position: relative; min-height: 420px; margin-right: calc(-1 * var(--gutter)); }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__list { margin: 28px 0 36px; border-top: 1px solid #DDD; }
.feature__list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #DDD; font-weight: 600; }
.feature__list .icon { color: var(--red); width: 20px; height: 20px; margin-top: 3px; }
@media (max-width: 900px) {
  .feature__grid { grid-template-columns: 1fr; }
  .feature__text { padding: var(--section) 0 48px; }
  .feature__media { min-height: 0; aspect-ratio: 4 / 3; margin-inline: calc(-1 * var(--gutter)); }
}

/* ---------- Por qué DRENVO ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--black); }
.why { padding: 30px 28px 10px 0; border-right: 1px solid var(--border); }
.why + .why { padding-left: 28px; }
.why:last-child { border-right: 0; }
.why__num { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; color: var(--red); margin-bottom: 40px; }
.why h3 { font-size: 1.3rem; margin-bottom: 12px; }
.why p { color: var(--dark); font-size: .97rem; }
@media (max-width: 1023px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why:nth-child(2) { border-right: 0; }
  .why:nth-child(3) { padding-left: 0; }
  .why:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .why-grid { grid-template-columns: 1fr; }
  .why, .why + .why { padding: 26px 0 6px; border-right: 0; }
  .why + .why { border-top: 1px solid var(--border); }
  .why__num { margin-bottom: 16px; }
}

/* ---------- Proceso ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 28px 0 0; }
.step__head { position: relative; display: flex; align-items: center; margin-bottom: 30px; }
.step__icon { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--black); background: var(--white); color: var(--black); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.section--gray .step__icon { background: var(--gray); }
.step:hover .step__icon { background: var(--red); border-color: var(--red); color: #fff; }
.step__line { position: absolute; left: 64px; right: 0; top: 50%; height: 1px; background: var(--border); overflow: hidden; }
.step__line::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease); }
.is-visible .step__line::after { transform: scaleX(1); }
.step:nth-child(2) .step__line::after { transition-delay: .2s; }
.step:nth-child(3) .step__line::after { transition-delay: .4s; }
.step:last-child .step__line { display: none; }
.step__num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; color: var(--red); margin-bottom: 8px; display: block; }
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--dark); font-size: .96rem; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .step:nth-child(2) .step__line { display: none; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 64px 1fr; gap: 0 22px; padding: 0 0 32px; }
  .step__head { grid-row: span 3; flex-direction: column; margin: 0; align-items: stretch; }
  .step__line { position: relative; left: auto; top: auto; width: 1px; height: auto; flex: 1; margin: 0 auto; min-height: 30px; }
  .step:nth-child(2) .step__line { display: block; }
  .step__line::after { transform: scaleY(0); transform-origin: top; }
  .is-visible .step__line::after { transform: scaleY(1); }
}

/* ---------- Fotografía a sangre ---------- */
.showcase { position: relative; min-height: clamp(420px, 52vw, 760px); display: flex; align-items: flex-end; color: #fff; background: var(--black); overflow: hidden; }
.showcase > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.showcase::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.45) 40%, rgba(0,0,0,.08) 75%); }
.showcase .wrap { position: relative; z-index: 1; padding-block: clamp(40px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 24px 64px; align-items: end; }
.showcase h2 { margin: 0; color: #fff; }
.showcase p { margin: 0; color: rgba(255,255,255,.85); }
@media (max-width: 800px) { .showcase .wrap { grid-template-columns: 1fr; } }

/* ---------- Aplicaciones ---------- */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2vw, 32px); }
.app__media { overflow: hidden; aspect-ratio: 4 / 5; background: var(--gray); }
.app__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.app:hover .app__media img { transform: scale(1.04); }
.app__body { padding-top: 24px; }
.app__kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.app h3 { font-size: 1.5rem; margin: 10px 0 12px; }
.app p { color: var(--dark); font-size: .97rem; }
.app ul { margin-top: 16px; border-top: 1px solid var(--border); }
.app li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .93rem; font-weight: 600; }
.note { font-size: var(--fs-xs); color: var(--muted); margin-top: 36px; }
@media (max-width: 900px) { .apps { grid-template-columns: 1fr; } .app__media { aspect-ratio: 16 / 10; } }

/* ---------- FAQ ---------- */
.faq { border-top: 2px solid var(--black); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  display: grid; grid-template-columns: 44px 1fr 28px; gap: 12px; align-items: center;
  padding: 24px 0; cursor: pointer; list-style: none; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); font-weight: 700; letter-spacing: -.01em;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--red); }
.faq__n { font-size: var(--fs-xs); letter-spacing: .14em; color: var(--red); }
.faq__icon { width: 22px; height: 22px; transition: transform .3s var(--ease); color: var(--black); }
.faq__item[open] .faq__icon { transform: rotate(45deg); color: var(--red); }
.faq__a { padding: 0 40px 24px 56px; color: var(--dark); }
.faq__a p { margin: 0; }
.faq__a a { color: var(--black); }
@media (max-width: 560px) { .faq__q { grid-template-columns: 34px 1fr 24px; } .faq__a { padding: 0 0 22px 46px; } }

/* ---------- CTA oscuro ---------- */
.cta { position: relative; overflow: hidden; background: var(--black); color: #fff; padding-block: var(--section); }
.cta__pipes { position: absolute; right: -40px; top: 50%; width: min(620px, 70vw); height: auto; transform: translateY(-50%); color: rgba(255,255,255,.09); pointer-events: none; }
.cta .wrap { position: relative; }
.cta__inner { max-width: 820px; }
.cta h2 { color: #fff; margin-bottom: 22px; }
.cta p { color: rgba(255,255,255,.75); font-size: 1.15rem; margin-bottom: 36px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta__mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; }
.cta__mail:hover { color: #fff; }
.cta__mail .icon { color: var(--red); }

/* ---------- Páginas de servicio ---------- */
.situations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.situation { padding: 28px clamp(20px, 2vw, 32px) 30px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.situation__n { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; color: var(--red); }
.situation h3 { font-size: 1.12rem; margin: 14px 0 8px; letter-spacing: -.01em; line-height: 1.25; }
.situation p { color: var(--dark); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .situations { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .situations { grid-template-columns: 1fr; } }

.blocks { display: grid; gap: 0; border-top: 1px solid var(--border); }
.block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 48px; padding: 32px 0; border-bottom: 1px solid var(--border); }
.block h3 { font-size: 1.3rem; margin: 0; }
.block p { color: var(--dark); margin: 0; }
@media (max-width: 760px) { .block { grid-template-columns: 1fr; } }

.media-pair { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; margin-top: clamp(40px, 5vw, 72px); }
.media-pair figure { margin: 0; }
.media-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-pair figure:last-child img { aspect-ratio: 3 / 3.4; }
@media (max-width: 700px) { .media-pair { grid-template-columns: 1fr; } .media-pair figure:last-child img { aspect-ratio: 4 / 3; } }

.components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; counter-reset: c; }
.component { padding: 26px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 48px 1fr; gap: 0 16px; }
.component__mark { width: 40px; height: 40px; color: var(--blue); }
.component h3 { font-size: 1.15rem; margin: 2px 0 8px; }
.component p { color: var(--dark); font-size: .96rem; margin: 0; }
@media (max-width: 760px) { .components { grid-template-columns: 1fr; } }

.checklist li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); font-weight: 600; }
.checklist .icon { color: var(--red); width: 20px; height: 20px; margin-top: 3px; }

/* ---------- Tarjetas de soluciones ---------- */
.sol-list { border-top: 2px solid var(--black); }
.sol { display: grid; grid-template-columns: 80px minmax(0, 5fr) minmax(0, 4fr) 260px; gap: 24px 40px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.sol__n { font-size: 2.6rem; font-weight: 800; color: var(--red); letter-spacing: -.04em; line-height: 1; }
.sol h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); margin: 0; }
.sol p { margin: 0; color: var(--dark); font-size: .97rem; }
.sol__media { overflow: hidden; aspect-ratio: 16 / 10; }
.sol__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sol:hover { color: var(--black); }
.sol:hover h3 { color: var(--red); }
.sol:hover .sol__media img { transform: scale(1.05); }
@media (max-width: 1023px) { .sol { grid-template-columns: 60px 1fr 220px; } .sol p { grid-column: 2; } .sol__media { grid-column: 3; grid-row: 1 / span 2; } }
@media (max-width: 640px) { .sol { grid-template-columns: 1fr; gap: 12px; } .sol p, .sol__media { grid-column: auto; grid-row: auto; } .sol__media { order: -1; } }

/* ---------- Valores / Nosotros ---------- */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.value { border-top: 2px solid var(--black); padding-top: 24px; }
.value__n { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; color: var(--red); }
.value h3 { font-size: 1.3rem; margin: 18px 0 10px; }
.value p { color: var(--dark); font-size: .97rem; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr; gap: 32px; } }

.data-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--black); }
.data-table th, .data-table td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { width: 34%; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.data-table td { font-weight: 600; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px clamp(40px, 6vw, 112px); }
.contact__info dl { margin: 32px 0 0; border-top: 2px solid var(--black); }
.contact__info dl div { padding: 20px 0; border-bottom: 1px solid var(--border); }
.contact__info dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.contact__info dd { margin: 0; font-weight: 600; }
.contact__info dd a { text-decoration: none; }
.contact__img { margin-top: 32px; }
.contact__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } .contact__img { display: none; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .88rem; font-weight: 700; }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid #CFCFCF; border-radius: 0;
  background: var(--white); color: var(--black); font: inherit; font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231F1F1F' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--black); box-shadow: inset 0 -2px 0 var(--red); }
.field__error { font-size: .85rem; font-weight: 600; color: var(--red-dark); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .94rem; color: var(--dark); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.form__submit { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.form__note { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { grid-column: 1 / -1; padding: 18px 20px; border-left: 3px solid var(--red); background: #FDF0F2; font-weight: 600; }
.alert ul { margin-top: 8px; font-weight: 500; }
.alert li { list-style: disc; margin-left: 20px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Legal ---------- */
.legal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 40px clamp(40px, 6vw, 112px); }
.legal__toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; border-top: 2px solid var(--black); padding-top: 16px; }
.legal__toc p { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.legal__toc a { display: block; padding: 7px 0; font-size: .93rem; text-decoration: none; color: var(--dark); }
.legal__toc a:hover { color: var(--red); }
.legal .prose h2 { padding-top: 24px; border-top: 1px solid var(--border); }
.legal .prose h2:first-of-type { margin-top: 0; }
.review-note { padding: 18px 20px; border-left: 3px solid var(--blue); background: #EEF8FB; font-size: .94rem; color: var(--dark); margin-bottom: 32px; }
@media (max-width: 900px) { .legal { grid-template-columns: 1fr; } .legal__toc { position: static; } }

/* ---------- Gracias / 404 ---------- */
.center-page { min-height: 60vh; display: grid; align-content: center; padding-block: var(--section); }
.center-page__mark { width: 72px; height: 72px; margin-bottom: 32px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--footer); color: rgba(255,255,255,.72); font-size: .94rem; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.5fr)); gap: 48px 40px; padding-block: clamp(64px, 7vw, 104px) 56px; }
.site-footer__brand img { width: 160px; margin-bottom: 28px; }
.site-footer__brand > p { max-width: 420px; }
.site-footer__contact { display: grid; gap: 12px; margin-top: 24px; }
.site-footer__contact a, .site-footer__contact > span { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: #fff; font-weight: 600; }
.site-footer__contact .icon { width: 20px; height: 20px; color: var(--red); margin-top: 2px; }
.site-footer__title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer .link-btn:hover { color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; padding-block: 26px 32px; border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-xs); color: rgba(255,255,255,.55); }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { text-decoration: underline; }
@media (max-width: 1023px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Cookies ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 980px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center;
  padding: 22px 24px; background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--red);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.35);
}
.cookie[hidden] { display: none; }
.cookie__text { margin: 0; font-size: .92rem; color: var(--dark); }
.cookie__text a { color: var(--black); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie .btn, .cookie-modal .btn { min-height: 46px; padding: 0 20px; font-size: .88rem; }
@media (max-width: 760px) { .cookie { grid-template-columns: 1fr; } .cookie__actions .btn { flex: 1; } }
.cookie-modal { width: min(560px, calc(100% - 32px)); padding: 0; border: 0; border-top: 3px solid var(--red); color: var(--black); }
.cookie-modal::backdrop { background: rgba(31,31,31,.5); }
.cookie-modal__form { padding: 30px 28px; display: grid; gap: 16px; }
.cookie-modal h2 { font-size: 1.5rem; margin: 0 0 6px; }
.toggle { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); font-size: .93rem; color: var(--dark); }
.toggle input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.toggle strong { color: var(--black); }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Pantallas muy angostas: evitar desbordes horizontales ---------- */
.split > *, .legal > *, .contact > *, .intro__media > *, .page-hero__grid > *, .hero__grid > *,
.section-head > *, .feature__grid > *, .showcase .wrap > *, .site-footer__grid > * { min-width: 0; }
.data-table td, .contact__info dd, .site-footer__contact span { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .btn { white-space: normal; text-align: center; padding: 12px 22px; }
  .data-table th, .data-table td { display: block; width: 100%; padding: 4px 0; border: 0; }
  .data-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
}
