/* Trexia landing — tokens + layout (single entry point) */
@import url('trexia-ds-tokens.css');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-page);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

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

.landing-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.landing-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--blue-600);
}

.landing-eyebrow--on-dark {
  color: var(--blue-300);
}

.landing-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
}

.landing-wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-wordmark);
  line-height: 1;
  text-decoration: none;
  color: var(--text-strong);
  position: relative;
  padding-bottom: 6px;
}

.landing-wordmark::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--blue-500);
}

.landing-wordmark--nav {
  font-size: 28px;
  height: 38px;
  padding-bottom: 5px;
}

.landing-wordmark--hero {
  font-size: 42px;
  color: #fff;
  height: 58px;
  padding-bottom: 8px;
}

.landing-wordmark--hero::after {
  background: var(--blue-300);
}

.landing-wordmark--close {
  font-size: 22px;
  height: 30px;
  padding-bottom: 5px;
}

.landing-wordmark--footer {
  font-size: 16px;
  height: 22px;
  padding-bottom: 4px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-500);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out);
}

.landing-btn--hero:hover {
  background: var(--blue-400);
}

.landing-btn--cierre:hover {
  background: var(--blue-600);
}

.landing-btn--on-dark:hover {
  background: var(--blue-400);
}

.landing-btn:focus-visible,
.landing-link:focus-visible,
.landing-nav__toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.landing-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
}

.landing-link--underline {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 3px;
}

.landing-link--underline:hover {
  border-bottom-color: #fff;
}

.landing-link--on-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

section[id] {
  scroll-margin-top: 88px;
}

/* Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 243, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.landing-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.landing-nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.landing-nav__links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.landing-nav__links a:hover {
  color: var(--text-strong);
}

.landing-nav__actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-nav__login {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  padding: 12px 4px;
  border-bottom: 1px solid transparent;
}

.landing-nav__login:hover {
  border-bottom-color: var(--text-strong);
}

.landing-nav__cta {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-500);
  border-radius: var(--radius-md);
  transition: background var(--dur-base) var(--ease-out);
}

.landing-nav__cta:hover {
  background: var(--blue-600);
}

.landing-nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-strong);
  padding: 8px;
}

/* Hero */
.landing-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface-ink);
  color: var(--text-inverse);
  padding: 112px 0 96px;
}

.landing-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}

.landing-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(24, 37, 48, 0.68) 0%,
    rgba(28, 30, 31, 0.8) 55%,
    rgba(28, 30, 31, 0.95) 100%
  );
}

.landing-hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 40px;
}

.landing-hero__eyebrow {
  margin: 44px 0 20px;
}

.landing-hero__title {
  font-size: 56px;
  line-height: var(--leading-tight);
  color: #fff;
  margin: 0 0 24px;
  max-width: 840px;
}

.landing-hero__lede {
  font-size: var(--text-lg);
  color: var(--ink-200);
  max-width: 620px;
  margin: 0 0 40px;
}

.landing-hero__pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 28px;
}

.landing-hero__pillar {
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 240px;
}

.landing-hero__pillar:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.landing-hero__pillar h3 {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
}

.landing-hero__pillar p {
  font-size: 13px;
  color: var(--ink-300);
  line-height: 1.5;
  margin: 0;
}

.landing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.landing-hero__actions .landing-link--underline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

/* Backers */
.landing-backers {
  background: var(--surface-ink-2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 26px 0;
}

.landing-backers__label {
  font-size: 11.5px;
  color: var(--ink-400);
  letter-spacing: 0.03em;
  text-align: center;
  margin-bottom: 22px;
}

.landing-backers__row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-backers__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 48px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-backers__item:last-child {
  border-right: none;
}

.landing-backers__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: #fff;
}

.landing-backers__role {
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--blue-300);
  margin-top: 5px;
}

/* Firma */
.landing-firma {
  background: var(--surface-card);
  padding: 104px 0;
}

.landing-firma__title {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.1;
  max-width: 1080px;
  margin: 22px 0 28px;
}

.landing-firma__lede {
  font-size: 18.5px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin: 0;
}

/* Soluciones */
.landing-soluciones {
  padding: 0 0 104px;
}

.landing-soluciones__header {
  max-width: 1080px;
  margin-bottom: 56px;
}

.landing-soluciones__title {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.16;
  margin: 16px 0 0;
}

.landing-soluciones__list {
  border-top: 1px solid var(--border-subtle);
}

.sol-row {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  gap: 28px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.sol-row__problem {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

.sol-row__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.sol-row__label--problem {
  color: var(--text-faint);
}

.sol-row__label--solution {
  color: var(--blue-600);
  font-weight: 500;
}

.sol-row__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  font-size: 18px;
  flex-shrink: 0;
}

.sol-row__solution {
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}

/* Workspace */
.landing-workspace {
  padding: 104px 0;
  background: var(--blue-50);
}

.landing-workspace__header {
  max-width: 820px;
  margin-bottom: 52px;
}

.landing-workspace__title {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.2;
  margin: 16px 0 0;
}

.landing-workspace__body {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 18px 0 0;
  max-width: 700px;
}

.landing-workspace__card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 48px 40px 40px;
}

.pipeline {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.pipeline__line {
  position: absolute;
  top: 19px;
  left: 19px;
  right: 19px;
  height: 1.5px;
  background: var(--border-default);
}

.pipeline__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-right: 20px;
}

.pipeline__stage:last-child {
  padding-right: 0;
}

.pipeline__dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.pipeline__dot--done {
  background: var(--blue-500);
  border: 1.5px solid var(--blue-500);
  color: #fff;
}

.pipeline__dot--pending {
  background: var(--surface-card);
  border: 1.5px solid var(--blue-400);
  color: var(--blue-700);
}

.pipeline__label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-strong);
}

.pipeline__sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 150px;
}

/* Escala */
.landing-escala {
  background: var(--surface-card);
  padding: 104px 0;
}

.landing-escala__header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.landing-escala__title {
  font-size: 40px;
  line-height: 1.15;
  margin: 14px 0 0;
}

.landing-escala__sub {
  color: var(--text-muted);
  font-size: 17px;
  margin: 14px 0 0;
}

.landing-escala__ticker {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.landing-escala__stat {
  padding: 48px 28px;
  text-align: center;
}

.landing-escala__stat + .landing-escala__stat {
  border-left: 1px solid var(--border-subtle);
}

.landing-escala__figure {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 500;
  color: var(--blue-700);
  font-variant-numeric: tabular-nums;
}

.landing-escala__figure-accent {
  color: var(--blue-500);
}

.landing-escala__caption {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Mercado */
.landing-mercado {
  background: var(--surface-ink);
  color: var(--text-inverse);
  padding: 100px 0;
  text-align: center;
}

.landing-mercado__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 40px;
}

.landing-mercado__amount {
  font-family: var(--font-mono);
  font-size: 84px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  margin-top: 20px;
  font-variant-numeric: tabular-nums;
}

.landing-mercado__unit {
  font-size: 30px;
  color: var(--blue-300);
  margin-left: 10px;
}

.landing-mercado__amount-label {
  font-size: 14px;
  color: var(--ink-400);
  margin-top: 16px;
  letter-spacing: 0.03em;
}

.landing-mercado__title {
  font-size: 36px;
  line-height: 1.3;
  color: #fff;
  margin: 44px auto 0;
  max-width: 680px;
}

.landing-mercado__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 36px;
}

.landing-mercado__stat {
  padding: 0 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.landing-mercado__stat:last-child {
  border-right: none;
}

.landing-mercado__stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.landing-mercado__stat-accent {
  color: var(--blue-300);
}

.landing-mercado__stat-caption {
  font-size: 13px;
  color: var(--ink-400);
  margin-top: 9px;
  max-width: 180px;
}

.landing-mercado__cta {
  margin-top: 48px;
}

/* Expansión */
.landing-expansion {
  background: var(--blue-800);
  color: var(--text-inverse);
  padding: 120px 0;
}

.landing-expansion__inner {
  max-width: 640px;
}

.landing-expansion__title {
  font-size: 40px;
  line-height: 1.2;
  color: #fff;
  margin: 14px 0 0;
}

.landing-expansion__body {
  color: var(--ink-200);
  font-size: 17.5px;
  line-height: 1.75;
  margin: 20px 0 0;
}

/* Cierre */
.landing-cierre {
  background: var(--blue-50);
  padding: 120px 0;
  text-align: center;
}

.landing-cierre__title {
  font-size: 46px;
  line-height: 1.16;
  max-width: 680px;
  margin: 16px auto 22px;
}

.landing-cierre__body {
  color: var(--text-muted);
  font-size: 17.5px;
  max-width: 540px;
  margin: 0 auto 40px;
}

.landing-cierre__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Marca + footer */
.landing-brand-close {
  padding: 56px 0 46px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.landing-brand-close__tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 18px;
}

.landing-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
}

.landing-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 40px;
}

.landing-footer__note {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .landing-container,
  .landing-hero__content,
  .landing-mercado__inner,
  .landing-footer__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .landing-nav__toggle {
    display: block;
  }

  .landing-nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px 20px;
    background: rgba(248, 247, 243, 0.98);
    border-bottom: 1px solid var(--border-subtle);
  }

  .landing-nav__links.open {
    display: flex;
  }

  .landing-nav__actions {
    display: none;
  }

  .landing-nav__actions--mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .landing-hero__title {
    font-size: 36px;
  }

  .landing-hero__pillar {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
    margin-bottom: 20px;
    max-width: none;
  }

  .sol-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sol-row__arrow {
    justify-self: start;
    transform: rotate(90deg);
  }

  .pipeline {
    flex-direction: column;
    gap: 24px;
  }

  .pipeline__line {
    display: none;
  }

  .landing-escala__ticker {
    grid-template-columns: 1fr;
  }

  .landing-escala__stat + .landing-escala__stat {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .landing-mercado__amount {
    font-size: 56px;
  }

  .landing-mercado__stat {
    border-right: none;
    width: 100%;
    padding: 16px 0;
  }

  .landing-backers__item {
    border-right: none;
    padding: 12px 24px;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .landing-hero__video {
    display: none;
  }

  .landing-hero__veil {
    background: var(--surface-ink);
  }
}
