:root {
  color-scheme: light;
  --ink: #1f1915;
  --ink-soft: rgba(31, 25, 21, 0.32);
  --bone: #efede8;
  --paper: #fffdf6;
  --paper-line: rgba(255, 253, 246, 0.32);
  --lime: #daf58e;
  --forest-1: #0f1c10;
  --forest-2: #2c4a24;
  --forest-3: #4f6b33;
  --earth: #7a6a4a;
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 1.7vw, 24px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--paper);
  transition: color .5s var(--ease);
}
.nav::before { /* fondo que aparece al hacer scroll */
  content: ""; position: absolute; inset: 0;
  background: rgba(239, 237, 232, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .5s var(--ease);
}
.announce {
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .5s var(--ease), opacity .4s var(--ease);
}
.announce > div { min-height: 0; padding: 4px 4px 0; }
.announce p {
  margin: 0; background: var(--lime); color: var(--ink);
  border-radius: 999px; padding: 7px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center;
}
.announce a { text-decoration: underline; text-underline-offset: 3px; }
.bar {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--gutter);
  transition: padding .5s var(--ease);
}
.bar::after { /* línea fina bajo el menú */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--paper-line); transition: background .5s var(--ease), left .5s var(--ease), right .5s var(--ease);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; justify-self: start; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo sup { font-size: 9px; font-weight: 500; margin-left: -6px; align-self: flex-start; margin-top: 2px; }
.links { display: flex; gap: 24px; font-size: 16px; font-weight: 500; }
.links a, .menu-trigger { opacity: 1; transition: opacity .25s; }
.links a:hover, .menu-trigger:hover { opacity: .65; }
.menu { position: relative; }
.menu-trigger {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
}
.menu-trigger svg { transition: transform .35s var(--ease); }
.menu:hover .menu-trigger svg, .menu.open .menu-trigger svg { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 18px); left: -20px; min-width: 260px;
  background: rgba(255, 253, 246, 0.9); color: var(--ink);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ink-soft); border-radius: 16px; padding: 8px;
  display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left;
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}
.menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; } /* puente hover */
.menu:hover .dropdown, .menu.open .dropdown {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.dropdown a { padding: 10px 12px; border-radius: 10px; display: grid; gap: 2px; }
.dropdown a:hover { background: rgba(31, 25, 21, 0.06); }
.dropdown small { font-size: 13px; color: rgba(31,25,21,.6); font-weight: 400; }
.cta-nav {
  justify-self: end;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  padding: 12px 16px; border-radius: 6px;
  border: 1px solid var(--paper-line);
  background: rgba(255, 253, 246, 0.12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .3s var(--ease);
}
.cta-nav:hover { transform: translateY(-1px); }
.burger { display: none; }

/* estado con scroll */
.nav.scrolled { color: var(--ink); }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled .announce { grid-template-rows: 0fr; opacity: 0; }
.nav.scrolled .bar { padding-block: 14px; }
.nav.scrolled .bar::after { background: var(--ink-soft); left: var(--gutter); right: var(--gutter); }
.nav.scrolled .cta-nav { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- STAGE: hero sticky + sección que lo tapa ---------- */
.stage { position: relative; }
.hero {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; min-height: 620px;
  overflow: hidden; color: var(--paper);
  display: flex; align-items: flex-end;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: #1b2230; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after { /* overlay negro para que la tipografía blanca se lea sobre cielo y agua */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 55%, rgba(0,0,0,.4) 100%),
    rgba(0, 0, 0, 0.28);
}

.hero-inner {
  width: 100%;
  padding: 0 var(--gutter) clamp(40px, 8vh, 80px);
  display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 32px; align-items: end;
}
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 24px; border: 1px solid var(--paper-line);
}
.hero h1 {
  margin: 24px 0 0;
  font-size: clamp(52px, 7.8vw, 118px); font-weight: 500;
  letter-spacing: -0.045em; line-height: .98;
  max-width: 11.5ch; text-wrap: balance;
}
.hero-side { display: grid; gap: 24px; padding-bottom: 12px; }
.hero-side p { margin: 0; font-size: 19px; line-height: 1.45; letter-spacing: -0.01em; max-width: 30ch; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  font-size: 15px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase;
  padding: 14px 16px; border-radius: 6px; border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--paper); color: var(--ink); }
.btn-ghost {
  background: rgba(255, 253, 246, 0.14); border-color: var(--paper-line); color: var(--paper);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 253, 246, 0.24); }

/* animaciones de entrada del hero */
.word { display: inline-block; }
.js .word, .js .fade-in { opacity: 0; transform: translateY(10px); }
.loaded .word, .loaded .fade-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}

/* ---------- SECCIÓN 1 ---------- */
.intro {
  position: relative; z-index: 1;
  background: var(--bone);
  border-radius: 24px 24px 0 0;
  padding: clamp(96px, 14vh, 128px) var(--gutter) clamp(96px, 16vh, 160px);
  box-shadow: 0 -30px 60px rgba(0,0,0,.18);
  display: grid; justify-items: center; gap: 32px; text-align: center;
}
.tag-dark { border-color: var(--ink-soft); color: var(--ink); }
.intro h2 {
  margin: 0; max-width: 24ch;
  font-size: clamp(30px, 3.6vw, 50px); font-weight: 500;
  letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance;
}
.features {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); gap: 32px;
}
.features li { display: grid; justify-items: center; gap: 16px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.35; }
.features svg { width: 26px; height: 26px; stroke: var(--ink); opacity: .7; fill: none; stroke-width: 1.2; }

/* ---------- SECCIÓN 2: cards ---------- */
.showcase {
  position: relative; z-index: 1; background: var(--bone);
  padding: 0 var(--gutter) clamp(96px, 14vh, 160px);
}
.cards {
  max-width: 924px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start;
}
.cards > :nth-child(2) { margin-top: clamp(48px, 9vw, 110px); }
.card-wrap { will-change: transform; }
.card {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1824 / 2240; max-width: 100%;
  border-radius: 16px; background: #1b2230; color: var(--paper);
}
.card-media { position: absolute; inset: 0; z-index: -1; transition: filter .6s var(--ease), transform .9s var(--ease); }
.card-media video, .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media::after { /* degradado para que el texto inferior se lea siempre */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%), rgba(0,0,0,.08);
  transition: background .6s var(--ease);
}
/* hover: blur solo sobre la imagen/vídeo, nunca sobre el texto */
.card:hover .card-media, .card:focus-within .card-media { filter: blur(10px) saturate(1.1); transform: scale(1.08); }
.card:hover .card-media::after, .card:focus-within .card-media::after { background: linear-gradient(180deg, rgba(0,0,0,.1) 40%, rgba(0,0,0,.6) 100%), rgba(0,0,0,.18); }
.card-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 32px;
}
.card-title {
  margin: 0; padding-left: 20px; border-left: 1px solid var(--paper-line);
  font-size: 13px; font-weight: 600; letter-spacing: .08em; line-height: 1.6; text-transform: uppercase;
  max-width: 32ch;
}
.card-icon { width: 44px; height: 44px; flex: none; stroke: var(--lime); fill: none; stroke-width: 1.3; transition: transform .6s var(--ease); }
.card:hover .card-icon { transform: rotate(-12deg) scale(1.06); }

/* ---------- SECCIÓN 3: por qué (carrusel) ---------- */
.why { position: relative; z-index: 1; background: var(--bone); padding-block: 0 clamp(96px, 14vh, 150px); }
.why-head {
  margin: 0 var(--gutter); padding-top: 32px; border-top: 1px solid var(--ink-soft);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.why-title { display: grid; justify-items: start; gap: 20px; }
.why-title h2 { margin: 0; font-size: clamp(34px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
.why-controls { display: flex; align-items: center; gap: 32px; }
.link-under {
  position: relative; font-size: 15px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; padding-block: 4px;
}
.link-under::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.link-under:hover::after, .link-under:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.arrows { display: flex; gap: 12px; }
.arrow {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--ink-soft); background: transparent; color: var(--ink); cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), opacity .35s;
}
.arrow svg { transition: transform .35s var(--ease); }
.arrow:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.arrow.prev:hover:not(:disabled) svg { transform: translateX(-3px); }
.arrow.next:hover:not(:disabled) svg { transform: translateX(3px); }
.arrow:disabled { opacity: .3; cursor: default; }

.rail {
  margin-top: clamp(48px, 7vw, 88px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.rail.dragging .benefit { pointer-events: none; }
.rail-track {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; gap: 12px; width: max-content;
  --cw: calc((100vw - 2 * var(--gutter) - 36px) / 4.15);
}
.benefit {
  flex: 0 0 var(--cw); scroll-snap-align: start;
  min-height: clamp(400px, 31vw, 450px);
  background: #fcfaf5; border-radius: 16px; padding: 32px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  transition: background .45s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
}
.benefit:hover { background: #fffefb; transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(31,25,21,.35); }
.benefit svg { width: 64px; height: 64px; fill: none; stroke: rgba(31,25,21,.32); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: stroke .45s var(--ease); }
.benefit:hover svg { stroke: var(--ink); }
.benefit h3 { margin: 0 0 16px; font-size: clamp(28px, 2.5vw, 36px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.benefit p { margin: 0; font-size: 17px; line-height: 1.45; letter-spacing: -0.01em; color: rgba(31,25,21,.82); max-width: 32ch; }

/* ---------- SECCIÓN 4: rasgos con scroll ---------- */
.traits { position: relative; z-index: 1; background: var(--ink); color: var(--paper); height: calc(100vh + (var(--n) - 1) * 55vh); }
.traits-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
}
.traits-media { position: relative; overflow: hidden; background: #2a231e; }
.traits-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity .8s var(--ease), transform 1.6s var(--ease);
}
.traits-media img.on { opacity: 1; transform: scale(1); }
.traits-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.5)); pointer-events: none; }
.traits-caption {
  position: absolute; left: 40px; right: 40px; bottom: 40px; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.traits-caption p {
  margin: 0; padding-left: 20px; border-left: 1px solid var(--paper-line);
  font-size: 13px; font-weight: 600; letter-spacing: .08em; line-height: 1.6; text-transform: uppercase; max-width: 30ch;
  min-height: 3.2em; display: flex; align-items: center;
}
.traits-caption .count { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--lime); font-variant-numeric: tabular-nums; }
.traits-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 36px; padding: 120px var(--gutter) 80px clamp(40px, 7vw, 100px); }
.tag-lime svg { stroke: var(--lime); }
.traits-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .08em; font-size: clamp(44px, 5.2vw, 80px); }
.traits-list button {
  all: unset; cursor: pointer; display: block;
  font-weight: 500; letter-spacing: -0.04em; line-height: 1.12;
  filter: blur(7px); opacity: .5;
  transition: filter .6s var(--ease), opacity .6s var(--ease);
}
.traits-list button:hover { opacity: .7; }
.traits-list button[aria-current="true"] { filter: blur(0); opacity: 1; }
.traits-list button:focus-visible { outline: 2px solid var(--lime); outline-offset: 6px; filter: blur(0); }

/* reveal al entrar en viewport (solo si hay JS y el elemento está fuera de pantalla al cargar) */
.reveal.pending { opacity: 0; transform: translateY(50px); }
.reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }

/* ---------- FOOTER ---------- */
.footer { position: relative; z-index: 1; }
.footer-cta {
  background: #efede7; color: var(--ink);
  padding: clamp(96px, 14vh, 140px) var(--gutter) clamp(80px, 12vh, 120px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.footer-cta h2 { margin: 0; font-size: clamp(40px, 6vw, 92px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; max-width: 12ch; text-wrap: balance; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #3a302a; }
.footer-bottom {
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px var(--gutter) 32px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.footer-links a { opacity: .75; transition: opacity .25s; }
.footer-links a:hover { opacity: 1; }
.footer-legal { margin: 0; font-size: 13px; opacity: .55; }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 901px) and (max-width: 1180px) {
  .rail-track { --cw: calc((100vw - 2 * var(--gutter) - 24px) / 2.4); }
}
@media (max-width: 900px) {
  .links, .cta-nav { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .burger {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px;
    border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; opacity: .9;
  }
  .burger span { width: 18px; height: 1.5px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-side p { font-size: 17px; }
  .features { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .cards > :nth-child(2) { margin-top: 0; }
  .card-foot { padding: 22px 24px; }
  .why-controls { width: 100%; justify-content: space-between; }
  .rail-track { --cw: calc((100vw - 2 * var(--gutter) - 12px) / 1.15); }
  .benefit { min-height: 380px; padding: 28px; }
  .traits-sticky { grid-template-columns: 1fr; grid-template-rows: 42% 1fr; padding-top: 88px; }
  .traits-media { margin: 0 16px; border-radius: 16px; }
  .traits-caption { left: 20px; right: 20px; bottom: 20px; }
  .traits-copy { justify-content: flex-start; gap: 20px; padding: 28px 16px 24px; }
  .traits-list { font-size: clamp(34px, 9vw, 48px); }
}

@media (prefers-reduced-motion: reduce) {
  
  .js .word, .js .fade-in, .reveal.pending { opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}
