/* =========================================================================
   GRUPO FRAMAR — Hoja de estilos del sitio (versión mejorada)
   Paleta de marca: naranja #F39200 + azul #1B75BC
   ========================================================================= */

:root {
  /* Marca */
  --orange:       #F39200;
  --orange-dark:  #D97F00;
  --orange-soft:  #FFF3E0;
  --blue:         #1B75BC;
  --blue-dark:    #145A91;
  --blue-soft:    #E9F2FB;

  /* Neutros */
  --ink:          #0E2233;   /* texto principal (navy) */
  --body:         #44586A;   /* texto secundario */
  --muted:        #7B8B99;
  --line:         #E4ECF2;
  --bg:           #FFFFFF;
  --bg-soft:      #F4F8FB;
  --bg-navy:      #0E2233;

  /* Sistema */
  --container:    1180px;
  --radius:       18px;
  --radius-sm:    12px;
  --radius-lg:    28px;
  --shadow-sm:    0 2px 10px rgba(14,34,51,.06);
  --shadow:       0 14px 40px rgba(14,34,51,.10);
  --shadow-lg:    0 30px 70px rgba(14,34,51,.16);
  --ease:         cubic-bezier(.22,.61,.36,1);

  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head:    'Poppins', var(--font-body);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Smooth scroll (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* --------------------------------------------------------------- Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--bg-navy); color: #C7D5E1; }
.section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--orange); border-radius: 2px;
}
.section-head { max-width: 680px; margin-bottom: 54px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

h2.title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.lead { font-size: 1.12rem; color: var(--body); margin-top: 16px; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(243,146,0,.32); }
.btn--primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(243,146,0,.4); }

/* Botón "Hablemos" del header — animación más notoria al pasar el cursor */
.nav__right .btn--primary { position: relative; overflow: hidden; }
.nav__right .btn--primary::before {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.nav__right .btn--primary:hover {
  transform: translateY(-2px) scale(1.07);
  box-shadow: 0 16px 34px rgba(243,146,0,.55);
}
.nav__right .btn--primary:hover::before { animation: btnShine .75s var(--ease); }
@keyframes btnShine { from { left: -130%; } to { left: 140%; } }
@media (prefers-reduced-motion: reduce) {
  .nav__right .btn--primary:hover { transform: none; }
  .nav__right .btn--primary:hover::before { animation: none; }
}
.btn--blue { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(27,117,188,.3); }
.btn--blue:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn--light { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.25); }
.btn--light:hover { background: rgba(255,255,255,.2); }

/* --------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav__logo img { height: 38px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 6px; position: relative; }
.nav__link {
  font-family: var(--font-head); font-weight: 500; font-size: .96rem;
  color: var(--ink); padding: 9px 16px; border-radius: 999px;
  transition: color .2s; position: relative; z-index: 1;
}
.nav__link:hover, .nav__link.active { color: var(--blue); }
/* Indicador deslizante: píldora que sigue al cursor y descansa bajo la página activa */
.nav__indicator {
  position: absolute; z-index: 0; top: 50%; transform: translateY(-50%);
  height: 38px; border-radius: 999px; background: var(--bg-soft);
  left: 0; width: 0; opacity: 0; pointer-events: none;
  transition: left .32s var(--ease), width .32s var(--ease), opacity .25s var(--ease);
}
.nav__right { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.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 */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); color: var(--ink); }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--orange), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.2rem; max-width: 520px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero__media { position: relative; }
.hero__media img, .hero__media video {
  width: 100%; border-radius: var(--radius-lg); object-fit: cover;
  aspect-ratio: 16/9; box-shadow: var(--shadow-lg); display: block;
}
.hero__badge {
  position: absolute; left: -22px; bottom: 34px;
  background: #fff; border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.hero__badge b { font-family: var(--font-head); font-size: 1.7rem; color: var(--ink); display: block; line-height: 1; }
.hero__badge span { font-size: .82rem; color: var(--muted); }
.hero__badge .dot { width: 44px; height: 44px; border-radius: 12px; background: var(--orange-soft); display: grid; place-items: center; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: -1; }
.hero__blob.b1 { width: 380px; height: 380px; background: var(--orange-soft); top: -80px; right: -60px; }
.hero__blob.b2 { width: 320px; height: 320px; background: var(--blue-soft); bottom: -100px; left: -80px; }

/* Hero con video de fondo (inicio) — mismo tratamiento que logística */
.hero--video { padding: 0; background: var(--ink); }
.hero--video .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero--video::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,34,51,.72) 0%, rgba(14,34,51,.52) 45%, rgba(14,34,51,.86) 100%);
}
.hero--video .container {
  position: relative; z-index: 2;
  min-height: clamp(470px, 74vh, 680px); display: flex; align-items: center;
  padding-top: 122px; padding-bottom: 96px;
}
.hero--video h1 { color: #fff; }
.hero--video p.lead { color: rgba(255,255,255,.92); max-width: 560px; }
@media (max-width: 720px) {
  .hero--video .container { padding-top: 100px; padding-bottom: 72px; min-height: clamp(420px, 70vh, 560px); }
}

/* Animación de entrada escalonada de la frase del hero */
.hero--video .eyebrow   { animation: heroUp .7s var(--ease) .05s both; }
.hero--video h1         { animation: heroUp .8s var(--ease) .18s both; }
.hero--video p.lead     { animation: heroUp .8s var(--ease) .34s both; }
.hero--video .hero__cta { animation: heroUp .8s var(--ease) .50s both; }
@keyframes heroUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--video .eyebrow, .hero--video h1, .hero--video p.lead,
  .hero--video .hero__cta { animation: none; }
}

/* --------------------------------------------------------------- Trust bar */
.trust { padding: 30px 0; border-block: 1px solid var(--line); }
.trust__inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; justify-content: center; }
.trust__label { font-size: .9rem; color: var(--muted); font-weight: 500; }
.trust__logos { display: flex; gap: 34px; flex-wrap: wrap; align-items: center; }
.trust__logos span { font-family: var(--font-head); font-weight: 700; color: #98a7b3; font-size: 1.05rem; letter-spacing: -.01em; }

/* --------------------------------------------------------------- Divisiones / cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cards--two { grid-template-columns: repeat(2, 1fr); max-width: 840px; margin-inline: auto; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.card__media { aspect-ratio: 16/11; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 26px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.card__tag { font-family: var(--font-head); font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.card__body h3 { font-size: 1.32rem; margin-bottom: 10px; }
.card__body p { font-size: .98rem; flex: 1; }
.card__link { margin-top: 18px; font-family: var(--font-head); font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; }
.card__link svg { width: 16px; height: 16px; transition: transform .3s; }
.card:hover .card__link svg { transform: translateX(4px); }

/* --------------------------------------------------------------- Feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--rev .split__media { order: 2; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 5/4; object-fit: cover; width: 100%; }

/* Carrusel de fotos (crossfade) */
.photo-carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.pc__slides { position: relative; aspect-ratio: 5/4; }
.pc__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .9s var(--ease);
}
.pc__slide.is-active { opacity: 1; }
.pc__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.pc__dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.pc__dot.is-active { width: 24px; border-radius: 6px; background: #fff; }
.feat-list { display: grid; gap: 18px; margin-top: 26px; }
.feat-item { display: flex; gap: 16px; }
.feat-item .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.feat-item .ic svg { width: 22px; height: 22px; }
.feat-item h4 { font-size: 1.05rem; margin-bottom: 3px; }
.feat-item p { font-size: .95rem; }

/* --------------------------------------------------------------- Mapa de cobertura Chile */
.cobertura {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px; margin-top: 28px;
}
.cobertura__col { display: flex; flex-direction: column; gap: 18px; }
.cobertura__col--left { align-items: flex-end; text-align: right; }
.cobertura__col--right { align-items: flex-start; text-align: left; }

.chile-map { position: relative; display: flex; justify-content: center; min-height: 420px; }
.chile-map__loading { color: #9fb2c2; font-size: .9rem; align-self: center; }
.chile-svg { width: auto; height: 620px; max-width: 100%; overflow: visible; display: block; }
.chile-svg path {
  fill: #1b75bc; stroke: #0e2233; stroke-width: .7px;
  cursor: pointer; transition: fill .2s var(--ease), filter .2s;
}
.chile-svg path.is-covered { fill: var(--orange); }
.chile-svg path:hover { filter: drop-shadow(0 0 5px rgba(243,146,0,.55)); }
.chile-svg path.is-active {
  fill: var(--orange); filter: drop-shadow(0 0 9px rgba(243,146,0,.85));
}
/* Resaltado fuerte al pasar por una tarjeta del listado */
.chile-svg path.is-hot {
  fill: #ffb43d;
  transform-box: fill-box; transform-origin: center;
  animation: regionPulse 1.1s ease-in-out infinite;
}
@keyframes regionPulse {
  0%, 100% { transform: scale(1);     filter: drop-shadow(0 0 6px rgba(243,146,0,.65)); }
  50%      { transform: scale(1.07);  filter: drop-shadow(0 0 18px rgba(255,180,61,1)); }
}
@media (prefers-reduced-motion: reduce) {
  .chile-svg path.is-hot { animation: none; filter: drop-shadow(0 0 14px rgba(255,180,61,.95)); }
}
/* ocultar puntos/labels que trae el SVG de origen */
.chile-svg #points, .chile-svg #label_points { display: none; }

.chile-map__tip {
  position: fixed; pointer-events: none; z-index: 200;
  background: #fff; color: var(--ink); font-family: var(--font-head); font-weight: 600;
  font-size: .85rem; padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, -130%); transition: opacity .15s; white-space: nowrap;
}
.chile-map__tip.show { opacity: 1; }

/* Tarjetas de región (cajas con ciudades) */
.region-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-sm); padding: 14px 18px; max-width: 220px;
  cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.region-card h3 {
  font-family: var(--font-head); color: #fff; font-size: 1.1rem; margin: 0 0 6px;
}
.region-card ul { list-style: none; margin: 0; padding: 0; }
.region-card li { color: #9fb2c2; font-size: .88rem; line-height: 1.55; }
.cobertura__col--right .region-card li { padding-left: 0; }
.region-card:hover, .region-card.is-active {
  transform: translateY(-2px); border-color: var(--orange);
  background: rgba(243,146,0,.12);
}
.region-card.is-active h3 { color: var(--orange); }

@media (max-width: 960px) {
  .cobertura { grid-template-columns: 1fr 1fr; gap: 16px; }
  .chile-map { grid-column: 1 / -1; order: -1; min-height: 340px; margin-bottom: 8px; }
  .chile-svg { height: 440px; }
  .cobertura__col { align-items: stretch; text-align: left; }
  .region-card { max-width: none; }
}
@media (max-width: 560px) {
  .cobertura { grid-template-columns: 1fr; }
  .chile-svg { height: 380px; }
}

/* --------------------------------------------------------------- Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }
.stat b { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); color: #fff; display: block; line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: .95rem; color: #9fb2c2; }
.stat b .plus { color: var(--orange); }

/* --------------------------------------------------------------- Testimonios */
.marquee {
  position: relative; overflow: hidden; margin-top: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: tmarquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.tcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.marquee .tcard { flex: 0 0 360px; width: 360px; margin-right: 24px; box-sizing: border-box; }
@keyframes tmarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Carrusel de logos de clientes */
.marquee--logos { margin-top: 40px; }
.marquee--logos .marquee__track { animation-duration: 30s; }
.logo-item { flex: 0 0 auto; width: 172px; height: 82px; margin-right: 40px; display: grid; place-items: center; }
.logo-item img {
  max-width: 100%; max-height: 50px; width: auto; object-fit: contain;
  filter: grayscale(1); opacity: .62; mix-blend-mode: multiply;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.logo-item img:hover { filter: grayscale(0); opacity: 1; }
@media (max-width: 560px) { .marquee .tcard { flex: 0 0 300px; width: 300px; } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } .marquee { overflow-x: auto; } }
.tcard p { color: var(--ink); font-size: 1.04rem; }
.tcard footer { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.tcard .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--orange)); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; }
.tcard .who b { display: block; font-family: var(--font-head); color: var(--ink); font-size: .98rem; }
.tcard .who span { font-size: .85rem; color: var(--muted); }

/* --------------------------------------------------------------- FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 4px; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.faq__q .ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; transition: .3s; position: relative; }
.faq__q .ico::before, .faq__q .ico::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; }
.faq__q .ico::before { width: 13px; height: 2px; }
.faq__q .ico::after { width: 2px; height: 13px; transition: transform .3s; }
.faq__item.open .faq__q .ico { background: var(--blue); }
.faq__item.open .faq__q .ico::before, .faq__item.open .faq__q .ico::after { background: #fff; }
.faq__item.open .faq__q .ico::after { transform: scaleY(0); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq__a p { padding: 0 4px 24px; font-size: 1rem; }

/* --------------------------------------------------------------- Team */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { text-align: left; }
.member__ph { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); margin-bottom: 14px; position: relative; }
.member__ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15); transition: transform .5s var(--ease), filter .4s; }
.member:hover .member__ph img { transform: scale(1.05); filter: grayscale(0); }
.member h4 { font-size: 1.06rem; }
.member span { font-size: .9rem; color: var(--orange); font-weight: 500; }

/* Organigrama (árbol del equipo) */
.orgchart { margin-top: 46px; }
.org-tree { text-align: center; }
.org-node { max-width: 234px; margin: 0 auto; }
.org-node .member { text-align: center; }
.org-node .member__ph { border-radius: 18px; }
.org-node--lead { width: 264px; max-width: 100%; }
.org-node--lead .member__ph { box-shadow: 0 0 0 4px var(--orange-soft); animation: leadPulse 2.8s ease-in-out infinite; }
.org-node--lead h4 { font-size: 1.16rem; }
@keyframes leadPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--orange-soft); }
  50%      { box-shadow: 0 0 0 8px rgba(243,146,0,.16); }
}

.org-parent { display: inline-block; position: relative; padding-bottom: 40px; }
.org-parent::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 2px; height: 40px; background: var(--line); transform: translateX(-50%); }

.org-children { display: flex; align-items: flex-start; }
.org-cell { flex: 1 1 0; min-width: 0; position: relative; padding: 40px 12px 0; }
.org-cell::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 40px; background: var(--line); transform: translateX(-50%); }
.org-cell::after  { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--line); }
.org-cell:first-child::after { left: 50%; }
.org-cell:last-child::after  { right: 50%; }

@media (max-width: 760px) {
  .org-children { flex-direction: column; align-items: center; gap: 4px; }
  .org-cell { width: 100%; max-width: 240px; padding: 30px 0 0; }
  .org-cell::after { display: none; }
  .org-cell::before { height: 30px; }
  .org-node, .org-node--lead { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .org-node--lead .member__ph { animation: none; }
}

/* --------------------------------------------------------------- Timeline historia (zigzag) */
.htimeline { position: relative; max-width: 900px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 36px; }
.htl { position: relative; display: flex; width: min(560px, 100%); border-radius: 22px; }
.htl--left  { align-self: flex-start; }
.htl--right { align-self: flex-end; }

.htl__icon {
  flex: 0 0 116px; display: grid; place-items: center;
  background: #FBF6EF; border-radius: 22px 0 0 22px;
}
.htl__icon svg { width: 48px; height: 48px; color: var(--orange); }

.htl__card {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(115deg, #FBA827 0%, #F39200 58%, #ED8A00 100%);
  border-radius: 0 22px 22px 0; padding: 24px 28px; color: #fff;
  box-shadow: 0 18px 36px rgba(243,146,0,.26);
}
.htl__eyebrow { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.92); }
.htl__title { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; line-height: 1.05; margin-top: 7px; font-size: clamp(1.2rem, 2.3vw, 1.8rem); color: #fff; }
.htl__sub { display: block; margin-top: 4px; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; color: rgba(255,255,255,.9); }
.htl__year { flex: 0 0 auto; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.55rem, 3vw, 2.3rem); color: #fff; }

/* Conectores tipo "codo" entre tarjetas alternadas */
.htl + .htl::before {
  content: ""; position: absolute; bottom: 100%; height: 36px; width: 42%;
  border: 0 solid rgba(217,127,0,.5);
}
.htl--right + .htl--left::before  { right: 52px; border-right-width: 2px; border-bottom-width: 2px; border-bottom-right-radius: 18px; }
.htl--left  + .htl--right::before { left: 52px;  border-left-width: 2px;  border-bottom-width: 2px; border-bottom-left-radius: 18px; }

@media (max-width: 760px) {
  .htimeline { gap: 20px; max-width: 520px; }
  .htl { width: 100%; align-self: stretch; }
  .htl + .htl::before { display: none; }
  .htl__icon { flex-basis: 88px; }
  .htl__icon svg { width: 38px; height: 38px; }
  .htl__card { padding: 18px 20px; }
}
@media (max-width: 460px) {
  .htl { flex-direction: column; }
  .htl__icon { flex-basis: auto; padding: 18px 0; border-radius: 22px 22px 0 0; }
  .htl__card { border-radius: 0 0 22px 22px; }
}

/* Accesibilidad: sin movimiento, mostrar contenido animado igualmente */
@media (prefers-reduced-motion: reduce) {
  [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* --------------------------------------------------------------- Pilares (cards con más diseño) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.pillar {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 28px 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.pillar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--orange));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.pillar:hover::before { transform: scaleX(1); }
.pillar__num {
  position: absolute; top: 16px; right: 22px;
  font-family: var(--font-head); font-weight: 800; font-size: 2.7rem; line-height: 1;
  color: var(--accent-soft, var(--orange-soft)); transition: color .3s;
}
.pillar:hover .pillar__num { color: var(--accent, var(--orange)); opacity: .35; }
.pillar__ic {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  margin-bottom: 20px; background: var(--accent-soft, var(--orange-soft)); color: var(--accent-strong, var(--orange-dark));
}
.pillar h3 { font-family: var(--font-head); font-size: 1.18rem; line-height: 1.25; margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: .96rem; }
.pillar__tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--accent-strong, var(--orange-dark));
}
.pillar__tag svg { transition: transform .25s var(--ease); }
.pillar__tag:hover svg { transform: translateX(4px); }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

/* --------------------------------------------------------------- Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-sm); transition: transform .5s var(--ease); }
.gallery a { overflow: hidden; border-radius: var(--radius-sm); display: block; }
.gallery a:hover img { transform: scale(1.07); }
.gallery .tall { grid-row: span 2; aspect-ratio: auto; height: 100%; }

/* --------------------------------------------------------------- CTA band */
.ctaband {
  background: linear-gradient(115deg, var(--blue) 0%, var(--blue-dark) 60%, #0E3F66 100%);
  border-radius: var(--radius-lg); padding: 58px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.ctaband::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(243,146,0,.25); filter: blur(60px); top: -120px; right: -60px; }
.ctaband h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); position: relative; }
.ctaband p { color: #cfe0ef; max-width: 540px; margin: 14px auto 28px; position: relative; }
.ctaband .hero__cta { justify-content: center; position: relative; }

/* --------------------------------------------------------------- Form */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: start; }
.info-card { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-card:last-child { border-bottom: 0; }
.info-card .ic { flex: none; width: 50px; height: 50px; border-radius: 14px; background: var(--orange-soft); color: var(--orange-dark); display: grid; place-items: center; }
.info-card .ic svg { width: 22px; height: 22px; }
.info-card h4 { font-size: 1.02rem; margin-bottom: 2px; }
.info-card a, .info-card p { color: var(--body); font-size: .98rem; }
.info-card a:hover { color: var(--blue); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--bg-soft); transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }
.form__note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form__msg { display: none; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .95rem; }
.form__msg.ok { display: block; background: #E7F6EC; color: #1E7A43; }
/* Validación server-side (ASP.NET) */
.field-error { display: block; color: #c0392b; font-size: .82rem; margin-top: 6px; }
.input-validation-error { border-color: #c0392b !important; box-shadow: 0 0 0 3px rgba(192,57,43,.12) !important; }

/* --------------------------------------------------------------- Page hero (interior) */
.page-hero { padding: 64px 0 40px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.page-hero p { max-width: 600px; margin-top: 14px; font-size: 1.12rem; }

/* Hero con video de fondo (logística) */
.page-hero--video { position: relative; padding: 0; border-bottom: none; overflow: hidden; background: var(--ink); }
.page-hero--video .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.page-hero--video::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,34,51,.74) 0%, rgba(14,34,51,.5) 42%, rgba(14,34,51,.86) 100%);
}
.page-hero--video .container {
  position: relative; z-index: 2;
  padding-top: 132px; padding-bottom: 116px;
  min-height: clamp(440px, 66vh, 620px); display: flex; align-items: center;
}
.page-hero--video .breadcrumb, .page-hero--video .breadcrumb a { color: rgba(255,255,255,.82); }
.page-hero--video .breadcrumb a:hover { color: #fff; }
.page-hero--video h1 { color: #fff; }
.page-hero--video p { color: rgba(255,255,255,.92); }
@media (max-width: 720px) {
  .page-hero--video .container { padding-top: 108px; padding-bottom: 84px; }
}
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--blue); }

/* --------------------------------------------------------------- Página Inmobiliaria (AlvaMar) */
.alva-hero { text-align: center; }
.alva-hero__head { max-width: 920px; margin: 0 auto; }
.alva-hero__logo { width: clamp(190px, 26vw, 300px); height: auto; display: block; margin: 0 auto 26px; }
.alva-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.12; }
.alva-hero__sub { font-family: var(--font-head); font-weight: 600; color: var(--muted); font-size: clamp(1.1rem, 2.4vw, 1.5rem); margin-top: 24px; }
.alva-hero__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: block; margin-top: 44px; }

.alva-project { margin-bottom: 28px; }
.alva-project__brand { display: block; font-family: var(--font-head); font-weight: 700; letter-spacing: .03em; color: #b9c4cd; font-size: 1.35rem; line-height: 1; }
.alva-project .title { margin-top: 4px; }
.alva-project .lead { margin-top: 12px; color: var(--ink); }

/* Carrusel del Strip Center (imagen activa a color con texto, laterales en gris) */
.alva-carousel { position: relative; }
.alva-carousel__viewport { overflow: hidden; padding: 6px 0; }
.alva-carousel__track { display: flex; gap: 24px; transition: transform .6s var(--ease); will-change: transform; }
.alva-slide {
  position: relative; flex: 0 0 62%; border-radius: var(--radius-lg); overflow: hidden;
  transform: scale(.84); opacity: .5; cursor: pointer;
  transition: transform .6s var(--ease), opacity .6s var(--ease);
  box-shadow: var(--shadow);
}
.alva-slide img { width: 100%; height: clamp(300px, 46vw, 440px); object-fit: cover; filter: grayscale(1); transition: filter .6s var(--ease); display: block; }
.alva-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9,17,25,.88) 0%, rgba(9,17,25,.55) 42%, rgba(9,17,25,.05) 72%);
  opacity: 0; transition: opacity .6s var(--ease);
}
.alva-slide figcaption {
  position: absolute; left: clamp(22px, 3vw, 40px); right: 38%; bottom: clamp(24px, 4vw, 38px); z-index: 2;
  color: #fff; opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease) .1s, transform .5s var(--ease) .1s;
}
.alva-slide figcaption h3 { font-family: var(--font-head); color: #fff; font-size: clamp(1.15rem, 2.1vw, 1.7rem); line-height: 1.15; margin-bottom: 10px; }
.alva-slide figcaption p { color: rgba(255,255,255,.88); font-size: clamp(.82rem, 1.1vw, .96rem); line-height: 1.5; }
.alva-slide.is-active { transform: scale(1); opacity: 1; }
.alva-slide.is-active img { filter: grayscale(0); }
.alva-slide.is-active::after { opacity: 1; }
.alva-slide.is-active figcaption { opacity: 1; transform: none; }
.alva-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.alva-carousel__dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 999px; background: var(--line); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.alva-carousel__dot.is-active { width: 26px; background: var(--orange); }
@media (max-width: 760px) {
  .alva-slide { flex-basis: 84%; }
  .alva-slide figcaption { right: 18%; }
}

.alva-features { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }

/* --------------------------------------------------------------- Página Nosotros */
.nos-hero { text-align: center; }
.nos-hero__head { max-width: 880px; margin: 0 auto; }
.nos-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; }
.nos-hero__sub { max-width: 700px; margin: 22px auto 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.nos-hero__img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: block; margin-top: 44px; }

.hero-avatars { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.hero-avatars img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top;
  border: 3px solid #fff; box-shadow: var(--shadow-sm); margin-left: -14px; filter: grayscale(1);
}
.hero-avatars img:first-child { margin-left: 0; }
.hero-avatars__more {
  width: 46px; height: 46px; border-radius: 50%; background: var(--orange); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
  margin-left: -14px; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(243,146,0,.4);
}

/* Columnas vertebrales (lista) */
.spine { max-width: 760px; margin: 42px auto 0; }
.spine__row {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 8px; border-bottom: 1px solid var(--line);
}
.spine__row:first-child { border-top: 1px solid var(--line); }
.spine__row h3 {
  font-family: var(--font-head); font-weight: 700; line-height: 1.12;
  font-size: clamp(1.4rem, 3.1vw, 2.1rem); color: #bdbdbd; transition: color .3s var(--ease);
}
.spine__num { font-family: var(--font-head); font-size: .92rem; letter-spacing: .04em; color: #c4c4c4; flex: 0 0 auto; transition: color .3s var(--ease); }
.spine__row.is-active h3, .spine__row:hover h3 { color: var(--ink); }
.spine__row:hover .spine__num { color: var(--orange); }

/* --------------------------------------------------------------- Footer */
.site-footer { background: var(--bg-navy); color: #9fb2c2; padding: 70px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 40px; margin-bottom: 18px; }
.footer__brand p { font-size: .95rem; max-width: 280px; }
.footer h5 { color: #fff; font-family: var(--font-head); font-size: 1rem; margin-bottom: 18px; }
.footer ul li { margin-bottom: 11px; }
.footer ul a { font-size: .95rem; transition: color .2s; }
.footer ul a:hover { color: var(--orange); }
.footer__social { display: flex; gap: 10px; margin-top: 18px; }
.footer__social a { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .2s, transform .2s; }
.footer__social a:hover { background: var(--orange); transform: translateY(-2px); }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .86rem; }

/* --------------------------------------------------------------- Reveal anim */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { max-width: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .split--rev .split__media { order: 0; }
  .team { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
}
@media (max-width: 760px) {
  .section { padding: 70px 0; }
  .nav__menu {
    position: fixed; inset: 76px 0 auto 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 20px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .28s var(--ease);
  }
  .nav__menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 13px 14px; border-radius: 12px; font-size: 1.05rem; }
  .nav__link:hover, .nav__link.active { background: var(--bg-soft); }
  .nav__indicator { display: none; }
  .nav__toggle { display: flex; }
  .nav__right .btn { display: none; }
  .tgrid, .cards, .gallery { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .field.row { grid-template-columns: 1fr; }
  .ctaband { padding: 40px 24px; }
  .hero__badge { left: 50%; transform: translateX(-50%); }
}

/* ---- Refinamientos responsivos (móvil) ---- */
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  /* Héroes con video de fondo: títulos y texto más contenidos */
  .hero--video h1 { font-size: clamp(1.95rem, 8.4vw, 2.6rem); }
  .hero--video p.lead { font-size: 1.04rem; }
  .hero--video .container { padding-top: 96px; padding-bottom: 64px; min-height: clamp(380px, 68vh, 520px); }
  /* Héroes centrados (Nosotros / AlvaMar) */
  .nos-hero h1 { font-size: clamp(1.8rem, 7.6vw, 2.4rem); }
  .nos-hero__sub { font-size: .98rem; }
  .alva-hero h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .alva-hero__img, .nos-hero__img { margin-top: 30px; }
  /* Cluster de avatares del equipo */
  .hero-avatars img, .hero-avatars__more { width: 40px; height: 40px; }
  .hero-avatars img, .hero-avatars__more { margin-left: -12px; }
  /* Lista "columnas vertebrales" */
  .spine { margin-top: 30px; }
  .spine__row { padding: 18px 2px; gap: 14px; }
  /* Carrusel Strip Center: tarjeta más ancha y más espacio para el texto */
  .alva-slide { flex-basis: 88%; }
  .alva-slide figcaption { right: 9%; }
  /* Galería del Strip Center / tarjetas: sin recortes raros */
  .alva-features { border-radius: var(--radius); }
}
@media (max-width: 400px) {
  .container { padding-inline: 16px; }
  .nav__logo img { height: 32px; }
  .btn { padding: 12px 20px; font-size: .92rem; }
  h2.title { font-size: clamp(1.6rem, 7.5vw, 2rem); }
}
