/* ============================================
   SOLARIO — Design System CSS
   Brand: #00296b · #003DA6 · #089EDF · #FFF
   ============================================ */

/* ---------- 1. VARIABLES ---------- */
:root {
  /* colors */
  --c-navy: #00296b;
  --c-blue: #003DA6;
  --c-celeste: #089EDF;
  --c-white: #ffffff;
  --c-offwhite: #F5F7FB;
  --c-iceblue: #d2e7fc;

  /* semantic colors */
  --ink: var(--c-navy);
  --muted: rgba(7, 7, 46, 0.62);
  --line: rgba(7, 7, 46, 0.08);
  --accent: var(--c-celeste);

  /* white-on-dark variants */
  --ink-inv: #fff;
  --muted-inv: rgba(255, 255, 255, 0.50);
  --line-inv: rgba(255, 255, 255, 0.10);

  /* typography */
  --font: "Manrope", system-ui, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: clamp(26px, 3.4vw, 42px);
  --fs-2xl: clamp(30px, 4vw, 48px);
  --fs-hero: clamp(32px, 5vw, 78px);
  --fs-title: calc(var(--fs-xl) * 1.02);  /* título de sección (15% menor que antes) */
  --fs-body: calc(var(--fs-base) * 0.85);  /* texto largo / párrafos (15% menor) */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;
  --lh-tight: 1.06;
  --lh-body: 1.65;
  --ls-tight: -.035em;
  --ls-wide: .2em;

  /* spacing */
  --sp-xs: 8px;
  --sp-sm: 14px;
  --sp-md: 24px;
  --sp-lg: 40px;
  --sp-xl: 60px;
  --sp-section: 110px;
  --sp-gutter: 4vw;
  /* centered content column of 1500px: gutters grow on wide screens, shrink on small */
  --sp-gutter-content: max(24px, calc((100vw - 1500px) / 2));

  /* radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* shadows */
  --shadow-sm: 0 4px 16px rgba(7, 7, 46, 0.05);
  --shadow-md: 0 8px 28px rgba(7, 7, 46, 0.06);
  --shadow-lg: 0 12px 36px rgba(7, 7, 46, 0.08);
  --shadow-accent: 0 6px 24px rgba(8, 158, 223, 0.3);

  /* transitions */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-smooth: cubic-bezier(.2, .7, .2, 1);
  --duration-fast: .25s;
  --duration-md: .4s;
  --duration-slow: .7s;
  --duration-reveal: 1.2s;
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100% }
body {
  background: var(--c-white);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none }
::selection { background: var(--accent); color: var(--c-white) }
address { font-style: normal }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0 }

/* ---------- 3. LAYOUT ---------- */
main, footer { overflow-x: clip }
.section { position: relative; z-index: 2 }
.section-white { background: var(--c-white) }
.section-offwhite { background: var(--c-offwhite) }

.container { max-width: none; margin: 0 auto; padding: var(--sp-section) var(--sp-gutter-content) }
.text-center { text-align: center }
.text-center h2 { margin-left: auto; margin-right: auto }

/* ---------- 4. TYPOGRAPHY ---------- */
.dot-accent { color: var(--accent); -webkit-text-fill-color: var(--accent) }
/* the accent dot must stay celeste even once the shimmer reveal "lights up" its character */
.dot-accent .paint-char, .dot-accent .paint-char.lit, .dot-accent .paint-char.glow { color: var(--accent) !important }
.sec-label {
  font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide); color: var(--muted);
  text-transform: uppercase; margin-bottom: 28px;
}
.section h2, .cta-divider h2 {
  font-family: var(--font); font-size: var(--fs-title); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight); line-height: var(--lh-tight);
  text-wrap: balance; color: var(--c-blue);
}
.sec-sub {
  margin-top: var(--sp-sm); color: var(--muted); max-width: 720px;
  font-weight: var(--fw-regular); font-size: var(--fs-body); line-height: 1.7;
}
.sec-sub.centered { margin-left: auto; margin-right: auto }

/* scroll-paint title — letter-by-letter */
.shimmer-title { font-family: var(--font) }
.shimmer-title .paint-char { display: inline; color: rgba(0,41,107,.08); transition: color .15s ease }
.shimmer-title .paint-char.lit { color: var(--c-blue) }
.shimmer-title .paint-char.glow { color: var(--accent) }

/* ---------- 5. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 15px; font-weight: var(--fw-semibold);
  border-radius: var(--r-pill); padding: 16px 36px; cursor: pointer;
  border: 1px solid transparent; letter-spacing: .01em;
  transition: transform var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast);
}
.btn:active { transform: scale(.97) }
.btn-primary { background: var(--accent); color: var(--c-white); font-weight: var(--fw-medium) }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-accent) }
.btn-ghost { border-color: rgba(255,255,255,.3); color: var(--c-white); background: rgba(0,0,0,.15) }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent) }
.hero-ctas .btn-primary { background: var(--c-white); color: var(--c-navy) }
.hero-ctas .btn-primary:hover { transform: translateY(-2px); color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 32px -6px rgba(8,158,223,.6) }
.btn-outline { border-color: var(--line); color: var(--c-blue); background: transparent }
.btn-outline:hover { border-color: var(--accent); color: var(--accent) }

/* ---------- 6. NAV ---------- */
nav.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 6vw 18px; background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--duration-fast), backdrop-filter var(--duration-fast), border-color var(--duration-fast), padding var(--duration-fast), opacity .25s ease;
}
.brand { display: inline-flex; align-items: center }
.brand-logo { height: 32px; width: auto }
.brand-logo-white { display: block }
.brand-logo-color { display: none }
nav.topbar.nav-light .brand-logo-white { display: none }
nav.topbar.nav-light .brand-logo-color { display: block }
.navlinks { flex: 1; display: flex; justify-content: flex-end; align-items: center; column-gap: 32px; transition: opacity .35s ease, transform .35s ease }
.navlinks-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 32px }
.navlinks-right { display: flex; align-items: center; gap: 16px }
.navlinks a { font-family: var(--font); font-size: 15px; font-weight: var(--fw-medium); color: rgba(255,255,255,.92); letter-spacing: .01em; white-space: nowrap; transition: color var(--duration-fast) }
.navlinks a:hover { color: var(--c-white) }
.navlinks .portal { color: var(--c-white); background: var(--accent); border: none; border-radius: var(--r-pill); padding: 12px 26px; font-size: 15px; font-weight: var(--fw-bold); transition: transform var(--duration-fast), background var(--duration-fast) }
.navlinks .portal:hover { transform: translateY(-2px); background: #06b8ff }
.navlinks .portal-btn { color: var(--c-white); background: transparent; border: 1.5px solid rgba(255,255,255,.55); border-radius: var(--r-pill); padding: 12px 26px; font-size: 15px; font-weight: var(--fw-bold); transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-fast) }
.navlinks .portal-btn:hover { border-color: var(--c-white); background: rgba(255,255,255,.1); transform: translateY(-2px) }

/* nav on dark sections (hero, navy) */
nav.topbar.scrolled { padding-top: 22px; padding-bottom: 12px }
nav.topbar.nav-dark {
  background: rgba(0,41,107,.28);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom-color: rgba(255,255,255,.08);
}

nav.topbar.nav-dark .navlinks a { color: rgba(255,255,255,.9) }
nav.topbar.nav-dark .navlinks a:hover { color: var(--c-white) }
nav.topbar.nav-dark .portal-btn { border-color: rgba(255,255,255,.85); color: var(--c-white) }
nav.topbar.nav-dark .nav-toggle span { background: var(--c-white) }
nav.topbar.nav-dark .portal { color: var(--c-white) }

/* nav on light sections */
nav.topbar.nav-light {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom-color: rgba(0,41,107,.07);
}

nav.topbar.nav-light .navlinks a { color: var(--c-navy) }
nav.topbar.nav-light .navlinks a:hover { color: var(--c-blue) }
nav.topbar.nav-light .navlinks-center a { color: var(--c-navy) }
nav.topbar.nav-light .navlinks-center a:hover { color: var(--c-blue) }
nav.topbar.nav-light .portal { color: var(--c-white) !important }
nav.topbar.nav-light .portal-btn { border-color: rgba(0,41,107,.15); color: var(--c-navy) }
nav.topbar.nav-light .portal-btn:hover { border-color: var(--c-navy); background: rgba(0,41,107,.05) }
nav.topbar.nav-light .nav-toggle span { background: var(--c-navy) }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 60 }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-white); border-radius: 2px; transition: transform var(--duration-fast), opacity var(--duration-fast) }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg) }
.nav-toggle.active span:nth-child(2) { opacity: 0 }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg) }

/* ---------- 7. HERO (static — normal scroll, no pinning) ---------- */
.hero-scroll { position: relative; height: auto; background: linear-gradient(180deg, #F5F7FB 0%, #F5F7FB 62%, #FBFCFE 82%, #fff 100%) }
.hero-sticky { position: static; height: 100svh; min-height: 660px; overflow: hidden; max-width: 100vw }
.hero { display: block }
.hero-media { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: hidden }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0 }
.hero-scrim { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(125% 85% at 50% 58%, rgba(0,26,66,.5) 0%, rgba(0,26,66,.22) 46%, transparent 78%),
    linear-gradient(180deg, rgba(0,26,66,.32) 0%, rgba(0,26,66,.06) 30%, rgba(0,26,66,.14) 58%, rgba(0,26,66,.62) 86%, var(--c-navy) 100%);
}
/* decorative rising-cluster/logo elements only made sense during the old pinned-scroll
   animation; the hero is now a normal static section, so they stay hidden */
.hero-textrise { display: none }
.hero-cluster { display: none }
.hero-content { position: absolute; z-index: 4; inset: 0; padding: 0 8vw; max-width: none; opacity: 1; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center }
.hero-content .btn { pointer-events: auto }
.hero .btn { font-size: 16px; padding: 14px 32px; font-family: var(--font) }
.hero-ctas { display: flex; justify-content: center; gap: var(--sp-sm); flex-wrap: wrap; margin-top: 20px }
.eyebrow { font-family: var(--font); font-size: clamp(10px, 1.2vw, 16px); font-weight: var(--fw-regular); letter-spacing: var(--ls-wide); color: var(--c-white); text-transform: uppercase; margin-bottom: 18px }
.hero h1 { font-family: var(--font); font-size: calc(var(--fs-hero) * .8); line-height: var(--lh-tight); letter-spacing: -.04em; font-weight: var(--fw-medium); color: var(--c-white); clip-path: inset(0 100% 0 0); animation: revealTitle .9s .6s cubic-bezier(.77,0,.175,1) forwards }
@keyframes revealTitle { to { clip-path: inset(0 0% 0 0) } }

/* ---------- 7b. TRANSITION — normal-flow section (no pinning) ---------- */
.energia-scroll { position: relative; z-index: 5 }
.energia-fill {
  min-height: 60vh; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(56px, 9vh, 100px) var(--sp-gutter-content);
  background: var(--c-offwhite);
}
.energia-inner { width: 100%; max-width: 1400px; margin: 0 auto }
/* baja 60px el contenido de Soluciones sin mover "Quiénes somos" (el cue compensa abajo) */
#soluciones { padding-top: 0 }
.energia-inner .abx-head { text-align: center }
.energia-inner > .sec-sub { text-align: center }
.energia-inner .abx-grid-2 { margin-top: clamp(28px, 3vw, 48px) }

/* scroll cue below Soluciones → invites scrolling down to About Us */
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(24px, 3vh, 48px); margin-bottom: clamp(24px, 4vh, 56px); text-decoration: none; color: var(--muted) }
.scroll-cue-line { width: 1.4px; height: 50px; background: var(--muted); opacity: .6 }
.scroll-cue-label { font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: var(--ls-wide); color: var(--muted); text-transform: uppercase }
.scroll-cue-arrow { color: var(--muted); animation: cueBob 1.8s ease-in-out infinite }
.scroll-cue:hover .scroll-cue-label, .scroll-cue:hover .scroll-cue-arrow { color: var(--ink) }
@keyframes cueBob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(4px) } }

/* ---------- 8. ABOUT US — reconocimientos (continues the off-white composition) ---------- */
.about-light { background: linear-gradient(180deg, var(--c-offwhite) 0%, var(--c-white) 18%, var(--c-white) 50%, var(--c-offwhite) 100%) }
#about .container { max-width: none; padding-top: 0; margin-top: 0; padding-bottom: 120px; padding-left: var(--sp-gutter-content); padding-right: var(--sp-gutter-content) }
#resultados { margin-top: 0 }
.about-wrap { display: flex; flex-direction: column; align-items: center; text-align: center }

/* ---------- 8a. ABOUT — layout de decisiones (stats / video / texto) ---------- */
.abx-head { align-self: center; text-align: center; margin-left: 0; max-width: none }
/* About Us: eyebrow + título centrados al inicio de toda la sección */
#about .abx-head { align-self: center; text-align: center; margin-bottom: calc(clamp(22px, 2.4vw, 34px) + 50px) }
#about .abx-title { white-space: normal }
#about .abx-grid-2 { align-items: start; margin-top: 0 }
.abx-head .sec-label { display: block; margin-bottom: 18px; font-size: var(--fs-sm) }
.abx-title { font-size: var(--fs-title) !important; color: var(--ink); line-height: 1.12 !important; font-weight: var(--fw-semibold) !important; letter-spacing: -.03em !important; max-width: none; white-space: nowrap }
.abx-grid { width: 100%; display: grid; grid-template-columns: 0.72fr 1.3fr 1.0fr; gap: clamp(28px, 3.4vw, 60px); align-items: center; margin-top: calc(clamp(36px, 4vw, 64px) + 55px); text-align: left }
/* 2-column layout: card (left) + text (right), vertically centered against each other.
   Tighter margin-top than the base .abx-grid so it feels integrated with the heading
   that rose in via the transition above, rather than a separate block further down. */
.abx-grid-2 { grid-template-columns: 369px minmax(0, 640px); justify-content: center; gap: clamp(48px, 5vw, 96px); width: 100%; margin-left: 0; margin-top: clamp(32px, 4vw, 56px); align-items: center }

/* left — cifras apiladas */
/* only the digits are bold; the + prefix and the M/MW suffix stay regular */
/* the leading + sign hangs into the padding so digits (and the label) share one left edge */

/* left — video card */
.abx-media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 4; box-shadow: 0 34px 70px -28px rgba(0,41,107,.45) }
.abx-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }

/* right — texto + viñetas + cta */
.abx-text { display: flex; flex-direction: column; align-items: flex-start; max-width: 640px }
.abx-p { margin: 0 0 16px; color: var(--muted); font-size: var(--fs-body); line-height: 1.7; max-width: none }
.abx-p-strong { color: var(--ink); font-weight: var(--fw-bold); margin-top: 0 }
.abx-list { list-style: none; margin: 8px 0 30px; padding: 0; display: flex; flex-direction: column; gap: 12px; width: 100% }
.abx-list li { position: relative; padding-left: 26px; color: var(--ink); font-size: var(--fs-body); line-height: 1.5; font-weight: var(--fw-regular) }
.abx-list li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 16px; height: 16px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.abx-logos-title { margin-top: 36px; margin-bottom: 0 }
.abx-lt-1 { display: block; font-family: var(--font); font-size: var(--fs-body); font-weight: var(--fw-bold); color: var(--ink); line-height: 1.25; letter-spacing: -.02em }
/* About Us: todo el texto del bloque en el mismo color que el eyebrow (--muted) */
#about .abx-p-strong, #about .abx-list li { color: var(--muted) }
.abx-logos { display: flex; flex-wrap: wrap; align-items: center; gap: calc(clamp(20px, 2.2vw, 36px) + 10px); margin-top: 44px; max-width: 100% }
.abx-logos img { height: 41px; width: auto; display: block }

/* certificaciones integradas a la composición */
.abx-certs { width: 100%; margin-top: calc(clamp(50px, 5.5vw, 88px) + 50px); padding-top: clamp(30px, 3.4vw, 52px); border-top: 1px solid var(--line) }
.abx-certs-label { display: block; font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: var(--ls-wide); color: var(--muted); text-transform: uppercase; margin-bottom: clamp(22px, 2.4vw, 34px) }
.abx-certs .about-certs { margin-top: 0; justify-content: center; gap: clamp(28px, 3vw, 48px) }
@media (max-width: 700px) { .abx-certs .about-certs { justify-content: center } }

@media (max-width: 1024px) {
  .abx-head { margin-left: 0; max-width: none; text-align: center }
  .abx-grid { grid-template-columns: 1fr; }
  .abx-grid-2 { grid-template-columns: 1fr; width: 100%; margin-left: 0; justify-items: center }
  .abx-media { grid-column: 1 / -1; order: -1; aspect-ratio: 16 / 9; width: 50%; max-height: none; margin: 0 auto }
  .abx-text { align-items: center; text-align: center; max-width: 640px; margin: 0 auto }
  .abx-list li { display: flex; justify-content: center; align-items: flex-start; padding-left: 0 }
  .abx-list li::before { position: static; margin-right: 10px; margin-top: .15em; flex: none }
}
@media (max-width: 700px) {
  .abx-grid { grid-template-columns: 1fr; gap: 32px }
  .abx-head, .abx-title { text-align: left }
  .abx-media { aspect-ratio: 4 / 3; width: 100%; margin: 0 }
  .abx-text { align-items: flex-start; text-align: left }
  .abx-list li { display: block; justify-content: normal; padding-left: 26px }
  .abx-list li::before { position: absolute; left: 0; top: .15em; margin: 0 }
}

/* ---------- 9. FLIP CARDS (Soluciones) ---------- */
/* fixed 400px cards: auto-fit wraps the row responsively without ever resizing or deforming a card */
.flip-cards { display: grid; grid-template-columns: repeat(auto-fit, 337px); justify-content: center; gap: 32px; margin: 56px auto 0; max-width: 100%; perspective: 1200px }
/* border-radius + overflow live on the card (not the faces) so iOS Safari doesn't
   break backface-visibility (which caused the mirrored bleed-through) */
.flip-card { position: relative; width: 337px; max-width: 100%; aspect-ratio: 3 / 4; cursor: pointer; border-radius: var(--r-md); overflow: hidden }
#soluciones .container { max-width: none; padding-left: var(--sp-gutter-content); padding-right: var(--sp-gutter-content) }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform var(--duration-slow) cubic-bezier(.4,0,.2,1); -webkit-transform-style: preserve-3d; transform-style: preserve-3d }
/* flip on hover (mouse devices) or when tapped (.flipped added by JS on touch) */
@media (hover: hover) { .flip-card:hover .flip-card-inner { transform: rotateY(180deg) } }
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg) }
.flip-front, .flip-back { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden }
.flip-glass { border: 1px solid var(--line) }
.flip-front { display: flex; flex-direction: column; background: var(--c-navy); position: relative }
.flip-img { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: .4; transition: transform .5s var(--ease-smooth) }
.flip-card:hover .flip-img { transform: scale(1.05) }
.flip-front-body { padding: 28px 24px; width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 2 }
.flip-front-body .idx { font-family: var(--font); font-size: var(--fs-sm); color: rgba(255,255,255,.6); letter-spacing: .18em; margin-bottom: 6px }
.flip-front-body h3 { font-family: var(--font); font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--c-white); letter-spacing: -.01em }
/* "Ver detalle" affordance on the front — invites the flip */
.flip-cta { position: absolute; left: 0; right: 0; bottom: 24px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 11px; font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: .04em; color: #fff; pointer-events: none }
.flip-cta-ico { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; transition: background var(--duration-fast), border-color var(--duration-fast) }
.flip-cta-ico svg { width: 15px; height: 15px; color: #fff }
/* desktop: grow a bit on hover as the card flips to reveal the detail */
@media (hover: hover) {
  .flip-card { transition: transform var(--duration-md) var(--ease-out) }
  .flip-card:hover { transform: scale(1.045); z-index: 3 }
  .flip-card:hover .flip-cta-ico { background: rgba(255,255,255,.18); border-color: #fff }
}
.flip-back { transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; padding: 30px 26px; border: none }
.flip-card:nth-child(1) .flip-back { background: var(--accent); color: var(--c-white) }
.flip-card:nth-child(2) .flip-back { background: #e8641c; color: var(--c-white) }
.flip-card:nth-child(3) .flip-back { background: #179c53; color: var(--c-white) }
.flip-icon { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 16px }
.flip-back .idx { display: none }
.flip-back h3 { font-family: var(--font); font-size: var(--fs-md); font-weight: var(--fw-bold); margin-bottom: 10px; letter-spacing: -.01em; color: var(--c-white) }
.flip-back p { font-size: var(--fs-body); color: rgba(255,255,255,.7); font-weight: var(--fw-regular); line-height: var(--lh-body) }
.flip-back .card-link { color: var(--c-white) }
.card-link { display: inline-block; margin-top: 18px; font-size: var(--fs-xs); color: var(--accent); font-weight: var(--fw-medium); transition: transform var(--duration-fast) }
.card-link:hover { transform: translateX(4px) }

/* ---------- 11. STATS ---------- */
.stat { text-align: center; display: flex; flex-direction: column; align-items: center }
.stat b { display: block; font-family: var(--font); font-size: var(--fs-2xl); font-weight: var(--fw-black); letter-spacing: -.03em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums }
.stat b i { font-style: normal; color: inherit }
.stat b i:first-child { color: var(--accent) }
.stat span { display: block; margin-top: 6px; font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-regular) }

/* ---------- 12. SCROLL-DRIVEN SERVICES ---------- */
/* ---------- BREAK / FRASE (torre en blanco y negro) ---------- */
.break-band {
  position: relative; width: 100%; overflow: hidden;
  min-height: clamp(220px, 42vh, 460px);
  display: flex; align-items: center; justify-content: center;
  background: #16181c;
}
/* imagen de la torre en blanco y negro (capa propia para no afectar el texto) */
.break-band::before {
  content: ""; position: absolute; top: -230px; left: 0; right: 0; bottom: -230px; z-index: 0;
  background: url("assets/break-torre.jpg") center / cover no-repeat;
  filter: grayscale(1) contrast(1.04);
  transform: translateY(var(--break-parallax, 0px)); will-change: transform;
}
/* filtro azul de marca sobre la imagen */
.break-band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,41,107,.86) 0%, rgba(0,26,66,.92) 100%);
}
.break-band-inner {
  position: relative; z-index: 2; width: 100%; text-align: center;
  padding: clamp(26px, 5vh, 56px) var(--sp-gutter-content);
}
.break-phrase {
  margin: 0; font-family: var(--font); font-size: clamp(10px, 2.9vw, 44px);
  font-weight: var(--fw-semibold); color: var(--c-white);
  line-height: 1.2; letter-spacing: var(--ls-tight); white-space: nowrap;
}
.break-phrase .dot-accent { color: var(--accent) }

.svc-scroll { position: relative; height: auto; background: linear-gradient(180deg, var(--c-offwhite) 0%, var(--c-offwhite) 55%, var(--c-white) 100%); margin-top: 0; padding: clamp(60px, 8vh, 110px) 0 }
.svc-scroll-sticky { position: static; height: auto; overflow: visible; display: flex; align-items: center; padding-top: 0 }
.svc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; position: relative; z-index: 3 }
.svc-tab {
  font-family: var(--font); font-size: 14px; font-weight: var(--fw-semibold);
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 11px 20px; cursor: pointer; white-space: nowrap;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}
.svc-tab:hover { color: var(--ink); border-color: rgba(0,41,107,.28) }
.svc-tab.active { color: var(--c-white); background: var(--c-blue); border-color: var(--c-blue) }
.svc-stage { width: 100%; max-width: none; height: auto; margin: 0 auto; padding: 0 var(--sp-gutter-content); position: relative; display: flex; flex-direction: column; justify-content: center }
.svc-header { text-align: center; margin-top: -40px; margin-bottom: clamp(72px, 9vh, 120px) }
.svc-header .sec-label { display: block; margin-bottom: 18px }
.svc-content { position: relative; display: grid; grid-template-columns: minmax(360px, 620px) minmax(0, 480px); gap: clamp(48px, 6vw, 96px); justify-content: center; align-items: center; z-index: 2; opacity: 1 }
.svc-text { position: relative; transform: none }
.svc-heading { font-family: var(--font); font-size: var(--fs-title); font-weight: var(--fw-semibold); color: var(--c-blue); line-height: 1.1; letter-spacing: var(--ls-tight); margin: 0 }
.svc-panels { position: relative; height: auto; min-height: 300px; margin-top: 24px }
.svc-name { margin-bottom: 18px }
.svc-panel { position: static; display: none; flex-direction: column; justify-content: flex-start; opacity: 1; pointer-events: none }
.svc-panel.active { display: flex; pointer-events: auto }
.svc-name { display: block; font-family: var(--font); font-size: calc(var(--fs-xl) * 0.72); font-weight: var(--fw-bold); line-height: 1.1; letter-spacing: var(--ls-tight) }
.svc-name-mem { color: var(--accent) }
.svc-name-bess { color: #179c53 }
.svc-name-pv { color: #e8641c }
.svc-name-int { color: var(--c-blue) }
.svc-panel.active { opacity: 1; pointer-events: auto }
.svc-panel-icon { display: block; height: 34px; width: auto }
.svc-panel-icon-wide { height: 24px }
.svc-panel h3 { font-family: var(--font); font-size: var(--fs-xl); font-weight: 200; color: var(--ink); line-height: 1.15; letter-spacing: var(--ls-tight) }
.svc-highlight { color: var(--accent); font-weight: 900 }
.svc-panel .svc-highlight .paint-char.lit, .svc-panel .svc-highlight .paint-char.glow { color: var(--accent) }
.svc-highlight-bess { color: #179c53 }
.svc-panel .svc-highlight-bess .paint-char.lit, .svc-panel .svc-highlight-bess .paint-char.glow { color: #179c53 }
.svc-highlight-pv { color: #e8641c }
.svc-panel .svc-highlight-pv .paint-char.lit, .svc-panel .svc-highlight-pv .paint-char.glow { color: #e8641c }
.svc-panel p { margin-top: var(--sp-sm); color: var(--muted); font-size: var(--fs-body); font-weight: var(--fw-regular); max-width: none; line-height: 1.7 }
.svc-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-md) }
.svc-tag {
  font-family: var(--font); font-size: var(--fs-xs); font-weight: var(--fw-medium);
  letter-spacing: .01em; padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(0,41,107,.05); white-space: nowrap;
}
.svc-tag-mem { color: var(--c-blue); background: rgba(8,158,223,.1) }
.svc-tag-bess { color: #179c53; background: rgba(23,156,83,.1) }
.svc-tag-pv { color: #e8641c; background: rgba(232,100,28,.1) }
.svc-tag-int { color: var(--c-blue); background: rgba(0,61,166,.08) }
.svc-cta { display: inline; margin-top: var(--sp-md); font-family: var(--font); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c-blue); text-transform: uppercase; letter-spacing: .1em; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--c-blue); transition: color var(--duration-fast), text-decoration-color var(--duration-fast) }
.svc-cta:hover { color: var(--accent); text-decoration-color: var(--accent) }
.svc-cta::after { content: '→'; font-size: 12px; transition: transform var(--duration-fast) }
.svc-cta:hover::after { transform: translateX(4px) }
.svc-visual { position: relative; width: 100%; max-width: 620px; justify-self: start; order: -1; transform: none }
.svc-img-wrap { position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; max-height: 76vh; box-shadow: var(--shadow-lg) }
.svc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: transform, opacity; background: var(--c-navy) }
.svc-img.active { opacity: 1 }

/* ---------- 12b. RESULTADOS (image + full-width glass + navy figures) ---------- */
.results-hero {
  position: relative; width: 100%; min-height: calc(100vh - 500px); overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--c-navy);
}
/* image on its own layer so it can be moved for the parallax effect */
.results-hero::before {
  content: ""; position: absolute; top: -230px; left: 0; right: 0; bottom: -230px; z-index: 0;
  background:
    linear-gradient(rgba(4,18,46,.58), rgba(4,18,46,.58)),
    url("assets/card-subestacion.jpg") center / cover no-repeat;
  transform: translateY(var(--results-parallax, 0px)); will-change: transform;
}
/* keep the glass + navy bands above the parallax image layer */
.results-glass-band, .results-figures-band { position: relative; z-index: 1 }
/* top image area — slim strip above the glass + navy bands */
.results-hero-spacer { flex: 1 1 auto; min-height: clamp(140px, 20vh, 240px) }

/* full-width glass band (middle) */
.results-glass-band {
  padding: clamp(40px, 6vh, 84px) var(--sp-gutter-content);
  background: rgba(255,255,255,.10);
  border-top: 1px solid rgba(255,255,255,.22);
  border-bottom: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
}
.results-glass-inner { max-width: 1500px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap }
.results-cta { flex: none; white-space: nowrap }
/* mismo estilo que el botón blanco del hero */
.results-cta.btn-primary { background: var(--c-white); color: var(--c-navy) }
.results-cta.btn-primary:hover { transform: translateY(-3px); color: var(--c-navy); box-shadow: 0 14px 32px -12px rgba(0,0,0,.4) }
.results-eyebrow {
  display: block; font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--c-white); opacity: .85; margin-bottom: 14px;
}
.results-title {
  font-family: var(--font); font-size: var(--fs-title); font-weight: var(--fw-semibold);
  color: var(--c-white); line-height: 1.14; letter-spacing: var(--ls-tight); max-width: 24ch;
}
.results-title .dot-accent { color: var(--accent) }

/* full-width navy band (bottom) — flat azul marino, white numbers */
.results-figures-band {
  background: var(--c-navy);
  padding: clamp(36px, 5vh, 66px) var(--sp-gutter-content);
}
.results-figures {
  max-width: 1500px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 56px);
}
.results-figure { display: flex; flex-direction: column; align-items: flex-start }
#resultados .results-figure .stat { align-items: flex-start; text-align: left }
#resultados .results-figure .stat b {
  font-size: var(--fs-2xl); color: var(--c-white); font-weight: var(--fw-black);
  line-height: 1; letter-spacing: -.03em; white-space: nowrap;
}
#resultados .results-figure .stat b i { font-style: normal; color: inherit }
#resultados .results-figure .stat b i:first-child { color: var(--accent) }
.results-figure-label {
  width: 100%; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.20);
  font-family: var(--font); font-size: var(--fs-sm); color: var(--muted-inv); font-weight: var(--fw-regular);
}

@media (max-width: 900px) {
  .results-hero-spacer { min-height: 34vh }
  .results-figures { grid-template-columns: repeat(2, 1fr); gap: 28px }
}
@media (max-width: 700px) {
  /* title + CTA stack cleanly instead of relying on flex-wrap */
  .results-glass-inner { flex-direction: column; align-items: flex-start; gap: 22px }
}
@media (max-width: 560px) {
  .results-figures { grid-template-columns: 1fr; gap: 22px }
  .results-figure-label { margin-top: 12px; padding-top: 12px }
}

/* ---------- 15. CASES ---------- */
#casos .text-center { margin-bottom: 50px }
.cases-carousel { overflow: visible }
.cases-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 10px }
.cases-track::-webkit-scrollbar { display: none }
.case-card { flex-shrink: 0; width: 420px; height: 520px; border-radius: var(--r-lg); scroll-snap-align: start; position: relative; overflow: hidden; background: var(--c-navy) }
.case-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out) }
.case-card:hover .case-img { transform: scale(1.05) }
.case-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,26,66,.05) 0%, rgba(0,26,66,.45) 48%, rgba(0,26,66,.92) 100%) }
.case-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 26px; z-index: 2; display: flex; flex-direction: column }
.case-date { font-family: var(--font); font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: .04em; color: var(--accent); margin-bottom: 10px }
.case-info h3 { font-family: var(--font); font-size: var(--fs-md); font-weight: var(--fw-bold); line-height: 1.2; letter-spacing: -.02em; color: var(--c-white) }
.case-info p { margin-top: 10px; color: rgba(255,255,255,.82); font-size: var(--fs-body); font-weight: var(--fw-regular); line-height: 1.55 }
.cases-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 32px }
.cases-counter { display: flex; align-items: center; gap: 12px; font-family: var(--font); font-size: var(--fs-sm); font-weight: 600; color: var(--muted) }
#cases-current { color: var(--ink); font-size: var(--fs-sm) }
.cases-bar { width: 120px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden }
.cases-bar-fill { height: 100%; background: var(--ink); transition: width var(--duration-fast); border-radius: 2px }
.cases-arrows { display: flex; gap: 10px }
.cases-arrow { width: var(--sp-lg); height: var(--sp-lg); border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 14.4px; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color var(--duration-fast), color var(--duration-fast) }
.cases-arrow:hover { border-color: var(--ink); color: var(--ink) }

/* ---------- 17. CONTACT FORM ---------- */
.contact-header { margin-bottom: 50px }
.contact-form-wrap { max-width: 800px; margin: 0 auto }
.contact-form { text-align: left }
/* split contact: floating white card (lighter than the off-white section), image left, form right */
.contact-split { display: grid; grid-template-columns: 0.92fr 1.28fr; gap: 0; align-items: stretch; max-width: 1220px; margin: 0 auto; background: var(--c-white); border-radius: var(--r-lg); overflow: hidden }
.contact-media { position: relative; overflow: hidden; min-height: 480px }
.contact-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.contact-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 4vw, 68px) }
.contact-panel .contact-header { margin-bottom: 32px; text-align: left }
.contact-panel .contact-header h2 { white-space: nowrap }
.contact-panel .sec-sub { margin-left: 0; margin-right: 0 }
.contact-panel .contact-form-wrap { max-width: none; margin: 0 }
@media (max-width: 860px) {
  .contact-split { grid-template-columns: 1fr; max-width: 560px }
  .contact-media { min-height: 220px }
  .contact-panel { padding: clamp(28px, 6vw, 40px) }
  .contact-panel .contact-header { margin-bottom: 24px }
  .contact-panel .contact-header h2 { white-space: normal }
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md) }
.form-field { margin-bottom: var(--sp-md) }
.form-field input, .form-field textarea { width: 100%; padding: var(--sp-sm) 0; background: transparent; border: none; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); font-weight: var(--fw-regular); transition: border-color var(--duration-fast); outline: none; border-radius: 0 }
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(0,41,107,.3) }
.form-field input:focus, .form-field textarea:focus { border-bottom-color: var(--accent) }
.form-field input:invalid:not(:placeholder-shown), .form-field textarea:invalid:not(:placeholder-shown) { border-bottom-color: #e53e3e }
.form-field input:valid:not(:placeholder-shown) { border-bottom-color: var(--accent) }
/* flagged red after the user leaves an invalid/empty required field */
.form-field input.field-invalid, .form-field textarea.field-invalid, .pf-select.field-invalid { border-bottom-color: #e53e3e }
.form-field textarea { resize: vertical; min-height: 80px; border: none; border-bottom: 1px solid var(--line) }
.file-upload { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-regular); cursor: pointer; border-bottom: 1px solid var(--line); transition: color var(--duration-fast) }
.file-upload:hover { color: var(--accent) }
.file-upload svg { flex-shrink: 0 }
.btn-submit { margin-top: var(--sp-xs); width: auto; min-width: 220px; justify-content: center; font-size: 15px; padding: 16px 36px }

/* hero card icons */

/* form microcopy */
.form-micro { margin-top: 14px; font-size: var(--fs-sm); color: var(--muted); text-align: center; font-weight: var(--fw-regular) }
/* ---------- 18. WHATSAPP ---------- */
.whatsapp-float { position: fixed; bottom: 28px; right: 28px; z-index: 100; width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #6BCB77; box-shadow: 0 6px 24px rgba(107,203,119,.4); transition: transform var(--duration-fast), box-shadow var(--duration-fast) }
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,.45) }
.whatsapp-float svg { width: 30px; height: 30px }

/* ---------- 19. FOOTER ---------- */
.footer-line-wrap { overflow: hidden; height: 2px; position: relative }
.footer-line { position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: footerLineMove 4s cubic-bezier(.4,0,.2,1) infinite }
@keyframes footerLineMove { 0% { left: -40% } 100% { left: 100% } }
footer { position: relative; z-index: 2; background: var(--c-navy); color: rgba(255,255,255,.65) }
footer .container { padding-top: 100px; padding-bottom: 140px }
.foot-inner { border-top: 1px solid var(--line-inv) }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px }
.foot-col h4 { font-family: var(--font); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .18em; color: var(--accent); margin-bottom: 12px; font-weight: 600 }
.foot-col p, .foot-col address { font-size: var(--fs-sm); color: rgba(255,255,255,.45); line-height: 1.8; font-weight: 300 }
.foot-col a { display: block; font-size: var(--fs-sm); color: rgba(255,255,255,.45); margin-bottom: 7px; transition: color var(--duration-fast); font-weight: 300 }
.foot-col a:hover { color: var(--c-white) }
.foot-col nav { display: flex; flex-direction: column }
.foot-company { font-size: var(--fs-sm); color: rgba(255,255,255,.35); margin-top: var(--sp-xs); font-weight: 300 }
footer .brand-logo { height: 24px }

.copyright { margin-top: 50px; font-size: var(--fs-xs); color: rgba(255,255,255,.2); letter-spacing: .04em; font-weight: 300 }

/* ---------- 20. ANIMATIONS ---------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out) }
.rv.in { opacity: 1; transform: none }

/* Staggered group reveal: the container gets .in from the reveal observer, then its
   direct children fade up in sequence. Add classes "rv rv-group" to the wrapper. */
.rv-group { opacity: 1 !important; transform: none !important }
.rv-group > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out) }
.rv-group.in > * { opacity: 1; transform: none }
.rv-group.in > *:nth-child(1) { transition-delay: .03s }
.rv-group.in > *:nth-child(2) { transition-delay: .11s }
.rv-group.in > *:nth-child(3) { transition-delay: .19s }
.rv-group.in > *:nth-child(4) { transition-delay: .27s }
.rv-group.in > *:nth-child(5) { transition-delay: .35s }
.rv-group.in > *:nth-child(6) { transition-delay: .43s }
.rv-group.in > *:nth-child(7) { transition-delay: .51s }
.rv-group.in > *:nth-child(8) { transition-delay: .59s }

/* ---------- 21. RESPONSIVE ---------- */

/* Collapse the desktop nav into the hamburger menu early enough that the
   absolutely-centered links never overlap the right-hand buttons. */
@media (max-width: 1300px) {
  .nav-toggle { display: flex }
  .navlinks { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; background: rgba(0,41,107,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) }
  .navlinks.open { opacity: 1; pointer-events: auto }
  .navlinks a { font-size: 18px; color: var(--c-white) !important }
  .navlinks-center a { color: var(--c-white) !important }
  .navlinks-center, .navlinks-right { position: static; transform: none; flex-direction: column; gap: 28px }
  /* drop the wide-screen gap so the text column and the card don't overlap */
  .svc-content { gap: clamp(24px, 3.5vw, 56px); grid-template-columns: minmax(300px, 1fr) minmax(0, 420px) }
  .svc-text { transform: none }
  .svc-visual { transform: none; width: 100%; max-width: 420px }
  /* About: drop the wide-screen 250px right-shift + oversized gap so the text column doesn't collapse */
  .abx-grid-2 { margin-left: 0; width: 100%; gap: clamp(32px, 3.5vw, 64px) }
}

/* Tablet */
@media (max-width: 1024px) {
  :root { --sp-gutter-content: calc(4vw + 10px) }
  .hero-content { padding: 0 8vw }
  /* nav overlay handled by the ≤1300 block; only the link size steps down here */
  .navlinks a { font-size: 16px; color: var(--c-white) !important }
  .hero h1 { font-size: clamp(34px, 6vw, 58px) }
}

/* Tablet range (e.g. 1024px): more breathing room above the eyebrow (visual card size now inherited from the base rule, already 30% smaller) */
@media (min-width: 901px) and (max-width: 1024px) {
  .svc-panel { justify-content: flex-start; padding-top: 60px }  /* ~50px between dots and eyebrow */
  /* Soluciones cards match the Casos de éxito cards (320 × 400) */
  .flip-cards { grid-template-columns: repeat(auto-fit, 320px) }
  .flip-card { width: 320px; aspect-ratio: 4 / 5 }
}

/* Small tablet / large mobile */
@media (max-width: 900px) {
#ultimate .container { padding-top: 40px }
  .svc-stage { padding: 0 var(--sp-gutter-content) }
  .svc-content { grid-template-columns: 1fr; gap: 32px }
  .svc-panel { justify-content: flex-start; padding-top: 36px }
  .svc-visual { width: 480px; max-width: 100%; justify-self: center; transform: none }
  .svc-tabs { justify-content: center }
  .svc-img-wrap { max-height: 48vh }
}

/* Mobile nav + layout */
@media (max-width: 800px) {
  /* nav overlay + link sizing already handled by the ≤1300 / ≤1024 blocks */
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px }
  .hero .btn { font-size: 15px; padding: 14px 28px }
  .case-card { width: 340px; height: 440px }
  .svc-section-header { margin-bottom: 40px }
  .hero-content { text-align: left; display: flex; flex-direction: column; align-items: flex-start }
  .hero-ctas { justify-content: flex-start }
  .eyebrow { text-align: left }
  .popup-card { padding: 32px 24px; width: 95% }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --sp-section: 70px; --sp-gutter-content: 20px }
  .hero { min-height: 100svh }
  .hero h1 { font-size: clamp(28.8px, 10vw, 43.2px) }
  .eyebrow { font-size: 9.4px }
  .hero-content { padding: 0 20px }
  .hero .btn { font-size: 15px; padding: 14px 26px }
  .section h2, .cta-divider h2 { font-size: clamp(22.4px, 7.6vw, 29.6px) }
  .sec-sub { font-size: 12px; max-width: 100%; overflow: visible; -webkit-line-clamp: unset }
  .stat b { font-size: clamp(19.2px, 8vw, 28.8px) }
  .form-row { grid-template-columns: 1fr }
#ultimate .container { padding-top: 40px }
  .svc-panel h3 { font-size: clamp(24px, 8vw, 31.2px) }
  .svc-panel p { max-width: 100%; font-size: 12px }
  .svc-visual { width: 100%; max-width: 420px }
  .svc-img-wrap { max-height: 42vh; border-radius: var(--r-md) }
  .case-card { width: 300px; height: 400px }
  .contact-form-wrap { max-width: 100% }
  .whatsapp-float { width: 52px; height: 52px; bottom: 20px; right: 20px }
  .whatsapp-float svg { width: 26px; height: 26px }
  nav.topbar { padding: 24px 20px 14px }
  #about .container { padding-top: 80px; padding-bottom: 80px }
  .sec-label { font-size: 9.8px; margin-bottom: 20px }
  .popup-card { padding: 28px 20px }
  .container { text-align: center }
  .sec-sub { margin-left: auto; margin-right: auto }
  .svc-panel { align-items: center; text-align: center }
  .svc-panel p { text-align: center }
  .svc-tabs { justify-content: center }
  .svc-cta { display: none }
  .contact-form { text-align: center }
  .form-field { text-align: left }
  .btn-submit { margin-left: auto; margin-right: auto }
  .foot-cols { text-align: center }
  .foot-col { display: flex; flex-direction: column; align-items: center }
  .foot-col nav { align-items: center }
  .copyright { text-align: center }
  .cases-controls { justify-content: center }
}

/* Small mobile */
@media (max-width: 400px) {
  .hero h1 { font-size: 21.6px }
  .foot-cols { grid-template-columns: 1fr }
  .case-card { width: 280px; height: 380px }
  .hero-content { padding: 0 16px }
}

/* ---------- 22. PRINT ---------- */
@media print {
  nav.topbar, .hero-video, .hero-scrim, .whatsapp-float, .footer-line-wrap, .svc-progress, .svc-dots, .cases-arrows, .carousel-dots { display: none !important }
  .hero { height: auto; min-height: auto; page-break-after: always }
  .hero-content { position: static; opacity: 1; transform: none; padding: 20px }
  .hero h1 { clip-path: none; color: #000 }
  .section, .svc-scroll { height: auto }
  .svc-scroll-sticky { position: static; height: auto }
  .rv { opacity: 1; transform: none }
  .shimmer-title .paint-char { color: inherit !important }
  body { font-size: 12pt; color: #000; background: #fff }
  .flip-card { height: auto }
  .flip-card-inner { transform: none !important }
  .flip-back { display: none }
}

/* ---------- 4K / Ultra-wide ---------- */
@media (min-width: 2560px) {
  /* content column already stays centered via --sp-gutter-content; nothing to cap here */
}

/* ---------- 23. ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none }
  .rv-group > * { opacity: 1 !important; transform: none !important; transition: none }
  .shimmer-title .paint-char { transition: none }
  .hero-content { opacity: 1; transform: none; transition: none }
  .hero h1 { clip-path: none; animation: none }
  html { scroll-behavior: auto }
}

/* vals carousel - animated cards */
@media (max-width: 600px) { .val-card { width: 280px } }

/* popup form */
.popup-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,41,107,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 24px); overflow-y: auto; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-smooth) }
.popup-overlay.active { opacity: 1; pointer-events: auto }
.popup-card { background: var(--c-white); border-radius: var(--r-md); padding: 48px 40px; max-width: 480px; width: 90%; position: relative; transform: translateY(20px); transition: transform .4s var(--ease-out) }
.popup-overlay.active .popup-card { transform: none }
.popup-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; transition: color var(--duration-fast) }
.popup-close:hover { color: var(--ink) }
.popup-card h3 { font-family: var(--font); font-size: var(--fs-md); font-weight: var(--fw-black); color: var(--ink); margin-bottom: 8px }
.popup-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 28px }
.popup-card .form-field { margin-bottom: 14px }
.popup-card .btn-submit { width: 100%; margin-top: 8px }

/* popup trigger styling — inline text links only (buttons/nav keep their own styles) */
.popup-trigger:not(.btn):not(.portal) { color: var(--accent) !important; font-weight: var(--fw-bold) !important; text-decoration: underline; text-underline-offset: 4px; cursor: pointer }
.popup-trigger:not(.btn):not(.portal):hover { color: var(--c-white) !important }
.popup-trigger { cursor: pointer }

/* diagnostic modal popup */
.popup-card-modal { max-width: 660px; width: 94%; text-align: left; padding: 64px 64px 44px; max-height: 92vh; overflow-y: auto; box-shadow: 0 40px 100px -30px rgba(0,41,107,.5) }
.popup-logo { height: 26px; width: auto; display: block; margin-bottom: 12px }
.popup-card-modal .popup-sub { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin-bottom: 32px; max-width: 42ch }
.popup-formfields .form-field input, .popup-formfields .form-field textarea, .popup-formfields .pf-select { font-size: var(--fs-sm) }
.popup-formfields .form-field input::placeholder, .popup-formfields .form-field textarea::placeholder { font-size: var(--fs-sm) }
.popup-formfields .form-field textarea { min-height: 64px }
.popup-formfields .file-upload { font-size: var(--fs-sm) }
.popup-formfields .pf-label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); margin-bottom: 6px; letter-spacing: .01em }
.popup-card-modal .form-row { gap: 32px }
.popup-card-modal .form-field { margin-bottom: 24px }
/* popup accents → logo blue */
.popup-formfields .form-field input:focus,
.popup-formfields .form-field textarea:focus,
.popup-formfields .pf-select:focus { border-bottom-color: var(--c-blue) }
.popup-formfields .form-field input:valid:not(:placeholder-shown) { border-bottom-color: var(--c-blue) }
.popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px }
.popup-social { display: flex; align-items: center; gap: 12px }
.popup-social a { color: var(--c-blue); display: inline-flex; transition: color var(--duration-fast), transform var(--duration-fast) }
.popup-social a svg { width: 22px; height: 22px }
.popup-social a:hover { color: var(--c-navy); transform: translateY(-2px) }
/* submit: gray until the form is valid, then logo blue */
.popup-card-modal .btn-submit { min-width: 150px; width: auto; margin-top: 0; background: #c7ccd6; color: #fff; box-shadow: none; cursor: not-allowed; transition: background var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast) }
.popup-card-modal .btn-submit:hover { transform: none; box-shadow: none }
.popup-formfields.is-valid .btn-submit { background: var(--c-blue); cursor: pointer }
.popup-formfields.is-valid .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -8px rgba(0,61,166,.55) }
.pf-select {
  width: 100%; padding: var(--sp-sm) 0; background: transparent;
  border: none; border-bottom: 1px solid var(--line); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-base); font-weight: var(--fw-regular);
  outline: none; cursor: pointer; border-radius: 0;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003DA6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; background-size: 15px;
}
.pf-select:focus { border-bottom-color: var(--accent) }
.pf-select:required:invalid { color: rgba(0,41,107,.3) }
.pf-select option { color: var(--ink) }
.pf-radio-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px }
.pf-radio-field .pf-label { width: 100%; margin-bottom: 4px }
.pf-radio { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-base); color: var(--ink); cursor: pointer }
.pf-radio input { accent-color: var(--accent); width: 15px; height: 15px }
/* popup — tablet: keep 2 columns but tighten padding/gaps */
@media (max-width: 820px) {
  .popup-card-modal { padding: 48px 40px 40px }
  .popup-card-modal .form-row { gap: 24px }
  .popup-card-modal .form-field { margin-bottom: 20px }
}
/* popup — phone: single column, stacked footer, full-width button */
@media (max-width: 600px) {
  .popup-card-modal { padding: 34px 22px 26px }
  .popup-card-modal .form-row { grid-template-columns: 1fr; gap: 0 }
  .popup-card-modal .popup-sub { margin-bottom: 24px }
  .popup-footer { flex-direction: column-reverse; align-items: stretch; gap: 16px }
  .popup-card-modal .btn-submit { width: 100% }
  .popup-social { justify-content: center; gap: 18px }
  .popup-social a svg { width: 24px; height: 24px }
}
/* popup — very small phones */
@media (max-width: 380px) {
  .popup-card-modal { padding: 28px 18px 22px }
}

/* sec-sub single line for specific sections (desktop only — wrap below tablet so it never clips) */
#eaas .sec-sub, #soluciones .sec-sub { white-space: nowrap; max-width: none }
@media (max-width: 1024px) {
  #eaas .sec-sub, #soluciones .sec-sub { white-space: normal }
}
/* long titles must wrap (not clip) on small phones; the intended <br> breaks stay.
   Also scale like every other section title on mobile (they drop the desktop !important size). */
@media (max-width: 600px) {
  .abx-title { white-space: normal; font-size: clamp(22.4px, 7.6vw, 29.6px) !important }
}

/* flip card logos */
.flip-logo { height: 48px; width: auto; filter: brightness(0) invert(1); opacity: .9 }

/* about certifications */
.about-certs { display: flex; gap: 48px; align-items: center; justify-content: center; margin-top: 72px; flex-wrap: wrap }
.cert-logo { height: 85px; width: auto; filter: brightness(0); opacity: 1; transition: opacity var(--duration-fast) }
.cert-logo-wide { height: 36px }
.cert-item:hover .cert-logo { opacity: 1 }
.cert-pill { text-align: center; opacity: 1; transition: opacity var(--duration-fast) }
.cert-item:hover .cert-pill { opacity: 1 }
.cert-pill span { display: block; font-family: var(--font); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); letter-spacing: .03em; line-height: 1.2 }
.cert-pill small { display: block; margin-top: 3px; font-family: var(--font); font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-regular) }
@media (max-width: 600px) { .about-certs { gap: 24px; margin-top: 48px } .cert-logo { height: 65px } }

/* cert logos in color (no invert filter) */
.cert-logo-color { filter: none; opacity: 1 }
.cert-item:hover .cert-logo-color { opacity: 1 }

.cert-logo-natural { filter: none; opacity: 1 }
.cert-item:hover .cert-logo-natural { opacity: 1 }
