/* ============================================================
   CANTHI Ingeniería Eléctrica — style.css v20260522
   Archetype: Dark Navy Corporate Premium
   ============================================================ */

/* === 1. VARIABLES & RESET ================================= */
:root {
  --navy:        #1B3F7A;
  --navy-dark:   #0F2347;
  --navy-mid:    #2B5BAA;
  --light:       #B8C8DC;
  --light-bg:    #EEF3F8;
  --gold:        #F0A500;
  --gold-dark:   #C88A00;
  --gold-glow:   rgba(240,165,0,0.22);
  --white:       #FFFFFF;
  --dark:        #1A2B50;
  --card-dark:   #162240;
  --text:        #1A2B50;
  --text-muted:  rgba(26,43,80,0.6);
  --text-light:  rgba(255,255,255,0.9);
  --text-dim:    rgba(255,255,255,0.55);

  --nav-h:       80px;
  --max-w:       1200px;
  --gap:         clamp(1rem, 3vw, 2rem);
  --section-py:  clamp(4rem, 8vw, 7rem);

  --ease:        cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:    cubic-bezier(0,0,0.2,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);

  --radius:      12px;
  --radius-sm:   8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  font-size: 16px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* === 2. TYPOGRAPHY ======================================== */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.6rem;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 2px;
  background: var(--gold);
}

/* === 3. BUTTONS =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,165,0,0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* === 4. SPLASH ============================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
  /* Double safety: auto-hide at 4.5s even if JS fails */
  animation: splashSafety 0.01s 4.5s forwards;
}
@keyframes splashSafety {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.splash.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
  background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
  border-radius: 16px;
  padding: 18px 36px;
  box-shadow: 0 8px 32px rgba(27,63,122,0.22), 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid var(--gold);
}
.splash-logo-icon {
  width: 48px;
  height: 48px;
  color: var(--gold);
}
.splash-logo-img {
  height: 160px;
  width: calc(160px * 612 / 183);
  display: block;
  overflow: visible;
}
.splash-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.splash-logo-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--white);
}
.splash-logo-sub {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.splash-bar-wrap {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.4s ease 0.6s forwards;
}
.splash-bar {
  height: 100%;
  background: var(--gold);
  width: 0;
  animation: growBar 1.4s ease-out 0.8s forwards;
}
@keyframes growBar { to { width: 100%; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes filterReveal { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: none; } }

/* === 5. NAV =============================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(15,35,71,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
  border-radius: 14px;
  padding: 6px 22px;
  box-shadow: 0 4px 20px rgba(27,63,122,0.20), 0 1px 4px rgba(0,0,0,0.08);
  border-left: 3px solid var(--gold);
  transition: box-shadow 0.3s var(--ease);
}
.nav-logo:hover {
  box-shadow: 0 6px 28px rgba(27,63,122,0.30), 0 2px 6px rgba(0,0,0,0.10);
}
.nav-logo-icon {
  width: 36px;
  height: 36px;
  color: var(--gold);
  flex-shrink: 0;
}
.nav-logo-img {
  height: 58px;
  width: calc(58px * 612 / 183);
  display: block;
  overflow: visible;
}
.footer-logo-img {
  height: 58px;
  width: calc(58px * 612 / 183);
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-logo-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--white);
}
.nav-logo-sub {
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links li a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8);
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav-links .btn-nav {
  background: var(--gold);
  color: var(--navy-dark) !important;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
}
.nav-links .btn-nav:hover {
  background: var(--gold-dark);
}

.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 4px;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}
.nav-burger.is-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-burger.is-open span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav-burger.is-open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === 6. HERO ============================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15,35,71,0.88) 0%,
    rgba(27,63,122,0.72) 50%,
    rgba(15,35,71,0.82) 100%
  );
}

/* Circuit board SVG overlay */
.hero-circuit {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hero-circuit svg {
  width: 100%;
  height: 100%;
}
.trace {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.28;
}
.trace-anim {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawTrace 2.4s ease-out forwards;
}
.node {
  fill: var(--gold);
  opacity: 0;
  animation: nodeAppear 0.4s ease forwards;
}
@keyframes drawTrace { to { stroke-dashoffset: 0; } }
@keyframes nodeAppear { to { opacity: 0.5; } }

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--nav-h) clamp(1rem, 4vw, 2.5rem) 4rem;
  padding-top: calc(var(--nav-h) + 3rem);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.7s ease 0.8s forwards;
}

.hero-title {
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.0;
  max-width: 14ch;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s ease 1s forwards;
  text-wrap: balance;
}
.hero-title .gold { color: var(--gold); }

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.7s ease 1.2s forwards;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  max-width: 52ch;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.7s ease 1.4s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.7s ease 1.6s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroFadeUp 0.7s ease 2s forwards;
  transition: opacity 0.4s;
}
.hero-scroll.is-hidden { opacity: 0; }
.scroll-line {
  width: 1.5px;
  height: 40px;
  background: rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: scrollDrop 1.6s ease-in-out 2.2s infinite;
}
@keyframes scrollDrop {
  0%   { top: -100%; }
  100% { top: 100%; }
}
@keyframes heroFadeUp {
  to { opacity: 1; transform: none; }
}

/* === 7. ABOUT ============================================= */
.about {
  padding-block: var(--section-py);
  background: var(--white);
  overflow: hidden;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.about-text { order: 1; }

.about-text h2 {
  color: var(--navy);
  margin-bottom: 1.5rem;
  max-width: 20ch;
}
.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}
.pillar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--light-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pillar-icon {
  width: 32px;
  height: 32px;
  color: var(--gold);
  flex-shrink: 0;
}
.pillar strong {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--navy);
  border-radius: var(--radius);
}
.counter-item {
  text-align: center;
  padding: 0.75rem 0.25rem;
  min-width: 0;
}
.counter-value {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.counter-suffix {
  font-size: 0.5em;
  font-weight: 700;
}
.counter-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.about-image { order: 2; }
.about-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 646 / 442;
  box-shadow: 0 40px 80px rgba(15,35,71,0.25);
}
.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.about-img-wrap:hover img { transform: scale(1.04); }
.about-img-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* === 8. SERVICES ========================================== */
.services {
  padding-block: var(--section-py);
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.services-bg-img {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.services-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.04;
  filter: grayscale(1);
}

.services-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  z-index: 1;
}
.services-head h2 { color: var(--white); }
.services-head p {
  color: var(--text-dim);
  margin-top: 0.75rem;
  max-width: 50ch;
  margin-inline: auto;
  font-size: 1rem;
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}
.service-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240,165,0,0.06), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.service-card:hover {
  border-color: rgba(240,165,0,0.3);
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 0 1px rgba(240,165,0,0.15);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: block;
}
.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}
.service-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.service-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--gold);
  background: rgba(240,165,0,0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
}

/* === 9. PROJECTS ========================================== */
.projects {
  padding-block: var(--section-py);
  background: var(--light-bg);
}
.projects-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
.projects-head h2 { color: var(--navy); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(27,63,122,0.25);
  color: var(--navy);
  background: var(--white);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  box-shadow: 0 4px 20px rgba(26,43,80,0.12);
}
.project-card.is-hidden {
  display: none;
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover img { transform: scale(1.08); }

.project-info {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,35,71,0.95) 0%,
    rgba(15,35,71,0.5) 45%,
    transparent 70%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: background 0.4s var(--ease-out);
}
.project-card:hover .project-info {
  background: linear-gradient(
    to top,
    rgba(15,35,71,0.98) 0%,
    rgba(15,35,71,0.75) 60%,
    rgba(15,35,71,0.3) 100%
  );
}

.project-cat {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(15,35,71,0.85);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  border: 1px solid rgba(240,165,0,0.3);
}

.project-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.project-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.project-spec {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.project-spec strong {
  color: var(--gold);
  font-weight: 600;
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}
.project-card:hover .project-details {
  max-height: 100px;
}
.project-details ul {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.project-details li {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  padding-left: 0.75rem;
  position: relative;
}
.project-details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* Clickable project (links to detail page) */
.project-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}
.project-card--link { cursor: pointer; }
.project-card--link::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.4s var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
.project-card--link:hover::after { border-color: var(--gold); }

.project-view-cue {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-dark);
  background: var(--gold);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  pointer-events: none;
}
.project-view-cue svg { transition: transform 0.35s var(--ease-out); }
.project-card--link:hover .project-view-cue {
  opacity: 1;
  transform: none;
}
.project-card--link:hover .project-view-cue svg { transform: translateX(3px); }

/* === 10. VIDEOS =========================================== */
.videos-section {
  background: linear-gradient(160deg, #0f243f 0%, var(--navy) 50%, #0d1e38 100%);
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  margin: -2px 0; /* close gap from clip-path */
}
.videos-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
}

/* Section label gold variant */
.section-label--gold {
  color: var(--gold);
  border-color: var(--gold);
}

/* Videos grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Video card */
.video-card {
  display: flex;
  flex-direction: column;
}
.video-card-inner {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(240,165,0,0.25);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.video-card-inner:hover {
  border-color: rgba(240,165,0,0.6);
  box-shadow: 0 8px 40px rgba(240,165,0,0.12);
}

/* Video container — native aspect ratio (portrait for Instagram posts) */
.video-embed-wrap {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  aspect-ratio: 9 / 16;
}
.video-embed-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card footer — clickable Instagram link */
.video-card-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px solid rgba(240,165,0,0.15);
  text-decoration: none;
  transition: color 0.2s ease;
}
.video-card-footer:hover {
  color: var(--gold);
}

/* Instagram follow button */
.btn-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border: 1.5px solid rgba(240,165,0,0.5);
  border-radius: 50px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-ig:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

/* Responsive */
@media (max-width: 700px) {
  .videos-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .videos-section {
    clip-path: none;
  }
}

/* === 11. CLIENTS ========================================== */
.clients {
  padding-block: var(--section-py);
  background: var(--white);
}
.clients-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.clients-col h3 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.clients-col h3::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
}
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}
.logo-card {
  background: #fff;
  border: 1.5px solid rgba(27,63,122,0.10);
  border-radius: 12px;
  padding: 0.85rem 0.6rem 0.6rem;
  text-align: center;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  margin: 0;
  cursor: default;
}
.logo-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(27,63,122,0.14);
  transform: translateY(-3px);
}
.logo-card-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-card-img {
  max-height: 50px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-initials {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}
.logo-card--proveedor .logo-initials {
  background: var(--gold);
  color: var(--navy-dark);
}
.logo-card figcaption {
  font-size: 0.65rem;
  color: var(--dark);
  opacity: 0.6;
  margin-top: 0.45rem;
  line-height: 1.25;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.logo-card--dark {
  background: var(--navy);
}
.logo-card--dark figcaption {
  color: rgba(255,255,255,0.7);
}
.logo-card--white-logo .logo-card-img {
  filter: brightness(0);
}

/* ── Marquee de clientes / proveedores ── */
.marquees {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}
.marquee-head {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.marquee-head::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
}
.marquee {
  position: relative;
  overflow: hidden;
  padding: 0.4rem 0;
  /* desvanecido en los bordes para que los logos entren y salgan suave */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  will-change: transform;
}
.marquee-track.is-cloned {
  animation: marquee-x 40s linear infinite;
}
.marquee--reverse .marquee-track.is-cloned {
  animation-direction: reverse;
}
.marquee:hover .marquee-track.is-cloned {
  animation-play-state: paused;
}
.marquee .logo-card {
  width: 150px;
  flex: 0 0 auto;
  margin: 0;
}
@keyframes marquee-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === 11. COMPROMISOS ====================================== */
.compromisos {
  padding-block: var(--section-py);
  background: var(--navy-dark);
  position: relative;
  overflow: hidden;
}
.compromisos::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(43,91,170,0.25), transparent 60%),
              radial-gradient(ellipse at 80% 30%, rgba(240,165,0,0.08), transparent 50%);
  pointer-events: none;
}

.compromisos-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
}
.compromisos-head h2 { color: var(--white); }
.compromisos-head p {
  color: var(--text-dim);
  margin-top: 0.75rem;
  max-width: 48ch;
  margin-inline: auto;
  font-size: 1rem;
}

.compromisos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  position: relative;
}
.compromiso-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
}
.compromiso-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(240,165,0,0.25);
  transform: translateY(-4px);
}
.compromiso-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(240,165,0,0.12);
  border: 1.5px solid rgba(240,165,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--gold);
}
.compromiso-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.compromiso-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* === 12. CONTACT ========================================== */
.contact {
  padding-block: var(--section-py);
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.contact-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
  filter: grayscale(1);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.contact-info h2 {
  color: var(--white);
  margin-bottom: 1rem;
}
.contact-info > p {
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 42ch;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(240,165,0,0.12);
  border: 1.5px solid rgba(240,165,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.contact-item-content span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}
.contact-item-content a,
.contact-item-content strong {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.contact-item-content a:hover { color: var(--gold); }

.contact-form-wrap {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 2.5rem;
  backdrop-filter: blur(10px);
}
.contact-map {
  margin-top: 3rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  line-height: 0;
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: 380px;
}
.contact-form-wrap h3 {
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.form-group {
  margin-bottom: 1.1rem;
}
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.25s, background 0.25s;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.3);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.09);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  margin-top: 0.5rem;
}
.form-submit:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,165,0,0.3);
}
.form-submit:active { transform: none; }
.form-msg {
  display: none;
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1rem;
}
.form-msg.success {
  display: block;
  background: rgba(0,200,100,0.12);
  color: #4ade80;
  border: 1px solid rgba(0,200,100,0.25);
}
.form-msg.error {
  display: block;
  background: rgba(240,60,60,0.12);
  color: #f87171;
  border: 1px solid rgba(240,60,60,0.25);
}

/* === 13. FOOTER =========================================== */
.footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 34ch;
  margin-bottom: 1.5rem;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.25s;
}
.footer-social a:hover {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.footer-bottom a {
  font-size: 0.78rem;
  color: var(--gold);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-bottom a:hover { opacity: 1; }

/* === 14. BACK TO TOP ====================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(240,165,0,0.4);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.4s var(--ease-out);
  pointer-events: none;
  cursor: pointer;
  border: none;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: all;
}
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(240,165,0,0.5); }

/* === 15. REVEAL ANIMATIONS ================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Defensive rule per gotcha A.4.5 */
.reveal[data-split] {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal-left.is-visible { opacity: 1; transform: none; }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal-right.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* === 16. RESPONSIVE ======================================= */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .compromisos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-image { order: -1; }
  .about-img-wrap { aspect-ratio: 646 / 442; }
  .contact-inner { grid-template-columns: 1fr; }
  .clients-inner { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(15,35,71,0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s var(--ease-out), opacity 0.4s;
    pointer-events: none;
  }
  .nav-links.is-open {
    transform: none;
    opacity: 1;
    pointer-events: all;
  }
  .nav-links li a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    text-align: center;
  }
  .nav-burger { display: flex; }

  .projects-grid { grid-template-columns: 1fr; }
  .compromisos-grid { grid-template-columns: 1fr; }
  .counters { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .counters { grid-template-columns: 1fr; }
  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
}

/* ════════════════════════════════════════
   12. OBRA DETAIL PAGE
   ════════════════════════════════════════ */
.obra-page { background: var(--white); }

/* Botón "Contacto" en nav del detalle */
.btn-nav {
  background: var(--gold);
  color: var(--navy-dark) !important;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-weight: 700;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.btn-nav:hover { background: #ffb720; transform: translateY(-2px); }

/* ── HERO ── */
.obra-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: var(--navy-dark);
}
.obra-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}
.obra-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15,35,71,0.96) 0%, rgba(15,35,71,0.55) 50%, rgba(15,35,71,0.7) 100%);
}
.obra-hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(3rem, 7vw, 6rem);
  width: 100%;
}
.obra-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  transition: color 0.3s var(--ease-out), gap 0.3s var(--ease-out);
}
.obra-back:hover { color: var(--gold); gap: 0.75rem; }
.obra-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(240,165,0,0.45);
  background: rgba(240,165,0,0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.obra-title {
  color: var(--white);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.obra-subtitle {
  color: rgba(255,255,255,0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 620px;
  line-height: 1.55;
}
.obra-specs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid rgba(255,255,255,0.15);
}
.obra-spec { display: flex; flex-direction: column; }
.obra-spec-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.obra-spec-label {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 0.4rem;
}
.obra-hero-circuit {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: 1;
  opacity: 0.8;
  pointer-events: none;
}

/* ── VIDEO SECTION ── */
.obra-video-section {
  position: relative;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.obra-video-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  pointer-events: none;
}
.obra-video-frame {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
  border: 1px solid rgba(240,165,0,0.25);
  aspect-ratio: 16/9;
}
.obra-video-corner {
  position: absolute;
  width: 38px;
  height: 38px;
  z-index: 3;
  pointer-events: none;
}
.obra-video-corner--tl {
  top: 14px; left: 14px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}
.obra-video-corner--br {
  bottom: 14px; right: 14px;
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}
.obra-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Fila de clips verticales ── */
.obra-video-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.obra-vclip {
  margin: 0;
  flex: 0 1 320px;
  max-width: 320px;
}
.obra-vclip .obra-video-frame {
  margin: 0;            /* anula el "margin:0 auto" que separaba los videos */
  max-width: 100%;
  aspect-ratio: 9 / 16;
}
.obra-vcaption {
  margin-top: 1rem;
  text-align: center;
  color: #c9d6ea;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.obra-vcaption-line {
  display: block;
  width: 44px;
  height: 2px;
  margin: 0 auto 0.7rem;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Fotos a tamaño completo (sin recorte), una al lado de la otra ── */
.obra-photos-full {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.obra-photo-full {
  margin: 0;
  flex: 0 0 auto;
}
.obra-photo-full img {
  display: block;
  /* altura compartida: ambas fotos a la misma altura, ancho natural → sin recorte ni huecos */
  height: clamp(280px, 36vw, 440px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(240,165,0,0.25);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35);
}
/* En pantallas chicas se apilan, cada una completa */
@media (max-width: 760px) {
  .obra-photos-full {
    flex-direction: column;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 2rem);
  }
  .obra-photo-full img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 70vh;
  }
}

/* ── GALERÍA ── */
.obra-gallery-section {
  position: relative;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.obra-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.15rem);
  max-width: 1100px;
  margin: 0 auto;
}
.obra-gallery-item {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #000;
  border: 1px solid rgba(240,165,0,0.18);
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}
.obra-gallery-item--big {
  grid-column: 1 / -1;
  aspect-ratio: 21/8;
}
.obra-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.obra-gallery-item:hover img { transform: scale(1.06); }
.obra-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color 0.4s var(--ease-out);
  pointer-events: none;
}
.obra-gallery-item:hover::after { border-color: var(--gold); }
.obra-gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(to top, rgba(15,35,71,0.92) 0%, rgba(15,35,71,0) 100%);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.obra-gallery-item figcaption::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  margin-right: 0.55rem;
  vertical-align: middle;
}
.obra-gallery-item:hover figcaption {
  opacity: 1;
  transform: none;
}

@media (max-width: 700px) {
  .obra-gallery { grid-template-columns: repeat(2, 1fr); }
  .obra-gallery-item--big { aspect-ratio: 16/9; }
  .obra-gallery-item figcaption { opacity: 1; transform: none; }
}

/* ── DETAIL ── */
.obra-detail {
  background: var(--white);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.obra-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.obra-detail-text h2 {
  color: var(--navy);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0.5rem 0 1.25rem;
}
.obra-detail-text p {
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
.obra-detail-list {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid rgba(27,63,122,0.08);
}
.obra-detail-list h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.obra-detail-list ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.obra-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}
.obra-detail-list li svg { flex-shrink: 0; margin-top: 2px; }

@media (max-width: 768px) {
  .obra-hero { min-height: 60vh; }
  .obra-detail-grid { grid-template-columns: 1fr; }
}
