/* ============================================================
   DUNITY — design system  ·  dunity.app
   Dark cinematic + red pill (#F32424). Space Grotesk + JetBrains Mono.
   ============================================================ */

:root {
  /* surfaces — near-black, neutral cool */
  --bg:        #0a0a0b;
  --bg-elev:   #111114;
  --card:      #131318;
  --card-2:    #17171d;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* text */
  --text:   #f5f5f4;
  --muted:  #a6a6ae;
  --faint:  #6a6a73;

  /* accents */
  --accent:  #F32424;   /* píldora roja */
  --cyan:    #06B6D4;
  --amber:   #F59E0B;
  --violet:  #A855F7;

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-dur: 0.9s;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; overflow-x: hidden; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; width: 100%; max-width: 100%; position: relative; }

::selection { background: var(--accent); color: #fff; }

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

img { max-width: 100%; }

/* page width */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---------- type scale ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow.muted { color: var(--faint); }
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.02; }

.display {
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  letter-spacing: -0.03em;
  line-height: 1.0;
  text-wrap: balance;
}
.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
  max-width: 46ch;
  text-wrap: pretty;
}
.kicker { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 16px; font-weight: 600;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .35s var(--ease), border-color .25s;
  will-change: transform;
  white-space: nowrap;
  color: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 rgba(243, 36, 36, 0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px -10px var(--accent), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }

/* ---------- store badges ---------- */
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: border-color .25s, transform .25s var(--ease), background .25s;
  cursor: pointer;
}
.badge:hover { border-color: var(--line-2); transform: translateY(-2px); background: rgba(255, 255, 255, 0.06); }
.badge .glyph { width: 26px; height: 26px; flex: none; opacity: 0.95; }
.badge .b-text { display: flex; flex-direction: column; line-height: 1.1; }
.badge .b-store { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- chips / tags ---------- */
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- sections ---------- */
section { position: relative; }
.section-pad { padding: clamp(90px, 13vh, 160px) 0; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .4s var(--ease);
}
.card:hover { border-color: var(--line-2); }

/* ---------- glow ---------- */
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--reveal-dur) var(--ease), transform var(--reveal-dur) var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
.reveal[data-d="6"] { transition-delay: .48s; }

/* ---------- matrix canvas ---------- */
#matrix {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.10;
}

/* ---------- footer link ---------- */
.foot-link { color: var(--muted); transition: color .2s; }
.foot-link:hover { color: var(--text); }

/* utilities */
.mono { font-family: var(--mono); }
.center { text-align: center; }

/* keyframes */
@keyframes breathe {
  0%, 100% { opacity: 0.42; transform: scale(1); }
  50%      { opacity: 0.62; transform: scale(1.08); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- reduced motion ---------- */
/* DUNITY: el movimiento es parte de la experiencia de marca (Matrix, conejos, píldora, juego) y se
   mantiene IGUAL en web y móvil, incluso con "Reducir movimiento" activado en el sistema. La única
   concesión es suavizar el scroll-behavior; el parallax/tilt del cursor (desktop) ya se desactiva
   en JS para reduced-motion. Si más adelante se quiere dar control al usuario, sumar un toggle. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
