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

:root {
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.5);
  --shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.35);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

:root {
  color-scheme: dark light;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* THEME TOKENS */

body[data-theme="dark"] {
  /* gris grafito */
  --bg: radial-gradient(circle at top left, #26282b 0, #151618 55%, #070708 100%);
  --bg-solid: #151618;
  --bg-elevated: rgba(23, 24, 26, 0.96);
  --bg-pill: rgba(80, 80, 85, 0.4);
  --border-soft: rgba(120, 124, 129, 0.4);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-strong: #0ea5e9;
  --danger-soft: rgba(248, 113, 113, 0.3);
  --danger: #fb7185;
}

body[data-theme="light"] {
  --bg: radial-gradient(circle at top left, #e5e7eb 0, #f9fafb 40%, #f3f4f6 100%);
  --bg-solid: #f9fafb;
  --bg-elevated: rgba(255, 255, 255, 0.96);
  --bg-pill: rgba(37, 99, 235, 0.06);
  --border-soft: rgba(148, 163, 184, 0.55);
  --text-main: #111827;
  --text-muted: #4b5563;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-strong: #1d4ed8;
  --danger-soft: rgba(248, 113, 113, 0.22);
  --danger: #e11d48;
}

/* PAGE LAYOUT */

.page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 1.75rem clamp(1.25rem, 4vw, 3rem);
}

@media (min-width: 1920px) {
  .page {
    padding-inline: 20vw;
  }
}

.page-header,
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-header {
  padding-block: 0.75rem 0.75rem;
}

.page-footer {
  padding-block: 1.75rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  margin-top: 3rem;
}

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4rem;
}

/* BRAND */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.6rem;
  background: radial-gradient(circle at 25% 20%, var(--accent-strong), var(--accent));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 30% 12%;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.85);
  transform: rotate(-18deg);
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* THEME TOGGLE */

.theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(21, 22, 24, 0.85);
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-med), border-color var(--transition-med),
    transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-med);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  background-image: linear-gradient(
    120deg,
    rgba(32, 34, 37, 0.96),
    rgba(15, 16, 18, 0.9)
  );
}

body[data-theme="light"] .theme-toggle {
  background-image: linear-gradient(
    120deg,
    rgba(249, 250, 251, 0.95),
    rgba(229, 231, 235, 0.9)
  );
  background-color: rgba(255, 255, 255, 0.95);
}

.theme-toggle:hover {
  border-color: rgba(56, 189, 248, 0.8);
  color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #020617, 0 0 0 4px var(--accent);
}

.theme-toggle-icon {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 20%, #fbbf24, #f97316);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.7);
  overflow: hidden;
}

body[data-theme="dark"] .theme-toggle-icon {
  background: radial-gradient(circle at 30% 20%, #e5e7eb, #f9fafb);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.7);
}

.theme-toggle-icon::before {
  content: "";
  position: absolute;
  inset: 20% 20%;
  border-radius: inherit;
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.9;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.3fr);
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.35rem, 4vw, 3.1rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.9rem;
}

.hero-lead {
  margin: 0 0 0.8rem;
  font-size: 0.98rem;
  max-width: 34rem;
  color: var(--text-main);
}

.hero-sub {
  margin: 0;
  font-size: 0.85rem;
  max-width: 30rem;
  color: var(--text-muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.8rem 0.25rem 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  border: 1px solid rgba(120, 124, 129, 0.6);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.9rem;
  backdrop-filter: blur(10px);
}

.pill-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #f97373, #ef4444);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.9);
  position: relative;
}

.pill-dot::after {
  content: "";
  position: absolute;
  inset: 0.2rem;
  border-radius: inherit;
  border: 2px solid rgba(15, 23, 42, 0.6);
}

.pill-text {
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* EQUALIZER */

.hero-visual {
  justify-self: center;
  max-width: 340px;
}

.equalizer {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  padding: 16px 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(23, 24, 26, 0.97), rgba(9, 10, 12, 0.98));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(120, 124, 129, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5px;
  overflow: hidden;
}

/* incluso en modo claro, el ecualizador mantiene fondo oscuro */
body[data-theme="light"] .equalizer {
  background: linear-gradient(145deg, #020617, #020617);
  border-color: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-soft);
}

.equalizer::before {
  content: "";
  position: absolute;
  inset: 10px 14px;
  border-radius: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

/* barras con reflejo y color dinámico */

.eq-bar {
  --eq-color: #38bdf8;
  --eq-color-bright: #0ea5e9;

  flex: 1;
  height: 40%;
  min-height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--eq-color-bright),
    var(--eq-color)
  );
  opacity: 0.98;
  transform-origin: bottom center;
  transform: scaleY(0.25);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.9);
  transition: transform 0.12s linear;
  position: relative;
  z-index: 1;
}

/* reflejo inferior simulando cristal */

.eq-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 60%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(15, 23, 42, 0)
  );
  transform-origin: top center;
  transform: scaleY(-0.9);
  opacity: 0.25;
  filter: blur(3px);
  pointer-events: none;
}

/* pequeño highlight en la parte superior de la barra */

.eq-bar::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 8%;
  height: 18%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.3;
  pointer-events: none;
}

/* Wave caption */

.wave-caption {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.45);
  font-size: 0.72rem;
  color: var(--accent-strong);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .wave-caption {
  background: rgba(219, 234, 254, 0.8);
  border-color: rgba(59, 130, 246, 0.55);
  color: #1d4ed8;
}

.wave-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.9);
  position: relative;
}

.wave-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(248, 250, 252, 0.6);
}

.wave-text {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* META */

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.meta-item {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(23, 24, 26, 0.9);
  border: 1px solid rgba(120, 124, 129, 0.55);
  font-size: 0.83rem;
  color: var(--text-muted);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .meta-item {
  background: rgba(255, 255, 255, 0.9);
}

.meta-item h2 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-main);
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .page {
    padding-inline: 1.25rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.1fr);
    gap: 2.5rem;
  }

  .hero-visual {
    max-width: 280px;
    justify-self: flex-start;
  }

  .page-header {
    align-items: flex-start;
  }

  .meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .page {
    padding-inline: 1rem;
  }

  .page-header,
  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-footer {
    border-top: none;
    margin-top: 1.5rem;
  }

  .meta {
    gap: 0.75rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .equalizer {
    height: 190px;
  }
}
