/* =========================================================================
   AMERICAN ADVISOR — stylesheet
   Estructura: 1) Reset  2) Tokens  3) Utilidades  4) Preloader
   5) Header/Nav  6) Hero  7) Institucional  8) Servicios
   9) Novedades  10) CTA  11) Contacto  12) Footer  13) Responsive
   ========================================================================= */

/* ---------- 1) Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }

/* ---------- 2) Tokens ---------- */
:root {
  /* marca — extraído del isologo */
  --blue-900: #06213d;
  --blue-800: #0a3d66;
  --blue-700: #0e5c96;
  --blue-600: #1179c4;
  --blue-500: #1e93de;
  --blue-400: #4db4ef;
  --blue-300: #7cc4f2;
  --blue-100: #e7f4fc;

  --ink: #1b2430;
  --ink-soft: #4c5866;
  --gray-100: #f5f7fa;
  --gray-200: #e9edf2;
  --white: #ffffff;

  --gradient-brand: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 55%, var(--blue-400) 100%);
  --gradient-dark: linear-gradient(180deg, rgba(6,33,61,.15) 0%, rgba(6,33,61,.85) 100%);

  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --container: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-md: 0 10px 30px -12px rgba(6, 33, 61, .25);
  --shadow-lg: 0 25px 60px -20px rgba(6, 33, 61, .35);

  --header-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* tokens de tema (claro por defecto) — cambian con [data-theme] */
  --page-bg: var(--white);
  --surface: var(--white);
  --surface-2: var(--gray-100);
  --border: var(--gray-200);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --heading: var(--blue-900);
  color-scheme: light;
}

/* ---------- 2.1) Modo oscuro ----------
   Se activa poniendo data-theme="dark" en <html> (ver script inline en el
   <head> y los botones #themeDarkBtn/#themeLightBtn en assets/js/main.js). Las secciones ya
   oscuras de marca (hero, servicios, cta, footer, preloader) no cambian:
   sólo se re-tematiza el "chrome" claro (fondo, cards, textos, header). */
[data-theme="dark"] {
  --page-bg: #081a2e;
  --surface: #102f4d;
  --surface-2: #0a2439;
  --border: rgba(255, 255, 255, .12);
  --text: #e7edf3;
  --text-soft: #a7b7c6;
  --heading: #f4f8fb;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* red de seguridad ante cualquier desborde puntual */
  transition: background .35s var(--ease), color .35s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); font-weight: 600; line-height: 1.15; }

body.is-locked { overflow: hidden; }

/* ---------- 3) Utilidades ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: .9rem;
}

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-head p { color: var(--text-soft); margin-top: 1rem; font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--tint { background: var(--surface-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--gradient-brand); color: var(--white); box-shadow: var(--shadow-md); }
.btn--primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.btn--ghost { background: rgba(255,255,255,.1); color: var(--white); border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.18); border-color: #fff; transform: translateY(-2px); }

.btn--light { background: var(--white); color: var(--blue-700); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn--outline { background: transparent; color: var(--blue-700); border: 1.5px solid var(--blue-500); }
.btn--outline:hover { background: var(--blue-100); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger.in-view > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- 4) Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  background: var(--blue-900);
  background-image: radial-gradient(circle at 30% 20%, rgba(30,147,222,.35), transparent 55%),
                     radial-gradient(circle at 80% 80%, rgba(77,180,239,.25), transparent 50%);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader__logo { width: min(220px, 55vw); animation: pl-pulse 1.8s ease-in-out infinite; filter: brightness(0) invert(1); }
.preloader__bar { width: min(220px, 55vw); height: 3px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue-400), var(--white)); border-radius: inherit; transition: width .25s ease-out; }
.preloader__label { font-family: var(--font-head); color: rgba(255,255,255,.75); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }

@keyframes pl-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: .8; }
}

/* ---------- 5) Header / Nav ---------- */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 900;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
}
.header::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--surface);
  opacity: 0;
  transition: opacity .35s var(--ease), background .35s var(--ease);
}
.header.is-scrolled { height: 68px; box-shadow: var(--shadow-md); }
.header.is-scrolled::before { opacity: 1; }

.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; position: relative; z-index: 1; padding-inline: clamp(1rem, 3vw, 2.75rem); }

.brand { display: flex; align-items: center; gap: .65rem; position: relative; z-index: 1; }
.brand img { height: 40px; width: auto; transition: filter .35s var(--ease); }
.header:not(.is-scrolled) .brand img { filter: brightness(0) invert(1); }
[data-theme="dark"] .header.is-scrolled .brand img { filter: brightness(0) invert(1); }

.nav { display: flex; align-items: center; gap: 2.1rem; }
.nav__link {
  font-weight: 600; font-size: .92rem;
  color: var(--white);
  position: relative;
  padding: .3rem 0;
  transition: color .3s var(--ease);
}
.header.is-scrolled .nav__link { color: var(--text); }
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
  background: var(--blue-500); transition: width .3s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.header:not(.is-scrolled) .nav__link:hover { color: var(--blue-100); }

.nav__dropdown { position: relative; }
.nav__dropdown-toggle { display: flex; align-items: center; gap: .35rem; }
.nav__dropdown-toggle svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.nav__dropdown:hover .nav__dropdown-toggle svg { transform: rotate(180deg); }

.nav__panel {
  position: absolute; top: calc(100% + 1.1rem); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 300px; background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .6rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s, background .35s var(--ease);
}
.nav__dropdown:hover .nav__panel,
.nav__dropdown:focus-within .nav__panel {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav__panel a {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem; border-radius: 8px; color: var(--text); font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.nav__panel a:hover { background: var(--blue-100); color: var(--blue-700); }
[data-theme="dark"] .nav__panel a:hover { background: rgba(30,147,222,.2); color: var(--blue-300); }
.nav__panel a svg { width: 17px; height: 17px; color: var(--blue-500); flex-shrink: 0; }
.nav__panel-group { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa7b4; padding: .6rem .8rem .2rem; }
.nav__panel-divider { height: 1px; background: var(--border); margin: .35rem .2rem; }

.header:not(.is-scrolled) .btn--outline-inv { border-color: rgba(255,255,255,.6); color: var(--white); }

/* Cluster derecho fijo: tema + idioma + hamburguesa (siempre visible) */
.header__end { display: flex; align-items: center; gap: .7rem; position: relative; z-index: 1; }

/* Selector de tema: dos círculos opacos (luna / sol) — el modo activo se
   pinta en dorado, el otro queda en blanco. Mismo look en cualquier estado
   del header, ya que los círculos no dependen del fondo de atrás. */
.theme-toggle { display: flex; align-items: center; gap: .5rem; }
.theme-toggle__btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--white); color: var(--ink);
  box-shadow: 0 1px 2px rgba(6,33,61,.18), 0 4px 10px -4px rgba(6,33,61,.25);
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.theme-toggle__btn svg { width: 18px; height: 18px; }
.theme-toggle__btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -4px rgba(6,33,61,.35); }
.theme-toggle__btn:active { transform: scale(.94); }
.theme-toggle__btn.is-active { background: #f5a623; color: #241a06; }

/* Selector de idioma: pill azul con la etiqueta del idioma activo + panel
   con las 5 opciones disponibles. */
.lang-select { position: relative; }
.lang-select__toggle {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem 1.05rem; border-radius: 999px;
  background: var(--gradient-brand); color: var(--white);
  font-weight: 600; font-size: .88rem; box-shadow: var(--shadow-md);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.lang-select__toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lang-select__toggle svg { width: 13px; height: 13px; flex-shrink: 0; transition: transform .25s var(--ease); }
.lang-select.is-open .lang-select__toggle svg { transform: rotate(180deg); }
.lang-select__short { display: none; }

.lang-select__panel {
  position: absolute; top: calc(100% + .8rem); right: 0; z-index: 20;
  min-width: 168px; background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s, background .35s var(--ease);
}
.lang-select.is-open .lang-select__panel { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.lang-option {
  display: flex; align-items: center; width: 100%; padding: .6rem .8rem; border-radius: 8px;
  font-size: .9rem; font-weight: 500; color: var(--text); text-align: left;
  transition: background .2s, color .2s;
}
.lang-option:hover { background: var(--blue-100); color: var(--blue-700); }
[data-theme="dark"] .lang-option:hover { background: rgba(30,147,222,.2); color: var(--blue-300); }
.lang-option.is-active { color: var(--blue-600); font-weight: 700; }
.lang-option.is-active::after { content: '✓'; margin-left: auto; }

@media (max-width: 480px) {
  .header__end { gap: .45rem; }
  .theme-toggle { gap: .35rem; }
  .theme-toggle__btn { width: 33px; height: 33px; }
  .theme-toggle__btn svg { width: 16px; height: 16px; }
  .lang-select__toggle { padding: .5rem .65rem; gap: .3rem; }
  .lang-select__full { display: none; }
  .lang-select__short { display: inline; }
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 26px; z-index: 1;
}
.nav-toggle span { height: 2px; width: 100%; background: var(--white); border-radius: 2px; transition: all .3s var(--ease); }
.header.is-scrolled .nav-toggle span { background: var(--text); }

/* ---------- 6) Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}
/* Portada con slide automático: 4 fotos apiladas, cada una cubre toda la
   portada y se turnan con un crossfade cada 3s (ver main.js). */
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ease); }
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: hero-zoom 18s ease-in-out infinite alternate; }
@keyframes hero-zoom { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: opacity .3s linear; }
  .hero__slide img { animation: none; }
}

.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(8,6,3,.78) 0%, rgba(8,6,3,.42) 32%, rgba(8,6,3,.12) 58%, rgba(8,6,3,.4) 100%),
    linear-gradient(180deg, rgba(8,6,3,.5) 0%, rgba(8,6,3,.08) 32%, rgba(8,6,3,.18) 60%, rgba(8,6,3,.78) 100%);
}
/* Textura de puntos decorativa, como en la portada del PDF de referencia */
.hero::after {
  content: '';
  position: absolute; z-index: -1; top: 7%; right: 5%;
  width: 260px; height: 260px;
  background-image: radial-gradient(rgba(255,255,255,.4) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
  display: none;
}
@media (min-width: 900px) { .hero::after { display: block; } }

/* Efecto de partículas: motas cálidas flotando frente a la foto */
.hero__particles { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__particle {
  position: absolute; left: var(--x); bottom: -12px;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: rgba(255, 208, 140, .9);
  box-shadow: 0 0 7px 1.5px rgba(255, 180, 100, .5);
  opacity: 0; mix-blend-mode: screen;
  animation: hero-particle-rise var(--dur) linear var(--delay) infinite;
}
@keyframes hero-particle-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: var(--op, .7); }
  90% { opacity: var(--op, .7); }
  100% { transform: translate(var(--drift), -112vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__particle { animation: none; opacity: 0; }
}

.hero__content { padding-top: var(--header-h); max-width: 760px; }

.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); color: var(--white); letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--blue-400); }
.hero p.lead { margin-top: 1.4rem; font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 600px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

/* Numeración de portada "1—2—3—4" unida por una línea, como en el diseño de referencia */
.hero__slides { position: absolute; left: clamp(1.5rem, 4vw, 4rem); bottom: 2.4rem; z-index: 2; display: flex; align-items: flex-end; gap: clamp(1.4rem, 3vw, 2.4rem); }
.hero__slides::before { content: ''; position: absolute; left: -4px; right: -4px; bottom: 9px; height: 1px; background: rgba(255,255,255,.32); }
.hero__slide-num { position: relative; font-family: var(--font-head); font-weight: 300; line-height: 1; font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: rgba(255,255,255,.5); padding-bottom: 14px; transition: color .3s var(--ease); }
.hero__slide-num::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 1px; height: 14px; background: rgba(255,255,255,.5); transform: translateX(-50%) skewX(-16deg); }
.hero__slide-num.is-active { color: var(--white); }
.hero__slide-num:hover { color: rgba(255,255,255,.8); }
.hero__slide-num:focus-visible { outline: 1.5px solid rgba(255,255,255,.8); outline-offset: 4px; border-radius: 3px; }
@media (max-width: 780px) { .hero__slides { display: none; } }

/* Botón "Presentación", traslúcido sobre la foto, como en el diseño de referencia */
.hero__deck {
  position: absolute; right: clamp(1.2rem, 4vw, 3.4rem); bottom: 2.2rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .9rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  background: rgba(122, 94, 42, .55); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
  color: #f3e9d6; font-weight: 600; font-size: .95rem;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.hero__deck:hover { background: rgba(142, 111, 50, .7); transform: translateY(-2px); }
.hero__deck svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .hero__deck { display: none; } }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(255,255,255,.7); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
}
.scroll-cue__line { width: 1px; height: 36px; background: linear-gradient(180deg, rgba(255,255,255,.8), transparent); animation: scroll-cue 2s ease-in-out infinite; }
@keyframes scroll-cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 7) Institucional ---------- */
/* Fondo decorativo (patrón geométrico claro), como en "Nosotros" del PDF de
   referencia. Solo en modo claro: el patrón es blanco y no funciona sobre
   fondo oscuro, así que en modo oscuro cae al tinte de superficie normal. */
#institucional { position: relative; overflow: hidden; background: var(--page-bg) center/cover no-repeat; }
:root:not([data-theme="dark"]) #institucional { background-image: url('../img/w1.png'); }
[data-theme="dark"] #institucional { background-image: none; }
#institucional > .container { position: relative; z-index: 1; }

.about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about__media { position: relative; }
.about__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; }
.about__card {
  position: absolute; bottom: -1.6rem; right: -1.6rem;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 1.4rem 1.6rem; max-width: 240px;
  border-left: 4px solid var(--blue-500);
  transition: background .35s var(--ease);
}
.about__card strong { display: block; font-family: var(--font-head); color: var(--blue-800); font-size: 1rem; margin-bottom: .3rem; }
[data-theme="dark"] .about__card strong { color: var(--blue-300); }
.about__card p { font-size: .85rem; color: var(--text-soft); }

.about__body p { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 1.2rem; }

.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 2.2rem; }
.pillar { background: var(--surface-2); border-radius: var(--radius-sm); padding: 1.4rem; border: 1px solid var(--border); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease); }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: var(--surface); }
.pillar .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.pillar .icon svg { width: 22px; height: 22px; color: var(--white); }
.pillar h4 { font-size: 1rem; margin-bottom: .35rem; color: var(--heading); }
.pillar p { font-size: .88rem; color: var(--text-soft); }

.mv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; margin-top: 4.5rem; }
.mv-card { padding: 2.2rem; border-radius: var(--radius); color: var(--white); position: relative; overflow: hidden; }
.mv-card--mission { background: var(--gradient-brand); }
.mv-card--vision { background: var(--blue-900); }
.mv-card::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); top: -80px; right: -80px; }
.mv-card .eyebrow { color: rgba(255,255,255,.85); }
.mv-card h3 { color: var(--white); font-size: 1.3rem; margin-bottom: .9rem; }
.mv-card p { color: rgba(255,255,255,.88); position: relative; z-index: 1; }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.value {
  padding: 2rem 1.6rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); text-align: left;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), background .35s var(--ease);
}
.value:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.value .num { font-family: var(--font-head); font-size: .8rem; font-weight: 700; color: var(--blue-400); letter-spacing: .1em; }
.value h4 { margin: .8rem 0 .6rem; font-size: 1.08rem; }
.value p { font-size: .9rem; color: var(--text-soft); }

/* ---------- 8) Servicios ---------- */
/* Fondo azul de marca fijo (no cambia con el tema claro/oscuro), con ondas y
   puntos como en la sección "Servicios" del PDF de referencia. Las tarjetas
   con foto se mantienen tal cual estaban. */
.section--services {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 12% 15%, rgba(30,147,222,.4), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(77,180,239,.3), transparent 48%),
    linear-gradient(160deg, var(--blue-900) 0%, #0a3358 55%, var(--blue-800) 100%);
}
.section--services::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.18) 1.6px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(circle at 50% 25%, #000, transparent 72%);
          mask-image: radial-gradient(circle at 50% 25%, #000, transparent 72%);
}
.section--services::after {
  content: ''; position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%;
  background: rgba(255,255,255,.05); bottom: -170px; left: -110px;
}
.section--services .section-head .eyebrow { color: var(--blue-300); }
.section--services .section-head h2 { color: var(--white); }
.section--services .section-head p { color: rgba(255,255,255,.78); }
.section--services .service-card { box-shadow: 0 25px 50px -22px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.1); }
.section--services .services-foot { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.section--services .services-foot p { color: var(--white); }
.section--services .btn--outline { color: var(--white); border-color: rgba(255,255,255,.55); }
.section--services .btn--outline:hover { background: rgba(255,255,255,.12); }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.service-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/5; box-shadow: var(--shadow-md);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover img { transform: scale(1.08); }
.service-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6,33,61,.92) 0%, rgba(6,33,61,.45) 45%, rgba(6,33,61,.1) 75%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.7rem;
}
.service-card__index { position: absolute; top: 1.3rem; left: 1.3rem; font-family: var(--font-head); font-weight: 700; font-size: .8rem; color: var(--white); background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.service-card h3 { color: var(--white); font-size: 1.15rem; margin-bottom: .5rem; }
.service-card p { color: rgba(255,255,255,.8); font-size: .87rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--ease), opacity .4s var(--ease); }
.service-card:hover p { max-height: 120px; opacity: 1; margin-top: .2rem; }

/* Franja de íconos con divisores, como en la sección "Servicios" del PDF de referencia */
.services-icons {
  margin-top: 3rem; display: flex; align-items: center; justify-content: space-between;
  background: #081227; border-radius: var(--radius);
  padding: 1.8rem clamp(1rem, 4vw, 3rem);
  box-shadow: 0 25px 55px -25px rgba(0,0,0,.6);
}
.services-icons__item { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 .5rem; border-right: 1px solid rgba(255,255,255,.16); }
.services-icons__item:last-child { border-right: 0; }
.services-icons__item svg { width: 42px; height: 42px; color: var(--white); }
@media (max-width: 640px) {
  .services-icons { flex-wrap: wrap; row-gap: 1.6rem; }
  .services-icons__item { flex: 0 0 33.333%; border-right: 0; }
}

.services-foot { margin-top: 2.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.8rem 2rem; background: var(--blue-100); border-radius: var(--radius); }
.services-foot p { font-weight: 600; color: var(--blue-800); }

/* ---------- 9) Novedades / reels ---------- */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.reel-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); transition: background .35s var(--ease), border-color .35s var(--ease); }
.reel-card__frame { position: relative; aspect-ratio: 9/13; background: var(--blue-900); }
.reel-card__frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(6,33,61,.35); transition: opacity .3s var(--ease);
  cursor: pointer;
}
.reel-card__play span { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; transition: transform .3s var(--ease), background .3s var(--ease); }
.reel-card__play:hover span { transform: scale(1.08); background: rgba(255,255,255,.28); }
.reel-card__play svg { width: 22px; height: 22px; color: var(--white); margin-left: 3px; }
.reel-card__frame.is-playing .reel-card__play { opacity: 0; pointer-events: none; }
.reel-card__body { padding: 1.4rem 1.5rem; }
.reel-card__body p { font-size: .92rem; color: var(--text-soft); }

/* ---------- 10) Proyecto minero animado ---------- */
.project-reel { background: var(--surface-2); border-radius: var(--radius); padding: clamp(.8rem, 2vw, 1.4rem); transition: background .35s var(--ease); }
.project-reel__frame {
  position: relative; aspect-ratio: 16/9; max-width: 1140px; margin-inline: auto;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--blue-900); box-shadow: var(--shadow-lg);
}
.project-reel__frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s var(--ease); }
.project-reel__frame iframe { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; }
.project-reel__play {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: rgba(6,33,61,.4); transition: opacity .3s var(--ease); cursor: pointer;
}
.project-reel__play span { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; transition: transform .3s var(--ease), background .3s var(--ease); }
.project-reel__play:hover span { transform: scale(1.08); background: rgba(255,255,255,.28); }
.project-reel__play svg { width: 28px; height: 28px; color: var(--white); margin-left: 3px; }
.project-reel__frame.is-active .project-reel__play { opacity: 0; pointer-events: none; }
.project-reel__frame.is-active img { opacity: 0; }

/* ---------- 11) Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact-info-list { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 2rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: box-shadow .3s var(--ease), transform .3s var(--ease), background .35s var(--ease); }
.contact-info-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.contact-info-item .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--blue-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-item .icon svg { width: 21px; height: 21px; color: var(--blue-600); }
.contact-info-item h4 { font-size: .95rem; margin-bottom: .25rem; }
.contact-info-item p, .contact-info-item a { font-size: .9rem; color: var(--text-soft); }
.contact-info-item a:hover { color: var(--blue-600); }

.contact-map { margin-top: 1.8rem; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.contact-map iframe { width: 100%; height: 230px; border: 0; display: block; filter: grayscale(.15); }
[data-theme="dark"] .contact-map iframe { filter: grayscale(.25) invert(.92) hue-rotate(180deg); }

.contact-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: clamp(1.8rem, 3vw, 2.8rem); border: 1px solid var(--border); transition: background .35s var(--ease), border-color .35s var(--ease); }
.contact-form h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.contact-form > p { color: var(--text-soft); font-size: .92rem; margin-bottom: 1.8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: .92rem; transition: border-color .25s, background .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); background: var(--surface); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: .78rem; color: #8b96a3; margin-top: 1rem; }
.form-status { margin-top: 1rem; font-size: .88rem; font-weight: 600; display: none; }
.form-status.is-visible { display: block; }
.form-status.ok { color: #1a8a4f; }

/* ---------- 12) Footer ---------- */
.footer { background: var(--blue-900); color: rgba(255,255,255,.75); padding-top: 4.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { height: 42px; filter: brightness(0) invert(1); margin-bottom: 1.2rem; }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 300px; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.4rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; transition: background .25s, transform .25s; }
.footer-social a:hover { background: var(--blue-600); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; }

.footer h5 { color: var(--white); font-family: var(--font-head); font-size: .95rem; margin-bottom: 1.3rem; letter-spacing: .02em; }
.footer-links { display: flex; flex-direction: column; gap: .8rem; }
.footer-links a { font-size: .88rem; transition: color .2s, padding-left .2s; }
.footer-links a:hover { color: var(--white); padding-left: 4px; }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.6rem 0; font-size: .8rem; color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--white); }

.back-to-top {
  position: fixed; right: 1.8rem; bottom: 1.8rem; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-brand); color: var(--white);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 20px; height: 20px; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed; left: 1.8rem; bottom: 1.8rem; z-index: 500;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 20px 40px -12px rgba(37, 211, 102, .55); }
.whatsapp-float svg { width: 28px; height: 28px; position: relative; z-index: 1; }
.whatsapp-float__ping {
  position: absolute; inset: 0; border-radius: 50%; background: #25d366;
  opacity: .6; animation: wa-ping 2.2s ease-out infinite;
}
@keyframes wa-ping {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.7); opacity: 0; }
}

@media (max-width: 640px) {
  .whatsapp-float { left: 1.1rem; bottom: 1.1rem; width: 50px; height: 50px; }
  .whatsapp-float svg { width: 25px; height: 25px; }
  .back-to-top { right: 1.1rem; bottom: 1.1rem; }
}

/* ---------- 13) Responsive ---------- */
@media (max-width: 1080px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 460px; margin-inline: auto; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .reels { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }

  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; inset: 0; top: 0; padding: 6.5rem 2rem 2rem;
    background: var(--blue-900); overflow-y: auto;
  }
  .nav.is-open .nav__link { color: var(--white); padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1.05rem; }
  .nav.is-open .nav__dropdown { border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav.is-open .nav__dropdown-toggle { width: 100%; justify-content: space-between; padding: 1rem 0; }
  .nav.is-open .nav__panel { position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none; width: 100%; box-shadow: none; background: rgba(255,255,255,.04); display: none; }
  .nav.is-open .nav__dropdown.is-open .nav__panel { display: block; }
  .nav.is-open .nav__panel a, .nav.is-open .nav__panel-group { color: rgba(255,255,255,.8); }
  .nav.is-open .nav__panel a:hover { background: rgba(255,255,255,.08); color: var(--white); }
  .nav.is-open .nav__panel-divider { background: rgba(255,255,255,.12); }

  .nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle.is-active span { background: var(--white) !important; }

  .services { grid-template-columns: 1fr; }
  .reels { grid-template-columns: 1fr; }
  .reel-card__frame { aspect-ratio: 16/10; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .mv-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about__card { position: static; margin-top: 1.2rem; max-width: none; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .values { grid-template-columns: 1fr; }
}
