/* ════════════════════════════════════════════════════════
   TESSERA · styles.css
   ════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Ailerons';
  src: url('https://cdn.jsdelivr.net/gh/opentype/ailerons@latest/Ailerons-Typeface.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/opentype/ailerons@latest/Ailerons-Typeface.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:    #202031;
  --teal:    #587579;
  --teal-lt: #6e9195;
  --slate:   #636879;
  --beige:   #f0e8de;
  --yellow:  #fbe0a0;
  --bg:      #f5f0e8;
  --bg-lt:   #faf7f2;
  --mid:     #4a4858;
  --light:   #8a879a;
  --dust:    #ddd5c8;
  --ff-logo: 'Ailerons', 'Raleway', sans-serif;
  --ff:      'Raleway', sans-serif;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--navy);
  overflow-x: hidden;
}

#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--teal);
  z-index: 1000;
  width: 0;
  transition: width .05s linear;
}

/* ══════════════════ NAV ══════════════════ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 4rem;
  transition: padding .4s, background .4s, box-shadow .4s;
}

nav.scrolled {
  padding: 1rem 4rem;
}

nav.nav-dark {
  background: rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

nav.nav-dark.scrolled {
  background: rgba(0,0,0,.32);
}

nav.nav-dark .nav-logo {
  color: var(--beige);
}

nav.nav-dark .nav-links a {
  color: rgba(240,232,222,.8);
}

nav.nav-dark .nav-links a:hover {
  color: var(--beige);
}

nav.nav-dark .nav-cta {
  background: rgba(240,232,222,.12);
  color: var(--beige) !important;
  border: 1px solid rgba(240,232,222,.3);
}

nav.nav-dark .nav-cta:hover {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
}

nav.nav-dark .hamburger span {
  background: var(--beige);
}

nav.nav-light {
  background: rgba(245,240,232,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--dust);
}

nav.nav-light.scrolled {
  background: rgba(245,240,232,.95);
}

nav.nav-light .nav-logo {
  color: var(--navy);
}

nav.nav-light .nav-links a {
  color: var(--mid);
}

nav.nav-light .nav-links a:hover {
  color: var(--navy);
}

nav.nav-light .nav-cta {
  background: var(--navy);
  color: var(--beige) !important;
}

nav.nav-light .nav-cta:hover {
  background: var(--teal) !important;
}

nav.nav-light .hamburger span {
  background: var(--navy);
}

.nav-logo {
  font-family: var(--ff-logo);
  font-size: 1.6rem;
  letter-spacing: .22em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .35s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width .3s var(--ease);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1.5rem;
  border-radius: 2px;
  font-size: .72rem !important;
  font-weight: 600 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  text-decoration: none;
  transition: background .3s, transform .2s !important;
}

.nav-cta::after {
  display: none !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  transition: .3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--navy);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--beige);
  text-decoration: none;
  transition: color .25s;
}

.mobile-nav a:hover,
.mobile-nav a.mobile-cta {
  color: var(--yellow);
}

/* ══════════════════ HERO ══════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4rem 5rem;
  position: relative;
  overflow: hidden;
  background: #0a1a1c;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%;
  top: -7.5%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1;
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px;
  z-index: 2;
  pointer-events: none;
}

.hero-social-proof,
.hero-eyebrow,
.hero-title,
.hero-sub,
.hero-actions,
.hero-scroll-hint {
  position: relative;
  z-index: 3;
}

.hero-social-proof {
  position: absolute;
  bottom: 5.5rem;
  right: 4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem;
  z-index: 3;
}

.hero-proof-item {
  text-align: right;
  opacity: 0;
  transform: translateY(12px);
}

.hero-proof-item:nth-child(1) { animation: fadeUp .7s 1.1s var(--ease) forwards; }
.hero-proof-item:nth-child(3) { animation: fadeUp .7s 1.3s var(--ease) forwards; }
.hero-proof-item:nth-child(5) { animation: fadeUp .7s 1.5s var(--ease) forwards; }

.hero-proof-num {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--beige);
  letter-spacing: -.01em;
  line-height: 1;
  margin-bottom: .25rem;
}

.hero-proof-item:nth-child(1) .hero-proof-num {
  font-size: 3rem;
}

.hero-proof-label {
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(240,232,222,.45);
  font-weight: 500;
}

.hero-proof-sep {
  width: 1px;
  height: 0;
  background: rgba(240,232,222,.15);
  opacity: 0;
  align-self: flex-end;
  animation: growLine .4s 1.4s forwards;
}

@keyframes growLine { to { height: 24px; opacity: 1; } }

.hero-eyebrow {
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--teal-lt);
  font-weight: 600;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp .9s .3s var(--ease) forwards;
}

.hero-title {
  font-size: clamp(3rem,6.5vw,7.5rem);
  font-weight: 200;
  line-height: .95;
  color: var(--beige);
  letter-spacing: .02em;
  max-width: 16ch;
  opacity: 0;
  animation: fadeUp 1s .5s var(--ease) forwards;
}

.hero-title strong {
  font-weight: 800;
  color: var(--yellow);
  display: block;
}

.hero-sub {
  margin-top: 2rem;
  max-width: 44ch;
  font-size: 1.05rem;
  color: rgba(240,232,222,.8);
  font-weight: 300;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s .7s var(--ease) forwards;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  animation: fadeUp 1s .9s var(--ease) forwards;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 4rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  opacity: 0;
  animation: fadeIn 1s 1.5s forwards;
}

.hero-scroll-hint span {
  font-size: .6rem;
  letter-spacing: .2em;
  color: rgba(240,232,222,.55);
  text-transform: uppercase;
  font-weight: 500;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), transparent);
}

/* ══════════════════ BOTONES ══════════════════ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2rem;
  background: var(--teal);
  color: var(--beige);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background .3s, color .3s, transform .2s var(--ease);
}

.btn-primary:hover {
  background: var(--yellow);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2rem;
  border: 1px solid rgba(240,232,222,.5);
  color: rgba(240,232,222,.9);
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: border-color .3s, color .3s, transform .2s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--beige);
  transform: translateY(-2px);
}

/* ══════════════════ BASE ══════════════════ */

section {
  position: relative;
  overflow: hidden;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
}

.section-label {
  font-size: .62rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: block;
}

.section-title {
  font-size: clamp(2.2rem,4.5vw,3.8rem);
  font-weight: 200;
  line-height: 1.1;
}

.section-title strong {
  font-weight: 800;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--teal);
}

.divider {
  height: 1px;
  background: var(--dust);
  margin: 0 4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ══════════════════ NOSOTROS ══════════════════ */

#about {
  padding: 9rem 0;
}

.about-intro {
  margin-bottom: 4rem;
  max-width: 65ch;
}

.about-intro .section-title {
  margin-bottom: 1.5rem;
}

.about-lead {
  font-size: 1.05rem;
  color: var(--mid);
  line-height: 1.8;
  font-weight: 300;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--navy);
  border-radius: 4px;
  padding: 3rem 4rem;
  margin-bottom: 4rem;
  gap: 0;
}

.about-stat {
  padding: 0 2rem;
}

.about-stat:first-child {
  padding-left: 0;
}

.about-stat:last-child {
  padding-right: 0;
}

.about-stat-num {
  font-size: clamp(1.6rem,2.5vw,2.2rem);
  font-weight: 700;
  color: var(--beige);
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}

.about-stat p {
  font-size: .82rem;
  color: rgba(240,232,222,.6);
  line-height: 1.55;
  font-weight: 300;
}

.about-stat-divider {
  width: 1px;
  height: 60px;
  background: rgba(240,232,222,.12);
}

.about-pillars {
  display: flex;
  flex-direction: column;
}

.pillar {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--dust);
}

.pillar:last-child {
  border-bottom: 1px solid var(--dust);
}

.pillar-num {
  font-size: 1.4rem;
  color: var(--teal);
  font-weight: 700;
  min-width: 28px;
  letter-spacing: .04em;
}

.pillar-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .3rem;
  color: var(--navy);
}

.pillar-content p {
  font-size: .9rem;
  color: var(--mid);
  line-height: 1.6;
  font-weight: 300;
}

/* ══════════════════ SERVICIOS ══════════════════ */

#servicios {
  padding: 9rem 0;
  background: var(--bg-lt);
}

.services-header {
  margin-bottom: 4rem;
}

.services-header p {
  margin-top: 1.2rem;
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.75;
  font-weight: 300;
  max-width: 55ch;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border-top: 1px solid var(--dust);
}

.service-card {
  padding: 2.8rem 2.5rem;
  border-right: 1px solid var(--dust);
  border-bottom: 1px solid var(--dust);
  transition: background .3s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.service-card:nth-child(3n) {
  border-right: none;
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--teal);
  transition: width .4s var(--ease);
}

.service-card:hover {
  background: var(--navy);
}

.service-card:hover::before {
  width: 100%;
}

.service-num {
  font-size: 1.5rem;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 1.2rem;
  display: block;
  transition: color .3s;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .7rem;
  color: var(--navy);
  transition: color .3s;
}

.service-card p {
  font-size: .88rem;
  color: var(--mid);
  line-height: 1.65;
  font-weight: 300;
  transition: color .3s;
}

.service-card:hover .service-num { color: var(--teal-lt); }
.service-card:hover h3            { color: var(--beige); }
.service-card:hover p             { color: rgba(240,232,222,.7); }

.service-ebitda {
  grid-column: 1/-1;
  padding: 2.5rem;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-ebitda p {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--beige);
  font-style: italic;
}

.service-ebitda strong {
  color: var(--yellow);
  font-weight: 800;
}

/* ══════════════════ METODOLOGÍA ══════════════════ */

#metodologia {
  padding: 9rem 0;
}

.methodology-header {
  margin-bottom: 3rem;
}

.methodology-header .section-label {
  color: var(--teal-lt);
}

.meth-title {
  color: var(--beige) !important;
}

.meth-title em {
  color: var(--yellow) !important;
  font-style: normal;
}

.meth-sub {
  margin-top: 1.2rem;
  font-size: 1rem;
  color: rgba(240,232,222,.75);
  font-weight: 300;
  line-height: 1.7;
  max-width: 52ch;
}

.hc-intro {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.hc-intro-item {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 1.8rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,232,222,.1);
  border-radius: 6px;
  transition: background .3s, border-color .3s;
}

.hc-intro-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(240,232,222,.18);
}

.hc-intro-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(88,117,121,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal-lt);
}

.hc-intro-item h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--beige);
  line-height: 1.3;
}

.hc-intro-item p {
  font-size: .8rem;
  color: rgba(240,232,222,.6);
  line-height: 1.6;
  font-weight: 300;
}

.meth-numbers-title {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 300;
  color: rgba(240,232,222,.7);
  margin-bottom: 1.5rem;
}

.meth-numbers-title strong {
  color: var(--beige);
  font-weight: 700;
}

.meto-numbers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid rgba(240,232,222,.1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.meto-num-item {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 3.5rem;
  background: rgba(255,255,255,.04);
  cursor: default;
  transition: background .3s var(--ease);
}

.meto-num-item:hover {
  background: rgba(255,255,255,.07);
}

.meto-big {
  display: flex;
  align-items: baseline;
  gap: .15rem;
  line-height: 1;
  flex-shrink: 0;
}

.meto-big .count-anim {
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 200;
  color: var(--beige);
}

.meto-unit {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--yellow);
  font-weight: 700;
}

.meto-num-body { flex: 1; }

.meto-num-label {
  font-size: .95rem;
  font-weight: 700;
  color: var(--beige);
  margin-bottom: .5rem;
  letter-spacing: .02em;
}

.meto-num-desc {
  font-size: .83rem;
  color: rgba(240,232,222,.6);
  line-height: 1.6;
  font-weight: 300;
}

.meto-num-sep {
  width: 1px;
  height: 80px;
  background: rgba(240,232,222,.1);
  flex-shrink: 0;
}

.meto-mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tessa-card {
  background: rgba(88,117,121,.1);
  border: 1px solid rgba(88,117,121,.25);
  border-radius: 8px;
  padding: 2.8rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: background .3s, border-color .3s;
}

.tessa-card:hover {
  background: rgba(88,117,121,.16);
  border-color: rgba(88,117,121,.4);
}

.tessa-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--teal);
  transition: width .4s var(--ease);
}

.tessa-card:hover::after {
  width: 100%;
}

.tessa-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88,117,121,.22) 0%, transparent 70%);
  pointer-events: none;
}

.tessa-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tessa-logo {
  font-family: var(--ff-logo);
  font-size: 1.4rem;
  color: var(--beige);
  letter-spacing: .1em;
}

.tessa-tag {
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-lt);
  font-weight: 700;
  background: rgba(88,117,121,.2);
  padding: .3rem .7rem;
  border-radius: 2px;
}

.tessa-card > p {
  color: rgba(240,232,222,.82);
  line-height: 1.75;
  font-weight: 300;
  font-size: .92rem;
}

.tessa-card strong {
  color: var(--yellow);
  font-weight: 700;
}

.progress-section {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,232,222,.1);
  border-radius: 8px;
  padding: 2.5rem;
}

.progress-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--beige);
  margin-bottom: 1.8rem;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.progress-item { cursor: default; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .6rem;
}

.progress-label {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(240,232,222,.9);
  letter-spacing: .02em;
}

.progress-value {
  font-size: .82rem;
  font-weight: 700;
  color: var(--teal-lt);
}

.progress-track {
  height: 4px;
  background: rgba(240,232,222,.12);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-lt) 100%);
  transition: width 1.2s var(--ease);
}

.progress-item:nth-child(4) .progress-fill { background: linear-gradient(90deg, var(--teal) 0%, var(--yellow) 100%); }
.progress-item:nth-child(1) .progress-fill { transition-delay:   0ms; }
.progress-item:nth-child(2) .progress-fill { transition-delay: 120ms; }
.progress-item:nth-child(3) .progress-fill { transition-delay: 240ms; }
.progress-item:nth-child(4) .progress-fill { transition-delay: 360ms; }
.progress-item:nth-child(5) .progress-fill { transition-delay: 480ms; }

.timeline-title {
  font-size: clamp(1.3rem,2.5vw,1.9rem);
  font-weight: 300;
  color: rgba(240,232,222,.9);
  margin-bottom: 2.5rem;
  line-height: 1.35;
  max-width: 55ch;
}

.timeline-title strong {
  color: var(--beige);
  font-weight: 700;
}

.h-timeline {
  position: relative;
}

.h-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
}

.h-cols::before {
  content: '';
  position: absolute;
  top: calc(1.45rem + 6px);
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(240,232,222,.12);
  z-index: 0;
}

.h-cols::after {
  content: '';
  position: absolute;
  top: calc(1.45rem + 6px);
  left: 10%;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, rgba(240,232,222,.25) 0%, rgba(240,232,222,.55) 70%, var(--yellow) 100%);
  z-index: 0;
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.h-timeline.animated .h-cols::after {
  width: 80%;
}

.h-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.h-col-time {
  font-size: .72rem;
  font-weight: 700;
  color: rgba(240,232,222,.7);
  letter-spacing: .1em;
  margin-bottom: .65rem;
}

.h-col-dot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.4rem;
  position: relative;
  z-index: 2;
}

.h-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 2px rgba(240,232,222,.4);
  border: none;
  outline: none;
  cursor: pointer;
  opacity: 0;
  transform: scale(0);
  transition: opacity .35s ease, transform .35s cubic-bezier(0.34,1.56,0.64,1), background .3s, box-shadow .3s;
}

.h-timeline.animated .h-dot {
  opacity: 1;
  transform: scale(1);
}

.h-dot:hover {
  background: var(--teal-lt);
  box-shadow: 0 0 0 5px rgba(88,117,121,.28);
  transform: scale(1.65) !important;
}

.h-dot::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(20,30,35,.95);
  color: var(--beige);
  font-family: var(--ff);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
  padding: .28rem .65rem;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10;
}

.h-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.h-step {
  flex: 1;
  padding: 0 .3rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.h-timeline.animated .h-step {
  opacity: 1;
  transform: translateY(0);
}

.h-step-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--beige);
  margin-bottom: .4rem;
  letter-spacing: .02em;
  transition: color .25s;
}

.h-step-desc {
  font-size: .72rem;
  color: rgba(240,232,222,.65);
  line-height: 1.5;
  font-weight: 300;
}

.h-col:nth-child(1) .h-dot  { transition-delay:  150ms; }
.h-col:nth-child(2) .h-dot  { transition-delay:  350ms; }
.h-col:nth-child(3) .h-dot  { transition-delay:  550ms; }
.h-col:nth-child(4) .h-dot  { transition-delay:  750ms; }
.h-col:nth-child(5) .h-dot  { transition-delay:  950ms; }
.h-col:nth-child(1) .h-step { transition-delay:  300ms; }
.h-col:nth-child(2) .h-step { transition-delay:  480ms; }
.h-col:nth-child(3) .h-step { transition-delay:  660ms; }
.h-col:nth-child(4) .h-step { transition-delay:  840ms; }
.h-col:nth-child(5) .h-step { transition-delay: 1020ms; }

/* ══════════════════ TESTIMONIOS ══════════════════ */

#casos {
  padding: 9rem 0;
  background: var(--bg-lt);
}

.carousel-wrap {
  margin-top: 4rem;
  position: relative;
}

.carousel {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.testimonial-card {
  background: var(--bg);
  padding: 2.8rem;
  border-radius: 4px;
  border: 1px solid var(--dust);
  position: relative;
  overflow: hidden;
  cursor: default;
  display: flex;
  flex-direction: column;
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s, border-color .3s;
  flex: 0 0 100%;
  width: 100%;
  min-height: 280px;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--teal);
  transition: width .4s var(--ease);
}

.testimonial-card:hover::before { width: 100%; }

.testimonial-card:hover {
  background: var(--navy);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(32,32,49,.15);
  border-color: transparent;
}

.testimonial-result {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: .3rem .7rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  transition: color .3s, border-color .3s, background .3s;
  width: fit-content;
}

.testimonial-card:hover .testimonial-result {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(251,224,160,.08);
}

.quote-mark {
  font-size: 4rem;
  color: var(--teal);
  opacity: .2;
  line-height: .7;
  margin-bottom: .8rem;
  display: block;
  font-weight: 800;
  transition: opacity .3s;
}

.testimonial-card:hover .quote-mark {
  opacity: .35;
  color: var(--teal-lt);
}

.testimonial-card > p {
  font-size: .94rem;
  line-height: 1.75;
  color: var(--mid);
  font-style: italic;
  margin-bottom: 2rem;
  font-weight: 300;
  flex: 1;
  transition: color .3s;
}

.testimonial-card:hover > p {
  color: rgba(240,232,222,.78);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  color: var(--yellow);
  flex-shrink: 0;
  transition: background .3s;
}

.testimonial-card:hover .author-avatar {
  background: var(--teal);
}

.author-info strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--navy);
  transition: color .3s;
}

.testimonial-card:hover .author-info strong {
  color: var(--beige);
}

.author-info span {
  font-size: .72rem;
  color: var(--light);
  letter-spacing: .04em;
  transition: color .3s;
}

.testimonial-card:hover .author-info span {
  color: rgba(240,232,222,.5);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--dust);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  transition: border-color .25s, background .25s, color .25s;
}

.carousel-btn:hover {
  border-color: var(--teal);
  background: var(--navy);
  color: var(--beige);
}

.carousel-dots {
  display: flex;
  gap: .6rem;
  align-items: center;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dust);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .25s, transform .25s;
}

.carousel-dot.active {
  background: var(--teal);
  transform: scale(1.3);
}

/* ══════════════════ CONTACTO ══════════════════ */

#contacto {
  padding: 10rem 0;
}

.contact-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.contact-inner .section-label {
  color: var(--teal-lt);
}

.contact-title {
  font-size: clamp(2.2rem,5vw,4rem);
  font-weight: 200;
  line-height: 1.2;
  color: var(--beige);
  margin: 1rem 0 1.5rem;
}

.contact-title em {
  font-style: italic;
  color: var(--yellow);
  font-weight: 300;
}

.contact-sub {
  font-size: 1rem;
  color: rgba(240,232,222,.7);
  line-height: 1.7;
  margin-bottom: 3rem;
  font-weight: 300;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: rgba(240,232,222,.75);
  letter-spacing: .06em;
  text-decoration: none;
  padding: .85rem 1.6rem;
  border: 1px solid rgba(240,232,222,.3);
  border-radius: 2px;
  transition: color .3s, border-color .3s;
}

.contact-email:hover {
  color: var(--beige);
  border-color: var(--teal);
}

.contact-guarantees {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-guarantees span {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(240,232,222,.45);
  font-weight: 500;
}

.contact-guarantees svg {
  color: var(--teal);
  flex-shrink: 0;
}

/* ══════════════════ FOOTER ══════════════════ */

footer {
  background: #161625;
  border-top: 1px solid rgba(240,232,222,.1);
  padding: 4rem 4rem 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-logo {
  font-family: var(--ff-logo);
  font-size: 1.4rem;
  letter-spacing: .22em;
  color: var(--beige);
  text-transform: uppercase;
  display: block;
  margin-bottom: .8rem;
  text-decoration: none;
}

.footer-brand p {
  font-size: .86rem;
  color: rgba(240,232,222,.6);
  line-height: 1.65;
  max-width: 26ch;
  font-weight: 300;
}

.footer-col h5 {
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal-lt);
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.footer-col ul a {
  font-size: .86rem;
  color: rgba(240,232,222,.6);
  text-decoration: none;
  transition: color .25s;
  font-weight: 300;
}

.footer-col ul a:hover {
  color: var(--beige);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240,232,222,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color .3s, background .3s;
}

.social-link:hover {
  border-color: var(--teal);
  background: rgba(88,117,121,.2);
}

.social-link i {
  font-size: 15px;
  color: rgba(240,232,222,.75);
  transition: color .3s;
}

.social-link:hover i {
  color: var(--beige);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(240,232,222,.1);
}

.footer-bottom p {
  font-size: .75rem;
  color: rgba(240,232,222,.6);
  font-weight: 300;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: .75rem;
  color: rgba(240,232,222,.6);
  text-decoration: none;
  transition: color .25s;
}

.footer-legal a:hover {
  color: var(--beige);
}

/* ══════════════════ VÍDEOS DE SECCIÓN ══════════════════ */

#about       { background: transparent; }
#metodologia { background: transparent; }
#contacto    { background: transparent; }
#servicios   { background: var(--bg-lt); }
#casos       { background: var(--bg-lt); }

.section-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.section-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 240, 232, 0.82);
  z-index: 1;
  pointer-events: none;
}

.section-video-overlay--dark {
  background: rgba(32, 32, 49, 0.84);
}

section > .section-inner {
  position: relative;
  z-index: 2;
}

/* ══════════════════ KEYFRAMES ══════════════════ */

@keyframes fadeUp  { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes scrollPulse { 0%,100% { opacity:.4; } 50% { opacity:1; } }

/* ══════════════════ RESPONSIVE ══════════════════ */

@media(max-width:1024px) {
  .about-stats { grid-template-columns: 1fr; gap: 0; padding: 2.5rem; }
  .about-stat { padding: 1.5rem 0; }
  .about-stat:first-child { padding-top: 0; }
  .about-stat:last-child { padding-bottom: 0; }
  .about-stat-divider { width: 100%; height: 1px; }
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .service-card:nth-child(3n) { border-right: 1px solid var(--dust); }
  .service-card:nth-child(2n) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .meth-top-row { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media(max-width:768px) {
  nav,
  nav.scrolled,
  nav.nav-light,
  nav.nav-light.scrolled,
  nav.nav-dark,
  nav.nav-dark.scrolled { padding: 1.1rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav a { font-size: 1.8rem; }
  .section-title { font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.15; }
  .section-label { font-size: .58rem; }
  .section-inner { padding: 0 1.25rem; }
  .divider { margin: 0 1.25rem; }
  #about       { padding: 4rem 0; }
  #servicios   { padding: 4rem 0; }
  #metodologia { padding: 4rem 0; }
  #casos       { padding: 4rem 0; }
  #contacto    { padding: 5rem 0; }
  .section-video-overlay       { background: rgba(245, 240, 232, 0.90); }
  .section-video-overlay--dark { background: rgba(32, 32, 49, 0.90); }
  .hero { padding: 5rem 1.25rem 3rem; min-height: 100svh; justify-content: center; }
  .hero-social-proof { position: relative; bottom: auto; right: auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 1rem; margin-top: 2.8rem; }
  .hero-social-proof .hero-proof-sep { width: 1px; height: 20px; opacity: 1 !important; animation: none !important; }
  .hero-proof-item { text-align: left; opacity: 0; animation: fadeUp .7s 1.1s var(--ease) forwards; }
  .hero-proof-item:nth-child(1) .hero-proof-num { font-size: 1.5rem; }
  .hero-proof-num { font-size: .95rem; }
  .hero-proof-label { font-size: .52rem; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.05; max-width: 100%; }
  .hero-sub { font-size: .92rem; max-width: 100%; margin-top: 2.5rem; }
  .hero-eyebrow { font-size: .62rem; margin-bottom: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; gap: .75rem; margin-top: 3rem; }
  .btn-primary, .btn-ghost { justify-content: center; padding: .95rem 1.25rem; font-size: .74rem !important; }
  .hero-scroll-hint { display: none; }
  .about-intro { margin-bottom: 2.5rem; }
  .about-lead { font-size: .95rem; }
  .about-stats { grid-template-columns: 1fr; gap: 0; padding: 1.8rem 1.25rem; margin-bottom: 2.5rem; border-radius: 6px; }
  .about-stat-divider { width: 100%; height: 1px; }
  .about-stat-num { font-size: 1.5rem; }
  .about-stat p { font-size: .8rem; }
  .services-header { margin-bottom: 2.5rem; }
  .services-header p { font-size: .92rem; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: none !important; padding: 2rem 1.5rem; }
  .service-num { font-size: 1.2rem; margin-bottom: .8rem; }
  .service-card h3 { font-size: 1rem; }
  .service-card p { font-size: .85rem; }
  .service-ebitda p { font-size: 1.1rem; }
  .methodology-header { margin-bottom: 2.5rem; }
  .meth-title { font-size: clamp(1.8rem, 7vw, 2.6rem) !important; }
  .meth-sub { font-size: .92rem; }
  .hc-intro { grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
  .hc-intro-item { padding: 1.2rem; }
  .hc-intro-item h4 { font-size: .82rem; }
  .hc-intro-item p { font-size: .74rem; }
  .meth-numbers-title { font-size: 1.1rem; }
  .meto-numbers { grid-template-columns: 1fr; border-radius: 6px; }
  .meto-num-item { padding: 2rem 1.5rem; gap: 1.5rem; }
  .meto-big .count-anim { font-size: clamp(3rem, 11vw, 4.5rem); }
  .meto-unit { font-size: 1.6rem; }
  .meto-num-sep { width: 100%; height: 1px; }
  .meto-num-label { font-size: .88rem; }
  .meto-num-desc { font-size: .78rem; }
  .meto-mid { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem; }
  .tessa-card { padding: 2rem 1.5rem; }
  .tessa-logo { font-size: 1.1rem; }
  .tessa-card > p { font-size: .86rem; }
  .progress-section { padding: 1.8rem 1.4rem; }
  .progress-title { font-size: .9rem; margin-bottom: 1.5rem; }
  .progress-label { font-size: .78rem; }
  .timeline-title { font-size: clamp(1.2rem, 5vw, 1.6rem); margin-bottom: 2rem; }
  .carousel-wrap { margin-top: 2.5rem; }
  .carousel-controls { gap: 1rem; margin-top: 2rem; }
  .h-timeline { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; padding-right: 2rem; mask-image: linear-gradient(to right, black 85%, transparent 100%); -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%); }
  .h-cols { grid-template-columns: repeat(5, minmax(80px, 1fr)); min-width: 420px; }
  .h-cols::before, .h-cols::after { display: none; }
  .h-col-time { font-size: .6rem; }
  .h-step-name { font-size: .7rem; }
  .h-step-desc { display: none; }
  .h-dot { width: 11px; height: 11px; }
  .testimonial-card { padding: 2rem 1.5rem; }
  .testimonial-result { font-size: .58rem; padding: .25rem .6rem; margin-bottom: 1.2rem; }
  .quote-mark { font-size: 3rem; margin-bottom: .5rem; }
  .testimonial-card > p { font-size: .88rem; margin-bottom: 1.5rem; }
  .contact-title { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .contact-sub { font-size: .92rem; margin-bottom: 2rem; }
  .contact-actions { flex-direction: column; align-items: stretch; gap: .75rem; }
  .contact-email { justify-content: center; font-size: .78rem; }
  .contact-guarantees { gap: .8rem; }
  .contact-guarantees span { font-size: .65rem; }
  footer { padding: 3rem 1.25rem 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-logo { font-size: 1.2rem; }
  .footer-bottom { flex-direction: column; gap: .8rem; text-align: center; }
  .footer-legal { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}

@media(max-width:480px) {
  .hero-social-proof { gap: .6rem; }
  .hero-proof-sep { width: 1px; height: 20px; }
  .hero-proof-item:nth-child(1) .hero-proof-num { font-size: 1.2rem; }
}

@media(max-width:380px) {
  .hero-title { font-size: 2rem; }
}

@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .section-video { display: none; }
  #about       { background: var(--bg); }
  #metodologia { background: var(--navy); }
  #contacto    { background: var(--navy); }
}