/* ============================================================
   DISFORIA — Landing WIP
   Estilos custom, sin dependencias externas.
   ============================================================ */

:root {
  --bg:        #07070a;
  --bg-2:      #0d0d14;
  --ink:       #f2f2f7;
  --ink-soft:  #a7a7b4;
  --ink-faint: #5b5b6b;

  --accent:      #ff2e63;   /* rojo magenta */
  --accent-2:    #12e2e2;   /* cian */
  --accent-glow: rgba(255, 46, 99, 0.55);

  --line: rgba(255, 255, 255, 0.08);

  --font: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --maxw: 780px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 120% at 50% -10%, var(--bg-2) 0%, var(--bg) 55%) fixed;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Capas ambientales ---------- */

/* Resplandor que respira detrás del título */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 40% at 50% 32%, var(--accent-glow), transparent 70%),
    radial-gradient(35% 35% at 70% 60%, rgba(18, 226, 226, 0.18), transparent 70%);
  filter: blur(30px);
  opacity: 0.7;
  animation: breathe 9s var(--ease) infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.08); }
}

/* Grano de película */
.bg-grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(3) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-3%, 2%); }
  66%  { transform: translate(2%, -3%); }
  100% { transform: translate(-1%, 1%); }
}

/* Líneas de barrido tipo CRT */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ---------- Layout ---------- */

.site-header,
.hero,
.site-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.site-header {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand__logo {
  height: 28px;
  width: auto;
  display: block;
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}

.brand:hover .brand__logo {
  opacity: 0.85;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--maxw);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(2.5rem, 8vh, 6rem);
  gap: 1.4rem;
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: rise 0.9s var(--ease) both;
}

/* ---------- Título con glitch ---------- */

.glitch {
  position: relative;
  margin: 0;
  font-size: clamp(3.4rem, 17vw, 9.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(255, 46, 99, 0.25);
  animation: rise 1s var(--ease) both;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--accent);
  animation: glitch-x 3.4s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  mix-blend-mode: screen;
}

.glitch::after {
  color: var(--accent-2);
  animation: glitch-y 2.6s infinite linear alternate-reverse;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  mix-blend-mode: screen;
}

@keyframes glitch-x {
  0%   { transform: translate(0); }
  10%  { transform: translate(-3px, 1px); }
  20%  { transform: translate(3px, -1px); }
  30%  { transform: translate(-2px, 0); }
  45%  { transform: translate(0); }
  100% { transform: translate(0); }
}

@keyframes glitch-y {
  0%   { transform: translate(0); }
  15%  { transform: translate(2px, -2px); }
  25%  { transform: translate(-3px, 2px); }
  40%  { transform: translate(1px, 1px); }
  55%  { transform: translate(0); }
  100% { transform: translate(0); }
}

.hero__tagline {
  margin: 0;
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);
  font-style: italic;
  color: var(--ink);
  max-width: 34ch;
  animation: rise 1.1s var(--ease) both;
}

.hero__synopsis {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 56ch;
  animation: rise 1.25s var(--ease) both;
}

.hero__synopsis em {
  color: var(--ink);
  font-style: italic;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 0.4rem;
  animation: rise 1.4s var(--ease) both;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* ---------- Ficha técnica ---------- */

.credits {
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.55rem;
  animation: rise 1.5s var(--ease) both;
}

.credits__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem 0.7rem;
  font-size: 0.9rem;
}

.credits dt {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
}

.credits dd {
  margin: 0;
  color: var(--ink);
}

/* ---------- Llamada a la acción ---------- */

.cta {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  animation: rise 1.55s var(--ease) both;
}

.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #0a0a0f;
  background: linear-gradient(135deg, var(--accent), #ff5c86);
  box-shadow: 0 10px 30px rgba(255, 46, 99, 0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), filter 0.2s var(--ease);
}

.cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 46, 99, 0.42);
  filter: brightness(1.05);
}

.cta__btn:active {
  transform: translateY(0);
}

.cta__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 46, 99, 0.35), 0 10px 30px rgba(255, 46, 99, 0.28);
}

.cta__arrow {
  transition: transform 0.25s var(--ease);
}

.cta__btn:hover .cta__arrow {
  transform: translateX(4px);
}

.cta__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: 1200px;
  border-top: 1px solid var(--line);
  padding-block: 1.75rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.site-footer__note {
  letter-spacing: 0.08em;
}

/* ---------- Animaciones de entrada ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Accesibilidad: menos movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .bg-glow { opacity: 0.65; }
}
