/*
  The Rishi Maze website
  ----------------------
  This file is intentionally written in clear blocks so it is easier to edit.
*/

/* ===== Design tokens ===== */
:root {
  --bg: #050505;
  --panel: #0b0a08;
  --panel-soft: rgba(11, 10, 8, 0.88);
  --text: #f1dfbd;
  --muted: #c9ad7b;
  --green: #38e86a;
  --orange: #d45a22;
  --gold: #c7923c;
  --line: rgba(212, 146, 70, 0.35);
  --header-height: 72px;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  max-width: 100%;
}

/* Use this class for images you add manually inside text sections. */
.responsive-image,
.content-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  object-fit: contain;
  object-position: center center;
  background: #020202;
}

.content-image {
  margin: 18px 0;
}

/* ===== Header and navigation ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand img {
  display: block;
  width: 160px;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.nav {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: min(90vw, 390px);
  height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  overflow-y: auto;
  background: rgba(5, 5, 5, 0.98);
  border-left: 1px solid var(--line);
  transition: right 0.25s ease;
}

.nav.open {
  right: 0;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-title {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.menu-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(56, 232, 106, 0.55);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--green);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.nav a,
.nav-group-toggle,
.nav-page-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.nav-page-link,
.nav-group-toggle {
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  cursor: pointer;
}

.nav-cta {
  color: var(--green) !important;
}

.nav-group-toggle {
  justify-content: space-between;
}

.nav-group-toggle::after {
  content: "+";
  color: var(--green);
  font-size: 1.2rem;
}

.nav-group.open .nav-group-toggle::after {
  content: "−";
}

.nav-submenu {
  display: none;
  padding: 6px 0 10px 14px;
}

.nav-group.open .nav-submenu {
  display: block;
}

.nav-submenu a {
  min-height: 38px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.03em;
}

/* ===== Shared section styles ===== */
.page,
.section {
  scroll-margin-top: 92px;
}

.page-panel {
  margin: 34px 16px;
}

.page-heading {
  max-width: 920px;
  margin: 0 auto 24px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(56, 232, 106, 0.09), transparent 32%),
    linear-gradient(180deg, rgba(13, 11, 8, 0.94), rgba(5, 5, 5, 0.9));
}

.page-heading p:not(.eyebrow) {
  max-width: 720px;
  color: #dfcba7;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.03em;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.1rem, 15vw, 7rem);
}

h1 span {
  color: var(--orange);
}

h2 {
  font-size: clamp(2.4rem, 10vw, 5rem);
}

h3 {
  color: var(--gold);
  font-size: clamp(1.8rem, 7vw, 3.2rem);
}

/* ===== Hero ===== */
/* Hero background watermark protection: images are anchored bottom-right so the lower-right watermark remains visible on desktop. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 20px) 18px 32px;
  background-color: #050505;
  background-position: right bottom;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.86) 72%,
    #050505
  );
}


.hero-overlay-wrap {
  position: relative;
  z-index: 2;
  width: min(92vw, 1200px);
  display: flex;
  justify-content: center;
}

.hero-overlay-image {
  display: block;
  width: min(100%, 1100px);
  max-height: calc(100svh - var(--header-height) - 50px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 40px rgba(0,0,0,0.75));
}

.hero-inner {
  position: relative;
  max-width: 780px;
}

.lead {
  max-width: 620px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(0, 0, 0, 0.56);
  color: #f4e5c8;
  font-size: 1.08rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(0, 0, 0, 0.64);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  clip-path: polygon(
    10px 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    10px 100%,
    0 calc(100% - 10px),
    0 10px
  );
}

.btn.primary {
  color: var(--green);
  border-color: rgba(56, 232, 106, 0.7);
  box-shadow: 0 0 18px rgba(56, 232, 106, 0.18);
}

.btn.orange {
  color: var(--orange);
  border-color: rgba(212, 90, 34, 0.8);
}

.btn.small {
  min-height: 48px;
  margin-top: 14px;
}

/* ===== Info strip ===== */
.info-strip {
  display: grid;
  gap: 12px;
  margin: -18px 16px 34px;
  position: relative;
  z-index: 2;
}

.info-strip article {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(11, 10, 8, 0.95);
}

.info-strip strong,
.info-strip span {
  display: block;
}

.info-strip strong {
  color: var(--green);
  font-size: 1.08rem;
  text-transform: uppercase;
}

.info-strip span {
  color: var(--muted);
}

/* ===== Panels ===== */
.panel {
  display: grid;
  gap: 0;
  margin: 22px 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020202;
}

.panel-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 0;
}

.panel-text {
  padding: 26px 20px;
}

.panel-text.full-width {
  grid-column: 1 / -1;
}

.panel-text p:not(.eyebrow) {
  color: #dfcba7;
}

/* ===== Cards and faction grid ===== */
.cards {
  margin: 22px 0;
  padding: 24px 20px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.cards p:not(.eyebrow) {
  color: #dfcba7;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.faction-grid article {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #0b0a08;
}

.faction-grid span {
  font-size: 2rem;
}

.faction-grid strong {
  text-transform: uppercase;
}

.faction-grid small {
  color: var(--muted);
}

.green {
  color: var(--green);
}

.red {
  color: #e2452b;
}

.gold {
  color: #d2a032;
}

.violet {
  color: #bd5be1;
}

.blue {
  color: #5bbde1;
}

.steel {
  color: #bbb;
}

/* ===== Registration ===== */
.register {
  margin: 28px 16px;
  padding: 28px 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #0d0b08, #050505);
}

.register-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.register-grid article {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.55);
}

/* ===== Back to top ===== */
.top-button {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 998;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(56, 232, 106, 0.8);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.78);
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: 0.2s;
}

.top-button.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

footer {
  padding: 30px 18px 50px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ===== Arrin Holonet floating music widget ===== */
.music-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  width: min(326px, calc(100vw - 32px));
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.music-widget::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(56, 232, 106, 0.95), transparent 32%),
    linear-gradient(315deg, rgba(199, 146, 60, 0.75), transparent 42%),
    radial-gradient(circle at 50% 0%, rgba(56, 232, 106, 0.32), transparent 55%);
  filter: drop-shadow(0 0 18px rgba(56, 232, 106, 0.22));
  pointer-events: none;
}

.music-widget::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 20px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(56, 232, 106, 0.055) 0,
      rgba(56, 232, 106, 0.055) 1px,
      transparent 1px,
      transparent 7px
    ),
    radial-gradient(circle at 12% 18%, rgba(56, 232, 106, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(3, 18, 12, 0.96), rgba(9, 8, 7, 0.94));
  box-shadow: inset 0 0 24px rgba(56, 232, 106, 0.10);
  pointer-events: none;
}

.music-panel {
  position: relative;
  z-index: 1;
  padding: 14px 14px 12px;
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.music-panel::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 12px;
  right: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 232, 106, 0.95), rgba(199, 146, 60, 0.65), transparent);
  opacity: 0.85;
}

.music-panel::after {
  content: "ARRIN BROADCAST NODE";
  position: absolute;
  right: 14px;
  bottom: 9px;
  color: rgba(56, 232, 106, 0.18);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.music-minimize {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 232, 106, 0.58);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.58);
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
}

.music-minimize:hover,
.music-minimize:focus-visible,
.music-controls button:hover,
.music-controls button:focus-visible {
  outline: none;
  border-color: rgba(56, 232, 106, 0.98);
  box-shadow: 0 0 16px rgba(56, 232, 106, 0.36);
}

.music-display {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin-bottom: 12px;
  padding-right: 34px;
}

.music-logo-frame {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 232, 106, 0.38);
  border-radius: 16px;
  background:
    radial-gradient(circle, rgba(56, 232, 106, 0.16), rgba(0, 0, 0, 0.52) 62%),
    rgba(0, 0, 0, 0.44);
  box-shadow:
    inset 0 0 14px rgba(56, 232, 106, 0.14),
    0 0 16px rgba(56, 232, 106, 0.18);
}

.music-logo {
  width: 43px;
  height: 43px;
  object-fit: contain;
  opacity: 0.98;
  filter: drop-shadow(0 0 10px rgba(124, 255, 180, 0.38));
}

.music-copy {
  min-width: 0;
}

.music-kicker {
  margin-bottom: 5px;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(56, 232, 106, 0.42);
}

.music-title {
  overflow: hidden;
  color: #f4e5c8;
  font-size: 0.94rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-signal {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.music-signal span {
  width: 5px;
  height: 7px;
  border-radius: 999px;
  background: rgba(56, 232, 106, 0.82);
  box-shadow: 0 0 10px rgba(56, 232, 106, 0.42);
  animation: rishiSignal 1.2s infinite ease-in-out;
}

.music-signal span:nth-child(2) {
  height: 14px;
  animation-delay: 0.16s;
}

.music-signal span:nth-child(3) {
  height: 20px;
  animation-delay: 0.32s;
}

.music-controls {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.music-controls button {
  min-height: 42px;
  border: 1px solid rgba(199, 146, 60, 0.55);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(0, 0, 0, 0.62);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
}

.music-controls .music-play {
  color: var(--green);
  border-color: rgba(56, 232, 106, 0.78);
  font-size: 1.05rem;
  text-shadow: 0 0 8px rgba(56, 232, 106, 0.46);
}

.volume-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#volumeControl {
  width: 100%;
  accent-color: var(--green);
}

.music-widget.minimized {
  width: 62px;
  height: 62px;
}

.music-widget.minimized::before,
.music-widget.minimized::after {
  border-radius: 20px;
}

.music-widget.minimized .music-panel {
  display: none;
}

.music-widget.minimized .music-minimize {
  inset: 0;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  font-size: 0;
  background:
    radial-gradient(circle, rgba(56, 232, 106, 0.18), rgba(0, 0, 0, 0.72)),
    rgba(0, 0, 0, 0.72);
}

.music-widget.minimized .music-minimize::before {
  content: "♫";
  color: var(--green);
  font-size: 1.45rem;
  text-shadow: 0 0 13px rgba(56, 232, 106, 0.72);
}

@media (max-width: 520px) {
  .music-widget {
    right: 10px;
    bottom: 10px;
    width: min(292px, calc(100vw - 20px));
  }

  .top-button {
    right: 12px;
    bottom: 86px;
  }
}



/* ===== Desktop layout restoration ===== */
@media (min-width: 900px) {
  .panel {
    grid-template-columns: minmax(320px, 42%) 1fr;
    align-items: stretch;
  }

  .panel.reverse .panel-image {
    order: 2;
  }

  .panel.reverse .panel-text {
    order: 1;
  }

  .panel-text {
    padding: 42px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .faction-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== Restored desktop header and navigation ===== */
@media (min-width: 760px) {
  :root {
    --header-height: 84px;
  }

  .site-header {
    padding: 10px 32px;
  }

  .brand img {
    width: 210px;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    height: auto;
    max-width: calc(100vw - 280px);
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    transition: none;
  }

  .nav-header {
    display: none;
  }

  .nav-page-link,
  .nav-group-toggle {
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .nav-group {
    position: relative;
  }

  .nav-group-toggle::after {
    margin-left: 6px;
    font-size: 0.9rem;
  }

  .nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.98);
  }

  .nav-group.open .nav-submenu {
    display: block;
  }

  .nav-submenu a {
    min-height: 34px;
  }

  .hero {
    padding: calc(var(--header-height) + 30px) 7vw 40px;
  }

  .hero-overlay-wrap {
    width: min(88vw, 1400px);
  }

  .hero-overlay-image {
    width: min(100%, 1250px);
  }

  .info-strip {
    grid-template-columns: repeat(3, 1fr);
    margin: 0 7vw 48px;
  }

  .page-panel {
    margin: 46px 7vw;
  }

  .panel {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
  }

  .panel.reverse {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .panel.reverse .panel-image {
    order: 2;
  }

  .panel.reverse .panel-text {
    order: 1;
  }

  .panel-text {
    padding: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .faction-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .register {
    margin: 46px 7vw;
    padding: 42px;
  }

  .register-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .nav {
    gap: 14px;
  }

  .nav-page-link,
  .nav-group-toggle {
    font-size: 0.78rem;
  }

  .faction-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== Link styling: keep underline, inherit page color ===== */
a,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  opacity: 0.8;
}

/* ===== Media library table ===== */
.media-library {
  margin: 3rem 0;
}

.media-library h2 {
  color: var(--green);
  margin-bottom: 0.5rem;
}

.media-library p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.table-wrapper {
  overflow-x: auto;
}

.rishi-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(56, 232, 106, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(56, 232, 106, 0.08);
}

.rishi-table th {
  background: rgba(56, 232, 106, 0.12);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  padding: 14px;
  text-align: left;
}

.rishi-table td {
  padding: 14px;
  border-top: 1px solid rgba(56, 232, 106, 0.08);
  color: var(--text);
}

.rishi-table tr:hover {
  background: rgba(56, 232, 106, 0.04);
}

.rishi-table a {
  color: #f1dfbd;
  text-decoration: underline;
  font-weight: 700;
}

.rishi-table a:hover {
  color: var(--green);
  opacity: 1;
}

@media (max-width: 700px) {
  .rishi-table th,
  .rishi-table td {
    padding: 10px;
    font-size: 0.9rem;
  }
}




/* ===== Whole-image display for content images ===== */
/* Hero backgrounds are intentionally NOT included here. */
.panel-image img,
.responsive-image,
.content-image {
  object-fit: contain;
  object-position: center center;
  background: #020202;
}
