/* =========================================================
   COPRINS S.L. — Sitio público
   Colores del logo: --primary (azul marino), --secondary (azul), --accent (naranja)
   ========================================================= */

:root {
  --primary: #015a82;
  --secondary: #0a8bc6;
  --accent: #f7893a;
  --deep: color-mix(in srgb, var(--primary) 50%, #00111c);
  --ink: #0d2230;
  --muted: #5b6d7b;
  --paper: #f2f6f9;
  --line: #dde7ee;
  --white: #fff;

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 0;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: clamp(1rem, .96rem + .2vw, 1.1rem); line-height: 1.65; color: var(--ink); background: var(--white); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.05; letter-spacing: -.025em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0; font-weight: 600; }
.skip:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Tipografía ---------- */
.h-xxl { font-size: clamp(2.4rem, 1rem + 5vw, 6.2rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; line-height: .95; }
.h-xl  { font-size: clamp(2.1rem, 1rem + 3.6vw, 4.4rem); font-weight: 800; color: var(--primary); }
.h-md  { font-family: var(--font-display); font-size: clamp(1.35rem, 1rem + 1.1vw, 2rem); font-weight: 700; color: var(--primary); line-height: 1.25; letter-spacing: -.015em; margin-bottom: 1.2rem; }
.h-sm  { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); font-weight: 800; color: var(--primary); margin-bottom: 1.2rem; }
h1 em, h2 em, h3 em, .h-xl em, .hero-title em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: var(--muted); max-width: 52ch; }
.h-xl + .lead, .h-xl + .prose { margin-top: 1.4rem; }

.kicker { display: inline-flex; align-items: center; gap: .75em; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--secondary); margin: 0 0 1.2rem; }
.kicker::before { content: ""; width: 38px; height: 3px; background: var(--accent); border-radius: 0; }
.kicker-light { color: #a8dcf5; }
.kicker.center { display: flex; justify-content: center; }

.prose { color: #33495a; }
.prose p { margin-bottom: 1.1em; }
.prose h3 { font-size: 1.45rem; color: var(--primary); margin: 1.8em 0 .8em; }
.prose strong { color: var(--ink); }
.prose em { font-style: normal; color: var(--accent); font-weight: 600; }
.prose-lg { font-size: clamp(1.05rem, 1rem + .25vw, 1.18rem); }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .ico { width: 22px; height: 22px; padding: 4px; border-radius: 0; background: color-mix(in srgb, var(--secondary) 15%, #fff); color: var(--primary); stroke-width: 3; margin-top: 2px; }

.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-family: var(--font-display); font-weight: 700; color: var(--primary); border-bottom: 2px solid var(--accent); padding-bottom: 3px; transition: gap .3s var(--ease), color .3s; }
.link-arrow:hover { gap: .9em; color: var(--secondary); }

/* ---------- Botones ---------- */
.btn { --bg: var(--primary); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .95em 1.6em; border-radius: 0; border: 2px solid transparent; background: var(--bg); color: var(--fg); font-family: var(--font-display); font-weight: 700; font-size: .96rem; position: relative; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease), box-shadow .4s var(--ease), color .3s, border-color .3s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill, rgba(255,255,255,.18)); transform: translateY(101%); transition: transform .45s var(--ease); }
.btn:hover::before { transform: none; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--bg) 80%, transparent); }
.btn .ico { transition: transform .35s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn-sm { padding: .65em 1.25em; font-size: .88rem; }
.btn-lg { padding: 1.1em 2em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary { --bg: var(--primary); --fill: var(--secondary); }
.btn-accent  { --bg: var(--accent); --fill: color-mix(in srgb, var(--accent) 78%, #000); }
.btn-white   { --bg: #fff; --fg: var(--primary); --fill: var(--paper); }
.btn-ghost   { --bg: transparent; --fg: var(--primary); border-color: var(--line); --fill: var(--paper); }
.btn-outline-light { --bg: transparent; border-color: rgba(255,255,255,.55); --fill: #fff; }
.btn-outline-light:hover { color: var(--primary); border-color: #fff; }

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; background: linear-gradient(90deg, var(--secondary), var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Cabecera ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 60; color: #fff; transition: transform .5s var(--ease); }
.topbar { background: rgba(0, 17, 28, .35); font-size: .84rem; max-height: 44px; overflow: hidden; transition: max-height .4s var(--ease), opacity .3s; border-bottom: 1px solid rgba(255,255,255,.1); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 40px; }
.topbar-contact, .topbar-social { display: flex; align-items: center; gap: 22px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; opacity: .88; transition: opacity .2s, color .2s; }
.topbar a:hover { opacity: 1; color: var(--accent); }
.topbar .ico { width: 15px; height: 15px; }
.topbar-social { gap: 14px; }
.navbar { transition: background .4s, box-shadow .4s, padding .4s; padding: 14px 0; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; display: block; width: clamp(160px, 15vw, 200px); }
.brand img { width: 100%; height: auto; transition: opacity .4s; }
.brand .brand-color { position: absolute; inset: 0; opacity: 0; }
.header.scrolled .topbar, .solid-header .topbar { max-height: 0; opacity: 0; border: 0; }
.header.scrolled .navbar, .solid-header .navbar { background: rgba(255,255,255,.94); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 10px 30px -18px rgba(1,40,60,.35); padding: 10px 0; color: var(--primary); }
.header.scrolled .brand-color, .solid-header .brand-color { opacity: 1; }
.header.scrolled .brand-white, .solid-header .brand-white { opacity: 0; }
.header.hidden { transform: translateY(-110%); }
.solid-header main { padding-top: 90px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); }
.nav > a:not(.btn), .nav-drop > a { font-family: var(--font-display); font-weight: 600; font-size: .96rem; position: relative; padding: 8px 0; display: inline-flex; align-items: center; gap: 4px; }
.nav > a:not(.btn)::after, .nav-drop > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav > a:not(.btn):hover::after, .nav a.active::after, .nav-drop:hover > a::after { transform: scaleX(1); transform-origin: left; }
.caret { width: 12px; height: 12px; transition: transform .3s; }
.nav-drop { position: relative; }
.nav-drop:hover .caret, .nav-drop:focus-within .caret { transform: rotate(180deg); }
.drop { position: absolute; top: calc(100% + 14px); left: 50%; width: 400px; background: #fff; color: var(--ink); border-radius: 0; padding: 10px; box-shadow: 0 30px 60px -20px rgba(1,40,60,.4); opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: all .35s var(--ease); }
.drop::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }
.nav-drop:hover .drop, .nav-drop:focus-within .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop a { display: flex; gap: 14px; padding: 12px; border-radius: 0; transition: background .2s; }
.drop a:hover { background: var(--paper); }
.drop-ico { flex: none; width: 42px; height: 42px; border-radius: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--secondary) 13%, #fff); color: var(--primary); transition: background .3s, color .3s; }
.drop a:hover .drop-ico { background: var(--primary); color: #fff; }
.drop strong { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--primary); }
.drop small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; margin-top: 2px; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; color: inherit; position: relative; z-index: 3; }
.burger span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 0; transition: transform .35s var(--ease), opacity .2s; }

@media (max-width: 1020px) {
  .burger { display: block; }
  .nav { position: fixed; inset: 0; z-index: 2; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 100px var(--gutter) 40px; background: var(--deep); color: #fff; clip-path: circle(0 at calc(100% - 40px) 40px); transition: clip-path .7s var(--ease); overflow-y: auto; }
  .nav > a:not(.btn), .nav-drop > a { font-size: 2rem; font-weight: 800; }
  .nav-drop { width: 100%; }
  .drop { position: static; width: auto; opacity: 1; visibility: visible; transform: none; background: transparent; box-shadow: none; padding: 4px 0 10px; color: #fff; }
  .drop a { padding: 6px 0; }
  .drop-ico, .drop small, .caret { display: none; }
  .drop strong { color: rgba(255,255,255,.75); font-weight: 600; }
  .nav-cta { margin-top: 18px; }
  .nav-open .nav { clip-path: circle(150% at calc(100% - 40px) 40px); }
  .nav-open .header { color: #fff; }
  .nav-open .navbar { background: transparent !important; box-shadow: none !important; }
  .nav-open .brand-white { opacity: 1 !important; position: relative; z-index: 3; }
  .nav-open .brand-color { opacity: 0 !important; }
  .nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .burger span:nth-child(2) { opacity: 0; }
  .nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-open { overflow: hidden; }
  .hide-sm { display: none !important; }
}
@media (max-width: 640px) { .topbar-contact a:nth-child(2) { display: none; } }

/* ---------- Hero (portada) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; isolation: isolate; background: var(--deep); }
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.hero-slide.is-active { opacity: 1; }
.hero-slide.is-active img { animation: kenburns 9s linear forwards; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, color-mix(in srgb, var(--deep) 92%, transparent) 0%, color-mix(in srgb, var(--deep) 65%, transparent) 45%, color-mix(in srgb, var(--primary) 15%, transparent) 100%),
  linear-gradient(0deg, color-mix(in srgb, var(--deep) 85%, transparent) 0%, transparent 45%); }
.hero-content { position: relative; padding-top: 180px; padding-bottom: 50px; display: grid; }
.hero-text { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.hero-text.is-active { opacity: 1; visibility: visible; }
.hero-title { font-family: var(--font-display); font-size: clamp(2.4rem, .8rem + 5.1vw, 6.3rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; line-height: .92; margin: 0 0 1.5rem; max-width: 13ch; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; transform: translateY(110%) rotate(5deg); }
.is-active .split .w > span, .page-hero .split .w > span, .project-hero .split .w > span { animation: wordUp 1s var(--ease) forwards; animation-delay: calc(.2s + var(--i) * .1s); }
.hero-text .kicker, .hero-sub { opacity: 0; transform: translateY(20px); }
.hero-text.is-active .kicker { animation: fadeUp .8s var(--ease) .1s forwards; }
.hero-text.is-active .hero-sub { animation: fadeUp .9s var(--ease) .6s forwards; }
.hero-sub { font-size: clamp(1.08rem, 1rem + .55vw, 1.4rem); max-width: 42ch; color: rgba(255,255,255,.86); margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.hero-in { opacity: 0; transform: translateY(24px); animation: fadeUp 1s var(--ease) forwards; animation-delay: var(--d, 0s); }

.hero-bar { border-top: 1px solid rgba(255,255,255,.15); background: linear-gradient(0deg, rgba(0,10,18,.35), transparent); }
.hero-bar-inner { display: flex; justify-content: space-between; align-items: stretch; gap: 30px; min-height: 96px; }
.hero-dots { display: flex; gap: 22px; align-items: center; }
.hero-dot { background: none; border: 0; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 12px; padding: 10px 0; font-family: var(--font-display); font-weight: 700; transition: color .3s; }
.hero-dot.is-active, .hero-dot:hover { color: #fff; }
.hero-dot .line { width: 60px; height: 2px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.hero-dot .line i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.is-active .line i { animation: dotProgress var(--slide-ms, 7000ms) linear forwards; }
.paused .hero-dot.is-active .line i { animation-play-state: paused; }
.hero-project { display: none; align-items: center; gap: 18px; padding: 18px 0 18px 28px; border-left: 1px solid rgba(255,255,255,.15); max-width: 460px; }
.hero-project.is-active { display: flex; animation: fadeUp .7s var(--ease); }
.hero-project small { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.hero-project strong { display: block; font-family: var(--font-display); font-size: 1rem; line-height: 1.3; }
.hero-project > span { flex: none; width: 46px; height: 46px; border-radius: 0; display: grid; place-items: center; background: #fff; color: var(--primary); transition: transform .4s var(--ease), background .3s, color .3s; }
.hero-project:hover > span { transform: rotate(45deg); background: var(--accent); color: #fff; }
.hero-project > div, .hero-project > strong { flex: 1; }
@media (max-width: 760px) {
  .hero-project { display: none !important; }
  .hero-dot .line { width: 34px; }
  .hero-content { padding-top: 150px; }
}

/* ---------- Cabecera interior ---------- */
.page-hero, .project-hero { position: relative; color: #fff; background: var(--deep); overflow: hidden; isolation: isolate; padding: clamp(170px, 20vw, 230px) 0 clamp(60px, 8vw, 100px); }
.page-hero-bg, .project-hero-bg { position: absolute; inset: -12% 0 0; z-index: -2; }
.page-hero-bg img, .project-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; animation: heroZoom 14s var(--ease) forwards; transform: scale(1.1); }
.page-hero::after, .project-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--deep) 20%, color-mix(in srgb, var(--primary) 55%, transparent) 70%, transparent), linear-gradient(0deg, var(--deep), transparent 50%); }
.page-title { font-size: clamp(2.4rem, 1rem + 5.5vw, 6.4rem); font-weight: 900; letter-spacing: -.04em; line-height: .95; max-width: 16ch; margin-bottom: 1.4rem; }
.page-intro { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: rgba(255,255,255,.85); max-width: 52ch; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: .88rem; color: rgba(255,255,255,.7); margin-bottom: 1.6rem; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: #fff; }
.project-hero { padding-bottom: clamp(50px, 6vw, 80px); min-height: 78svh; display: flex; align-items: flex-end; }
.project-hero-bg img { opacity: .55; }
.project-title { font-size: clamp(2.1rem, 1rem + 4vw, 5rem); font-weight: 900; letter-spacing: -.035em; line-height: 1; max-width: 20ch; margin-top: 1.2rem; }

.tag { display: inline-flex; align-items: center; padding: .4em 1em; border-radius: 0; background: var(--accent); color: #fff; font-family: var(--font-display); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.tag-light { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.tag-light:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Marquesina ---------- */
.marquee { background: var(--accent); color: #fff; overflow: hidden; padding: 20px 0; }
.marquee-track { display: flex; gap: 34px; width: max-content; align-items: center; animation: marquee 34s linear infinite; }
.marquee span { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.4rem, 1rem + 2vw, 2.6rem); text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; }
.marquee i { font-style: normal; font-size: 1.2rem; opacity: .8; }

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 10vw, 150px) 0; position: relative; }
.section-soft { background: var(--paper); }
.section-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(44px, 5vw, 72px); }
.section-head.single { grid-template-columns: 1fr; }
.section-head .lead { margin-bottom: 1.2rem; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 18px; } }

/* Intro nosotros (portada) */
.home-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.home-about-media { position: relative; }
.img-main { border-radius: 0; overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: 0 40px 80px -40px rgba(1,50,80,.5); }
.img-main img, .img-second img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.home-about-media:hover .img-main img { transform: scale(1.05); }
.img-second { position: absolute; right: 0; bottom: 0; width: 48%; aspect-ratio: 1; border-radius: 0; overflow: hidden; border: 8px solid #fff; box-shadow: 0 30px 60px -25px rgba(1,50,80,.5); }
.years-badge { position: absolute; left: -18px; bottom: 22%; background: var(--primary); color: #fff; padding: 22px 26px; border-radius: 0; display: flex; align-items: center; gap: 12px; box-shadow: 0 24px 50px -20px var(--primary); animation: float 7s ease-in-out infinite; }
.years-badge strong { font-family: var(--font-display); font-size: 3.4rem; font-weight: 900; line-height: 1; color: var(--accent); }
.years-badge span { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
.home-about .btn { margin-top: 1rem; }
@media (max-width: 900px) { .home-about-grid { grid-template-columns: 1fr; } .years-badge { left: 10px; } }

/* Servicios en filas (portada) */
.services-home { background: var(--paper); }
.service-rows { border-top: 1px solid var(--line); }
.service-row { position: relative; display: grid; grid-template-columns: 80px 1.1fr 1.2fr 60px; gap: 30px; align-items: center; padding: clamp(24px, 3vw, 40px) 10px; border-bottom: 1px solid var(--line); isolation: isolate; transition: color .4s, padding .4s var(--ease); }
.service-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--primary); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); border-radius: 0; }
.service-row:hover { color: #fff; padding-inline: 30px; }
.service-row:hover::before { transform: scaleY(1); }
.sr-num { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.sr-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.5vw, 2.4rem); line-height: 1.05; color: var(--primary); letter-spacing: -.02em; transition: color .4s; }
.service-row:hover .sr-title { color: #fff; }
.sr-text { color: var(--muted); transition: color .4s; }
.service-row:hover .sr-text { color: rgba(255,255,255,.82); }
.sr-arrow { width: 54px; height: 54px; border-radius: 0; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--primary); transition: all .4s var(--ease); }
.service-row:hover .sr-arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(45deg); }
.sr-img { position: absolute; right: 12%; top: 50%; width: 220px; aspect-ratio: 4/3; border-radius: 0; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(0, -50%) rotate(-6deg) scale(.8); transition: opacity .4s, transform .6s var(--ease); z-index: 2; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.sr-img img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (min-width: 1100px) { .service-row:hover .sr-img { opacity: 1; transform: translate(0, -50%) rotate(-4deg) scale(1); } }
@media (max-width: 860px) { .service-row { grid-template-columns: 40px 1fr 48px; gap: 14px; } .sr-text { grid-column: 2 / -1; grid-row: 2; } .sr-arrow { grid-column: 3; grid-row: 1; width: 44px; height: 44px; } }

/* Cifras */
.stats { background: linear-gradient(120deg, var(--primary), var(--secondary)); color: #fff; padding: clamp(60px, 7vw, 90px) 0; position: relative; overflow: hidden; }
.stats::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); pointer-events: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; z-index: 1; }
.stat { border-left: 2px solid rgba(255,255,255,.25); padding-left: 24px; }
.stat-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.8rem, 1.5rem + 3.6vw, 5.4rem); line-height: 1; letter-spacing: -.04em; }
.stat-label { margin-top: 10px; font-weight: 500; opacity: .88; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; } }

/* Tarjetas de proyecto */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.projects-grid.featured .big { grid-column: span 2; grid-row: span 2; }
.projects-grid.featured .big .project-card-img { aspect-ratio: auto; flex: 1; min-height: 360px; }
.projects-grid.featured .big h3 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); }
.project-card a { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 0; overflow: hidden; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.project-card a:hover { transform: translateY(-8px); box-shadow: 0 40px 70px -40px rgba(1,50,80,.55); border-color: transparent; }
.project-card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(140deg, var(--primary), var(--secondary)); }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.project-card a:hover .project-card-img img { transform: scale(1.07); }
.project-card-img .tag { position: absolute; left: 16px; top: 16px; }
.project-card-img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.25); }
.project-card-img .ph .ico { width: 90px; height: 90px; stroke-width: 1; }
.project-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.project-card-body small { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary); }
.project-card-body h3 { font-size: 1.18rem; line-height: 1.25; color: var(--primary); letter-spacing: -.01em; }
.project-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--accent); }
.project-card a:hover .more .ico { transform: rotate(45deg); }
.project-card .more .ico { transition: transform .4s var(--ease); width: 18px; height: 18px; }
.project-card.hide { display: none; }
@media (max-width: 1000px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } .projects-grid.featured .big { grid-row: auto; } }
@media (max-width: 620px) { .projects-grid { grid-template-columns: 1fr; } .projects-grid.featured .big { grid-column: auto; } .projects-grid.featured .big .project-card-img { min-height: 0; aspect-ratio: 4/3; } }

/* Por qué elegirnos */
.why { background: var(--deep); color: #fff; overflow: hidden; }
.why .h-xl { color: #fff; }
.why .lead { color: rgba(255,255,255,.75); }
.why-grid-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.why-head { position: sticky; top: 120px; }
.why-img { margin-top: 2rem; border-radius: 0; overflow: hidden; aspect-ratio: 16/10; }
.why-img img { width: 100%; height: 100%; object-fit: cover; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-card { padding: clamp(24px, 3vw, 36px); border-radius: 0; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); position: relative; overflow: hidden; transition: background .4s, transform .5s var(--ease), border-color .4s; }
.why-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.why-card:hover { background: rgba(255,255,255,.08); transform: translateY(-6px); border-color: rgba(255,255,255,.2); }
.why-card:hover::after { transform: scaleX(1); }
.why-ico { width: 56px; height: 56px; border-radius: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--secondary) 30%, transparent); color: #a8dcf5; margin-bottom: 22px; transition: transform .6s var(--ease), background .4s, color .4s; }
.why-ico .ico { width: 26px; height: 26px; }
.why-card:hover .why-ico { transform: rotate(-8deg); background: var(--accent); color: #fff; }
.why-card h3 { font-size: 1.25rem; margin-bottom: .5em; }
.why-card p { color: rgba(255,255,255,.7); margin: 0; font-size: .98rem; }
@media (max-width: 960px) { .why-grid-wrap { grid-template-columns: 1fr; } .why-head { position: static; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

/* Clientes */
.clients { padding: clamp(60px, 8vw, 100px) 0; overflow: hidden; }
.clients-marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.clients-track { display: flex; gap: 22px; width: max-content; align-items: center; animation: marquee 45s linear infinite; padding: 10px 0; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
.client { width: 200px; height: 110px; flex: none; display: grid; place-items: center; padding: 18px 26px; border-radius: 0; background: #fff; border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease), box-shadow .4s; }
.client:hover { border-color: var(--secondary); transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(1,50,80,.4); }
.client img { max-width: 100%; max-height: 70px; object-fit: contain; opacity: .9; transition: opacity .4s, transform .4s var(--ease); }
.client:hover img { opacity: 1; transform: scale(1.05); }
.client span { font-family: var(--font-display); font-weight: 800; color: var(--primary); text-align: center; }
.client-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.client-cell { aspect-ratio: 16/10; display: grid; place-items: center; padding: 22px; border-radius: 0; background: #fff; border: 1px solid var(--line); transition: border-color .3s, box-shadow .4s; }
.client-cell:hover { border-color: var(--secondary); box-shadow: 0 20px 40px -24px rgba(1,50,80,.4); }
.client-cell img { max-height: 80px; object-fit: contain; transition: transform .4s var(--ease); }
.client-cell:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .client-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }

/* CTA */
.cta { position: relative; color: #fff; padding: clamp(80px, 10vw, 140px) 0; overflow: hidden; isolation: isolate; background: var(--primary); }
.cta-bg { position: absolute; inset: 0; z-index: -2; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, color-mix(in srgb, var(--primary) 95%, transparent) 30%, color-mix(in srgb, var(--secondary) 75%, transparent)); }
.cta-inner { display: grid; gap: 40px; }
.cta .h-xxl { max-width: 16ch; }
.cta .h-xxl em { color: var(--accent); }
.cta-side { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; border-top: 2px solid rgba(255,255,255,.25); padding-top: 32px; }
.cta-side p { font-size: 1.2rem; margin: 0; opacity: .92; max-width: 50ch; }

/* ---------- Nosotros ---------- */
.story-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.big-year { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 3rem + 8vw, 11rem); line-height: .85; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--secondary); margin-bottom: 1.6rem; }
.story-img { margin: 0; border-radius: 0; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 40px 80px -40px rgba(1,50,80,.5); }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } .story-img { aspect-ratio: 4/3; } }

.mv { background: var(--paper); padding: clamp(60px, 8vw, 110px) 0; }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mv-card { background: #fff; border-radius: 0; padding: clamp(30px, 4vw, 56px); border: 1px solid var(--line); position: relative; overflow: hidden; }
.mv-card:first-child { background: var(--primary); color: #fff; border: 0; }
.mv-card h2 { font-size: clamp(2rem, 1rem + 2.4vw, 3.4rem); font-weight: 900; margin: 22px 0 14px; color: var(--primary); }
.mv-card:first-child h2 { color: #fff; }
.mv-card p { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); margin: 0; color: var(--muted); }
.mv-card:first-child p { color: rgba(255,255,255,.85); }
.mv-ico { width: 62px; height: 62px; border-radius: 0; display: grid; place-items: center; background: var(--accent); color: #fff; }
.mv-ico .ico { width: 30px; height: 30px; }
@media (max-width: 760px) { .mv-grid { grid-template-columns: 1fr; } }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card { position: relative; padding: clamp(28px, 3vw, 42px); border-radius: 0; border: 1px solid var(--line); background: #fff; transition: transform .5s var(--ease), box-shadow .5s, border-color .3s; }
.value-card:hover { transform: translateY(-8px); box-shadow: 0 40px 70px -40px rgba(1,50,80,.5); border-color: var(--secondary); }
.value-num { position: absolute; right: 26px; top: 20px; font-family: var(--font-display); font-weight: 900; font-size: 3.4rem; color: transparent; -webkit-text-stroke: 1.5px var(--line); }
.value-ico { width: 58px; height: 58px; border-radius: 0; display: grid; place-items: center; background: var(--primary); color: #fff; margin-bottom: 24px; }
.value-ico .ico { width: 28px; height: 28px; }
.value-card h3 { font-size: 1.35rem; color: var(--primary); margin-bottom: .5em; }
.value-card p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr; } }

/* ---------- Servicios (listado) ---------- */
.services-list { display: grid; gap: clamp(60px, 8vw, 120px); }
.service-block { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.service-block.flip .service-block-img { order: 2; }
.service-block-img { position: relative; display: block; border-radius: 0; overflow: hidden; aspect-ratio: 5/4; background: linear-gradient(140deg, var(--primary), var(--secondary)); box-shadow: 0 40px 80px -40px rgba(1,50,80,.5); }
.service-block-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.service-block:hover .service-block-img img { transform: scale(1.06); }
.service-block-num { position: absolute; left: 24px; bottom: 10px; font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 3rem + 4vw, 7.5rem); line-height: 1; color: #fff; text-shadow: 0 10px 30px rgba(0,0,0,.3); }
.service-ico { width: 64px; height: 64px; border-radius: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--secondary) 13%, #fff); color: var(--primary); margin-bottom: 22px; }
.service-ico .ico { width: 30px; height: 30px; }
.service-block h2 { font-size: clamp(1.9rem, 1rem + 2.4vw, 3.2rem); font-weight: 800; color: var(--primary); margin-bottom: .5em; }
.service-block h2 a:hover { color: var(--secondary); }
.service-block .lead { margin-bottom: 1.4em; }
.service-block-foot { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 1.6rem; }
@media (max-width: 860px) { .service-block { grid-template-columns: 1fr; } .service-block.flip .service-block-img { order: 0; } }

/* ---------- Detalle (servicio / proyecto) ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: clamp(40px, 6vw, 90px); align-items: start; }
.detail-side { position: sticky; top: 110px; display: grid; gap: 20px; }
.side-card { border-radius: 0; padding: 26px; border: 1px solid var(--line); background: #fff; }
.side-card h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 14px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 0; font-weight: 600; color: var(--ink); transition: background .3s, color .3s; }
.side-nav a span { flex: 1; line-height: 1.3; }
.side-nav a .ico:last-child { opacity: 0; transform: translateX(-6px); transition: all .3s var(--ease); width: 18px; }
.side-nav a:hover { background: var(--paper); }
.side-nav a:hover .ico:last-child { opacity: 1; transform: none; }
.side-nav a.active { background: var(--primary); color: #fff; }
.side-nav a.active .ico:last-child { opacity: 1; transform: none; }
.side-contact { background: var(--deep); color: #fff; border: 0; position: relative; overflow: hidden; }
.side-contact::before { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 0; background: color-mix(in srgb, var(--secondary) 40%, transparent); }
.side-contact h3 { color: #fff; position: relative; }
.side-contact p { color: rgba(255,255,255,.78); position: relative; }
.side-contact .link-arrow { color: #fff; margin-top: 18px; font-size: .9rem; }
.side-phone { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 18px; position: relative; }
.side-phone .ico { color: var(--accent); }
.feature-box { margin-top: 2.6rem; padding: clamp(26px, 3vw, 40px); border-radius: 0; background: var(--paper); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
.feature-list li { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.feature-list li span { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: .9rem; }
.feature-list li > .ico { flex: none; align-self: center; width: 22px; height: 22px; padding: 4px; background: color-mix(in srgb, var(--secondary) 15%, #fff); color: var(--primary); stroke-width: 3; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } .detail-side { position: static; } }
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }

.project-facts { background: var(--primary); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 30px 26px; border-left: 1px solid rgba(255,255,255,.15); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact small { display: block; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: #a8dcf5; font-weight: 600; margin-bottom: 6px; }
.fact strong { font-family: var(--font-display); font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.25; }
@media (max-width: 800px) { .facts-grid { grid-template-columns: 1fr 1fr; } .fact { padding: 20px 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.15); } }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2.4rem; }
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery a { position: relative; display: block; border-radius: 0; overflow: hidden; aspect-ratio: 4/3; background: var(--paper); }
.gallery-4 a:first-child, .gallery-3 a:first-child { grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery a:hover img { transform: scale(1.06); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; color: #fff; font-size: .9rem; font-weight: 500; background: linear-gradient(transparent, rgba(0,17,28,.8)); transform: translateY(100%); transition: transform .45s var(--ease); }
.gallery a:hover .gallery-cap, .gallery a:focus-visible .gallery-cap { transform: none; }
.gallery-zoom { position: absolute; right: 14px; top: 14px; width: 42px; height: 42px; border-radius: 0; background: #fff; color: var(--primary); display: grid; place-items: center; transform: scale(0); transition: transform .45s var(--ease); }
.gallery a:hover .gallery-zoom { transform: scale(1); }
@media (max-width: 700px) { .gallery, .gallery-2 { grid-template-columns: 1fr 1fr; } .gallery-4 a:first-child, .gallery-3 a:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4/3; } }

/* Paginación de proyectos */
.pager { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pager-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.pager-link { padding: 40px 0; display: flex; flex-direction: column; gap: 8px; transition: color .3s; }
.pager-link.next { text-align: right; align-items: flex-end; }
.pager-link small { font-weight: 600; color: var(--accent); letter-spacing: .06em; }
.pager-link strong { font-family: var(--font-display); font-size: clamp(1rem, .9rem + .6vw, 1.4rem); color: var(--primary); max-width: 34ch; line-height: 1.25; transition: color .3s; }
.pager-link:hover strong { color: var(--secondary); }
.pager-all { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 54px; height: 54px; align-self: center; margin: 0 30px; padding: 14px; border-radius: 0; border: 1.5px solid var(--line); transition: background .3s, border-color .3s, transform .5s var(--ease); }
.pager-all span { background: var(--primary); border-radius: 0; transition: background .3s; }
.pager-all:hover { background: var(--primary); border-color: var(--primary); transform: rotate(90deg); }
.pager-all:hover span { background: #fff; }
@media (max-width: 640px) { .pager-grid { grid-template-columns: 1fr 1fr; } .pager-all { display: none; } .pager-link { padding: 26px 0; } }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter { border: 1.5px solid var(--line); background: #fff; color: var(--primary); border-radius: 0; padding: .6em 1.25em; font-family: var(--font-display); font-weight: 700; font-size: .9rem; transition: all .3s; }
.filter sup { font-size: .7em; opacity: .6; margin-left: 2px; }
.filter:hover { border-color: var(--secondary); }
.filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact-cards { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.contact-cards li { display: flex; gap: 18px; padding: 24px; border-radius: 0; border: 1px solid var(--line); background: #fff; transition: border-color .3s, transform .4s var(--ease); }
.contact-cards li:hover { border-color: var(--secondary); transform: translateX(6px); }
.cc-ico { flex: none; width: 54px; height: 54px; border-radius: 0; display: grid; place-items: center; background: var(--primary); color: #fff; }
.contact-cards small { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.contact-cards a, .contact-cards p { display: block; font-family: var(--font-display); font-weight: 700; color: var(--primary); font-size: 1.08rem; margin: 3px 0 0; line-height: 1.4; }
.contact-cards a:hover { color: var(--secondary); }
.socials { display: flex; gap: 10px; }
.socials a { width: 48px; height: 48px; border-radius: 0; display: grid; place-items: center; background: var(--primary); color: #fff; transition: transform .4s var(--ease), background .3s; }
.socials a:hover { transform: translateY(-4px); background: var(--accent); }
.socials-dark a { background: rgba(255,255,255,.08); }
.map { height: 460px; background: var(--paper); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.form-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.next-link { display: flex; flex-direction: column; gap: 4px; margin-top: 3rem; padding: 24px; border-radius: 0; background: var(--paper); position: relative; transition: background .3s; }
.next-link small { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; }
.next-link strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); padding-right: 40px; }
.next-link .ico { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); color: var(--primary); transition: transform .4s var(--ease); }
.next-link:hover { background: color-mix(in srgb, var(--secondary) 12%, #fff); }
.next-link:hover .ico { transform: translate(6px, -50%); }
@media (max-width: 900px) { .contact-grid, .form-section { grid-template-columns: 1fr; } }

.contact-form { background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: clamp(22px, 4vw, 44px); display: grid; gap: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field { position: relative; display: block; }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 0; padding: 26px 18px 10px; outline: none; transition: border-color .3s, box-shadow .3s; }
.field select { padding: 18px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23015a82' stroke-width='2'%3E%3Cpath d='M2 5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 18px center; }
.field textarea { resize: vertical; min-height: 130px; }
.field span { position: absolute; left: 19px; top: 18px; color: var(--muted); pointer-events: none; transition: all .25s var(--ease); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--secondary) 18%, transparent); }
.field input:focus + span, .field input:not(:placeholder-shown) + span, .field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { top: 7px; font-size: .74rem; font-weight: 600; color: var(--secondary); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #d64545; }
.form-note { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 0; font-weight: 600; }
.form-alert.ok { background: #e3f6ea; color: #156b39; }
.form-alert.err { background: #fde8e8; color: #9b1c1c; }

/* 404 */
.notfound { padding: 200px 0 140px; text-align: center; }
.nf-code { font-family: var(--font-display); font-weight: 900; font-size: clamp(7rem, 4rem + 14vw, 16rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--secondary); margin-bottom: 30px; }
.notfound .lead { margin: 1.2rem auto 2rem; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Pie ---------- */
.footer { background: var(--deep); color: rgba(255,255,255,.72); padding: 70px 0 30px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 50px; }
.footer-logo { width: 240px; height: auto; }
.footer-cta { display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); color: #fff; letter-spacing: -.02em; transition: color .3s; }
.footer-cta .ico { width: 1.1em; height: 1.1em; padding: 8px; box-sizing: content-box; border-radius: 0; background: var(--accent); transition: transform .45s var(--ease); }
.footer-cta:hover { color: var(--accent); }
.footer-cta:hover .ico { transform: rotate(45deg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px; }
.footer-grid a, .footer-grid p { display: block; margin: 0 0 10px; font-size: .96rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid .socials { margin-top: 20px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .88rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* WhatsApp: chat rápido */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; font-family: var(--font-body); }
.wa-float { position: relative; width: 62px; height: 62px; border: 0; border-radius: 0; background: #25d366; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 34px -10px rgba(18,140,70,.75); transition: transform .35s var(--ease), background .3s; animation: pulse 2.4s infinite; }
.wa-float:hover { transform: translateY(-3px); }
.wa-float .ico { width: 30px; height: 30px; }
.wa-float > span { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .4s var(--ease), opacity .3s; }
.wa-ico-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.wa.open .wa-float { background: var(--primary); animation: none; }
.wa.open .wa-ico-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.wa.open .wa-ico-close { opacity: 1; transform: none; }
.wa-dot { position: absolute !important; top: -7px; right: -7px; width: 22px; height: 22px; background: var(--accent); color: #fff; font: 800 .72rem/22px var(--font-display); text-align: center; display: block !important; }
.wa.seen .wa-dot { opacity: 0; transform: scale(0); }
.wa-teaser { position: absolute; right: 76px; bottom: 14px; white-space: nowrap; background: #fff; color: var(--ink); font: 700 .86rem var(--font-display); padding: 10px 14px; box-shadow: 0 14px 30px -12px rgba(1,40,60,.35); opacity: 0; transform: translateX(10px); pointer-events: none; transition: opacity .4s, transform .4s var(--ease); }
.wa.tease .wa-teaser { opacity: 1; transform: none; }
.wa.open .wa-teaser { opacity: 0; }
.wa-panel { width: min(370px, calc(100vw - 40px)); background: #efeae2; box-shadow: 0 30px 70px -20px rgba(1,30,45,.55); transform-origin: bottom right; animation: waIn .45s var(--ease); overflow: hidden; }
.wa-panel[hidden] { display: none; }
@keyframes waIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes waUp { from { opacity: 0; transform: translateY(8px); } }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; background: var(--primary); color: #fff; }
.wa-head > div { flex: 1; min-width: 0; line-height: 1.25; }
.wa-head strong { display: block; font: 800 1rem var(--font-display); }
.wa-head small { color: rgba(255,255,255,.75); font-size: .8rem; }
.wa-avatar { position: relative; width: 44px; height: 44px; flex: none; background: var(--accent); display: grid; place-items: center; }
.wa-avatar img { width: 28px; height: auto; }
.wa-avatar i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; background: #25d366; border: 2px solid var(--primary); }
.wa-close { width: 36px; height: 36px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wa-close:hover { background: rgba(255,255,255,.25); }
.wa-close .ico { width: 18px; height: 18px; }
.wa-body { padding: 18px 16px 6px; max-height: min(50vh, 360px); overflow-y: auto; background-image: radial-gradient(rgba(1,90,130,.06) 1px, transparent 1px); background-size: 14px 14px; }
.wa-bubble { position: relative; margin: 0 0 14px; max-width: 88%; background: #fff; color: var(--ink); padding: 12px 14px; font-size: .94rem; line-height: 1.5; box-shadow: 0 2px 4px rgba(0,0,0,.06); animation: waUp .5s var(--ease) .15s both; }
.wa-bubble::before { content: ""; position: absolute; left: -8px; top: 0; border: 8px solid transparent; border-top-color: #fff; border-right-color: #fff; }
.wa-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; padding-bottom: 8px; }
.wa-chip { border: 1px solid rgba(1,90,130,.25); background: #fff; color: var(--primary); font: 600 .84rem var(--font-body); padding: 8px 12px; text-align: right; cursor: pointer; transition: background .25s, color .25s, border-color .25s; animation: waUp .5s var(--ease) both; }
.wa-chip:nth-child(2) { animation-delay: .05s; } .wa-chip:nth-child(3) { animation-delay: .1s; } .wa-chip:nth-child(4) { animation-delay: .15s; } .wa-chip:nth-child(5) { animation-delay: .2s; }
.wa-chip:hover, .wa-chip:focus-visible { background: var(--primary); color: #fff; border-color: var(--primary); }
.wa-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #f6f6f6; border-top: 1px solid rgba(0,0,0,.06); }
.wa-form textarea { flex: 1; min-height: 44px; max-height: 130px; resize: none; border: 1px solid #dcdcdc; background: #fff; border-radius: 0; padding: 11px 12px; font: inherit; font-size: .95rem; line-height: 1.4; color: var(--ink); outline: none; }
.wa-form textarea:focus { border-color: #25d366; }
.wa-send { width: 44px; height: 44px; flex: none; border: 0; background: #25d366; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .25s, transform .25s; }
.wa-send:hover { background: #1ebe5b; transform: translateX(2px); }
.wa-send .ico { width: 20px; height: 20px; }
.wa-note { margin: 0; padding: 0 14px 12px; background: #f6f6f6; color: var(--muted); font-size: .74rem; }
@media (max-width: 560px) {
  .wa { right: 14px; bottom: 14px; }
  .wa-panel { width: calc(100vw - 28px); }
  .wa-teaser { display: none; }
}
.footer-profile { display: inline-flex !important; align-items: center; gap: 8px; color: var(--accent) !important; font-weight: 600; }
.footer-profile .ico { width: 16px; height: 16px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 12, 20, .92); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .3s; }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 0; margin: 0 auto; animation: pop .45s var(--ease); }
.lightbox figcaption { color: rgba(255,255,255,.85); margin-top: 16px; font-size: 1rem; }
.lb-btn { position: fixed; width: 52px; height: 52px; border-radius: 0; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; transition: background .3s; z-index: 2; }
.lb-btn:hover { background: var(--accent); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%) scaleX(-1); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; top: 32px; left: 28px; color: rgba(255,255,255,.7); font-family: var(--font-display); font-weight: 700; }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(46px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes wordUp { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
@keyframes heroZoom { to { transform: scale(1); } }
@keyframes dotProgress { to { transform: scaleX(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 50% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Hero sin numeración: contenido centrado y enlace al proyecto abajo a la derecha */
.hero { justify-content: center; min-height: max(100svh, 720px); }
.hero-content { padding-top: 150px; padding-bottom: 170px; }
.hero-bar { position: absolute; left: 0; right: 0; bottom: 0; border-top: 0; background: none; }
.hero-bar-inner { justify-content: space-between; align-items: center; gap: 30px; min-height: 0; padding-bottom: 48px; }
.hero-bar .hero-actions { margin-top: 0; }
.hero-project { border-left: 1px solid rgba(255,255,255,.2); padding: 4px 0 4px 28px; max-width: 440px; }
@media (max-width: 760px) {
  .hero-content { padding-bottom: 210px; }
  .hero-bar-inner { padding-bottom: 32px; }
}
/* Botones del hero en móvil: tamaño normal y en una sola fila */
@media (max-width: 560px) {
  .hero-actions { gap: 10px; }
  .hero-actions { flex-wrap: nowrap; }
  .hero-actions .btn-lg { padding: .85em .9em; font-size: .84rem; border-width: 1.5px; }
  .hero-actions .btn { flex: 1 1 auto; white-space: nowrap; }
  .hero-actions .btn .ico { display: none; }
  .hero-bar-inner { padding-bottom: 96px; } /* deja sitio al botón flotante de WhatsApp */
  .hero-content { padding-bottom: 150px; }
}
@media (max-width: 350px) {
  .hero-actions { gap: 8px; }
  .hero-actions .btn-lg { padding: .85em .65em; font-size: .78rem; }
}

/* Franja de descarga del perfil de empresa */
.profile-banner { padding: 0 0 clamp(60px, 8vw, 110px); }
.profile-banner-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px); background: var(--primary); color: #fff; position: relative; overflow: hidden; }
.profile-banner-inner::after { content: ""; position: absolute; right: 0; top: 0; width: 10px; height: 100%; background: var(--accent); }
.pb-doc { position: relative; width: 96px; height: 124px; background: #fff; color: var(--primary); display: grid; place-items: center; box-shadow: 14px 14px 0 rgba(255,255,255,.12); transform: rotate(-4deg); transition: transform .5s var(--ease); }
.profile-banner-inner:hover .pb-doc { transform: rotate(0) translateY(-4px); }
.pb-doc .ico { width: 40px; height: 40px; }
.pb-doc b { position: absolute; left: -10px; bottom: 16px; background: var(--accent); color: #fff; font: 800 .8rem var(--font-display); padding: 4px 10px; letter-spacing: .08em; }
.pb-text .kicker { color: rgba(255,255,255,.75); margin-bottom: .6rem; }
.pb-text h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 .6rem; }
.pb-text p:last-child { margin: 0; color: rgba(255,255,255,.8); max-width: 52ch; }
@media (max-width: 860px) { .profile-banner-inner { grid-template-columns: 1fr; } .pb-doc { width: 76px; height: 98px; } }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.post-card a:hover { transform: translateY(-8px); box-shadow: 0 40px 70px -40px rgba(1,50,80,.55); border-color: transparent; }
.post-card-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(140deg, var(--primary), var(--secondary)); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post-card a:hover .post-card-img img { transform: scale(1.07); }
.post-card-img .tag { position: absolute; left: 16px; top: 16px; }
.post-card-img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.25); }
.post-card-img .ph .ico { width: 80px; height: 80px; stroke-width: 1; }
.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-body h3 { font-size: 1.2rem; line-height: 1.28; color: var(--primary); letter-spacing: -.01em; }
.post-card-body p { color: var(--muted); margin: 0; }
.post-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--accent); }
.post-card .more .ico { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.post-card a:hover .more .ico { transform: rotate(45deg); }
.post-card.hide { display: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .ico { width: 15px; height: 15px; }
.post-grid .big { grid-column: span 3; }
.post-grid .big a { display: grid; grid-template-columns: 1.35fr 1fr; }
.post-grid .big .post-card-img { aspect-ratio: auto; min-height: 420px; }
.post-grid .big .post-card-body { padding: clamp(28px, 4vw, 56px); justify-content: center; gap: 16px; }
.post-grid .big h3 { font-size: clamp(1.6rem, 1rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; }
.post-grid .big .more { margin-top: 10px; }
.home-blog .post-grid .post-card a { border-color: transparent; }

.post-hero { min-height: 70svh; }
.post-title { font-size: clamp(2rem, 1.1rem + 3.4vw, 4.4rem); max-width: 22ch; }
.post-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 1.4rem 0 0; color: rgba(255,255,255,.85); font-weight: 500; }
.post-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.post-hero-meta .ico { width: 18px; height: 18px; color: var(--accent); }
.post-lead { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); line-height: 1.4; color: var(--primary); letter-spacing: -.01em; padding-left: 22px; border-left: 4px solid var(--accent); margin-bottom: 2rem; }
.post-body .prose h3 { font-size: clamp(1.35rem, 1.1rem + .6vw, 1.7rem); }
.post-body .prose .checklist { margin: 0 0 1.4em; }
.post-share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 3rem; padding-top: 26px; border-top: 1px solid var(--line); }
.post-share > span { font-family: var(--font-display); font-weight: 700; color: var(--primary); margin-right: 8px; }
.post-share a, .post-share button { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--line); background: #fff; color: var(--primary); transition: background .3s, color .3s, border-color .3s; }
.post-share a:hover, .post-share button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.post-share .ico { width: 20px; height: 20px; }
.post-share button em { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 6px); white-space: nowrap; font-style: normal; font-size: .78rem; font-weight: 600; background: var(--ink); color: #fff; padding: 5px 10px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); }
.post-share button.copied em { opacity: 1; transform: translate(-50%, 0); }
.side-posts { display: grid; gap: 16px; }
.side-posts a { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.side-posts img { width: 76px; height: 60px; object-fit: cover; }
.side-posts small { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
.side-posts strong { display: block; font-family: var(--font-display); font-size: .95rem; line-height: 1.3; color: var(--ink); transition: color .3s; }
.side-posts a:hover strong { color: var(--accent); }
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid .big { grid-column: span 2; }
}
@media (max-width: 760px) {
  .post-grid .big a { grid-template-columns: 1fr; }
  .post-grid .big .post-card-img { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-grid .big { grid-column: auto; }
}
