/* ============================================================
   GRUPO KABAT — BRAND TOKENS
   ============================================================ */
:root {
  /* Grupo Kabat */
  --gk-primary: #213667;
  --gk-secondary: #0098D6;
  --gk-accent: #11172D;
  --gk-dark: #0D1B2A;
  --gk-darker: #070f1a;

  --hero-deep: #04080F;

  /* SYM */
  --sym-primary: #4393ce;
  --sym-secondary: #263565;
  --sym-accent: #87e856;
  --sym-dark: #0D1E36;

  /* Kabat One */
  --k1-primary: #00A1FF;
  --k1-secondary: #24326A;
  --k1-accent: #31D8FF;
  --k1-dark: #060E40;

  /* Neutrals */
  --white: #FFFFFF;
  --text-light: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.08);

  /* Grid texture — applied to dark sections */
  --grid-texture:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  --grid-size: 58px 58px;

  /* Grid texture — light variant for timeline */
  --grid-light:
    linear-gradient(rgba(33, 54, 103, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 54, 103, 0.06) 1px, transparent 1px);

  --section-py: 7rem;
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  background: var(--gk-dark);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
}

h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

p {
  color: var(--text-light);
  max-width: 60ch;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn--primary {
  background: var(--gk-secondary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 152, 214, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 8px 28px rgba(0, 152, 214, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.btn--sym {
  background: var(--sym-primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(67, 147, 206, 0.35);
}

.btn--sym:hover {
  box-shadow: 0 8px 28px rgba(67, 147, 206, 0.5);
}

.btn--k1 {
  background: var(--k1-primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 161, 255, 0.35);
}

.btn--k1:hover {
  box-shadow: 0 8px 28px rgba(0, 161, 255, 0.5);
}

.btn--sym-outline {
  background: rgba(67, 147, 206, 0.15);
  color: var(--white);
  border: 1.5px solid var(--sym-primary);
}

.btn--sym-outline:hover {
  background: rgba(67, 147, 206, 0.3);
}

.btn--k1-outline {
  background: rgba(0, 161, 255, 0.15);
  color: var(--white);
  border: 1.5px solid var(--k1-primary);
}

.btn--k1-outline:hover {
  background: rgba(0, 161, 255, 0.3);
}

/* ============================================================
   LABELS & SECTION HEADINGS
   ============================================================ */
.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gk-secondary);
  margin-bottom: 0.75rem;
}

.label--center {
  display: block;
  text-align: center;
}

.label--light {
  color: rgba(255, 255, 255, 0.5);
}

.label--dark {
  color: var(--gk-primary);
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.section-title--light {
  color: var(--white);
}

.section-title--dark {
  color: #111827;
}

.section-sub {
  text-align: center;
  margin: 0 auto 3.5rem;
  max-width: 55ch;
}

.section-sub--light {
  color: var(--text-light);
}

.section-sub--dark {
  color: #374151;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(7, 15, 26, 0.92);
  backdrop-filter: blur(12px);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo img {
  height: 40px;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Ocultar logo del nav mientras el usuario está en el hero */
.nav.in-hero .nav__logo img {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--white);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: 0.3s;
}

/* ============================================================
   HERO — canvas particle wave
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  background: var(--hero-deep);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero__logo {
  height: 100px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.1s forwards;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gk-secondary);
  max-width: 100%;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.25s forwards;
}

.hero__headline {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.4s forwards;
}

.hero__accent {
  color: var(--gk-secondary);
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.55s forwards;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.7s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ============================================================
   ABOUT — grid texture
   ============================================================ */
.about {
  padding: var(--section-py) 0;
  background: #0f1d2e;
  background-image: var(--grid-texture);
  background-size: var(--grid-size);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__text h2 {
  margin-bottom: 1.25rem;
}

.about__text p {
  margin-bottom: 1rem;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.stat:hover {
  background: rgba(0, 152, 214, 0.08);
  border-color: rgba(0, 152, 214, 0.3);
  transform: translateY(-4px);
}

.stat__number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  display: block;
}

.stat__plus,
.stat__pct {
  font-size: 1.6rem;
  color: var(--gk-secondary);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ============================================================
   COMPANIES — fondo blanco
   ============================================================ */
.companies {
  padding: var(--section-py) 0;
  background: #F5F8FC;
}

/* Textos oscuros sobre fondo claro */
.companies .label {
  color: var(--gk-primary);
}

.companies .section-title {
  color: #111827;
}

.companies .section-sub {
  color: #4B5563;
}

.companies__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.company-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.company-card:hover {
  transform: translateY(-6px);
}

.company-card--sym:hover {
  box-shadow: 0 20px 50px rgba(67, 147, 206, 0.18);
}

.company-card--k1:hover {
  box-shadow: 0 20px 50px rgba(0, 161, 255, 0.18);
}

/* Card header with image background */
.company-card__header {
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  min-height: 150px;
  position: relative;
  overflow: hidden;
}

/* Background image layer */
.company-card__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--card-image, none);
  background-size: cover;
  background-position: center right;
  z-index: 0;
}

/* Gradient overlay: brand color left → transparent right */
.company-card__header--sym {
  background-color: var(--sym-dark);
}

.company-card__header--sym::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(13, 30, 54, 0.80) 0%, rgba(13, 30, 54, 0) 100%);
  z-index: 1;
}

.company-card__header--k1 {
  background-color: var(--k1-dark);
}

.company-card__header--k1::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6, 14, 64, 0.80) 0%, rgba(6, 14, 64, 0) 100%);
  z-index: 1;
}

.company-card__logo {
  height: 72px;
  position: relative;
  z-index: 2;
}

.company-card__body {
  padding: 2rem;
  background: #FFFFFF;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.company-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
}

.company-card--sym .company-card__tag {
  background: rgba(67, 147, 206, 0.1);
  color: var(--sym-secondary);
}

.company-card--k1 .company-card__tag {
  background: rgba(0, 161, 255, 0.10);
  color: var(--k1-secondary);
}

.company-card__body h3 {
  color: #111827;
}

.company-card__body p {
  font-size: 0.9rem;
  color: #374151;
}

.company-card__pillars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.25rem 0;
}

.company-card__pillars li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #4B5563;
}

.company-card--sym .company-card__pillars li svg {
  color: var(--sym-primary);
}

.company-card--k1 .company-card__pillars li svg {
  color: var(--k1-primary);
}

.company-card__tagline {
  font-style: italic;
  font-size: 0.85rem;
  color: #6B7280;
  border-left: 2px solid #E5E7EB;
  padding-left: 1rem;
  margin-top: auto;
}

.company-card--sym .company-card__tagline {
  border-color: var(--sym-primary);
}

.company-card--k1 .company-card__tagline {
  border-color: var(--k1-primary);
}

/* ============================================================
   TIMELINE — light background with grid texture
   ============================================================ */
.timeline {
  padding: var(--section-py) 0;
  background: #EEF4FC;
  background-image: var(--grid-light);
  background-size: var(--grid-size);
  position: relative;
  overflow: hidden;
}

.timeline__track {
  position: relative;
  margin-top: 1rem;
}

/* Central vertical line */
.timeline__track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gk-primary) 8%, var(--gk-primary) 92%, transparent);
  transform: translateX(-50%);
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  position: relative;
  opacity: 0;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.timeline__item.visible {
  opacity: 1;
}

.timeline__item--left {
  flex-direction: row-reverse;
  transform: translateX(-30px);
}

.timeline__item--right {
  flex-direction: row;
  transform: translateX(30px);
}

.timeline__item--left.visible,
.timeline__item--right.visible {
  transform: translateX(0);
}

/* Dot */
.timeline__dot {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  transform: translate(-50%, 0);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gk-primary);
  border: 3px solid #EEF4FC;
  box-shadow: 0 0 0 2px var(--gk-primary);
  z-index: 2;
}

.timeline__dot--milestone {
  width: 18px;
  height: 18px;
  background: var(--gk-secondary);
  box-shadow: 0 0 0 3px rgba(0, 152, 214, 0.25), 0 0 0 1px var(--gk-secondary);
}

.timeline__dot--award {
  width: 18px;
  height: 18px;
  background: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25), 0 0 0 1px #F59E0B;
}

.timeline__dot--now {
  width: 20px;
  height: 20px;
  background: var(--k1-primary);
  box-shadow: 0 0 0 4px rgba(0, 161, 255, 0.2), 0 0 0 1px var(--k1-primary);
}

/* Card */
.timeline__card {
  width: calc(50% - 3rem);
  background: var(--white);
  border: 1px solid rgba(33, 54, 103, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  user-select: none;
}

.timeline__item--left .timeline__card {
  margin-right: 3.5rem;
}

.timeline__item--right .timeline__card {
  margin-left: 3.5rem;
}

.timeline__card:hover {
  box-shadow: 0 8px 32px rgba(33, 54, 103, 0.12);
  border-color: rgba(33, 54, 103, 0.25);
}

/* Click animation */
.timeline__card.popped {
  animation: cardPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

.timeline__card--milestone {
  border-color: rgba(0, 152, 214, 0.25);
  background: #F0F9FF;
}

.timeline__card--award {
  border-color: rgba(245, 158, 11, 0.3);
  background: #FFFBEB;
}

.timeline__card--now {
  border-color: rgba(0, 161, 255, 0.3);
  background: #F0F8FF;
}

.timeline__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #92400E;
  background: rgba(245, 158, 11, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.timeline__year {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gk-secondary);
  margin-bottom: 0.35rem;
}

.timeline__card--award .timeline__year {
  color: #D97706;
}

.timeline__card--now .timeline__year {
  color: var(--k1-primary);
}

.timeline__card h4 {
  color: #111827;
  margin-bottom: 0.5rem;
}

.timeline__card p {
  color: #374151;
  font-size: 0.875rem;
  max-width: 100%;
}

.timeline__card p strong {
  color: #111827;
  font-weight: 600;
}

.timeline__link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gk-secondary);
  letter-spacing: 0.03em;
  transition: gap 0.2s;
  gap: 0.2rem;
}

.timeline__link:hover {
  gap: 0.5rem;
  color: var(--gk-primary);
}

.timeline__link--k1 {
  color: var(--k1-primary);
}

.timeline__link--k1:hover {
  color: var(--k1-secondary);
}

/* ============================================================
   CTA BAND — grid texture
   ============================================================ */
.cta-band {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--gk-primary) 0%, #1a2d55 100%);
  background-image: var(--grid-texture);
  background-size: var(--grid-size);
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-band__text h2 {
  max-width: 24ch;
}

.cta-band__text p {
  color: var(--text-light);
  margin-top: 0.75rem;
}

.cta-band__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 4rem 0 2rem;
  background: var(--gk-darker);
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand img {
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 28ch;
}

.footer__copy {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer__col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__col a {
  font-size: 0.88rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer__col a:hover {
  color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --section-py: 5rem;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about__text p {
    max-width: 100%;
  }

  .companies__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--gk-darker);
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }

  .nav__links.open a {
    font-size: 1.4rem;
  }

  /* Timeline mobile: single column */
  .timeline__track::before {
    left: 20px;
  }

  .timeline__item--left,
  .timeline__item--right {
    flex-direction: column;
    padding-left: 50px;
  }

  .timeline__dot {
    left: 20px;
    top: 0.8rem;
  }

  .timeline__card {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .cta-band__inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-band__text h2 {
    max-width: 100%;
  }

  .cta-band__actions {
    justify-content: center;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}