/* ==========================================================================
   Construcciones y Reformas San Andrés Vera — rediseño v2
   Minimalista claro · acentos corporativos · scroll dinámico
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --red: #8b0000;
  --red-hover: #a30b0b;
  --red-soft: rgba(139, 0, 0, 0.08);
  --cream: #fff3d9;
  --cream-soft: #fdf8ee;
  --ink: #1f232b;
  --ink-2: #212121;
  --black: #091010;
  --text: #3e3e3e;
  --muted: #6b6b6b;
  --line: #e1e1e1;
  --grey: #eff1f4;
  --white: #ffffff;

  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-body: "Inter", "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 64px);
  --section: clamp(80px, 10vw, 150px);
  --radius: 22px;
  --radius-lg: 30px;
  --header-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 20px 60px -30px rgba(31, 35, 43, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; color: var(--ink); line-height: 1.05; letter-spacing: -0.015em; }
p { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.section { padding-block: var(--section); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ""; width: 28px; height: 2px; background: currentColor; }
.title-xl { font-size: clamp(42px, 6.2vw, 88px); }
.title-lg { font-size: clamp(34px, 4.4vw, 60px); }
.title-md { font-size: clamp(26px, 2.6vw, 34px); }
.lead { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.7; }
.rule { width: 56px; height: 3px; background: var(--red); border-radius: 3px; margin: 26px 0; }
.rule--center { margin-inline: auto; }
.t-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 30px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, box-shadow 0.35s, border-color 0.3s;
  white-space: nowrap;
}
.btn .arr { display: inline-block; transition: transform 0.35s var(--ease); font-family: var(--font-body); }
.btn:hover .arr { transform: translateX(5px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 12px 30px -14px rgba(139, 0, 0, 0.7); }
.btn--primary:hover { background: var(--red-hover); transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(139, 0, 0, 0.75); }
.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn--light { background: var(--cream); color: var(--ink); }
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn--sm { padding: 13px 22px; font-size: 12px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--red); letter-spacing: 0.02em;
}
.link-arrow .arr { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- Progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120; pointer-events: none; }
.progress__bar { height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.4s, box-shadow 0.4s, height 0.4s var(--ease), backdrop-filter 0.4s, transform 0.5s var(--ease);
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.is-scrolled {
  --header-h: 72px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(31, 35, 43, 0.08);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 68px; width: auto; transition: height 0.4s var(--ease); }
.site-header.is-scrolled .brand img { height: 52px; }
.nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 40px; }
.nav a {
  position: relative; font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.4s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.header-tools { display: flex; align-items: center; gap: 14px; }

/* language pill */
.lang { position: relative; display: inline-flex; align-items: center; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(31, 35, 43, 0.18); border-radius: 999px;
  padding: 9px 34px 9px 40px; cursor: pointer; transition: border-color 0.3s, background 0.3s;
}
.lang select:hover { border-color: var(--ink); background: #fff; }
.lang::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f232b' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c3 3.2 3 15.8 0 19M12 2.5c-3 3.2-3 15.8 0 19'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lang::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; transform: translateY(-65%) rotate(45deg); pointer-events: none;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
/* Google Translate: escondemos su interfaz y usamos la nuestra */
#google_translate_element { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.goog-te-banner-frame, .skiptranslate iframe, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; }
font { background: transparent !important; box-shadow: none !important; }

/* burger */
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; position: relative; z-index: 130; }
.burger span {
  position: absolute; left: 12px; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.45s var(--ease), top 0.45s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 28px; }
.burger.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* mobile overlay menu */
.menu {
  position: fixed; inset: 0; z-index: 110; background: var(--cream);
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--gutter) 48px;
  clip-path: circle(0px at calc(100% - 44px) 44px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease), visibility 0s linear 0.7s;
}
.menu.is-open { clip-path: circle(150vmax at calc(100% - 44px) 44px); visibility: visible; transition: clip-path 0.7s var(--ease), visibility 0s; }
.menu__links { display: flex; flex-direction: column; gap: 6px; }
.menu__links a {
  font-family: var(--font-display); font-size: clamp(38px, 9vw, 64px); line-height: 1.15; color: var(--ink);
  display: flex; align-items: baseline; gap: 16px;
  transform: translateY(24px); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.6s;
}
.menu.is-open .menu__links a { transform: none; opacity: 1; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: 0.08s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: 0.16s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: 0.24s; }
.menu__links a small { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.2em; color: var(--red); font-weight: 600; }
.menu__foot { margin-top: 40px; display: grid; gap: 10px; font-size: 15px; color: var(--muted); opacity: 0; transition: opacity 0.6s 0.3s; }
.menu.is-open .menu__foot { opacity: 1; }
.menu__foot a { color: var(--ink); font-weight: 500; }
.menu__foot .lang { margin-top: 8px; justify-self: start; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* ---------- Hero ---------- */
.stage { position: relative; }
.hero {
  position: relative; z-index: 0;
  background: var(--cream);
  padding-top: calc(var(--header-h) + 28px);
  padding-bottom: 48px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -30% -10%; height: 60%;
  background: radial-gradient(60% 60% at 50% 100%, rgba(139, 0, 0, 0.10), transparent 70%);
  pointer-events: none;
}
.hero__inner { display: grid; gap: 26px; margin-bottom: 24px; }
.hero__row { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.hero__sub {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: clamp(20px, 2.1vw, 30px); color: var(--ink); max-width: 46ch; line-height: 1.3;
}
.container--wide { width: min(100% - 2 * var(--gutter), 1520px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--ink); box-shadow: var(--shadow-card);
  aspect-ratio: 1680 / 720; margin-inline: auto; width: 100%;
}
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scroll {
  position: absolute; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero__scroll i { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); animation: nudge 1.6s infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-2px) rotate(45deg); } 50% { transform: translateY(2px) rotate(45deg); } }

/* En escritorio el hero se queda fijo y la sección siguiente lo "tapa" al hacer scroll */
@media (min-width: 1024px) and (min-height: 820px) {
  .hero { position: sticky; top: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 32px; }
  .hero > * { flex-shrink: 0; }
  .hero__media { width: min(100%, calc((100vh - 340px) * 1680 / 720)); }
  .after-hero { box-shadow: 0 -30px 60px -30px rgba(31, 35, 43, 0.25); }
}
.after-hero { position: relative; z-index: 2; background: var(--white); border-radius: 40px 40px 0 0; }

/* Secciones apiladas como hojas: cada una monta sobre la anterior con esquinas redondeadas */
.teaser, .why, .contact { position: relative; border-radius: 40px 40px 0 0; margin-top: -40px; }
.teaser { z-index: 3; } .why { z-index: 4; } .contact { z-index: 5; }

/* Cabecera sobre hero oscuro (página Servicios): versión clara hasta que se hace scroll */
.brand__light { display: none; }
body.hero-dark .site-header:not(.is-scrolled) .brand__dark { display: none; }
body.hero-dark .site-header:not(.is-scrolled) .brand__light { display: block; }
body.hero-dark .site-header:not(.is-scrolled) .nav a { color: #fff; }
body.hero-dark .site-header:not(.is-scrolled) .lang select { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.35); }
body.hero-dark .site-header:not(.is-scrolled) .lang select option { color: var(--ink); }
body.hero-dark .site-header:not(.is-scrolled) .lang::before { filter: invert(1); }
body.hero-dark .site-header:not(.is-scrolled) .lang::after { border-color: #fff; }
body.hero-dark .site-header:not(.is-scrolled) .burger span { background: #fff; }
.burger.is-open span { background: var(--ink) !important; }

/* ---------- Acerca ---------- */
.about { padding-block: var(--section); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about__media { position: relative; }
.about__main {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--grey);
}
.about__main img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.about__second {
  position: absolute; right: -8%; bottom: -10%; width: 46%; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 60px -20px rgba(31, 35, 43, 0.45); border: 6px solid #fff; background: var(--grey);
}
.about__second img { width: 100%; height: 100%; object-fit: cover; }
.about__badge {
  position: absolute; left: -6%; top: 8%; background: var(--red); color: #fff; border-radius: 999px;
  padding: 14px 20px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  box-shadow: 0 16px 30px -12px rgba(139, 0, 0, 0.7);
}
.about__copy p + p { margin-top: 20px; }
.about__copy .lead { max-width: 52ch; }

/* palabras que se "encienden" con el scroll */
.words .w { color: rgba(62, 62, 62, 0.28); transition: color 0.35s; }
.words strong .w { color: rgba(31, 35, 43, 0.35); }
.words .w.is-on { color: var(--text); }
.words strong .w.is-on { color: var(--ink); }

/* ---------- Servicios (teaser oscuro) ---------- */
.teaser { background: var(--black); color: #fff; padding-block: var(--section); overflow: hidden; }
.teaser .eyebrow { color: var(--cream); }
.teaser h2 { color: #fff; }
.teaser__head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.teaser__media {
  position: relative; margin-inline: auto; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 16 / 7; width: 100%; background: #111; will-change: clip-path;
}
.teaser__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.teaser__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 16, 16, 0) 40%, rgba(9, 16, 16, 0.55)); }
.teaser__body { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: center; margin-top: 56px; }
.teaser__body p { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.6; color: rgba(255, 255, 255, 0.82); font-family: var(--font-display); font-weight: 400; }
.teaser__body p strong { color: #fff; font-weight: 600; }
.teaser__body .btn-wrap { justify-self: end; }
/* cinta de servicios que se desplaza con el scroll */
.teaser__marquee { overflow: hidden; white-space: nowrap; margin: -16px 0 clamp(36px, 4vw, 56px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.teaser__track { display: inline-flex; align-items: center; gap: 0; will-change: transform; }
.teaser__track span { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(24px, 3vw, 44px); color: rgba(255, 243, 217, 0.5); padding-right: 22px; }
.teaser__track i { font-style: normal; color: var(--red); padding-right: 22px; font-size: clamp(24px, 3vw, 44px); }
.why-card { transition: box-shadow 0.4s, border-color 0.4s; }
.why-card:hover { box-shadow: 0 30px 60px -32px rgba(139, 0, 0, 0.45); border-color: rgba(139, 0, 0, 0.18); }

/* ---------- Obra destacada (TM Tower) ---------- */
.tower { background: var(--cream-soft); padding-block: var(--section); position: relative; overflow: hidden; }
.tower::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.35), transparent); }
.tower__grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.tower__copy h2 em { font-style: italic; color: var(--red); }
.tower__copy .lead { max-width: 44ch; }
.tower__note { margin-top: 18px; color: var(--muted); max-width: 46ch; }

.tower__stats { display: flex; flex-wrap: wrap; gap: clamp(26px, 4vw, 54px); margin-top: clamp(32px, 4vw, 46px); }
.tower__stats li { display: grid; gap: 6px; }
.tower__num { font-family: var(--font-display); font-size: clamp(40px, 4.6vw, 62px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tower__num b { font-weight: inherit; }
.tower__stats small { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); font-weight: 600; }

.tower__figure { margin: 0; }
.tower__video {
  display: block; width: 100%; position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--radius-lg); aspect-ratio: 16 / 9; background: #111; box-shadow: var(--shadow-card);
}
.tower__video img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.tower__video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 16, 16, 0) 45%, rgba(9, 16, 16, 0.5)); transition: opacity 0.4s; }
.tower__video:hover::after { opacity: 0.65; }
/* Abajo a la izquierda, no centrado: en la portada del reportaje sale una persona y
   un botón en medio le tapaba la cara. */
.tower__play {
  position: absolute; left: clamp(16px, 2vw, 24px); bottom: clamp(16px, 2vw, 24px); z-index: 1;
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 10px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: 0 18px 40px -14px rgba(139, 0, 0, 0.85);
  transition: transform 0.4s var(--ease), background 0.3s;
}
.tower__play i { position: relative; flex: none; width: 34px; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; }
.tower__play svg { width: 14px; margin-left: 2px; }
.tower__video:hover .tower__play { transform: translateY(-3px); background: var(--red-hover); }
/* aro que late: deja claro que es un vídeo sin cargar nada de YouTube */
.tower__play i::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.65); animation: towerPulse 2.8s var(--ease) infinite; }
@keyframes towerPulse { 0% { transform: scale(1); opacity: 0.7; } 70% { transform: scale(1.6); opacity: 0; } 100% { opacity: 0; } }
.tower__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tower__video.is-playing { cursor: default; }
.tower__video.is-playing::after, .tower__video.is-playing .tower__play, .tower__video.is-playing img { display: none; }
.tower__figure figcaption { margin-top: 16px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tower__figure figcaption a { color: var(--ink); font-weight: 600; border-bottom: 1px solid rgba(31, 35, 43, 0.25); }
.tower__figure figcaption a:hover { color: var(--red); border-color: currentColor; }

/* ---------- Flota ---------- */
.fleet { background: var(--white); padding-block: var(--section); overflow: hidden; }
.fleet__head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(36px, 5vw, 58px); }
.fleet__lead { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.75; }
.fleet__lead strong { color: var(--ink); }
.fleet__head h2 em { font-style: italic; color: var(--red); }
/* Panorámica de la nave + una segunda foto encima, en la esquina. Mismo recurso que en
   "Acerca", pero en horizontal, para que se reconozca como de la misma familia. */
.fleet__media { position: relative; padding-bottom: clamp(0px, 4vw, 56px); }
.fleet__main { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--grey); aspect-ratio: 21 / 9; will-change: clip-path; }
.fleet__main img { width: 100%; height: 100%; object-fit: cover; }
.fleet__inset {
  /* A la izquierda a propósito: a la derecha tapaba la furgoneta rotulada, y aquí cubre
     el rincón de coches aparcados, que es lo que menos aporta de la foto. */
  position: absolute; left: 3%; bottom: 0; width: 29%; margin: 0;
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 7px solid #fff; background: var(--grey);
  box-shadow: 0 30px 60px -20px rgba(31, 35, 43, 0.45);
}
.fleet__inset img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Por qué elegirnos + FAQ ---------- */
.why { background: var(--cream); padding-block: var(--section); position: relative; overflow: hidden; }
.why__head { text-align: center; margin-bottom: clamp(48px, 6vw, 80px); }
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
  background: #fff; border-radius: var(--radius); padding: 38px 30px 34px; border: 1px solid rgba(31, 35, 43, 0.06);
  box-shadow: 0 30px 60px -40px rgba(31, 35, 43, 0.35); will-change: transform;
  display: flex; flex-direction: column; gap: 18px;
}
/* El propio icono ya trae su fondo transparente: sin recuadro, más grande. */
.why-card__icon { line-height: 0; }
.why-card__icon img { width: 72px; height: 72px; object-fit: contain; }
.why-card h3 { font-size: 24px; line-height: 1.2; }
.why-card p { font-size: 15.5px; color: var(--muted); }
.why-card p strong { color: var(--ink); }
.why-card__num { font-size: 12px; letter-spacing: 0.2em; color: var(--red); font-weight: 600; }

.faq { margin-top: clamp(64px, 8vw, 110px); display: grid; grid-template-columns: 56px 1fr; gap: 24px; max-width: 900px; margin-inline: auto; }
.faq__track { position: relative; }
.faq__track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(31, 35, 43, 0.1); transform: translateX(-50%); }
.faq__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--red); transform: translateX(-50%) scaleY(0); transform-origin: 50% 0; }
.faq__list { display: grid; gap: 12px; }
.faq-item { background: #fff; border-radius: 18px; border: 1px solid rgba(31, 35, 43, 0.06); overflow: hidden; }
.faq-item__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left;
  padding: 22px 26px; font-family: var(--font-display); font-size: 21px; color: var(--ink);
}
.faq-item__btn i {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); position: relative; transition: transform 0.5s var(--ease), background 0.3s, border-color 0.3s;
}
.faq-item__btn i::before, .faq-item__btn i::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); }
.faq-item__btn i::before { width: 12px; height: 1.5px; } .faq-item__btn i::after { width: 1.5px; height: 12px; }
.faq-item.is-open .faq-item__btn i { transform: rotate(135deg); background: var(--red); border-color: var(--red); color: #fff; }
.faq-item__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; }
.faq-item__inner { overflow: hidden; }
.faq-item__body { padding: 0 26px 26px; color: var(--muted); display: grid; gap: 14px; }
.faq-item__body strong { color: var(--ink); }

/* ---------- Contacto ---------- */
.contact { position: relative; padding-block: var(--section); overflow: hidden; background: var(--cream-soft); }
.contact__bg { position: absolute; inset: -12% 0; z-index: 0; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; will-change: transform; }
.contact__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(253, 248, 238, 0.96) 0%, rgba(253, 248, 238, 0.86) 45%, rgba(253, 248, 238, 0.55) 100%); }
.contact__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__copy h2 { color: var(--red); }
.contact__copy .lead { margin-top: 22px; max-width: 46ch; }
.checks { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 21px; color: var(--ink); }
.checks li i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.checks li i svg { width: 14px; height: 14px; }
.contact__card {
  background: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 3.5vw, 48px);
  box-shadow: 0 40px 80px -40px rgba(31, 35, 43, 0.4); border: 1px solid rgba(31, 35, 43, 0.06);
  will-change: transform;
}
.contact__card h3 { font-size: clamp(24px, 2.2vw, 30px); text-align: center; }
.contact__card .note { text-align: center; color: var(--red); margin: 14px 0 34px; font-weight: 500; }
.contact__card .subtitle { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); font-weight: 600; text-align: center; }
.contact__card .hint { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.choices { display: grid; gap: 12px; }
.choice {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 18px;
  padding: 12px 16px 12px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff;
  text-align: left; transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.choice:hover { border-color: var(--red); transform: translateX(4px); box-shadow: 0 16px 30px -20px rgba(139, 0, 0, 0.6); }
.choice img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.choice span { font-size: 13.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.choice .arr { color: var(--red); font-size: 20px; transition: transform 0.3s var(--ease); }
.choice:hover .arr { transform: translateX(4px); }

/* formulario */
.form { display: none; }
.form.is-active { display: block; }
.form__head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.form__back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.form__back:hover { color: var(--red); }
.form__title { font-size: 26px; text-align: center; margin-bottom: 26px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }
.field label .req { color: var(--red); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color 0.3s, box-shadow 0.3s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f232b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.08); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: #c62828; }
.field .error { display: none; font-size: 12.5px; color: #c62828; }
.field.is-invalid .error { display: block; }
.field--file input[type="file"] { font-size: 14px; }
.field--file .filebox {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--cream-soft); cursor: pointer;
  font-size: 14px; color: var(--muted);
}
.field--file .filebox strong { color: var(--red); font-weight: 600; }
.field--file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radios label {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14.5px;
  transition: border-color 0.3s, background 0.3s;
}
.radios label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.radios input { accent-color: var(--red); }
.form__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }
.form__status { margin-top: 12px; font-size: 13.5px; color: #c62828; min-height: 1.2em; }
.iti { width: 100%; }
.iti input { padding-left: 60px !important; }

.thanks { display: none; text-align: center; padding: 20px 0 10px; }
.thanks.is-active { display: block; }
.thanks__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; }
.thanks__icon svg { width: 30px; height: 30px; }
.thanks h3 { font-size: 28px; }
.thanks p { margin-top: 12px; color: var(--muted); }
.thanks .btn { margin-top: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: rgba(255, 255, 255, 0.75); }
.site-footer.is-reveal { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: clamp(56px, 6vw, 88px) 0 56px; }
.footer__brand img { height: 110px; width: auto; }
.footer__brand p { margin-top: 20px; max-width: 34ch; font-size: 15px; }
.footer__col h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer__links a { transition: color 0.3s, padding-left 0.3s var(--ease); }
.footer__links a:hover { color: #fff; padding-left: 6px; }
.footer__contact { display: grid; gap: 12px; }
.footer__contact a { color: #fff; font-weight: 500; }
.footer__contact a:hover { color: var(--cream); }
.footer__bar { background: var(--red); color: #fff; font-size: 14px; }
.footer__bar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; flex-wrap: wrap; }
.footer__bar a { display: inline-flex; align-items: center; gap: 8px; }
.footer__bar img { height: 22px; width: auto; }
.site-main { position: relative; z-index: 2; background: var(--white); }

/* ---------- Página Servicios ---------- */
.page-hero { background: var(--black); color: #fff; padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(64px, 8vw, 120px); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 50% at 50% 0%, rgba(255, 243, 217, 0.08), transparent 70%); }
.page-hero .eyebrow { color: var(--cream); }
.page-hero h1 { color: #fff; }
.page-hero__head { text-align: center; margin-bottom: clamp(48px, 6vw, 80px); position: relative; }
.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; position: relative; }
.service { grid-column: span 2; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: #111; isolation: isolate; }
.service:nth-child(4) { grid-column: 2 / span 2; }
.service:nth-child(5) { grid-column: 4 / span 2; }
.service img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); will-change: transform; }
.service:hover img { transform: scale(1.06); }
.service::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 16, 16, 0) 35%, rgba(9, 16, 16, 0.8)); transition: opacity 0.4s; }
.service__label { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.service__label h2 { color: #fff; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.service__label i { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.4); display: grid; place-items: center; color: #fff; transition: background 0.3s, transform 0.4s var(--ease); }
.service:hover .service__label i { background: var(--red); border-color: var(--red); transform: rotate(-45deg); }
.service__num { position: absolute; top: 18px; left: 22px; z-index: 2; font-size: 12px; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.85); font-weight: 600; }

.gallery { padding-block: var(--section); background: var(--white); }
.gallery__head { text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.gallery__block + .gallery__block { margin-top: clamp(64px, 8vw, 120px); padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.gallery__block-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: 34px; }
.gallery__block-head p { color: var(--muted); max-width: 48ch; justify-self: end; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery__grid--4 { grid-template-columns: repeat(4, 1fr); }
.gallery__grid--5 .tile:first-child { grid-column: span 2; grid-row: span 2; }
.tile { display: block; position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--grey); cursor: zoom-in; will-change: transform; }
.gallery__grid--5 .tile:first-child { aspect-ratio: auto; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; background: rgba(9, 16, 16, 0); transition: background 0.4s; }
.tile:hover::after { background: rgba(9, 16, 16, 0.18); }
.tile i { position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s var(--ease); }
.tile:hover i { opacity: 1; transform: none; }
.tile i svg { width: 16px; height: 16px; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(9, 16, 16, 0.94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0s linear 0.35s; }
.lb.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s, visibility 0s; }
.lb__img { max-width: min(92vw, 1500px); max-height: 86vh; object-fit: contain; border-radius: 12px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); transform: scale(0.96); transition: transform 0.4s var(--ease); }
.lb.is-open .lb__img { transform: none; }
.lb__btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; display: grid; place-items: center; transition: background 0.3s; }
.lb__btn:hover { background: var(--red); }
.lb__btn svg { width: 22px; height: 22px; }
.lb__close { top: 20px; right: 20px; }
.lb__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); color: rgba(255, 255, 255, 0.7); font-size: 12px; letter-spacing: 0.2em; white-space: nowrap; }
.lb__count b { font-weight: 500; color: #fff; letter-spacing: 0.02em; font-family: var(--font-display); font-size: 15px; margin-right: 14px; }
.why-card__icon img { transition: transform 0.5s var(--ease); }
.why-card:hover .why-card__icon img { transform: rotate(-6deg) scale(1.08); }

/* ---------- Página legal ---------- */
.legal-hero { background: var(--cream); padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px); }
.legal { padding-block: clamp(56px, 7vw, 100px); }
.legal__grid { display: grid; grid-template-columns: 260px 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.legal__index { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 6px; }
.legal__index a { display: block; padding: 8px 0 8px 16px; border-left: 2px solid var(--line); font-size: 14px; color: var(--muted); transition: color 0.3s, border-color 0.3s; }
.legal__index a:hover, .legal__index a.is-active { color: var(--ink); border-color: var(--red); }
.legal__index a.sub { padding-left: 28px; font-size: 13px; }
.legal__doc + .legal__doc { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.legal__doc h2 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 22px; }
.legal__doc h3 { font-size: 21px; margin: 34px 0 12px; }
.legal__doc p { margin-top: 12px; color: var(--text); max-width: 68ch; }
.legal__doc a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .header-tools .btn { display: none; }
  .nav { gap: 28px; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
  :root { --header-h: 72px; }
  .nav { display: none; }
  .header-tools .lang, .header-tools .btn { display: none; }
  .burger { display: block; }
  .brand img { height: 50px; }
  .site-header.is-scrolled .brand img { height: 44px; }
  .hero { padding-top: calc(var(--header-h) + 24px); padding-bottom: 40px; }
  .hero__inner { grid-template-columns: 1fr; gap: 22px; margin-bottom: 28px; }
  .hero__aside { padding-bottom: 0; }
  .about__grid { grid-template-columns: 1fr; gap: 64px; }
  .about__media { max-width: 560px; margin-inline: auto; width: 100%; }
  .tower__grid { grid-template-columns: 1fr; gap: 44px; }
  .fleet__head { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .teaser__body { grid-template-columns: 1fr; }
  .teaser__body .btn-wrap { justify-self: start; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service, .service:nth-child(4), .service:nth-child(5) { grid-column: auto; }
  .gallery__block-head { grid-template-columns: 1fr; }
  .gallery__block-head p { justify-self: start; }
  .gallery__grid, .gallery__grid--4 { grid-template-columns: repeat(2, 1fr); }
  .legal__grid { grid-template-columns: 1fr; }
  .legal__index { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .legal__index a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
  .legal__index a.sub { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .after-hero, .tower, .teaser, .fleet, .why, .contact { border-radius: 24px 24px 0 0; }
  .tower, .teaser, .fleet, .why, .contact { margin-top: -24px; }
  .tower__stats { gap: 22px 32px; }
  .tower__video { border-radius: 18px; }
  /* En móvil la foto encajada se queda demasiado pequeña: van una detrás de otra. */
  .fleet__media { padding-bottom: 0; display: grid; gap: 14px; }
  .fleet__main { aspect-ratio: 4 / 3; border-radius: 18px; }
  .fleet__inset { position: static; width: 100%; border-width: 0; border-radius: 18px; box-shadow: none; }
  .hero__media { border-radius: 18px; }
  .hero__scroll { display: none; }
  .about__second { right: -4%; bottom: -8%; width: 52%; border-width: 4px; }
  .about__badge { left: -2%; }
  .teaser__head { flex-direction: column; align-items: flex-start; }
  .teaser__media { aspect-ratio: 4 / 3; border-radius: 18px; }
  .why__grid { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .faq__track { display: none; }
  .faq-item__btn { font-size: 18px; padding: 18px 20px; }
  .faq-item__body { padding: 0 20px 20px; }
  .checks li { font-size: 18px; }
  .choice { grid-template-columns: 54px 1fr auto; gap: 14px; }
  .choice img { width: 54px; height: 54px; }
  .form__actions { flex-direction: column-reverse; align-items: stretch; }
  .form__actions .btn { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bar .container { justify-content: center; text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery__grid--5 .tile:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .lb__prev, .lb__next { top: auto; bottom: 64px; transform: none; }
}
@media (max-width: 420px) {
  .btn { padding: 15px 22px; font-size: 12px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .words .w { color: inherit; }
  .hero { position: relative !important; min-height: 0 !important; }
}
