/* Zenith home — tipografía contenida, intro letras, contenido siempre legible */

:root {
  --bg: #050505;
  --surface: #0c0c0e;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --red: #e91429;
  --line: rgba(242, 242, 242, 0.1);
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "Syne", "DM Sans", system-ui, sans-serif;
  --v-energy: 0.08;
  --v-beat: 0.04;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-introing {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* —— Intro Netflix-style —— */
.zn-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  transition: opacity 0.55s ease, visibility 0.55s;
}

.zn-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.zn-intro__letters {
  display: flex;
  gap: clamp(0.15rem, 1.2vw, 0.55rem);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 11vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.zn-intro__letters span {
  display: inline-block;
  opacity: 0;
  transform: scale(2.6);
  color: #fff;
  will-change: transform, opacity;
}

.zn-intro.is-play .zn-intro__letters span {
  animation: letter-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.zn-intro.is-play .zn-intro__letters span:nth-child(1) { animation-delay: 0.06s; }
.zn-intro.is-play .zn-intro__letters span:nth-child(2) { animation-delay: 0.16s; }
.zn-intro.is-play .zn-intro__letters span:nth-child(3) { animation-delay: 0.26s; }
.zn-intro.is-play .zn-intro__letters span:nth-child(4) { animation-delay: 0.36s; }
.zn-intro.is-play .zn-intro__letters span:nth-child(5) { animation-delay: 0.46s; }
.zn-intro.is-play .zn-intro__letters span:nth-child(6) { animation-delay: 0.56s; }

/* Reduced motion / fallback: letras visibles de inmediato */
.zn-intro.is-static .zn-intro__letters span {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@keyframes letter-in {
  0% {
    opacity: 0;
    transform: scale(2.6);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.zn-intro.is-expand .zn-intro__letters {
  animation: brand-expand 0.55s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes brand-expand {
  to {
    letter-spacing: 0.35em;
    opacity: 0;
    transform: scale(1.35);
    filter: blur(4px);
  }
}

/* —— Nav —— */
.zn-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), transparent);
  pointer-events: none;
}

.zn-nav > * {
  pointer-events: auto;
}

.zn-nav__brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.zn-nav__platforms {
  display: flex;
  gap: 0.25rem;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(10px);
}

.zn-nav__platforms a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.zn-nav__platforms a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* —— Layout —— */
.page {
  position: relative;
  z-index: 1;
}

.scene {
  position: relative;
  padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
}

.scene--compact {
  min-height: auto;
}

.scene__kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.75rem;
}

.scene__title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  max-width: 22ch;
}

.scene__lede {
  margin: 0.9rem 0 0;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.02rem;
}

.scene__lede--wide {
  max-width: 42rem;
}

/* —— Hero —— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5rem;
  padding-bottom: 3rem;
  max-width: 920px;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 9vw, 4.75rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0;
  display: flex;
  gap: 0.02em;
}

.hero__brand .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
}

body.is-ready .hero__brand .letter {
  animation: hero-letter 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.is-ready .hero__brand .letter:nth-child(1) { animation-delay: 0.02s; }
body.is-ready .hero__brand .letter:nth-child(2) { animation-delay: 0.07s; }
body.is-ready .hero__brand .letter:nth-child(3) { animation-delay: 0.12s; }
body.is-ready .hero__brand .letter:nth-child(4) { animation-delay: 0.17s; }
body.is-ready .hero__brand .letter:nth-child(5) { animation-delay: 0.22s; }
body.is-ready .hero__brand .letter:nth-child(6) { animation-delay: 0.27s; }

@keyframes hero-letter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__lead {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.45;
  max-width: 34rem;
  color: var(--text);
}

.hero__sub {
  margin: 0.65rem 0 0;
  color: var(--muted);
  max-width: 34rem;
  font-size: 0.98rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--red);
  color: #fff;
}

.btn--primary:hover {
  background: #ff1f36;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

/* —— Pillars / steps —— */
.pillars {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pillars li {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.pillars strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.pillars span {
  color: var(--muted);
  font-size: 0.92rem;
}

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.steps b {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.85rem;
  padding-top: 0.15rem;
}

.steps strong {
  display: block;
  margin-bottom: 0.25rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Download cards —— */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.dl-card {
  padding: 1.25rem 1.3rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #101014, #0a0a0c);
}

.dl-card__os {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dl-card h3 {
  margin: 0.4rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.dl-card__desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.dl-card__meta {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.dl-card__hint {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: var(--text);
}

.dl-card__alt {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.dl-card__alt a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.term {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.term code {
  flex: 1 1 12rem;
  font-size: 0.72rem;
  line-height: 1.4;
  word-break: break-all;
  color: #d4d4d4;
}

.term--live #copy-linux.is-copied {
  border-color: #22c55e;
  color: #22c55e;
}

/* —— Brief —— */
.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.brief-grid h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brief-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.community {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

/* —— Footer —— */
.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.footer a:hover {
  color: var(--text);
}

/* —— Ambient —— */
.audio-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background:
    radial-gradient(circle at 20% 20%, rgba(233, 20, 41, 0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 38, 61, calc(var(--v-energy) * 0.1)), transparent 45%);
}

/* —— Reveal safety: nunca ocultar contenido —— */
.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 820px) {
  .pillars,
  .dl-grid,
  .brief-grid {
    grid-template-columns: 1fr;
  }

  .hero__ctas {
    width: 100%;
  }

  .hero__ctas .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .zn-intro__letters span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__brand .letter {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .zn-intro.is-expand .zn-intro__letters {
    animation: none !important;
  }
}
