:root {
  color-scheme: dark;

  /* Anime Tokyo Night Palette */
  --bg: #090614;
  --bg-deep: #05030a;
  --surface: #130c2c;
  --surface-2: #1e1344;
  --surface-translucent: rgba(19, 12, 44, 0.82);
  --border: #2e1d58;
  --border-neon: rgba(255, 42, 112, 0.45);
  --border-cyan: rgba(0, 240, 255, 0.45);

  --text: #ffffff;
  --text-dim: #e4e0f2;
  --muted: #a69bbd;

  /* Signature Anime Accents */
  --anime-pink: #ff2a70;
  --anime-pink-soft: #ff6699;
  --anime-pink-glow: rgba(255, 42, 112, 0.55);
  --anime-cyan: #00f0ff;
  --anime-cyan-glow: rgba(0, 240, 255, 0.45);
  --anime-purple: #7928ca;
  --anime-violet: #a855f7;
  --anime-gold: #ffd000;
  --anime-orange: #ff5e36;

  /* Backwards compatibility for policy pages */
  --blue: #00f0ff;
  --amber: #ff2a70;
  --amber-soft: #ff6699;
  --green: #00ffaa;
  --red: #ff3366;
  --radius: 16px;
  --radius-sm: 8px;

  /* Anime Typography */
  --font-display: 'Dela Gothic One', 'Outfit', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    /* Manga halftone screentone dots */
    radial-gradient(circle, rgba(255, 42, 112, 0.12) 1.2px, transparent 1.2px),
    /* Radiant anime atmospheric glows */
    radial-gradient(circle 600px at 85% 10%, rgba(255, 42, 112, 0.22), transparent 70%),
    radial-gradient(circle 520px at 12% 45%, rgba(0, 240, 255, 0.15), transparent 65%),
    radial-gradient(circle 700px at 50% 90%, rgba(121, 40, 202, 0.22), transparent 75%),
    /* Diagonal anime speed-grid stripes */
    linear-gradient(135deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.02) 75%, transparent 75%, transparent);
  background-size: 24px 24px, 100% 100%, 100% 100%, 100% 100%, 50px 50px;
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
}

/* Ambient Floating Sakura (Cherry Blossom) Petals */
.sakura-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  border-radius: 12px 1px 12px 1px;
  background: linear-gradient(135deg, rgba(255, 136, 196, 0.65), rgba(255, 42, 112, 0.3));
  box-shadow: 0 0 10px rgba(255, 42, 112, 0.4);
  opacity: 0.7;
  animation: sakura-fall linear infinite;
  will-change: transform, opacity;
}

.petal-1 { left: 8%; width: 14px; height: 14px; animation-duration: 14s; animation-delay: 0s; }
.petal-2 { left: 22%; width: 11px; height: 11px; animation-duration: 18s; animation-delay: 3s; }
.petal-3 { left: 38%; width: 16px; height: 16px; animation-duration: 16s; animation-delay: 7s; }
.petal-4 { left: 55%; width: 12px; height: 12px; animation-duration: 20s; animation-delay: 2s; }
.petal-5 { left: 68%; width: 15px; height: 15px; animation-duration: 15s; animation-delay: 5s; }
.petal-6 { left: 82%; width: 10px; height: 10px; animation-duration: 19s; animation-delay: 1s; }
.petal-7 { left: 92%; width: 14px; height: 14px; animation-duration: 17s; animation-delay: 8s; }
.petal-8 { left: 45%; width: 13px; height: 13px; animation-duration: 22s; animation-delay: 11s; }

@keyframes sakura-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.75;
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(40px);
    opacity: 0.85;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-30px);
    opacity: 0;
  }
}

/* Layout Containers */
.topbar, main, .footer {
  width: min(1140px, 100% - 36px);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* Header & Navigation */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 42, 112, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo, .brand img {
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 42, 112, 0.7));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.brand:hover .brand-logo,
.brand:hover img {
  transform: rotate(6deg) scale(1.08);
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.85));
}

.brand > span,
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand strong {
  font: 800 20px var(--font-heading);
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #ffffff 40%, var(--anime-pink-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-kanji {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--anime-pink);
  background: rgba(255, 42, 112, 0.16);
  border: 1px solid rgba(255, 42, 112, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.topbar nav {
  display: flex;
  gap: 24px;
}

.topbar nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  padding-bottom: 4px;
}

.topbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--anime-pink), var(--anime-cyan));
  box-shadow: 0 0 8px var(--anime-cyan);
  transition: width 0.25s ease;
}

.topbar nav a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.topbar nav a:hover::after {
  width: 100%;
}

/* Hero Section Base */
.hero {
  position: relative;
  padding: 72px 0 56px;
  max-width: 780px;
}

/* When hero has a visual showcase (as on index.html) */
.hero:has(.hero-visual) {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  max-width: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Eyebrow Badge */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border-neon);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 42, 112, 0.18), rgba(121, 40, 202, 0.22));
  box-shadow: 0 0 18px rgba(255, 42, 112, 0.25);
  transform: skewX(-6deg);
  margin-bottom: 24px;
}

.eyebrow-badge > * {
  transform: skewX(6deg);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2a70;
  box-shadow: 0 0 10px #ff2a70;
  animation: pulse-anime 1.5s ease-in-out infinite;
}

@keyframes pulse-anime {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 20px;
  padding: 5px 14px;
  border: 1px solid var(--border-neon);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 42, 112, 0.18), rgba(121, 40, 202, 0.22));
  color: #ffffff;
  font: 700 12px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: skewX(-6deg);
  width: fit-content;
}

.eyebrow-badge .eyebrow {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  transform: none;
}

.eyebrow-tag {
  color: var(--anime-cyan);
  font: 700 11px var(--font-mono);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.06em;
}

/* Title & Watermark */
.title-wrapper {
  position: relative;
}

.title-watermark {
  position: absolute;
  top: -30px;
  left: -8px;
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 96px);
  color: rgba(255, 255, 255, 0.035);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  z-index: -1;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  margin: 0;
}

h1 {
  font-size: clamp(40px, 6.2vw, 68px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 25%, #ff80bf 65%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 32px rgba(255, 42, 112, 0.4));
}

.lead {
  margin: 24px 0 0;
  color: var(--text-dim);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.65;
  max-width: 580px;
}

/* Actions & Anime Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
  overflow: hidden;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #ff2a70 0%, #ff5e36 55%, #ffd000 100%);
  color: #090614;
  border: none;
  filter: drop-shadow(0 0 16px rgba(255, 42, 112, 0.65));
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 26px rgba(255, 42, 112, 0.95)) drop-shadow(0 0 10px rgba(255, 208, 0, 0.7));
}

.btn-primary:hover::before {
  left: 140%;
}

.btn-ghost {
  background: rgba(0, 240, 255, 0.1);
  color: var(--anime-cyan);
  border: 1px solid var(--anime-cyan);
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.25));
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(0, 240, 255, 0.25);
  color: #ffffff;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.75));
}

/* Hero Visual Showcase */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  filter: drop-shadow(0 20px 45px rgba(255, 42, 112, 0.28));
  transition: transform 0.35s ease;
}

.hero-visual-card:hover {
  transform: translateY(-6px);
}

.anime-illustration {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

/* Visual Badges */
.visual-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font: 700 12px var(--font-mono);
  letter-spacing: 0.06em;
  backdrop-filter: blur(12px);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.visual-badge-top {
  top: -14px;
  right: 16px;
  background: linear-gradient(135deg, rgba(255, 208, 0, 0.28), rgba(255, 94, 54, 0.25));
  border: 1px solid var(--anime-gold);
  color: var(--anime-gold);
}

.visual-badge-top .badge-star {
  font-size: 14px;
  color: var(--anime-gold);
  animation: star-spin 4s linear infinite;
}

@keyframes star-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.visual-badge-bottom-left {
  bottom: 18px;
  left: -16px;
  background: rgba(0, 240, 255, 0.18);
  border: 1px solid var(--anime-cyan);
  color: var(--anime-cyan);
}

.pulse-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--anime-cyan);
  box-shadow: 0 0 10px var(--anime-cyan);
  animation: pulse-anime 1.4s ease-in-out infinite;
}

.visual-badge-bottom-right {
  bottom: -14px;
  right: 14px;
  background: rgba(255, 42, 112, 0.22);
  border: 1px solid var(--anime-pink);
  color: #ffffff;
}

/* Anime Marquee Ticker */
.anime-ticker {
  position: relative;
  margin: 32px 0 20px;
  background: rgba(18, 12, 38, 0.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 42, 112, 0.35);
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
  padding: 14px 0;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(255, 42, 112, 0.1);
}

.ticker-track {
  display: flex;
  gap: 36px;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-track span {
  font: 700 13px var(--font-mono);
  letter-spacing: 0.12em;
  color: #ffffff;
  opacity: 0.9;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ticker-track span:nth-child(4n + 1) { color: var(--anime-pink); }
.ticker-track span:nth-child(4n + 2) { color: var(--anime-cyan); }
.ticker-track span:nth-child(4n + 3) { color: var(--anime-gold); }
.ticker-track span:nth-child(4n + 4) { color: #ffffff; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Content Sections */
.section {
  padding: 64px 0;
}

.section h2 {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

/* Feature Grid (Manga Panel Cards) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-translucent);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, transparent 50%, var(--anime-pink) 50%);
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--anime-pink);
  box-shadow: 0 14px 34px rgba(255, 42, 112, 0.25);
}

.card h3 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card .note {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: #8b80a6;
  font-family: var(--font-mono);
}

/* Status Badges */
.status {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font: 700 11px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-en-prueba {
  background: rgba(255, 208, 0, 0.16);
  border: 1px solid rgba(255, 208, 0, 0.5);
  color: var(--anime-gold);
}

.status-funciona {
  background: rgba(0, 240, 255, 0.16);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--anime-cyan);
}

.status-descartado {
  background: rgba(255, 42, 112, 0.16);
  border: 1px solid rgba(255, 42, 112, 0.5);
  color: var(--anime-pink);
}

/* Process Steps (Manga Chapters) */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-translucent);
  backdrop-filter: blur(8px);
  counter-increment: step;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.step:hover {
  border-color: var(--anime-cyan);
  transform: translateY(-4px);
}

.step::before {
  content: 'CH.0' counter(step);
  display: inline-block;
  margin-bottom: 14px;
  color: var(--anime-cyan);
  font: 700 13px var(--font-mono);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
}

.step p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Anime Callout Box (Mission / Terminal Panel) */
.callout {
  position: relative;
  padding: clamp(32px, 5.5vw, 54px);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 42, 112, 0.2), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0, 240, 255, 0.15), transparent 50%),
    rgba(19, 12, 44, 0.92);
  border: 1px solid rgba(255, 42, 112, 0.4);
  box-shadow:
    0 0 40px rgba(255, 42, 112, 0.18),
    inset 0 0 30px rgba(0, 240, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.callout-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 42, 112, 0.25);
  font-family: var(--font-mono);
}

.callout-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--anime-cyan);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ping-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--anime-cyan);
  box-shadow: 0 0 10px var(--anime-cyan);
  animation: pulse-anime 1.4s ease-in-out infinite;
}

.callout-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.callout h2 {
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.callout p {
  margin: 16px 0 0;
  max-width: 680px;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1.65;
}

/* Music Action / Bottom CTA */
.section-music {
  padding: 16px 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.music-action {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding: 36px 0 48px;
  border-top: 1px solid rgba(255, 42, 112, 0.25);
  position: relative;
  color: var(--muted);
  font-size: 14px;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--anime-pink), var(--anime-cyan), transparent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-badge {
  font: 700 11px var(--font-mono);
  color: var(--anime-pink);
  background: rgba(255, 42, 112, 0.14);
  border: 1px solid rgba(255, 42, 112, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--anime-cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer a:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.85);
}

/* Media Queries */
@media (max-width: 900px) {
  .hero:has(.hero-visual) {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 60px 0 44px;
  }
  
  .hero-visual {
    order: 2;
  }

  .hero-visual-card {
    max-width: 420px;
  }

  .visual-badge-bottom-left {
    left: 4px;
  }
  
  .visual-badge-bottom-right {
    right: 4px;
  }
}

@media (max-width: 560px) {
  .topbar nav {
    display: none;
  }

  .hero {
    padding: 48px 0 36px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .visual-badge {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* Accessibility / Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .petal,
  .live-dot,
  .pulse-ring,
  .ping-dot,
  .ticker-track,
  .badge-star {
    animation: none !important;
  }

  .sakura-container {
    display: none;
  }

  .btn, .card, .step, .hero-visual-card {
    transition: none !important;
  }
}
