/*---------Base-----------*/

:root {
  --ink: #07070a;
  --ink-2: #101015;
  --paper: #ede9e1;
  --muted: #8a867e;
  --dim: rgba(237, 233, 225, 0.28);
  --line: rgba(237, 233, 225, 0.12);
  --amber: #ffb547;
  --ember: #c2501f;

  --gutter: clamp(16px, 4vw, 56px);
  --top-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}

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

html { background: var(--ink); overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--amber); color: var(--ink); }

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.kicker span { color: var(--muted); }

/*---------Grano y cursor-----------*/

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; }
  25% { background-position: -37px 23px; }
  50% { background-position: 29px -41px; }
  75% { background-position: -13px -17px; }
  100% { background-position: 41px 11px; }
}

.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {

  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }

  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: none;
    mix-blend-mode: difference;
  }
  .cursor__dot, .cursor__ring {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    will-change: transform;
  }
  .cursor__dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: var(--paper);
  }
  .cursor__ring {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 1px solid var(--paper);
    transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.35s var(--ease);
  }
  .cursor.is-link .cursor__ring {
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    background: var(--paper);
  }
  .cursor.is-hidden { opacity: 0; }
}

/*---------Barra superior-----------*/

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--top-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(var(--ink) 20%, rgba(7, 7, 10, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.brand__mark {
  width: 30px;
  height: 30px;
  fill: var(--paper);
  overflow: visible;
}
.brand__mark circle {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.6s var(--ease), fill 0.6s var(--ease);
}
.brand:hover .brand__mark circle:nth-child(1) { transform: scale(0.618); fill: var(--amber); }
.brand:hover .brand__mark circle:nth-child(2) { transform: translate(-6px, 4px) scale(1.25); }
.brand:hover .brand__mark circle:nth-child(3) { transform: translate(-4px, -3px) scale(1.4); transition-delay: 0.05s; }
.brand:hover .brand__mark circle:nth-child(4) { transform: translate(3px, -4px) scale(1.6); transition-delay: 0.1s; }
.brand__word {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
}

.navBar {
  display: flex;
  gap: clamp(18px, 2.6vw, 44px);
}
.nav-group {
  position: relative;
  padding: 24px 0;
}
.nav-group > a {
  position: relative;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--paper);
}
.nav-group > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav-group:hover > a::after, .nav-group.current > a::after {
  transform: scaleX(1);
  transform-origin: left;
}

.subMenu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 210px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: rgba(16, 16, 21, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.nav-group:hover .subMenu, .nav-group:focus-within .subMenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.subMenu a, .subMenu span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.subMenu .on::before {
  content: "";
  order: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}
.subMenu .on { transition: background 0.2s, padding 0.3s var(--ease); }
.subMenu .on:hover { background: rgba(237, 233, 225, 0.07); padding-left: 18px; }
.subMenu .off { color: var(--dim); }
.subMenu .off::after {
  content: "Pronto";
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hamburger {
  display: none;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.hamburger span {
  width: 18px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/*---------Inmersión en la espiral-----------*/

.dive {
  position: relative;
  height: 760vh;
}
.dive__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.dive__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#earth {
  position: absolute;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

.chapter {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: min(36vw, 520px);
  transform: translateY(calc(-50% + var(--y, 0px)));
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.chapter.is-active { visibility: visible; }

.chapter__num {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--amber);
}
.chapter__num span { color: var(--muted); }
.chapter__title {
  margin: 0;
  font-size: clamp(3rem, 5.3vw, 6.6rem);
  font-variation-settings: "wdth" 125, "wght" 850;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.chapter__lead {
  margin: 22px 0 0;
  max-width: 30ch;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  color: rgba(237, 233, 225, 0.72);
}

.divs {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.divs li {
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.divs li.off {
  padding: 11px 0;
  color: var(--dim);
}
.divs a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  font-variation-settings: "wdth" 100, "wght" 600;
  transition: font-variation-settings 0.5s var(--ease), padding 0.5s var(--ease), color 0.3s;
}
.divs a i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}
.divs a i::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: pulse 2.2s ease-in-out infinite;
}
.divs a:hover {
  padding-left: 14px;
  font-variation-settings: "wdth" 125, "wght" 800;
  color: var(--amber);
}
@keyframes pulse { 50% { opacity: 0.35; } }

.chapter--hero { width: auto; right: var(--gutter); top: auto; bottom: clamp(28px, 6vh, 64px); transform: translateY(var(--y, 0px)); }
.chapter--hero .kicker { margin-bottom: 18px; }
.hero__title {
  margin: 0;
  font-size: clamp(3rem, 11.2vw, 13rem);
  line-height: 0.84;
  letter-spacing: -0.04em;
  color: var(--paper);
}
.hero__lead {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: rgba(237, 233, 225, 0.72);
}
.hint {
  margin: 26px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hint__line {
  position: relative;
  width: 56px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.hint__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  animation: hint 2s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.chapter--end .chapter__title { font-size: clamp(2.8rem, 6.4vw, 6.6rem); }
.chapter--end .chapter__lead { max-width: 36ch; }

.hud {
  position: absolute;
  right: var(--gutter);
  bottom: 26px;
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.6s;
}
.hud b { font-weight: 500; color: var(--paper); }
.hud.is-on { opacity: 1; }

.rail {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}
.rail li {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  transition: background 0.4s, border-color 0.4s, transform 0.4s var(--ease);
}
.rail li.is-on {
  background: var(--amber);
  border-color: var(--amber);
  transform: scale(1.5);
}

/*---------Tipografía flexible (reacciona al cursor)-----------*/

.flex-type {
  font-variation-settings: "wdth" 125, "wght" 850;
  text-transform: uppercase;
  white-space: nowrap;
}
.flex-type .ch {
  display: inline-block;
  font-variation-settings: "wdth" var(--w, 125), "wght" var(--g, 850);
}

[data-speed] { transform: translate3d(0, var(--py, 0px), 0); }

/*---------Manifiesto-----------*/

.manifesto {
  position: relative;
  height: 280vh;
}
.manifesto__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.manifesto__label {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.manifesto__text {
  position: relative;
  margin: 0;
  max-width: 24ch;
  font-size: clamp(2rem, 4.4vw, 4.9rem);
  font-variation-settings: "wdth" 88, "wght" 560;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.manifesto__text .w {
  color: rgba(237, 233, 225, 0.12);
  transition: color 0.35s;
}
.manifesto__text .w.lit { color: var(--paper); }
.manifesto__text em { font-style: normal; }
.manifesto__text em .w.lit { color: var(--amber); }

.rings span {
  position: absolute;
  top: 50%;
  right: -12vw;
  border: 1px solid var(--line);
  border-radius: 50%;
  will-change: transform;
}
.rings span:nth-child(1) { width: 78vw; height: 78vw; margin-top: -39vw; }
.rings span:nth-child(2) { width: 48.2vw; height: 48.2vw; margin-top: -24.1vw; right: 6vw; border-color: rgba(255, 181, 71, 0.22); }
.rings span:nth-child(3) { width: 29.8vw; height: 29.8vw; margin-top: -14.9vw; right: 2vw; }

/*---------Divisiones en marcha-----------*/

.live {
  padding: clamp(100px, 16vh, 180px) var(--gutter) clamp(100px, 18vh, 200px);
}
.live__head { margin-bottom: clamp(48px, 9vh, 96px); }
.live__head .kicker { margin-bottom: 18px; }
.live__title {
  margin: 0;
  font-size: clamp(2.6rem, 8.4vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
}
.live__lead {
  margin: 22px 0 0;
  max-width: 40ch;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: rgba(237, 233, 225, 0.72);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
  perspective: 1200px;
}
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  min-height: clamp(360px, 54vh, 520px);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--ink-2);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transform: translate3d(0, var(--py, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 181, 71, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -70px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: transform 0.9s var(--ease), border-color 0.9s var(--ease);
}
.card:hover { border-color: rgba(255, 181, 71, 0.45); }
.card:hover::before { opacity: 1; }
.card:hover::after { transform: scale(2.6); border-color: rgba(255, 181, 71, 0.3); }

.card__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__meta b { font-weight: 400; color: var(--amber); }
.card__name {
  margin-top: auto;
  font-size: clamp(2.2rem, 3.6vw, 3.8rem);
  font-variation-settings: "wdth" 62, "wght" 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: font-variation-settings 0.7s var(--ease), color 0.4s;
}
.card:hover .card__name {
  font-variation-settings: "wdth" 125, "wght" 900;
  color: var(--amber);
}
.card__desc {
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(237, 233, 225, 0.66);
}
.card__go {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.card__go i {
  font-style: normal;
  transition: transform 0.5s var(--ease);
}
.card:hover .card__go i { transform: translateX(6px); }
.card--soon .card__name { color: var(--dim); }

/*---------Cierre-----------*/

.end {
  position: relative;
  padding: clamp(80px, 14vh, 140px) var(--gutter) 28px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.end__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.end__lead {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-variation-settings: "wdth" 90, "wght" 500;
}
.end__cta {
  display: inline-flex;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.end__cta i { font-style: normal; transition: transform 0.4s var(--ease); }
.end__cta:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.end__cta:hover i { transform: translateX(5px); }

.end__word {
  margin: clamp(40px, 8vh, 90px) 0 0;
  font-size: 24vw;
  line-height: 0.8;
  letter-spacing: -0.04em;
  text-align: center;
  user-select: none;
}
.end__base {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.end__base a:hover { color: var(--amber); }

/*---------Pantallas medianas-----------*/

@media (max-width: 1100px) {

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 340px; }

}

/*---------Móvil-----------*/

@media (max-width: 820px), (orientation: portrait) {

  .hamburger { display: flex; }

  .navBar {
    position: fixed;
    inset: 0;
    padding: calc(var(--top-h) + 4vh) var(--gutter) 40px;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    background: rgba(7, 7, 10, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
  }
  .navBar.open { opacity: 1; visibility: visible; }

  .nav-group {
    padding: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-group > a {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    font-family: var(--sans);
    font-size: 2rem;
    font-variation-settings: "wdth" 125, "wght" 800;
    letter-spacing: -0.01em;
  }
  .nav-group > a::after {
    content: "+";
    position: static;
    height: auto;
    background: none;
    transform: none;
    font-variation-settings: "wght" 300;
    color: var(--amber);
    transition: transform 0.3s var(--ease);
  }
  .nav-group.active > a::after { transform: rotate(45deg); }

  .subMenu {
    position: static;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  }
  .nav-group:hover .subMenu, .nav-group:focus-within .subMenu { transform: none; }
  .nav-group.active .subMenu { max-height: 320px; padding-bottom: 14px; }
  .subMenu a, .subMenu span { padding: 8px 0; font-size: 1rem; }

  .chapter {
    top: auto;
    bottom: clamp(24px, 5vh, 48px);
    right: var(--gutter);
    width: auto;
    transform: translateY(var(--y, 0px));
  }
  .chapter__title { font-size: clamp(2.4rem, 11.5vw, 5rem); }
  .chapter__lead { margin-top: 14px; font-size: 1rem; }
  .divs { margin-top: 20px; }
  .divs li { font-size: 0.95rem; }
  .divs li.off, .divs a { padding: 8px 0; }

  .hero__title { font-size: 15.5vw; }

  .chapter--end .chapter__title { font-size: clamp(2.4rem, 12vw, 4.4rem); }

  .hud { display: none; }
  .rail { top: calc(var(--top-h) + 16px); transform: none; flex-direction: row; right: auto; left: var(--gutter); }

  .manifesto__text { font-size: clamp(2rem, 9.4vw, 3.6rem); }
  .rings span:nth-child(1) { width: 140vw; height: 140vw; margin-top: -70vw; right: -60vw; }
  .rings span:nth-child(2) { width: 86.5vw; height: 86.5vw; margin-top: -43vw; right: -30vw; }
  .rings span:nth-child(3) { width: 53.5vw; height: 53.5vw; margin-top: -27vw; right: -10vw; }

}

@media (max-width: 620px) {

  .cards { grid-template-columns: 1fr; }
  .card { min-height: 300px; }
  .end__base { flex-direction: column; gap: 6px; }

}

/*---------Movimiento reducido-----------*/

@media (prefers-reduced-motion: reduce) {

  .grain, .hint__line::after, .divs a i::before { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }

}
