/* ==========================================================================
   Red Space Music — Design Tokens
   ========================================================================== */
:root {
  /* Color */
  --void: #05050a;
  --panel: #0b0b14;
  --panel-2: #11111c;
  --line: rgba(184, 179, 255, 0.12);
  --line-bright: rgba(184, 179, 255, 0.28);
  --signal: #6d5dfc;
  --signal-2: #3d7bff;
  --ion: #b8b3ff;
  --ink: #ededf5;
  --ink-dim: #9a98ad;
  --ink-faint: #5f5d72;
  --danger: #ff5d6c;
  --success: #4ade80;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Scale */
  --container: 1240px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: auto;
  background: var(--void);
}

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--signal); color: white; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 10px; border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: var(--line-bright); }

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

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ion);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  position: relative;
  padding: 140px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ion);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px 2px var(--signal);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.6;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 28px;
  border-radius: 100px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--signal), var(--signal-2));
  color: #fff;
  box-shadow: 0 0 0 0 rgba(109, 93, 252, 0.5), 0 8px 24px -8px rgba(109, 93, 252, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px 2px rgba(109, 93, 252, 0.45), 0 12px 28px -8px rgba(61, 123, 255, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--line-bright);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.btn-block { width: 100%; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 14px 0;
  background: rgba(5, 5, 10, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.logo .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--signal), var(--signal-2));
  position: relative;
  box-shadow: 0 0 16px rgba(109, 93, 252, 0.55);
}

.logo .mark::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 3px;
  background: var(--void);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--ink-dim);
  transition: color 0.25s var(--ease);
  position: relative;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nav-toggle span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.9;
}

.hero-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 93, 252, 0.22), transparent 65%);
  top: -300px;
  right: -300px;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-content h1 .accent {
  background: linear-gradient(135deg, var(--ion), var(--signal-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  height: 480px;
}

.signal-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

#signal-svg { width: 100%; height: 100%; }

.signal-path {
  fill: none;
  stroke: url(#signalGradient);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(109, 93, 252, 0.5));
}

.signal-node {
  fill: var(--ion);
  filter: drop-shadow(0 0 6px rgba(184, 179, 255, 0.9));
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  z-index: 1;
}

.scroll-cue .line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--ion), transparent);
}

/* ==========================================================================
   Platforms strip
   ========================================================================== */
.platforms {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.platforms-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 32px;
}

.marquee {
  display: flex;
  width: max-content;
  gap: 64px;
  animation: marquee 32s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0.75;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}

.platform-item:hover { opacity: 1; color: var(--ink); }

.platform-item svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ==========================================================================
   Feature cards
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--panel);
  padding: 40px 32px;
  position: relative;
  transition: background 0.4s var(--ease);
}

.feature-card:hover { background: var(--panel-2); }

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(109, 93, 252, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(109, 93, 252, 0.12);
  border: 1px solid var(--line-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--ion);
  position: relative;
  z-index: 1;
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   How it works — signal timeline
   ========================================================================== */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.timeline-track {
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  z-index: 0;
}

.timeline-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, var(--signal), var(--signal-2));
  box-shadow: 0 0 8px var(--signal);
}

.timeline-step {
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ion);
  margin-bottom: 24px;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.timeline-step.is-active .timeline-dot {
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.15), 0 0 20px rgba(109, 93, 252, 0.4);
}

.timeline-step h4 {
  font-size: 17px;
  margin-bottom: 8px;
}

.timeline-step p {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
}

/* ==========================================================================
   Why choose us
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.why-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.why-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
}

.why-card .why-icon {
  color: var(--ion);
  margin-bottom: 16px;
}

.why-card .why-icon svg { width: 24px; height: 24px; }

.why-card h4 { font-size: 16px; margin-bottom: 6px; }
.why-card p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.5; }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.stat {
  position: relative;
  padding: 0 20px;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: var(--line);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--ink), var(--ion));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-slider { position: relative; }

.swiper-slide {
  padding: 8px;
}

.testimonial-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-quote {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 28px;
  flex-grow: 1;
}

.testimonial-quote::before {
  content: '"';
  color: var(--signal);
  font-family: var(--font-display);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--signal), var(--signal-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.author-name { font-size: 14.5px; font-weight: 600; }
.author-role { font-size: 13px; color: var(--ink-faint); }

.swiper-pagination {
  position: relative;
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-bright);
  opacity: 1;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}

.swiper-pagination-bullet-active {
  background: var(--signal);
  width: 24px;
  border-radius: 4px;
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list {
  max-width: 760px;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
  margin-left: 20px;
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--ion);
  transition: transform 0.35s var(--ease);
}

.faq-icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-icon::after { top: 0; left: 50%; width: 1.5px; height: 100%; transform: translateX(-50%); }

.faq-item.open .faq-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.faq-answer-inner {
  padding-bottom: 24px;
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 640px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(30px, 4vw, 40px);
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 420px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 14.5px;
  color: var(--ink-dim);
}

.contact-detail svg { width: 18px; height: 18px; color: var(--ion); flex-shrink: 0; }

.glass-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.form-group input::placeholder, .form-group textarea::placeholder { color: var(--ink-faint); }

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--signal);
  background: rgba(109, 93, 252, 0.04);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-status {
  margin-top: 16px;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: none;
}

.form-status.show { display: block; }
.form-status.success { background: rgba(74, 222, 128, 0.1); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.25); }
.form-status.error { background: rgba(255, 93, 108, 0.1); color: var(--danger); border: 1px solid rgba(255, 93, 108, 0.25); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.footer-brand p {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 12px; }

.footer-col ul li a {
  font-size: 14.5px;
  color: var(--ink-dim);
  transition: color 0.25s var(--ease);
}

.footer-col ul li a:hover { color: var(--ion); }

.social-row { display: flex; gap: 12px; margin-top: 20px; }

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.social-icon:hover { border-color: var(--signal); color: var(--ion); transform: translateY(-2px); }
.social-icon svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a:hover { color: var(--ink-dim); }

/* ==========================================================================
   Reveal animation hook (JS toggles .is-visible)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}
.logo-img {
  height: 140px;
  width: auto;
  display: block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 320px; order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .timeline-track, .timeline-track-fill { display: none; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stat:nth-child(2)::after { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .section { padding: 90px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .glass-card { padding: 28px; }
  .container { padding: 0 20px; }
  .hero-content p { max-width: 100%; }
}
