/* Simulatte World Tiers Stylesheet */
/* Monochrome black base + retro-green primary accent + per-tier rainbow identity. */
/* All colors route through --sim-* / --tier-* tokens defined in styles.css. */

#world-tiers-landing-page {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  color: var(--sim-ink);
  padding: 40px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 120ms ease-out, visibility 120ms step-end;
}

#world-tiers-landing-page.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.landing-header {
  text-align: center;
  margin-bottom: 32px;
  max-width: 650px;
  z-index: 5;
  animation: fadeInDown 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-title {
  font-size: 0;
  margin: 0 0 12px 0;
  color: transparent;
  width: min(760px, 90vw);
}

.landing-title-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  transform: perspective(820px)
    rotateY(calc(var(--parallax-x, 0) * 6deg))
    rotateX(calc(var(--parallax-y, 0) * -5deg));
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.landing-title-svg text {
  font-size: 84px;
  letter-spacing: 0.11em;
  fill: transparent;
  stroke: var(--sim-ink);
  stroke-width: 0.45;
  font-family: "Orbitron", var(--sim-font);
  dominant-baseline: middle;
  transform: translate(calc(var(--parallax-x, 0) * 8px), calc(var(--parallax-y, 0) * 5px));
  transition: stroke 500ms var(--sim-ease, ease), stroke-width 500ms ease,
    transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: titleBreath 7s ease-in-out infinite;
}

.landing-title:hover .landing-title-svg text {
  stroke: var(--sim-ink);
  stroke-width: 0.7;
  animation-play-state: paused;
}

@keyframes titleBreath {
  0%,
  100% {
    stroke: var(--sim-ink);
    filter: none;
  }
  50% {
    stroke: var(--sim-ink);
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-title-svg text {
    animation: none;
  }

  .landing-title-svg,
  .landing-title-svg text,
  .landing-title-line {
    transform: none;
    transition: none;
  }
}

.landing-title-line {
  stroke: rgba(243, 245, 244, 0.84);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-opacity: 0.85;
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Nearest line to the wordmark travels least; the top line travels most. */
.landing-title-line:nth-of-type(1) {
  transform: translate(calc(var(--parallax-x, 0) * 22px), calc(var(--parallax-y, 0) * 10px));
}

.landing-title-line:nth-of-type(2) {
  stroke-opacity: 0.55;
  transform: translate(calc(var(--parallax-x, 0) * 16px), calc(var(--parallax-y, 0) * 7px));
}

.landing-title-line:nth-of-type(3) {
  stroke-opacity: 0.3;
  transform: translate(calc(var(--parallax-x, 0) * 10px), calc(var(--parallax-y, 0) * 5px));
}

.landing-subtitle {
  font-size: 1rem;
  color: var(--sim-ink-soft);
  line-height: 1.5;
  margin: 0;
  max-width: 36ch;
  margin-inline: auto;
}

.tier-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  max-width: 1250px;
  width: min(1040px, calc(100% - 24px));
  justify-content: center;
  z-index: 5;
  animation: fadeInUp 450ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

@media (max-width: 1250px) {
  .tier-cards-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 768px) {
  .tier-cards-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 500px) {
  .tier-cards-grid {
    grid-template-columns: 240px;
  }
}

.tier-card {
  position: relative;
  background: #0a0a0a;
  border: 1px solid var(--sim-line-strong);
  border-radius: 20px;
  padding: 20px 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: var(--sim-shadow-small);
}

.tier-card:hover {
  background: #101010;
  border-color: var(--sim-line-strong);
  box-shadow: var(--sim-shadow-small);
}

.tier-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--sim-line);
  border-radius: 10px;
  margin-bottom: 14px;
  background: #080808;
  color: var(--sim-ink-soft);
  transition: border-color 160ms ease;
  z-index: 2;
}

.tier-icon-mark {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tier-card:hover .tier-icon {
  border-color: var(--sim-line-strong);
}

.tier-name {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--sim-ink);
  z-index: 2;
}

.tier-desc {
  font-size: 0.88rem;
  color: var(--sim-ink-faint);
  line-height: 1.45;
  margin: 0;
  max-width: 28ch;
  z-index: 2;
}

/* Overlay canvas styles */
#overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: auto;
}

/* Custom visualizer controls overlay */
.visualizer-hud {
  position: absolute;
  top: 80px;
  left: 20px;
  z-index: 5;
  background: var(--sim-glass);
  border: 1px solid var(--sim-line);
  border-radius: 12px;
  padding: 16px;
  max-width: 320px;
  pointer-events: auto;
  box-shadow: var(--sim-shadow);
  animation: fadeInLeft 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.visualizer-hud h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sim-ink);
}

.visualizer-hud p {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: var(--sim-ink-soft);
  line-height: 1.4;
}

.visualizer-hud .hud-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--sim-line);
  padding-bottom: 4px;
}

.visualizer-hud .hud-stat span:first-child {
  color: var(--sim-ink-faint);
}

.visualizer-hud .hud-stat span:last-child {
  font-weight: 500;
  color: var(--sim-accent);
}

.visualizer-hud .hud-help {
  font-size: 0.78rem;
  color: var(--sim-ink-faint);
  margin-top: 10px;
  display: block;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
