/* NostaIdle Landing Page — Retro CRT idle game aesthetic */

:root {
  --bg-dark: #0c0f14;
  --bg-panel: #141a24;
  --bg-screen: #1a2332;
  --border: #2a3548;
  --text: #c8d4e0;
  --text-muted: #6b7a8f;
  --accent: #5cdb5c;
  --accent-dim: #3a9e3a;
  --accent-glow: rgba(92, 219, 92, 0.35);
  --amber: #ffb84d;
  --font-pixel: "Press Start 2P", monospace;
  --font-retro: "VT323", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-retro);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT effects */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 2px solid var(--border);
  background: rgba(12, 15, 20, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.pixel-art {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-header nav a.nav-discord {
  color: #7289da;
}

.site-header nav a.nav-discord:hover {
  color: #99aaf0;
}

/* Hero */
.hero {
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.crt-bezel {
  background: linear-gradient(145deg, #2a2f3a, #1a1e26);
  border: 4px solid #3a4050;
  border-radius: 16px;
  padding: 12px;
  box-shadow:
    0 0 40px var(--accent-glow),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
  max-width: 720px;
  width: 100%;
}

.crt-bezel--wide {
  max-width: 960px;
}

.crt-screen {
  background: var(--bg-screen);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.crt-screen--hero {
  padding: 0.5rem;
  overflow: hidden;
}

/* Misty Ascent South sidescroll — matches in-game view_scale 1.7 */
.sidescroll-scene {
  --scene-h: clamp(280px, 44vw, 440px);
  --view-scale: 1.7;
  --art-h: 1536;
  --art-w: 2816;
  --viewport-h: 752;
  --ground-y: 630;
  --path-art-y: 1355;
  --world-scale: calc(var(--scene-h) / var(--art-h) * var(--view-scale));
  --ground-screen: calc(var(--scene-h) * var(--ground-y) / var(--viewport-h));
  --plate-h: calc(var(--scene-h) * var(--view-scale));
  --plate-offset-y: calc(var(--ground-screen) - var(--path-art-y) * var(--world-scale));
  --walker-h: calc(var(--scene-h) * 256 / var(--viewport-h));
  position: relative;
  height: var(--scene-h);
  overflow: hidden;
  border-radius: 4px;
  background: #2a3340;
}

.sidescroll-track {
  display: flex;
  position: absolute;
  left: 0;
  top: var(--plate-offset-y);
  height: var(--plate-h);
  will-change: transform;
}

.sidescroll-plate {
  display: block;
  height: 100%;
  width: auto;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

.sidescroll-mist {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(to bottom, rgba(120, 140, 170, 0.22) 0%, transparent 35%, transparent 55%, rgba(20, 24, 32, 0.5) 100%),
    radial-gradient(ellipse at 50% 80%, rgba(180, 200, 220, 0.12) 0%, transparent 55%);
  mix-blend-mode: soft-light;
}

.sidescroll-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.65rem 0.5rem 0;
  pointer-events: none;
  z-index: 6;
  background: linear-gradient(to bottom, rgba(8, 12, 18, 0.55) 0%, transparent 42%);
}

.sidescroll-title {
  display: block;
  width: min(72%, 520px);
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}

.sidescroll-overlay .hero-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--amber);
  border: 2px solid var(--amber);
  padding: 0.35rem 0.65rem;
  margin-top: 0.45rem;
  letter-spacing: 0.1em;
  background: rgba(8, 12, 18, 0.55);
}

.location-tag {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: rgba(200, 212, 224, 0.85);
  margin-top: 0.4rem;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-walker {
  --walk-frames: 11;
  position: absolute;
  left: 14%;
  top: calc(var(--ground-screen) - var(--walker-h));
  width: var(--walker-h);
  height: var(--walker-h);
  background-image: url("../Assets/Walking%20Animation.png");
  background-repeat: no-repeat;
  background-size: calc(var(--walk-frames) * 100%) 100%;
  animation: hero-walk 0.99s steps(10) infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  z-index: 5;
}

@keyframes hero-walk {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}

.sidescroll-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  padding: 0 0.5rem;
  pointer-events: none;
}

.sidescroll-actions .btn {
  pointer-events: auto;
  font-size: 0.5rem;
  padding: 0.85rem 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .hero-walker {
    animation: none;
    background-position: 0 0;
  }
}

/* Idle counter */
.idle-counter {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--accent-dim);
  color: #0c0f14;
  border: 2px solid var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px var(--accent-glow);
  background: var(--accent);
}

.btn-discord {
  background: #4752c4;
  color: #fff;
  border: 2px solid #7289da;
  box-shadow: 0 0 16px rgba(114, 137, 218, 0.35);
}

.btn-discord:hover {
  transform: translateY(-2px);
  background: #5865f2;
  box-shadow: 0 0 24px rgba(114, 137, 218, 0.5);
}

/* Sections */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section h2 {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-align: center;
}

.section p {
  margin-bottom: 1rem;
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

.section .muted {
  color: var(--text-muted);
  font-size: 1.15rem;
  text-align: center;
}

.about {
  border-top: 2px solid var(--border);
}

.section-intro {
  margin-bottom: 1.5rem !important;
}

/* Screenshot gallery */
.screenshots {
  border-top: 2px solid var(--border);
}

.gallery {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery-viewport {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.gallery-track {
  position: relative;
}

.gallery-slide {
  display: none;
  margin: 0;
  text-align: center;
}

.gallery-slide.is-active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

.screenshot-frame {
  background: linear-gradient(145deg, #ded8c4, #c4b8a0);
  border: 4px solid #8b7355;
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
  cursor: zoom-in;
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.gallery-slide figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--amber);
  letter-spacing: 0.08em;
}

.gallery-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--bg-panel);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.gallery-btn:hover {
  border-color: var(--accent);
  background: var(--bg-screen);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.gallery-dot.is-active,
.gallery-dot:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.gallery-thumbs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.gallery-thumb {
  width: 72px;
  height: 48px;
  padding: 2px;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb.is-active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 2rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--accent);
}

.lightbox-img {
  max-width: min(960px, 95vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  border: 4px solid var(--border);
  box-shadow: 0 0 40px var(--accent-glow);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  padding: 1.5rem;
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 20px rgba(92, 219, 92, 0.1);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
  color: var(--amber);
}

.feature-card p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0;
}

/* Notify form */
.notify {
  text-align: center;
  border-top: 2px solid var(--border);
  padding-bottom: 4rem;
}

.notify-actions {
  margin: 1.25rem 0;
}

.notify-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.notify-form input[type="email"] {
  font-family: var(--font-retro);
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 2px;
  min-width: 260px;
}

.notify-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.hidden {
  display: none !important;
}

.form-success {
  margin-top: 1rem;
  color: var(--accent);
  font-size: 1.3rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.site-footer a {
  color: var(--accent-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  margin: 0 0.25rem;
}

/* Mobile */
@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .site-header nav {
    gap: 1rem;
  }

  .gallery-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.55rem;
  }

  .gallery-thumbs {
    display: none;
  }

  .sidescroll-overlay .hero-badge {
    font-size: 0.38rem;
  }

  .location-tag {
    font-size: 0.32rem;
  }

  .hero-walker {
    left: 10%;
  }

  .sidescroll-actions .btn {
    font-size: 0.42rem;
    padding: 0.7rem 0.9rem;
  }

  .notify-form {
    flex-direction: column;
    align-items: center;
  }

  .notify-form input[type="email"] {
    width: 100%;
    max-width: 320px;
  }
}
