@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --dark: #1a1a2e;
  --darker: #0d0d1a;
  --cyan: #00ffff;
  --white: #f0f0f0;
  --grey: #8888aa;
  --card-radius: 18px;
  --nav-h: 64px;
  --anchor-h: 44px;
  --font-head: 'Bebas Neue', 'Impact', monospace;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --glow-red: 0 0 8px #ff0000, 0 0 20px #ff000080, 0 0 40px #ff000040;
  --glow-pink: 0 0 8px #ff006e, 0 0 20px #ff006e80;
  --glow-cyan: 0 0 8px #00ffff, 0 0 20px #00ffff80;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--darker);
  color: var(--white);
}

body.riba-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--darker);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== SCANLINES OVERLAY ===== */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 80px; }
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(13, 13, 26, 0.95);
  border-bottom: 2px solid var(--pink);
  box-shadow: 0 0 20px #ff006e60, 0 2px 40px #ff000030;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Brand icon */
.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  min-height: 40px;
  min-width: 40px;
}

.brand-text-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.6rem;
  border-radius: 6px;
  box-shadow: var(--glow-red);
  letter-spacing: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* Main nav */
.main-nav {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.main-nav ol {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.main-nav ol li a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  border: 1.5px solid rgba(255, 0, 110, 0.35);
  background: rgba(255, 0, 110, 0.08);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.main-nav ol li a:hover,
.main-nav ol li a:focus {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: var(--glow-pink);
  outline: none;
}

.header-contact {
  flex-shrink: 0;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: var(--glow-cyan);
  box-shadow: 0 0 8px #00ffff40;
  white-space: nowrap;
}

/* ===== STICKY ANCHOR BAR ===== */
.sticky-anchor-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 800;
  height: var(--anchor-h);
  background: rgba(26, 26, 46, 0.98);
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar { display: none; }

.sticky-anchor-bar ol {
  display: flex;
  list-style: none;
  height: 100%;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.sticky-anchor-bar ol li a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grey);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sticky-anchor-bar ol li a:hover,
.sticky-anchor-bar ol li a:focus {
  color: var(--red);
  border-bottom-color: var(--red);
  outline: none;
}

/* Section scroll offset */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + var(--anchor-h) + 12px);
}

/* ===== MAIN / WRAP ===== */
main {
  padding-top: calc(var(--nav-h) + var(--anchor-h));
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 0, 110, 0.2);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,0,0,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(255,0,110,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero-article {
  width: 100%;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-media {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 2px solid var(--pink);
  box-shadow: var(--glow-pink), inset 0 0 40px rgba(255,0,110,0.08);
  aspect-ratio: 4/3;
  background: rgba(26,26,46,0.8);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pixel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,0,110,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,110,0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.neon-badge {
  position: relative;
  z-index: 2;
  font-family: var(--font-head);
  font-size: 5rem;
  color: var(--red);
  text-shadow: var(--glow-red);
  letter-spacing: 0.1em;
  animation: neonFlicker 3s ease-in-out infinite;
}

@keyframes neonFlicker {
  0%, 95%, 100% { opacity: 1; }
  96%, 98% { opacity: 0.6; }
  97%, 99% { opacity: 0.9; }
}

.hero-float-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--cyan);
  padding: 4px 12px;
  border-radius: 4px;
  text-shadow: var(--glow-cyan);
  box-shadow: var(--glow-cyan);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.eyebrow-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--pink);
  text-transform: uppercase;
  text-shadow: var(--glow-pink);
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.05;
  color: var(--white);
  letter-spacing: 0.04em;
  text-shadow: var(--glow-red);
  position: relative;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--grey);
  max-width: 480px;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: none;
  box-shadow: var(--glow-red);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-primary:hover, .btn-primary:focus {
  background: #cc0000;
  box-shadow: 0 0 16px #ff0000, 0 0 40px #ff000060;
  transform: translateY(-2px);
  outline: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--pink);
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 2px solid var(--pink);
  box-shadow: var(--glow-pink);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-ghost:hover, .btn-ghost:focus {
  background: var(--pink);
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}

/* ===== GLITCH EFFECT ===== */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch-text::before {
  color: var(--cyan);
  animation: glitchA 5s infinite;
}

.glitch-text::after {
  color: var(--red);
  animation: glitchB 5s infinite;
}

@keyframes glitchA {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: 0.8; transform: translate(-3px, 0) skewX(-2deg); clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); }
  93% { opacity: 0; }
  95% { opacity: 0.6; transform: translate(2px, 0) skewX(1deg); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); }
}

@keyframes glitchB {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: 0.7; transform: translate(3px, 0) skewX(2deg); clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); }
  95% { opacity: 0; }
}

/* ===== CONTENT SECTION ===== */
.content-section {
  padding: 60px 0;
}

.content-article {
  width: 100%;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ===== MAIN CONTENT (page.content) ===== */
.main-content {
  min-width: 0;
}

.main-content h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--white);
  letter-spacing: 0.05em;
  margin: 48px 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  text-shadow: var(--glow-red);
}

.main-content h2:first-child { margin-top: 0; }

.main-content h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--pink);
  letter-spacing: 0.04em;
  margin: 32px 0 8px;
  text-shadow: var(--glow-pink);
}

.main-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #ccccdd;
  margin-bottom: 16px;
}

.main-content a {
  color: var(--pink);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,0,110,0.4);
  transition: color 0.2s, border-color 0.2s;
}

.main-content a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.main-content ul, .main-content ol {
  padding-left: 1.5em;
  margin-bottom: 16px;
  color: #ccccdd;
  line-height: 1.75;
}

.main-content li { margin-bottom: 6px; }

.main-content strong { color: var(--white); font-weight: 700; }

.main-content em { color: var(--pink); font-style: italic; }

.main-content article {
  padding: 40px 0;
  border-bottom: 1px solid rgba(255,0,110,0.12);
  position: relative;
}

.main-content article:last-child { border-bottom: none; }

.main-content article::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  margin-bottom: 24px;
  border-radius: 2px;
  box-shadow: var(--glow-pink);
}

/* Tables */
.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.main-content th {
  background: rgba(255,0,110,0.15);
  color: var(--pink);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--pink);
  letter-spacing: 0.03em;
}

.main-content td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #ccccdd;
}

.main-content tr:hover td {
  background: rgba(255,0,110,0.05);
}

.main-content blockquote {
  border-left: 3px solid var(--red);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(255,0,0,0.06);
  border-radius: 0 8px 8px 0;
  color: var(--grey);
  font-style: italic;
}

.main-content code {
  font-family: monospace;
  font-size: 0.9em;
  color: var(--cyan);
  background: rgba(0,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.main-content img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,0,110,0.3);
  box-shadow: var(--glow-pink);
  margin: 16px 0;
}

/* ===== ASIDE ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--anchor-h) + 20px);
}

.aside-inner {
  background: rgba(26,26,46,0.8);
  border: 1.5px solid rgba(255,0,110,0.3);
  border-radius: var(--card-radius);
  padding: 28px 22px;
  box-shadow: 0 0 20px rgba(255,0,110,0.1), inset 0 0 30px rgba(255,0,0,0.03);
  border-bottom: 3px solid var(--red);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-shadow: var(--glow-red);
}

.aside-inner .subtitle {
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.aside-links li a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}

.aside-links li a:hover,
.aside-links li a:focus {
  background: rgba(255,0,110,0.12);
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 8px rgba(255,0,110,0.2);
  outline: none;
}

.aside-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pixel-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 4px;
  border: 1px solid var(--red);
  color: var(--red);
  background: rgba(255,0,0,0.08);
  text-shadow: 0 0 6px rgba(255,0,0,0.5);
}

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(10,10,20,0.98);
  border-top: 2px solid var(--red);
  box-shadow: 0 -4px 40px rgba(255,0,0,0.15);
  margin-top: 60px;
}

.site-footer article {
  padding: 60px 24px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Footer grid: brand + links side by side */
.site-footer {
  display: grid;
  grid-template-rows: auto auto auto;
}

/* Use display grid on footer children */
.site-footer > article:nth-of-type(1),
.site-footer > article:nth-of-type(2) {
  display: block;
}

/* Two-column via flex on footer inner wrapper approach */
.footer-brand,
.footer-links {
  width: 100%;
  max-width: none;
  padding: 0;
}

.site-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
}

.footer-brand {
  flex: 1 1 340px;
  background: rgba(255,0,0,0.04);
  border-right: 1px solid rgba(255,0,0,0.15);
}

.footer-brand-inner {
  padding: 60px 40px 48px;
  height: 100%;
}

.footer-mega-brand {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--red);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(255,0,0,0.5));
}

.footer-brand-desc {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 340px;
}

.footer-links {
  flex: 1 1 340px;
}

.footer-links-inner {
  padding: 60px 40px 48px;
}

.footer-nav-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-shadow: var(--glow-pink);
}

.footer-links-inner .subtitle {
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav-list li a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 4px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--grey);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.footer-nav-list li a:hover,
.footer-nav-list li a:focus {
  color: var(--pink);
  border-bottom-color: var(--pink);
  outline: none;
}

.footer-bottom {
  width: 100%;
  background: rgba(0,0,0,0.5);
  border-top: 1px solid rgba(255,0,0,0.2);
  padding: 18px 40px;
  flex-basis: 100%;
}

.copyright {
  font-size: 0.8rem;
  color: var(--grey);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ===== PARALLAX ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-section {
    background-attachment: fixed;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .scanlines { animation: none; }
  .glitch-text::before, .glitch-text::after { display: none; }
  .pixel-grid { animation: none; }
  .neon-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-with-aside {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --anchor-h: 40px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .main-nav ol li a {
    padding: 0 10px;
    font-size: 0.8rem;
    height: 40px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-media {
    order: 1;
    aspect-ratio: 16/9;
  }

  .hero-copy {
    order: 2;
  }

  .hero-h1 {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    order: -1;
  }

  .wrap {
    padding: 0 16px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-brand {
    border-right: none;
    border-bottom: 1px solid rgba(255,0,0,0.15);
  }

  .footer-brand-inner,
  .footer-links-inner {
    padding: 40px 24px;
  }

  .footer-bottom {
    padding: 16px 24px;
  }
}

@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary, .btn-ghost {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .sticky-anchor-bar ol li a {
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .contact-badge {
    display: none;
  }
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

button[aria-expanded]{min-width:44px;min-height:44px}
