/* ==========================================================
   Pro Services Group Spain — estilos
   Colores de marca tomados del logo: #039AE0 (azul claro) y #066BC2 (azul)
   ========================================================== */
:root {
  --sky: #039ae0;
  --blue: #066bc2;
  --navy: #061a33;
  --navy-2: #0b2748;
  --ink: #0d1b2a;
  --muted: #5b6b7f;
  --line: #dde5ef;
  --paper: #f4f7fb;
  --white: #ffffff;
  --grad: linear-gradient(120deg, var(--sky), var(--blue));
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(6, 26, 51, .35);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--grad); }
.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(42px, 6vw, 76px);
  text-transform: uppercase;
  letter-spacing: -.005em;
  margin-bottom: 24px;
}
.h2 em, .hero-title .accent {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 20px; font-weight: 500; color: var(--ink); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-intro { color: var(--muted); font-size: 18px; }
.section-head.light .h2 { color: var(--white); }
.section-head.light .section-intro { color: #b8c7da; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  will-change: transform;
}
.btn-primary { background: var(--grad); color: var(--white); box-shadow: 0 12px 30px -10px rgba(3, 154, 224, .7); }
.btn-primary:hover { box-shadow: 0 18px 40px -12px rgba(3, 154, 224, .9); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-block { width: 100%; }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--navy);
  display: grid; place-items: center;
  animation: splashOut .7s var(--ease) 2.6s forwards; /* red de seguridad sin JS */
}
.splash.is-done { animation: splashOut .7s var(--ease) forwards; }
.splash-mark { width: 120px; overflow: visible; }
.sp { opacity: 0; transform-box: fill-box; transform-origin: center; animation: spIn .8s var(--ease) forwards; }
.sp-1 { fill: var(--blue); transform: translateX(60px); animation-delay: .1s; }
.sp-2 { fill: var(--sky); transform: translateX(-60px); animation-delay: .3s; }
.sp-3 { fill: var(--sky); transform: translateY(60px); animation-delay: .5s; }
@keyframes spIn { to { opacity: 1; transform: none; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Cabecera ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0;
  transition: background .4s, padding .4s, box-shadow .4s, transform .45s var(--ease);
}
.nav-in { width: min(1280px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.nav-logo { flex-shrink: 0; position: relative; display: block; }
.nav-logo img { height: 48px; width: auto; transition: opacity .3s; }
.nav-logo .logo-dark { position: absolute; top: 0; left: 0; opacity: 0; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a {
  color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px;
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { padding: 12px 22px; font-size: 15px; }
.nav-cta-mobile { display: none; }
.nav.is-scrolled { background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 10px 0; box-shadow: 0 8px 30px -18px rgba(6, 26, 51, .4); }
.nav.is-scrolled .nav-links a { color: var(--ink); }
.nav.is-scrolled .logo-light { opacity: 0; }
.nav.is-scrolled .logo-dark { opacity: 1; }
.nav.is-hidden { transform: translateY(-110%); }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; background: rgba(255, 255, 255, .14); border-radius: 50%; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--white); transition: transform .35s var(--ease), top .35s; }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 26px; }
.nav.is-scrolled .burger { background: var(--paper); }
.nav.is-scrolled .burger span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--white); overflow: hidden; background: var(--navy);
  padding: 130px 0 0;
}
.hero-media { position: absolute; inset: -8% 0 0; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 45%; animation: kenburns 22s ease-out both; }
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 26, 51, .94) 0%, rgba(6, 26, 51, .72) 42%, rgba(6, 26, 51, .15) 100%),
    linear-gradient(0deg, rgba(6, 26, 51, .9) 0%, transparent 40%);
}
.hero-shape {
  position: absolute; right: -6%; top: 14%; width: min(46vw, 620px);
  fill: none; stroke: rgba(3, 154, 224, .55); stroke-width: 3;
  stroke-dasharray: 4000; stroke-dashoffset: 4000;
  animation: draw 3.2s var(--ease) 1.2s forwards, floaty 9s ease-in-out 4.4s infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes floaty { 50% { transform: translateY(-18px) rotate(-1.5deg); } }
.hero-content { position: relative; z-index: 2; }
.hero-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(56px, 10.5vw, 150px); line-height: .9; letter-spacing: -.01em;
  margin: 6px 0 28px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; }
.hero-sub { max-width: 560px; font-size: 19px; color: #d2deec; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-in { animation: heroIn 1.1s var(--ease) both; animation-delay: calc(.9s + var(--d) * .12s); }
.hero-title .hero-in { animation-name: heroUp; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } }
@keyframes heroUp { from { transform: translateY(105%); } }
.hero-stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(50px, 8vh, 90px);
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.stat { padding: 26px 20px 34px 0; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--display); font-size: clamp(38px, 4.5vw, 56px); line-height: 1; font-weight: 700; color: var(--white); }
.stat > span { font-size: 14px; color: #a9bbd0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.scroll-cue { position: absolute; z-index: 2; right: 40px; bottom: 40px; width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--white); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 60% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Cinta ---------- */
.marquee { background: var(--grad); color: var(--white); overflow: hidden; padding: 20px 0; }
.marquee-track { display: flex; align-items: center; gap: 34px; width: max-content; animation: marquee 34s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 600; font-size: 26px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.marquee i { width: 12px; height: 12px; background: var(--white); transform: rotate(45deg); opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * .12s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .clip-reveal { clip-path: inset(0 0 100% 0); transform: none; opacity: 1; transition: clip-path 1.4s var(--ease); }
.js .clip-reveal img { transform: scale(1.25); transition: transform 1.8s var(--ease); }
.js .clip-reveal.is-in { clip-path: inset(0 0 0 0); }
.js .clip-reveal.is-in img { transform: scale(1); }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.about-media { position: relative; }
.about-media .clip-reveal { border-radius: var(--radius); overflow: hidden; }
.about-media img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 50%; width: 100%; }
.about-badge {
  position: absolute; right: -28px; bottom: 40px;
  background: var(--navy); color: var(--white);
  padding: 26px 28px; border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 210px;
}
.about-badge strong { display: block; font-family: var(--display); font-size: 64px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-badge > span { font-size: 14px; color: #b8c7da; }
.about-text > p:not(.eyebrow) { color: var(--muted); }
.about-text .lead { color: var(--ink); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.value { background: var(--paper); border-radius: var(--radius); padding: 24px 20px; border: 1px solid var(--line); transition: box-shadow .4s, border-color .4s; }
.value:hover { box-shadow: var(--shadow); border-color: transparent; }
.value-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; margin-bottom: 16px; }
.value-ico svg { width: 24px; height: 24px; fill: var(--white); stroke: var(--white); }
.value h3 { font-family: var(--display); font-size: 26px; text-transform: uppercase; margin-bottom: 8px; }
.value p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- Servicios ---------- */
.services { background: var(--paper); }
.srv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.srv {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.js .srv.reveal.is-in:hover, .srv:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.srv-img { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.srv-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 26, 51, .45), transparent 55%); }
.srv-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.srv:hover .srv-img img { transform: scale(1.08); }
.srv-body { padding: 26px 26px 30px; position: relative; flex: 1; }
.srv-num {
  position: absolute; top: -34px; right: 22px;
  font-family: var(--display); font-weight: 700; font-size: 26px;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; color: var(--white); background: var(--grad);
  box-shadow: 0 10px 24px -8px rgba(6, 107, 194, .7);
  transition: transform .6s var(--ease);
}
.srv:hover .srv-num { transform: rotate(-12deg) scale(1.08); }
.srv h3 { font-family: var(--display); font-size: 30px; text-transform: uppercase; margin-bottom: 10px; }
.srv p { color: var(--muted); font-size: 15.5px; }
.srv ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.srv li { font-size: 14.5px; font-weight: 600; padding-left: 22px; position: relative; }
.srv li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--grad); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }

/* ---------- Antes y después ---------- */
.ba { background: var(--navy); color: var(--white); overflow: hidden; }
.ba::before {
  content: ""; position: absolute; width: 900px; height: 900px; right: -300px; top: -300px;
  background: radial-gradient(circle, rgba(3, 154, 224, .22), transparent 65%); pointer-events: none;
}
.ba-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.ba-tab, .chip {
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .25); background: transparent; color: var(--white);
  transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease);
}
.ba-tab:hover, .chip:hover { transform: translateY(-2px); }
.ba-tab.is-active { background: var(--grad); border-color: transparent; }
.ba-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; max-height: 78vh; width: 100%; margin-inline: auto;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
  user-select: none; touch-action: pan-y;
}
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s; }
.ba-frame.is-loading img { opacity: .2; }
.ba-before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--white); pointer-events: none;
}
.ba-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad);
  display: grid; place-items: center; font-weight: 700; font-size: 20px; letter-spacing: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); border: 3px solid var(--white);
}
.ba-label {
  position: absolute; top: 18px; padding: 6px 14px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 14px;
  background: rgba(6, 26, 51, .7); backdrop-filter: blur(6px); pointer-events: none;
}
.ba-label-l { left: 18px; }
.ba-label-r { right: 18px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* ---------- Proyectos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.chip { color: var(--ink); border-color: var(--line); background: var(--white); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 16px; }
.obra { margin: 0; border-radius: 14px; overflow: hidden; position: relative; aspect-ratio: 1; }
.obra:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
.obra a, .obra img { height: 100%; }
.obra img { object-fit: cover; }
.gallery:not(.is-all) .obra.is-extra { display: none; }
.more-wrap { text-align: center; margin-top: 36px; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.obra.is-hidden { display: none; }
.obra a { display: block; position: relative; }
.obra img { width: 100%; transition: transform 1s var(--ease), filter .6s; }
.obra figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  color: var(--white); font-family: var(--display); font-size: 21px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: linear-gradient(0deg, rgba(6, 26, 51, .85), transparent);
  transform: translateY(100%); transition: transform .5s var(--ease);
}
.obra a::after {
  content: "+"; position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--white); color: var(--navy); font-size: 26px; display: grid; place-items: center;
  transform: scale(0); transition: transform .5s var(--ease);
}
.obra:hover img { transform: scale(1.06); }
.obra:hover figcaption { transform: none; }
.obra:hover a::after { transform: scale(1); }

/* ---------- Proceso ---------- */
.process { background: var(--paper); }
.process-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.process-side { position: sticky; top: 110px; }
.process-side > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.process-img { border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.process-img img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.steps { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; display: grid; gap: 22px; }
.steps-line { position: absolute; left: 35px; top: 30px; bottom: 30px; width: 2px; background: var(--line); }
.steps-line span { display: block; width: 100%; height: 0; background: var(--grad); transition: height .2s linear; }
.step { position: relative; z-index: 1; display: grid; grid-template-columns: 72px 1fr; gap: 22px; align-items: center; }
.step-n {
  width: 72px; height: 72px; margin-left: -1px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px;
  background: var(--white); color: var(--blue); border: 2px solid var(--line);
  transition: background .5s, color .5s, border-color .5s;
  transform: translateX(-1px);
}
.step > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; transition: box-shadow .4s, transform .4s var(--ease); }
.step:hover > div { box-shadow: var(--shadow); transform: translateX(6px); }
.step.is-on .step-n { background: var(--grad); color: var(--white); border-color: transparent; }
.step h3 { font-family: var(--display); font-size: 27px; text-transform: uppercase; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Por qué elegirnos ---------- */
.why { background: var(--navy); color: var(--white); overflow: hidden; }
.why::after {
  content: ""; position: absolute; left: -200px; bottom: -400px; width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(6, 107, 194, .35), transparent 65%); pointer-events: none;
}
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; z-index: 1; }
.why-card {
  padding: 40px 32px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .4s, background .4s;
}
.why-card:hover { border-color: rgba(3, 154, 224, .6); background: linear-gradient(160deg, rgba(3, 154, 224, .16), rgba(255, 255, 255, .02)); }
.why-n { font-family: var(--display); font-weight: 700; font-size: 84px; line-height: 1; display: block; margin-bottom: 18px; color: transparent; -webkit-text-stroke: 1.5px var(--sky); }
.why-card h3 { font-family: var(--display); font-size: 34px; text-transform: uppercase; margin-bottom: 12px; }
.why-card p { color: #b8c7da; margin: 0; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact-info > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.contact-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s, transform .4s var(--ease); }
.contact-list li:hover { border-color: var(--sky); transform: translateX(6px); }
.ci { width: 48px; height: 48px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex-shrink: 0; }
.ci svg { width: 22px; height: 22px; fill: var(--white); stroke: var(--white); }
.contact-list small { display: block; font-size: 13px; color: var(--muted); }
.contact-list a, .contact-list span { font-weight: 700; text-decoration: none; word-break: break-word; }
.form { background: var(--navy); color: var(--white); padding: clamp(28px, 4vw, 46px); border-radius: 24px; box-shadow: var(--shadow); }
.form h3 { font-family: var(--display); font-size: 34px; text-transform: uppercase; margin-bottom: 24px; }
.field { position: relative; margin-bottom: 16px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--white);
  background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 12px;
  padding: 24px 16px 10px; outline: none; transition: border-color .3s, background .3s; resize: vertical;
  appearance: none; -webkit-appearance: none;
}
.field select option { color: var(--ink); }
.field select { background-image: linear-gradient(45deg, transparent 50%, #9fb4cc 50%), linear-gradient(135deg, #9fb4cc 50%, transparent 50%); background-position: calc(100% - 22px) 26px, calc(100% - 16px) 26px; background-size: 6px 6px; background-repeat: no-repeat; }
.field label { position: absolute; left: 17px; top: 17px; color: #9fb4cc; pointer-events: none; transition: transform .25s var(--ease), font-size .25s, color .25s; transform-origin: left; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); background: rgba(3, 154, 224, .08); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select.has-value + label, .field select:valid + label { transform: translateY(-11px); font-size: 12px; color: var(--sky); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #b8c7da; margin: 6px 0 22px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--sky); margin-top: 2px; flex-shrink: 0; }
.form-note { font-size: 13.5px; color: #9fb4cc; margin: 16px 0 0; text-align: center; }
.form a { color: var(--sky); }
.form-error { color: #ff9b9b; font-size: 14px; margin: 10px 0 0; text-align: center; min-height: 1em; }
.field.is-bad input, .field.is-bad select { border-color: #ff8080; }
.map { margin-top: 70px; border-radius: 24px; overflow: hidden; height: 380px; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); }

/* ---------- Pie ---------- */
.footer { background: #040f1f; color: #a9bbd0; padding: 80px 0 30px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-brand img { height: 52px; width: auto; margin-bottom: 20px; }
.footer h4 { font-family: var(--display); color: var(--white); font-size: 20px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; transition: color .3s; word-break: break-word; }
.footer a:hover { color: var(--sky); }
.social { display: flex; gap: 10px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; transition: background .3s, border-color .3s, transform .4s var(--ease); }
.social a:hover { background: var(--grad); border-color: transparent; transform: translateY(-4px); }
.social svg { width: 19px; height: 19px; fill: var(--white); stroke: var(--white); }
.social a:first-child svg, .social a:last-child svg { stroke: none; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; }
.footer-bottom p { margin: 0; font-size: 14px; }
.eu-logos { display: flex; gap: 14px; align-items: center; background: var(--white); padding: 10px 16px; border-radius: 12px; }
.eu-logos img { height: 40px; width: auto; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 62px; height: 62px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .7);
  transition: transform .4s var(--ease);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; animation: pulse 2.4s ease-out infinite; z-index: -1; }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 32px; height: 32px; fill: var(--white); }
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.7); opacity: 0; } }

/* ---------- Visor ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(4, 15, 31, .94);
  display: grid; place-items: center; padding: 60px 70px;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 82vh; max-width: 100%; width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transform: scale(.94); transition: transform .5s var(--ease); }
.lightbox.is-open img { transform: none; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: var(--white); cursor: pointer; border-radius: 50%; width: 54px; height: 54px; font-size: 32px; line-height: 1; transition: background .3s; }
.lb-close:hover, .lb-nav:hover { background: var(--sky); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #cfdbea; font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: .08em; margin: 0; }

/* ---------- Páginas legales ---------- */
.legal { padding: 150px 0 90px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-family: var(--display); font-size: clamp(44px, 7vw, 72px); text-transform: uppercase; margin-bottom: 30px; }
.legal h3 { font-family: var(--display); font-size: 28px; text-transform: uppercase; margin: 40px 0 12px; color: var(--blue); }
.legal p, .legal li { color: #34465c; }
.legal-page .nav { background: rgba(255, 255, 255, .95); box-shadow: 0 8px 30px -18px rgba(6, 26, 51, .4); }
.legal-page .nav .logo-light { opacity: 0; }
.legal-page .nav .logo-dark { opacity: 1; }
.legal-page .nav-links a { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1; margin: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px;
    background: var(--navy);
    clip-path: circle(0 at calc(100% - 44px) 44px);
    transition: clip-path .7s var(--ease);
  }
  .nav-links a, .nav.is-scrolled .nav-links a, .legal-page .nav-links a { color: var(--white); font-family: var(--display); font-size: 36px; text-transform: uppercase; }
  .nav-cta-mobile { display: block; }
  .nav.is-open .nav-links { clip-path: circle(150% at calc(100% - 44px) 44px); }
  .nav.is-open .burger { background: rgba(255, 255, 255, .14); }
  .nav.is-open .burger span { background: var(--white); top: 22px; }
  .nav.is-open .burger span:first-child { transform: rotate(45deg); }
  .nav.is-open .burger span:last-child { transform: rotate(-45deg); }
  .nav.is-open { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav.is-open .logo-light { opacity: 1; }
  .nav.is-open .logo-dark { opacity: 0; }
  .srv-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .process-grid, .contact-grid { grid-template-columns: 1fr; }
  .process-side { position: static; }
  .about-badge { right: 16px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .nav-in { width: calc(100% - 32px); }
  .nav-logo img { height: 40px; }
  .hero { padding-top: 110px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); }
  .stat { padding: 18px 12px 22px 0; }
  .stat + .stat { padding-left: 16px; }
  .scroll-cue { display: none; }
  .hero-shape { width: 80vw; right: -30%; top: 8%; opacity: .6; }
  .values, .srv-grid, .why-grid { grid-template-columns: 1fr; }
  .about-badge { position: relative; right: auto; bottom: auto; margin: -50px 16px 0 auto; }
  .ba-frame { aspect-ratio: 4 / 3.4; }
  .ba-handle span { width: 48px; height: 48px; font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .obra { border-radius: 10px; }
  .obra figcaption { font-size: 16px; padding: 30px 10px 10px; transform: none; }
  .steps-line { left: 27px; }
  .step { grid-template-columns: 56px 1fr; gap: 14px; }
  .step-n { width: 56px; height: 56px; font-size: 21px; }
  .footer-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 60px 10px; }
  .lb-nav { top: auto; bottom: 14px; transform: none; }
  .map { height: 300px; margin-top: 50px; }
}

/* Movimiento reducido: solo se apagan los efectos intrusivos (bucles grandes) */
@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
  .marquee-track { animation-duration: 80s; }
  .hero-shape { animation: draw 2s var(--ease) .6s forwards; }
}

/* ---------- Grupo MOLMEX ---------- */
.group-note { padding: 18px 20px; border-left: 3px solid var(--sky); background: var(--paper); border-radius: 0 12px 12px 0; }
.group-note a { color: var(--blue); text-decoration: none; }
.group-note a:hover { text-decoration: underline; }
.group-badge { display: inline-flex; flex-direction: column; gap: 8px; margin: 4px 0 22px; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; transition: border-color .3s, background .3s; }
.group-badge:hover { border-color: var(--sky); background: rgba(3, 154, 224, .08); }
.group-badge span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8fa5bf; }
.group-badge img { height: 26px; width: auto; }

/* ---------- Selector de idioma ---------- */
.lang-switch { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 48px; padding: 0 12px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .5); color: var(--white); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-decoration: none; flex-shrink: 0; transition: background .3s, border-color .3s, color .3s; }
.lang-switch:hover { background: var(--grad); border-color: transparent; color: var(--white); }
.nav.is-scrolled .lang-switch, .legal-page .lang-switch { border-color: var(--line); color: var(--ink); }
.nav.is-scrolled .lang-switch:hover { color: var(--white); }
@media (max-width: 1080px) {
  .lang-switch { margin-left: auto; }
  .burger { margin-left: 10px; }
  .nav.is-open .lang-switch { border-color: rgba(255, 255, 255, .5); color: var(--white); }
}
