/* ------------------------------------------------------------------ *
 * Warframe World State — viewer styles
 * Void blue-black, Orokin gold (structure), energy cyan (live state).
 * Faction colors only where meaningful (invasions / tags).
 * ------------------------------------------------------------------ */
:root {
  --void: #070b12;
  --void-2: #0b121d;
  --panel: #0e1622;
  --panel-edge: #1d2b3e;
  --gold: #e0b15e;
  --gold-dim: #8a6f3d;
  --cyan: #46d6c8;
  --text: #dce4f0;
  --text-dim: #7d8aa0;
  --text-faint: #4d5a70;
  --grineer: #cf6a4a;
  --corpus: #5b9bd5;
  --infested: #a6c84b;
  --corrupted: #d4b24c;
  --nav-h: 60px;
  --notch: 12px;
  --display: "Rajdhani", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- Fixed navigation ---------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: rgba(8, 12, 19, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-edge);
  z-index: 50;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--text);
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 16px;
  white-space: nowrap;
}
.nav__mark {
  width: 12px; height: 24px; background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}
.nav__links {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; flex: 1;
  scrollbar-width: thin;
}
.nav__links::-webkit-scrollbar { height: 4px; }
.nav__links::-webkit-scrollbar-thumb { background: var(--panel-edge); }
.nav__link {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  font-family: var(--display); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px;
  padding: 8px 10px; border-radius: 3px; white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__link:hover { color: var(--text); background: #ffffff08; }
.nav__link.is-active { color: var(--void); background: var(--gold); }
.nav__link--ext { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.nav__ext { font-size: 10px; opacity: 0.7; }
.nav__link:focus-visible,
.nav__brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.nav__clock {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  white-space: nowrap;
}

/* ---- Main / views --------------------------------------------------- */
#main { padding-top: var(--nav-h); }
.view[hidden] { display: none; }

/* ---- Hero ----------------------------------------------------------- */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 460px;
  overflow: hidden;
  background: #05060d;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }

/* image/parallax layers sit behind the canvas particle overlay */
.scene-layer {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  z-index: 1; will-change: transform;
}
.scene-layer--mid { z-index: 1; }
.scene-layer--fg { z-index: 1; }
.hero--photo::after { /* readability scrim under the headline text */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,14,0.45) 0%, rgba(5,7,14,0) 40%, rgba(5,7,14,0.5) 100%);
}
@keyframes kenburns {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}
.hero--kenburns .scene-layer--bg { animation: kenburns 28s ease-in-out infinite alternate; }
.hero__overlay {
  position: absolute; left: 0; right: 0; top: 14%;
  text-align: center; pointer-events: none; z-index: 3;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}
.hero__eyebrow {
  margin: 0; color: var(--gold);
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: 0.4em; font-size: 13px; font-weight: 600;
}
.hero__state {
  margin: 4px 0 6px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 11vw, 120px);
  letter-spacing: 0.06em; line-height: 1;
  color: #fff;
}
.hero__state[data-state="night"] { color: #cdd9f2; }
.hero__count { margin: 0; color: var(--text); font-size: 15px; }
.hero__count .timer { font-size: 16px; }

.hero__cycles {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; padding: 0 16px;
}
.chip {
  display: inline-flex; align-items: center;
  background: rgba(8,12,19,0.7); backdrop-filter: blur(6px);
  border: 1px solid var(--panel-edge);
  color: var(--text-dim);
  font-size: 12px; padding: 7px 14px; border-radius: 999px;
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.chip strong { color: var(--text); margin-left: 4px; font-weight: 600; }
.chip:hover { border-color: var(--cyan); color: var(--text); }

/* ---- Data view ------------------------------------------------------ */
.view--data { max-width: 820px; margin: 0 auto; padding: 32px 24px 60px; }
.view__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-bottom: 14px; margin-bottom: 8px;
  border-bottom: 1px solid var(--panel-edge);
}
.view__title {
  margin: 0; color: var(--gold);
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 22px;
}
.view__count { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.view__body { background: var(--panel); border: 1px solid var(--panel-edge); padding: 8px 18px; border-radius: 4px; }
.panel__empty { color: var(--text-faint); font-style: italic; padding: 14px 0; }

/* ---- Rows ----------------------------------------------------------- */
.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 0; border-bottom: 1px solid #ffffff08;
}
.row:last-child { border-bottom: none; }
.row__main { min-width: 0; }
.row__title { color: var(--text); font-weight: 500; }
.row__sub { color: var(--text-dim); font-size: 12px; }

.timer { font-family: var(--mono); font-size: 13px; color: var(--cyan); white-space: nowrap; }
.timer--ended { color: var(--text-faint); }

.tag {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 2px; border: 1px solid var(--panel-edge);
  color: var(--text-dim);
}
.tag--tier { color: var(--gold); border-color: var(--gold-dim); }

.fac-grineer { color: var(--grineer); }
.fac-corpus { color: var(--corpus); }
.fac-infested { color: var(--infested); }
.fac-corrupted { color: var(--corrupted); }

.cycle-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.cycle-dot--on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.cycle-dot--off { background: var(--corpus); box-shadow: 0 0 6px var(--corpus); }

.invasion { padding: 12px 0; border-bottom: 1px solid #ffffff08; }
.invasion:last-child { border-bottom: none; }
.invasion__head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.invasion__bar { height: 8px; border-radius: 2px; overflow: hidden; display: flex; background: var(--void-2); }
.invasion__fill { height: 100%; }
.invasion__node { color: var(--text-dim); font-size: 11px; margin-top: 6px; }

.bar { height: 6px; background: var(--void-2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.bar__fill { height: 100%; background: var(--gold); }

.stage { padding: 7px 0 7px 12px; border-bottom: 1px solid #ffffff08; border-left: 2px solid var(--panel-edge); margin-left: 2px; }
.stage:last-child { border-bottom: none; }
.stage__type { color: var(--text); font-weight: 500; }
.stage__mod { color: var(--text-dim); font-size: 12px; }

.price { font-family: var(--mono); font-size: 12px; color: var(--gold); white-space: nowrap; }
.price small { color: var(--text-dim); }

/* ---- Syndicate missions -------------------------------------------- */
.syndicate { border-bottom: 1px solid #ffffff08; }
.syndicate:last-child { border-bottom: none; }
.syndicate__header { border-bottom: none !important; }
.syndicate__header:hover .row__title { color: var(--cyan); }
.syndicate__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.syndicate__chevron { font-size: 11px; color: var(--text-faint); transition: color 0.15s; }
.syndicate__header:hover .syndicate__chevron { color: var(--cyan); }
.syndicate__nodes { padding-left: 4px; }

/* ---- Footer --------------------------------------------------------- */
.foot {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 16px 24px; border-top: 1px solid var(--panel-edge);
  color: var(--text-faint); font-family: var(--mono); font-size: 11px;
}
.badge {
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan);
  border: 1px solid var(--panel-edge); padding: 3px 8px; border-radius: 2px;
}

@media (max-width: 640px) {
  .nav__brand span:last-child { display: none; }
  .view--data { padding: 22px 14px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Hamburger button ---------------------------------------------- */
.nav__hamburger {
  display: none; /* shown only on mobile via media query below */
  background: none; border: none; cursor: pointer;
  padding: 8px; gap: 5px; flex-direction: column; align-items: center;
  margin-left: auto;
}
.nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile nav drawer --------------------------------------------- */
.nav__drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(8, 12, 19, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-edge);
  padding: 8px 0 12px;
  z-index: 49;
  flex-direction: column;
}
.nav__drawer[hidden] { display: none !important; }
.nav__drawer .nav__link {
  width: 100%; text-align: left;
  padding: 13px 22px; font-size: 14px; border-radius: 0;
}
.nav__drawer .nav__link.is-active {
  background: rgba(224,177,94,0.12); color: var(--gold);
}
.nav__backdrop {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(0,0,0,0.4);
  display: none;
}
.nav__backdrop.is-open { display: block; }

@media (max-width: 640px) {
  .nav__brand span:last-child { display: none; }
  .nav__links { display: none; }
  .nav__clock { display: none; }
  .nav__hamburger { display: flex; }
}
