/* =========================
   HOMEPAGE COMMAND LANDING
========================= */

.home-hero {
  background:
    radial-gradient(circle at 18% 22%, rgba(180, 0, 20, 0.26), transparent 30%),
    linear-gradient(rgba(5, 5, 7, 0.52), rgba(5, 5, 7, 0.92)),
    url("../../images/ronin-hero.jpg") center center / cover no-repeat;
  justify-content: center;
  text-align: center;
  padding-top: clamp(185px, 18vh, 235px);
}

.home-hero .hero-content {
  position: relative;
  width: min(840px, 92vw);
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  transform: none;
}

.home-hero .hero-content::after {
  content: "浪人";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 78%;
  color: rgba(240, 68, 82, 0.11);
  font-family: serif;
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -52%) rotate(-8deg);
  text-shadow: 0 0 42px rgba(180, 0, 20, 0.18);
  white-space: nowrap;
}

.home-hero h1::after {
  content: "" !important;
  display: none !important;
}

.home-hero .hero-content::before {
  margin-left: auto;
  margin-right: auto;
}

.home-hero .crest-line {
  margin-left: auto;
  margin-right: auto;
}

.home-hero h1 {
  margin-left: auto;
  margin-right: auto;
}

.home-hero .hero-subtext {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  border-left: 0;
}

.home-hero .hero-buttons {
  justify-content: center;
  width: min(720px, 92vw);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero .btn-rsi {
  margin-left: auto !important;
  margin-right: auto !important;
}

.home-command-main {
  position: relative;
  overflow: hidden;
  padding: 0 24px 88px;
}

.home-command-main::before {
  content: "";
  position: absolute;
  inset: 16px 8px;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 88%, transparent);
  animation: homeGridDrift 18s linear infinite;
}

.stats-strip,
.home-command-brief,
.home-path-section,
.cta-section {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card,
.section-card,
.command-brief-primary,
.command-brief-side,
.path-grid article {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(190, 20, 42, 0.38);
  background:
    linear-gradient(145deg, rgba(18, 20, 25, 0.96), rgba(5, 6, 9, 0.98)),
    radial-gradient(circle at top right, rgba(255, 55, 80, 0.12), transparent 42%);
  box-shadow:
    0 20px 58px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(160, 0, 22, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.section-card p,
.command-brief-primary p,
.command-brief-side p,
.path-grid p,
.cta-inner p {
  color: var(--text-muted);
  line-height: 1.68;
}

.section-card h2,
.command-brief-primary h2,
.home-section-heading h2,
.cta-inner h2 {
  margin: 8px 0 14px;
  color: var(--silver-bright);
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================
   LOWER HOME COMMAND SYSTEM
========================= */

.home-command-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-bottom: 24px;
}

.command-brief-primary,
.command-brief-side {
  padding: 30px;
}

.command-brief-primary {
  min-height: 320px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(125, 0, 18, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(18, 20, 25, 0.96), rgba(5, 6, 9, 0.98));
}

.command-brief-primary::after {
  content: "RONIN";
  position: absolute;
  right: -18px;
  bottom: -28px;
  color: rgba(255, 255, 255, 0.035);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.command-brief-primary h2 {
  max-width: 740px;
  font-size: clamp(1.65rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.command-brief-primary p {
  max-width: 760px;
  font-size: 1.02rem;
}

.brief-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.brief-callouts span {
  padding: 8px 11px;
  border: 1px solid rgba(110, 216, 232, 0.28);
  background: rgba(110, 216, 232, 0.06);
  color: rgba(237, 245, 247, 0.82);
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-brief-side {
  display: grid;
  align-content: center;
  border-color: rgba(110, 216, 232, 0.28);
  background:
    radial-gradient(circle at top right, rgba(110, 216, 232, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(13, 22, 28, 0.96), rgba(5, 6, 9, 0.98));
}

.command-brief-side h3,
.path-grid h3 {
  margin: 8px 0 10px;
  color: var(--silver-bright);
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-path-section {
  margin-bottom: 24px;
}

.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}

.home-section-heading h2 {
  margin: 0;
}

.path-grid article span {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(240, 68, 82, 0.45);
  color: var(--red-bright);
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.path-grid article {
  padding: 24px;
  border-color: rgba(110, 216, 232, 0.22);
}

.path-grid article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 3px;
  height: calc(100% - 48px);
  background: linear-gradient(var(--red-bright), rgba(110, 216, 232, 0.72));
}

.home-enlistment-panel .cta-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
}

.home-enlistment-panel .cta-inner::after {
  content: "JOIN";
  position: absolute;
  right: clamp(16px, 4vw, 60px);
  top: 50%;
  color: rgba(255, 255, 255, 0.04);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(4rem, 13vw, 10rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: translateY(-50%);
  pointer-events: none;
}

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* =========================
   HOMEPAGE STATS STRIP
========================= */

.stats-strip {
  padding: 36px 0;
  margin-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  min-height: 140px;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 70, 95, 0.5);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    0 0 30px rgba(120, 0, 15, 0.22);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 70, 95, 0.65), transparent);
}

.stat-value {
  color: #ff4058;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(255, 70, 95, 0.2);
}

.stat-label {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* =========================
   COMPETITION NEWS REEL
========================= */

.home-news-reel {
  position: fixed;
  top: 73px;
  left: 0;
  z-index: 999;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid rgba(190, 20, 42, 0.42);
  border-right: 0;
  border-bottom: 1px solid rgba(190, 20, 42, 0.52);
  border-left: 0;
  background:
    linear-gradient(90deg, rgba(190, 20, 42, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.96), rgba(4, 5, 8, 0.98));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.home-news-reel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.18;
}

.news-reel-header {
  position: relative;
  z-index: 1;
  display: inline-flex;
  float: left;
  min-height: 42px;
  padding: 0 18px 0 50px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-right: 1px solid rgba(190, 20, 42, 0.42);
  background:
    linear-gradient(90deg, rgba(120, 0, 18, 0.72), rgba(15, 17, 22, 0.96));
}

.news-reel-header h2 {
  margin: 0;
  color: var(--silver-bright);
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-reel-header .section-tag {
  margin: 0;
  font-size: 0.62rem;
  white-space: nowrap;
}

.news-reel-window {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 42px;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
}

.news-reel-window::before,
.news-reel-window::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: 90px;
  height: 100%;
  pointer-events: none;
}

.news-reel-window::before {
  left: 0;
  background: linear-gradient(90deg, #050609, transparent);
}

.news-reel-window::after {
  right: 0;
  background: linear-gradient(270deg, #050609, transparent);
}

.news-reel-track {
  display: flex;
  width: max-content;
  min-height: 42px;
  align-items: center;
  animation: roninNewsReel 42s linear infinite;
}

.news-reel-window:hover .news-reel-track {
  animation-play-state: paused;
}

.news-reel-item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 0 28px;
  color: rgba(244, 247, 252, 0.78);
  white-space: nowrap;
}

.news-reel-item::before {
  content: "◆";
  color: #ff4058;
  text-shadow: 0 0 12px rgba(255, 64, 88, 0.35);
}

.news-reel-item strong {
  color: #ff4058;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.news-reel-item span {
  color: rgba(245, 248, 252, 0.86);
}

.news-reel-item.broadcast-priority::before,
.news-reel-item.broadcast-priority strong {
  color: #ffd36f;
}

.news-reel-item.broadcast-warning::before,
.news-reel-item.broadcast-warning strong {
  color: #ff9a45;
}

.news-reel-item.broadcast-emergency::before,
.news-reel-item.broadcast-emergency strong {
  color: #ff3854;
  text-shadow: 0 0 14px rgba(255, 56, 84, 0.52);
}

.news-reel-item.broadcast-success::before,
.news-reel-item.broadcast-success strong {
  color: #7cffc8;
}

.news-reel-item.broadcast-emergency span {
  color: rgba(255, 225, 229, 0.94);
}

@keyframes roninNewsReel {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.site-header .music-toggle {
  position: fixed;
  top: 121px;
  right: 28px;
  z-index: 1001;
  flex: initial;
  order: initial;
  margin-left: 0;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.66);
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.site-header .main-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.cta-section {
  margin-top: 0;
}

.cta-inner {
  border: 1px solid rgba(190, 20, 42, 0.38);
  background:
    linear-gradient(135deg, rgba(125, 0, 18, 0.46), rgba(5, 6, 9, 0.96)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 36%);
  box-shadow:
    0 22px 68px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.home-enlistment-panel .cta-inner {
  border-color: rgba(110, 216, 232, 0.24);
  border-left: 3px solid rgba(240, 68, 82, 0.72);
  background:
    radial-gradient(circle at 18% 18%, rgba(110, 216, 232, 0.12), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(240, 68, 82, 0.08), transparent 38%),
    linear-gradient(135deg, rgba(5, 9, 12, 0.98), rgba(2, 4, 7, 0.99));
}

.home-enlistment-panel .cta-inner::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(110, 216, 232, 0.08);
  background:
    linear-gradient(90deg, rgba(110, 216, 232, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.home-enlistment-panel .cta-inner::after {
  color: rgba(110, 216, 232, 0.045);
}

.home-enlistment-panel .section-tag,
.home-enlistment-panel h2,
.home-enlistment-panel p {
  position: relative;
  z-index: 1;
}

.home-enlistment-panel .btn-primary {
  min-width: 230px;
  border-color: rgba(240, 68, 82, 0.82);
  background:
    linear-gradient(135deg, rgba(190, 20, 42, 0.92), rgba(80, 5, 12, 0.96));
  box-shadow:
    0 0 22px rgba(240, 68, 82, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* =========================
   TOURNAMENT FLYOUT
========================= */

.tournament-flyout {
  position: fixed;
  top: 50%;
  right: -260px;
  z-index: 500;
  display: flex;
  width: 320px;
  transform: translateY(-50%);
  transition: right 0.3s ease;
}

.tournament-flyout:hover {
  right: 0;
}

.flyout-tab {
  padding: 18px 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: #8b0000;
  border-radius: 8px 0 0 8px;
  color: white;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.flyout-content {
  width: 260px;
  padding: 22px;
  border: 1px solid rgba(255, 45, 45, 0.4);
  background: linear-gradient(135deg, rgba(80, 0, 0, 0.22), rgba(0, 0, 0, 0.95));
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.15);
}

.flyout-content h3 {
  margin: 10px 0;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
}

.flyout-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.6;
}

.flyout-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 45, 45, 0.5);
  background: linear-gradient(135deg, rgba(160, 0, 0, 0.85), rgba(40, 0, 0, 0.95));
  color: white;
  text-decoration: none;
}

@keyframes homeGridDrift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 58px 116px, 58px 116px;
  }
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-command-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-path-section .path-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .home-hero {
    padding-top: 205px;
  }

  .site-header .music-toggle {
    top: 115px;
    right: 20px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
  }

  .site-header .music-toggle {
    top: 236px;
    right: 14px;
    align-self: auto;
    margin-left: 0;
  }

  .home-hero {
    padding-top: 285px;
  }

  .home-hero .hero-content {
    width: 100%;
    margin: 0 auto;
    transform: none;
  }

  .home-hero .hero-content::before,
  .home-hero .crest-line,
  .home-hero h1,
  .home-hero .hero-subtext {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero .hero-subtext {
    max-width: none;
  }

  .home-hero .hero-content::after {
    left: 72%;
    font-size: clamp(7rem, 34vw, 11rem);
  }

  .home-command-main {
    padding: 54px 16px 70px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .home-command-brief,
  .path-grid {
    grid-template-columns: 1fr;
  }

  .command-brief-primary,
  .command-brief-side,
  .path-grid article {
    padding: 22px;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tournament-flyout {
    display: none;
  }
}

/* Final home hero centering pass */
.home-hero {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(880px, 92vw);
  max-width: 880px;
  margin-inline: auto !important;
  padding-inline: 0;
  text-align: center;
}

.home-hero .hero-content::before,
.home-hero .crest-line,
.home-hero h1,
.home-hero .hero-subtext,
.home-hero .hero-buttons,
.home-hero .btn-rsi {
  margin-left: auto !important;
  margin-right: auto !important;
}

.home-hero .hero-content::before {
  width: fit-content;
  text-align: center;
}

.home-hero .crest-line {
  width: fit-content;
  text-align: center;
}

.home-hero h1 {
  max-width: 100%;
  text-align: center;
}

.home-hero .hero-subtext {
  max-width: 780px;
  padding-left: 0;
  border-left: 0;
  text-align: center;
}

.home-hero .hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(560px, 100%);
  text-align: center;
}

.home-hero .hero-buttons .btn {
  justify-content: center;
  text-align: center;
}

.home-hero .btn-rsi {
  align-self: center;
  width: min(560px, 100%) !important;
  text-align: center;
}

@media (max-width: 720px) {
  .home-hero .hero-content {
    width: min(100%, 92vw);
  }

  .home-hero .hero-buttons,
  .home-hero .btn-rsi {
    width: 100% !important;
  }
}
