/* ==========================================================================
   GRUPO ALKEN — hoja de estilos v2
   Paleta del logo: navy #1C2B3A · lima #A8C348 · papel verde pálido
   Estética editorial + animaciones (fade-up, Ken Burns, marquesina, carrusel)
   ========================================================================== */

:root {
  --ink:        #1C2B3A;
  --ink-soft:   #46566B;
  --muted:      #64705F;
  --accent:     #A8C348;
  --accent-dark:#7E9930;
  --accent-deep:#5F7522;
  --paper:      #F5F7EC;
  --paper-mid:  #EDF1DC;
  --paper-deep: #E4EACB;
  --rule:       #D8DFC0;
  --white:      #FDFEFA;
  --cream:      #F4F6EA;
  --shadow:     0 20px 60px rgba(28, 43, 58, .18);
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans:  "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-logo:  "Poppins", "Inter", sans-serif;
  --track:      .14em;
  --ease-quiet: cubic-bezier(.22, 1, .36, 1);
}

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

/* hidden debe ganar a cualquier display explícito */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

em { font-style: italic; }
a { color: inherit; }

/* ---------- textura de grano ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.17 0 0 0 0 0.12 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- logo (wordmark SVG) ---------- */
.brand-mark { height: 46px; width: auto; display: block; overflow: visible; }
.lg-thin  { fill: var(--ink); transition: fill .4s; }
.lg-accent{ fill: var(--accent); transition: fill .4s; }
.lg-bold  { fill: var(--accent); font-family: var(--font-logo); font-weight: 600; letter-spacing: 0; transition: fill .4s; }
/* variante clara (header sobre hero y footer) */
.site-header.on-hero .lg-thin,
.footer-mark .lg-thin { fill: var(--cream); }
.site-header.on-hero .lg-accent,
.footer-mark .lg-accent { fill: var(--accent); }

/* ---------- utilidades editoriales ---------- */
.section { padding: 96px 0; }
.section-rule { border-bottom: 1px solid var(--rule); }
.bg-mid { background: var(--paper-mid); }

.eyebrow,
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.section-label.light { color: rgba(244,246,234,.8); }
.label-num {
  color: var(--accent-dark);
  font-weight: 700;
  margin-right: 10px;
}
.section-label.light .label-num { color: var(--accent); }
.label-num::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.section-title em { color: var(--accent-dark); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.section-body p { color: var(--ink-soft); margin-bottom: 18px; max-width: 56ch; }
.section-body p:last-child { margin-bottom: 0; }

/* ---------- animación fade-up con retardos ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s var(--ease-quiet), transform .9s var(--ease-quiet);
  will-change: transform, opacity;
}
.fade-up.is-in { opacity: 1; transform: none; }
.fade-up.delay-1 { transition-delay: .12s; }
.fade-up.delay-2 { transition-delay: .24s; }
.fade-up.delay-3 { transition-delay: .36s; }
.fade-up.delay-4 { transition-delay: .48s; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s, transform .2s, box-shadow .3s;
}
.btn:active { transform: translateY(1px); }
.btn .arrow { display: inline-block; transition: transform .35s var(--ease-quiet); }
.btn:hover .arrow { transform: translateX(6px); }

.btn-pill { border-radius: 999px; }
.btn-lg { padding: 17px 34px; font-size: 15px; }

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(168, 195, 72, .35);
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
  box-shadow: 0 10px 30px rgba(28, 43, 58, .3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent-dark); color: var(--accent-deep); }

.btn-ghost-light {
  background: rgba(244, 246, 234, .06);
  color: var(--cream);
  border-color: rgba(244, 246, 234, .5);
}
.btn-ghost-light:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(245, 247, 236, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: background .4s, border-color .4s, box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(28,43,58,.08); }

/* header transparente sobre el hero */
.site-header.on-hero {
  background: linear-gradient(180deg, rgba(15, 24, 33, .55), rgba(15, 24, 33, 0));
  backdrop-filter: blur(2px);
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-header.on-hero .main-nav a { color: rgba(244,246,234,.85); }
.site-header.on-hero .main-nav a:hover { color: #fff; }
.site-header.on-hero .lang-btn { color: rgba(244,246,234,.65); }
.site-header.on-hero .lang-btn:hover { color: #fff; }
.site-header.on-hero .lang-btn.active { color: var(--accent); }
.site-header.on-hero .nav-toggle span { background: var(--cream); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.btn-header { padding: 11px 22px; font-size: 12.5px; border-radius: 999px; }

.lang-switch { display: flex; align-items: center; gap: 4px; }
.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 2px;
  transition: color .2s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--accent-dark); border-bottom: 2px solid var(--accent); }
.lang-sep { color: var(--rule); font-size: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s, background .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO con carrusel de fondo ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--cream);
  padding: 140px 0 120px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease;
  will-change: transform, opacity;
}
.hero-slide.is-active {
  opacity: 1;
  animation: kenburns 16s ease-in-out infinite alternate;
}
@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.07) translate(-1.2%, -1.2%); }
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 55%, transparent 0%, rgba(16, 26, 36, .45) 75%, rgba(12, 20, 28, .75) 100%),
    linear-gradient(180deg, rgba(16, 26, 36, .55) 0%, rgba(16, 26, 36, .25) 35%, rgba(16, 26, 36, .3) 65%, rgba(12, 20, 28, .7) 100%),
    linear-gradient(90deg, rgba(16, 26, 36, .55) 0%, rgba(16, 26, 36, .15) 60%, transparent 100%);
}
.hero-beam {
  position: absolute; inset: 0;
  background: linear-gradient(115deg,
    transparent 20%,
    rgba(216, 235, 160, .14) 27%,
    transparent 36%,
    transparent 55%,
    rgba(216, 235, 160, .08) 63%,
    transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }
.hero-eyebrow { color: rgba(244, 246, 234, .8); }
.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(44px, 7.2vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin-bottom: 34px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(12, 20, 28, .4);
}
.hero-title em { color: var(--accent); }
.hero-sub {
  font-size: 18px;
  color: rgba(244, 246, 234, .88);
  max-width: 56ch;
  margin-bottom: 40px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 48px; }
.hero-actions.center { justify-content: center; margin-bottom: 32px; }

.hero-dots { display: flex; gap: 10px; }
.hero-dot {
  width: 34px; height: 3px;
  border: none;
  background: rgba(244, 246, 234, .3);
  cursor: pointer;
  transition: background .3s;
}
.hero-dot.active { background: var(--accent); }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(244, 246, 234, .7);
  font-size: 10px;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 600;
}
.scroll-line {
  width: 1px; height: 46px;
  background: rgba(244, 246, 234, .25);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--accent);
  animation: scrollline 2.4s var(--ease-quiet) infinite;
}
@keyframes scrollline { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- cifras (contadores) ---------- */
.stats { background: var(--paper); padding: 60px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 56px);
  color: var(--ink);
  line-height: 1.1;
}
.stat-num::first-letter { color: inherit; }
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- nosotros ---------- */
.about-split { align-items: center; }
.about-visual {
  position: relative;
  padding: 0 0 22px 22px;
}
.about-visual img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 1;
  filter: saturate(.85);
  box-shadow: var(--shadow);
}
.about-frame {
  position: absolute;
  inset: 22px -22px -0px 0;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(168,195,72,.14), transparent 60%);
  z-index: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.value-item { background: var(--paper-mid); padding: 28px 22px; transition: background .4s; }
.value-item:hover { background: var(--paper-deep); }
.value-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.value-item h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.value-item p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ---------- servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.service-card {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-quiet);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 44px rgba(28,43,58,.11);
  transform: translateY(-4px);
}
.service-num {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 18px;
}
.service-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 14px;
}
.service-card > p { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 6px 12px;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); background: rgba(168,195,72,.08); }

/* ---------- banner CTA intermedio ---------- */
.cta-banner {
  margin-top: 56px;
  background: var(--ink);
  color: var(--cream);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-left: 4px solid var(--accent);
}
.cta-banner p {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.3;
  max-width: 30ch;
}

/* ---------- editorial ---------- */
.editorial-section {
  position: relative;
  background:
    linear-gradient(rgba(245, 247, 236, .93), rgba(245, 247, 236, .97)),
    url('../assets/img/editorial.jpg') center/cover;
}

/* marquesina de índices */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(253, 254, 250, .6);
  margin: 12px 0 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.index-badge {
  padding: 26px 44px;
  text-align: center;
  border-right: 1px solid var(--rule);
  min-width: 220px;
}
.index-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
}
.index-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.editorial-cta { text-align: left; }

/* ---------- carrusel de testimonios ---------- */
.carousel {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
}
.carousel-window { overflow: hidden; flex: 1; }
.carousel-track {
  display: flex;
  transition: transform .6s var(--ease-quiet);
}
.testi-slide {
  min-width: 100%;
  padding: 8px 4px;
}
.testi-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 44px 48px;
  max-width: 780px;
  margin: 0 auto;
}
.testi-quote {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 23px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
}
.testi-quote::before { content: "\201C"; color: var(--accent-dark); font-size: 1.4em; }
.testi-author { font-weight: 700; font-size: 14px; }
.testi-role {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.carousel-arrow {
  align-self: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  transition: all .3s;
  flex-shrink: 0;
}
.carousel-arrow:hover { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.carousel-dot {
  width: 30px; height: 3px;
  border: none;
  background: var(--rule);
  cursor: pointer;
  transition: background .3s;
}
.carousel-dot.active { background: var(--accent-dark); }

/* ---------- blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.blog-card {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.blog-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-quiet);
}
.blog-card:hover::after { transform: scaleX(1); }
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 44px rgba(28,43,58,.1);
  transform: translateY(-4px);
}
.blog-card-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.blog-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--ink);
}
.blog-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 22px; flex-grow: 1; }
.blog-card .read-more {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink);
}
.blog-card:hover .read-more { color: var(--accent-deep); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(28, 43, 58, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
.modal-overlay.visible { opacity: 1; }
.modal-panel {
  background: var(--paper);
  max-width: 720px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 56px 56px 48px;
  position: relative;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
  transform: translateY(14px);
  transition: transform .25s;
}
.modal-overlay.visible .modal-panel { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 18px; right: 22px;
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}
.modal-close:hover { color: var(--ink); }
.modal-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.modal-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  margin-bottom: 28px;
}
.modal-body p { color: var(--ink-soft); margin-bottom: 18px; }
.modal-body h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
  margin: 30px 0 12px;
}
.modal-body ul { margin: 0 0 18px 20px; color: var(--ink-soft); }
.modal-body li { margin-bottom: 8px; }
.modal-cta { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }

/* ---------- CTA final (fondo con imagen difuminada) ---------- */
.cta-final {
  position: relative;
  text-align: center;
  padding: 140px 0;
  color: var(--cream);
  overflow: hidden;
}
.cta-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(20, 31, 42, .88), rgba(16, 26, 36, .93)),
    url('../assets/img/cta.jpg') center/cover;
  z-index: 0;
}
.cta-content { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  margin-bottom: 24px;
  color: #fff;
}
.cta-title em { color: var(--accent); }
.cta-sub { color: rgba(244,246,234,.85); font-size: 17px; max-width: 52ch; margin: 0 auto 40px; }
.cta-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: rgba(244,246,234,.6);
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B9C4CE; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 64px 24px 40px;
}
.footer-mark { height: 40px; margin-bottom: 20px; }
.footer-brand p { font-size: 14px; max-width: 40ch; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a,
.footer-contact a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  color: #B9C4CE;
  transition: color .2s;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-contact p { font-size: 13px; margin-bottom: 10px; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  padding-bottom: 28px;
  font-size: 12px;
  color: #8494A3;
}

/* ---------- flotantes: chatbot (grande) + WhatsApp debajo ---------- */
.float-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.bot-hint {
  position: absolute;
  right: 84px;
  top: 8px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px 2px 12px 12px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(28,43,58,.3);
  animation: hint-pop .5s var(--ease-quiet);
}
@keyframes hint-pop {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: none; }
}
.bot-toggle {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(28,43,58,.35);
  transition: transform .2s, background .2s;
}
.bot-toggle:hover { transform: translateY(-3px) scale(1.04); background: #253a4f; }
.bot-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ring-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ring-pulse {
  0%   { transform: scale(.9); opacity: .9; }
  70%  { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}
.wa-float {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(28,43,58,.3);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 34px rgba(28,43,58,.35); }

/* ---------- panel chatbot ---------- */
.bot-panel {
  position: fixed;
  right: 22px;
  bottom: 178px;
  z-index: 310;
  width: 380px;
  max-width: calc(100vw - 44px);
  max-height: min(560px, calc(100vh - 200px));
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bot-header {
  background: var(--ink);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bot-name { font-family: var(--font-serif); font-size: 17px; font-weight: 500; }
.bot-status { font-size: 11px; color: var(--accent); letter-spacing: .04em; }
.bot-header-actions { display: flex; align-items: center; gap: 12px; }
.bot-lang .lang-btn { color: #93A3B2; }
.bot-lang .lang-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.bot-close {
  background: none;
  border: none;
  color: #93A3B2;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s;
}
.bot-close:hover { color: #fff; }

.bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}
.bot-msg {
  max-width: 85%;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-line;
}
.bot-msg.bot {
  background: var(--white);
  border: 1px solid var(--rule);
  align-self: flex-start;
  border-radius: 2px 12px 12px 12px;
}
.bot-msg.user {
  background: var(--ink);
  color: #fff;
  align-self: flex-end;
  border-radius: 12px 2px 12px 12px;
}
.bot-msg.typing { color: var(--muted); font-style: italic; }

.bot-options {
  padding: 0 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bot-option {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  background: none;
  border: 1px solid var(--accent);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.bot-option:hover { background: var(--accent); color: var(--ink); }

.bot-input-row {
  display: flex;
  border-top: 1px solid var(--rule);
  background: var(--white);
}
.bot-input-row input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}
.bot-input-row button {
  border: none;
  background: none;
  color: var(--accent-dark);
  padding: 0 18px;
  cursor: pointer;
  transition: color .2s;
}
.bot-input-row button:hover { color: var(--ink); }

/* ---------- contacto + formulario ---------- */
.contact-section { position: relative; padding: 120px 0; color: var(--cream); overflow: hidden; }
.contact-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.contact-info .cta-title { text-align: left; margin-bottom: 18px; }
.contact-info .cta-sub { margin: 0 0 30px; max-width: 44ch; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); margin-top: 3px; }
.ci-label {
  display: block;
  font-size: 10.5px; font-weight: 600; letter-spacing: var(--track);
  text-transform: uppercase; color: rgba(244,246,234,.5); margin-bottom: 3px;
}
.contact-list a { color: var(--cream); text-decoration: none; font-size: 15.5px; transition: color .2s; }
.contact-list a:hover { color: var(--accent); }
.card-link {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--accent); font-weight: 600; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: gap .25s;
}
.card-link svg { width: 18px; height: 18px; }
.card-link:hover { gap: 14px; }

.contact-form {
  background: var(--paper);
  border-radius: 10px;
  border-top: 3px solid var(--accent);
  padding: 36px 34px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.cf-row { margin-bottom: 18px; }
.cf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: block; }
.cf-field > span {
  display: block;
  font-size: 11px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.cf-field input, .cf-field select, .cf-field textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168,195,72,.2);
}
.cf-field textarea { resize: vertical; min-height: 100px; }
.cf-submit { width: 100%; justify-content: center; margin-top: 6px; }
.cf-status { margin-top: 14px; font-size: 13.5px; text-align: center; min-height: 20px; line-height: 1.4; }
.cf-status.sending { color: var(--muted); }
.cf-status.ok { color: var(--accent-deep); font-weight: 600; }
.cf-status.err { color: #b3402f; font-weight: 600; }

/* ---------- logos de índices en la marquesina ---------- */
.idx-logo { height: 34px; width: auto; display: block; }
.marquee .index-badge {
  display: flex; align-items: center; justify-content: center;
  min-width: 250px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 84px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    box-shadow: 0 18px 40px rgba(28,43,58,.12);
    transform: translateY(-130%);
    transition: transform .3s ease;
    z-index: -1;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft) !important; }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .btn-header { display: none; }
  .brand-mark { height: 38px; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { max-width: 480px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .carousel-arrow { display: none; }
  .testi-card { padding: 32px 26px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 110px; }
  .hero-title { font-size: clamp(38px, 11vw, 52px); }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats { padding: 44px 0; }
  .stats-grid { gap: 24px; }
  .modal-panel { padding: 44px 26px 36px; }
  .cta-final { padding: 100px 0; }
  .contact-section { padding: 84px 0; }
  .cf-2 { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
  .cta-banner { padding: 28px 24px; }
  .float-stack { right: 16px; bottom: 16px; }
  .bot-toggle { width: 64px; height: 64px; }
  .wa-float { width: 52px; height: 52px; }
  .bot-panel { bottom: 160px; right: 16px; }
  .bot-hint { right: 76px; }
}
