/* ==========================================================================
   Revivetendo Relay Network — Clean Solid CSS Design System
   ========================================================================== */

:root {
  /* Solid Color Palette - No Gradients or Glows */
  --bg-primary: #0f1117;
  --bg-secondary: #161821;
  --bg-tertiary: #1e202b;
  --bg-card: #181a24;
  --border-color: #2a2d3d;
  --border-hover: #3d4259;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #0284c7;
  --accent-cyan-hover: #0369a1;
  --accent-light: #38bdf8;
  --accent-purple: #7c3aed;
  --accent-green: #059669;

  /* Clean Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
}

body {
  line-height: 1.6;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Links - High Contrast Bright Cyan */
a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: #7dd3fc;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none !important;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-title {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Page Header */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: var(--font-main);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.page-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.65;
}

/* Section Shared Styles */
.guide-section,
.content-section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border-color);
}

.guide-section h2,
.content-section h2 {
  font-family: var(--font-main);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Step Cards */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.step-card {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 1.8rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.step-number {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}

.step-content h3 {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.step-content p {
  color: var(--text-main);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.step-note {
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  margin-top: 1rem;
  margin-bottom: 0 !important;
}

/* Guide Reference Images - Natural Aspect Ratio, No Black Areas */
.guide-image-container {
  margin: 1.5rem 0;
  width: 100%;
}

.guide-image {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.image-caption {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  display: block;
}

/* Clean Boxes inside steps */
.info-box {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}

.info-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.info-box p {
  font-size: 0.92rem !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

.requirements-list {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
}

.requirements-list h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.requirements-list ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.requirements-list li {
  font-size: 0.92rem;
  color: var(--text-main);
}

/* Action Box */
.action-box {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.action-box h4 {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Buttons - Pure White Text on Cyan Background */
.btn,
a.btn,
.feature-card a.btn,
.action-box a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  background-color: var(--accent-cyan);
  color: #ffffff !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lucide {
  flex-shrink: 0;
  vertical-align: middle;
}

.btn:hover,
a.btn:hover,
.feature-card a.btn:hover,
.action-box a.btn:hover {
  background-color: var(--accent-cyan-hover);
  color: #ffffff !important;
}

.btn-secondary,
a.btn-secondary {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
}

.btn-secondary:hover,
a.btn-secondary:hover {
  background-color: #262938 !important;
  border-color: var(--border-hover) !important;
  color: #ffffff !important;
}

.btn-discord,
a.btn-discord {
  background-color: #5865f2 !important;
  color: #ffffff !important;
}

.btn-discord:hover,
a.btn-discord:hover {
  background-color: #4752c4 !important;
  color: #ffffff !important;
}

/* Landing Page Hero Section */
.hero-section {
  padding: 5rem 0 3rem;
  border-bottom: none !important;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: visible !important;
}

.hero-icon {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  margin: 0 auto 1.5rem;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Animation: Drop in one by one from top WITHOUT fade (opacity stays 100%) */
@keyframes dropFromTop {
  0% {
    transform: translateY(-45px);
    visibility: hidden;
  }
  1% {
    visibility: visible;
  }
  100% {
    transform: translateY(0);
    visibility: visible;
  }
}

.animated-title {
  display: inline-flex;
  gap: 0.3em;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.animated-title .word {
  display: inline-block;
  visibility: hidden;
  animation: dropFromTop 0.32s cubic-bezier(0.2, 0.85, 0.35, 1.1) forwards;
  animation-delay: calc(var(--animation-order) * 0.25s);
}

/* Staggered entrance for all content appearing AFTER title word drop completes (~1.08s) */
@keyframes staggerFadeUp {
  0% {
    opacity: 0;
    transform: translateY(22px);
    visibility: hidden;
  }
  1% {
    visibility: visible;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

.stagger-in {
  opacity: 0;
  visibility: hidden;
  animation: staggerFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.08s;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mii Characters Placed Inside Blank Box Areas & Popping Out-of-Bounds */
.content-section,
.feature-grid,
.feature-card,
.step-card,
.info-box,
.requirements-list {
  position: relative;
  overflow: visible !important;
}

/* Feature cards with outer corner Miis: reserve 90px right padding on BOTH title and paragraph so text wraps cleanly and zero words are blocked */
.feature-card.has-mii {
  position: relative;
  overflow: visible !important;
}

.feature-card.has-mii h3,
.feature-card.has-mii p {
  padding-right: 90px;
}

.feature-card.has-mii h3 {
  margin-bottom: 0.85rem;
}

.mii-card-corner {
  position: absolute;
  right: -24px;
  top: -42px;
  height: 165px;
  width: auto;
  z-index: 10;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.mii-card-corner-lounging {
  position: absolute;
  right: -18px;
  top: -50px;
  height: 140px;
  width: auto;
  z-index: 10;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

/* Hero section bottom-right overlapping Mii */
.mii-overlap-hero {
  position: absolute;
  right: -25px;
  bottom: -45px;
  height: 260px;
  width: auto;
  z-index: 10;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.7));
  transform: rotate(4deg);
  pointer-events: none;
}

@media (max-width: 900px) {
  .mii-overlap-hero {
    height: 180px;
    right: -10px;
    bottom: -30px;
  }
}

@media (max-width: 600px) {
  .feature-card.has-mii h3 {
    padding-right: 0;
  }
  .mii-card-corner,
  .mii-overlap-hero {
    display: none;
  }
}

/* Quick Start Banner */
.quick-start-banner {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.quick-start-banner h2 {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.quick-start-banner p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Code block / Directory tree */
.code-block {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.code-header {
  background-color: var(--bg-secondary);
  padding: 0.55rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.btn-copy {
  background-color: var(--border-color);
  border: none;
  color: var(--text-main);
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy:hover {
  background-color: var(--border-hover);
}

.code-block pre {
  padding: 1.1rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-main);
  overflow-x: auto;
}

/* Ordered instructions */
.ordered-instructions {
  margin-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.ordered-instructions li {
  font-size: 0.95rem;
  color: var(--text-main);
  padding-left: 0.3rem;
}

/* Controller Physical Button Tokens */
.controller-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-weight: 700;
  color: #f8fafc;
  background-color: #334155;
  border: 1px solid #64748b;
  box-shadow: 0 2px 0 #0f172a, 0 3px 3px rgba(0, 0, 0, 0.3);
  user-select: none;
  vertical-align: middle;
  line-height: 1;
  margin: 0 0.15rem;
}

.controller-btn.btn-round {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.82rem;
}

.controller-btn.btn-shoulder {
  padding: 0 0.55rem;
  height: 24px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.controller-btn.btn-pill {
  padding: 0 0.65rem;
  height: 24px;
  border-radius: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.controller-btn.btn-dpad {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  padding: 2px;
}

.controller-btn svg {
  display: block;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.6rem;
}

.feature-card h3 {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.feature-card a {
  color: var(--accent-light);
}

.feature-card a:hover {
  text-decoration: underline;
}

/* FAQ List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background-color: transparent;
  border: none;
  padding: 1.15rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.faq-indicator {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent-light);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 1.4rem 1.3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Footer */
.footer {
  padding: 2.2rem 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
  .step-card {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .step-number {
    padding-top: 0;
  }

  .nav-links {
    display: none;
  }

  .page-header h1,
  .hero-section h1,
  .animated-title {
    font-size: 2.2rem;
  }
}

/* Light Mode Support */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --border-color: #cbd5e1;
    --border-hover: #94a3b8;

    --text-main: #0f172a;
    --text-muted: #334155;
    --text-dim: #64748b;
  }
  
  /* Adjust shadows for light mode */
  .guide-image,
  .hero-icon,
  .discord-ui-mockup {
    box-shadow: none;
  }

  .mii-card-corner,
  .mii-card-corner-lounging,
  .mii-overlap-hero {
    filter: none;
  }

  .controller-btn {
    box-shadow: 0 2px 0 #0f172a;
  }
}

/* Discord UI Mockup Section */
.discord-ui-section {
  overflow: hidden;
}

.discord-ui-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.discord-ui-text {
  flex: 1;
}

.discord-ui-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.discord-ui-text .btn-fullwidth {
  display: inline-flex;
  width: auto;
  margin-top: 1rem;
}

.discord-ui-mockup {
  flex: 1;
  background-color: #313338;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1e1f22;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body);
  color: #dbdee1;
  min-width: 350px;
}

.discord-ui-header {
  background-color: #2b2d31;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid #1e1f22;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f2f3f5;
}

.discord-ui-header .hashtag {
  color: #80848e;
  font-size: 1.2rem;
}

.discord-ui-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discord-msg {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
}

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #2b2d31;
}

.discord-msg-content {
  flex: 1;
}

.discord-msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.discord-user {
  font-weight: 500;
  color: #f2f3f5;
}

.discord-user.admin-user {
  color: #eb459e; /* Pink role color */
}

.discord-time {
  font-size: 0.75rem;
  color: #949ba4;
}

.discord-msg p {
  color: #dbdee1;
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

/* Animations for Discord Mockup */
.start-anim .msg-anim-1 { animation: popIn 0.4s ease forwards 0.2s; }
.start-anim .msg-anim-2 { animation: popIn 0.4s ease forwards 1.4s; }
.start-anim .msg-anim-3 { animation: popIn 0.4s ease forwards 2.6s; }

@keyframes popIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mods Grid */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.mod-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.mod-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
}

.mod-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
}

.mod-username {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Juxtaposition Carousel */
.juxt-carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  margin-top: 2rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.juxt-carousel {
  display: flex;
  width: fit-content;
  animation: scrollCarousel 20s linear infinite;
  gap: 1.5rem;
}

.juxt-carousel:hover {
  animation-play-state: paused;
}

.juxt-post {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.juxt-post img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.juxt-content strong {
  display: block;
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.juxt-content p {
  font-size: 0.95rem;
  margin: 0;
}

@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 0.75rem)); }
}

@media (max-width: 900px) {
  .discord-ui-layout {
    flex-direction: column;
  }
  .discord-ui-mockup {
    width: 100%;
  }
}

.feature-logo {
  margin-bottom: 1rem;
}
