/* ============================================================
   Frax: Rupture — Dark Dystopian Pixel Art Theme
   ============================================================ */

:root {
  --bg: #07060a;
  --bg-card: #0d0b14;
  --text: #f0e8ff;
  --text-dim: #b8aed0;
  --accent: #c44b6b;
  --accent-glow: #e8718f;
  --gold: #c9a44b;
  --gold-glow: #e8c971;
  --cyan: #4ba4c9;
  --divider: #2a1f3d;
  --border: #2a1f3d;
  --font-pixel: "Press Start 2P", monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 14px;
  line-height: 2.2;
  overflow-x: hidden;
  position: relative;
}

/* ---- overlay effects ---- */

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

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(7, 6, 10, 0.85) 100%);
}

/* ---- hero ---- */

.hero {
  position: relative;
  text-align: center;
  padding: 80px 20px 50px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(196, 75, 107, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.title {
  font-size: 40px;
  color: var(--accent);
  text-shadow:
    0 0 12px var(--accent-glow),
    0 0 50px rgba(196, 75, 107, 0.5),
    3px 3px 0 #000;
  letter-spacing: 5px;
  position: relative;
  z-index: 1;
  image-rendering: pixelated;
}

.subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 18px;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.tagline {
  font-size: 15px;
  color: var(--gold);
  margin-top: 12px;
  letter-spacing: 4px;
  text-shadow: 0 0 10px rgba(201, 164, 75, 0.4);
  position: relative;
  z-index: 1;
}

.hero-divider {
  width: 140px;
  height: 2px;
  margin: 28px auto 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  image-rendering: pixelated;
}

/* ---- sections ---- */

.section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.section-inner {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.section-inner.reverse {
  flex-direction: row-reverse;
}

.section-content {
  flex: 1 1 300px;
  min-width: 280px;
}

.section-title {
  font-size: 24px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  letter-spacing: 4px;
  margin-bottom: 20px;
  image-rendering: pixelated;
}

.section-title.center {
  text-align: center;
}

.section-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 2.5;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.section-desc.center {
  text-align: center;
}

.section-divider {
  width: 80px;
  height: 1px;
  margin: 0 auto;
  background: var(--divider);
  box-shadow: 0 0 8px rgba(42, 31, 61, 0.8);
}

/* ---- sprite box ---- */

.sprite-box {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- sprite wrapper (platform + character layered) ---- */

.sprite-wrapper {
  position: relative;
  width: 160px;
  height: 128px;
}

.sprite-container {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 96px;
  height: 96px;
  z-index: 2;
  image-rendering: pixelated;
}

.sprite-head,
.sprite-body {
  position: absolute;
  inset: 0;
  width: 96px;
  height: 96px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* ---- isometric platform (5×5 grid, tileToSprite formula) ---- */

.platform {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  height: 96px;
  z-index: 1;
  image-rendering: pixelated;
}

.iso-tile {
  position: absolute;
  width: 32px;
  height: 32px;
  background-image: url("../images/sprites/isometric-tileset.png");
  background-size: 288px 320px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* ---- Survive: Sword Attack (5 frames, southWest row) ---- */

.sprite-survive-head {
  background-image: url("../images/sprites/Head_Male1_Attack_Sword.png");
  background-size: 480px 480px;
  animation: sword-slash 0.6s steps(5) infinite;
}

.sprite-survive-body {
  background-image: url("../images/sprites/Body_Leather_Attack_Sword.png");
  background-size: 480px 480px;
  animation: sword-slash 0.6s steps(5) infinite;
}

@keyframes sword-slash {
  from { background-position: 0 -96px; }
  to   { background-position: -480px -96px; }
}

/* ---- Evolve: Staff Attack (7 frames, southWest row) ---- */

.sprite-evolve-head {
  background-image: url("../images/sprites/Head_Male1_Attack_Staff.png");
  background-size: 672px 480px;
  animation: staff-cast 0.84s steps(7) infinite;
}

.sprite-evolve-body {
  background-image: url("../images/sprites/Body_Robe_Attack_Staff.png");
  background-size: 672px 480px;
  animation: staff-cast 0.84s steps(7) infinite;
}

@keyframes staff-cast {
  from { background-position: 0 -96px; }
  to   { background-position: -672px -96px; }
}

/* ---- Thrive: Mining (5 frames, southWest row) ---- */

.sprite-thrive-head {
  background-image: url("../images/sprites/Head_Male1_Mining.png");
  background-size: 480px 480px;
  animation: mining-swing 0.7s steps(5) infinite;
}

.sprite-thrive-body {
  background-image: url("../images/sprites/Body_Leather_Mining.png");
  background-size: 480px 480px;
  animation: mining-swing 0.7s steps(5) infinite;
}

@keyframes mining-swing {
  from { background-position: 0 -96px; }
  to   { background-position: -480px -96px; }
}

/* ---- signup form ---- */

.signup-section {
  text-align: center;
}

.signup-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.signup-input {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 14px 18px;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s;
  image-rendering: pixelated;
  min-width: 260px;
}

.signup-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(196, 75, 107, 0.4);
}

.signup-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.signup-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 14px 28px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: background 0.2s, box-shadow 0.2s;
  image-rendering: pixelated;
}

.signup-btn:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 14px rgba(196, 75, 107, 0.6);
}

.signup-msg {
  font-size: 12px;
  margin-top: 14px;
  color: var(--gold);
  letter-spacing: 1px;
}

.signup-msg.hidden {
  display: none;
}

.signup-hint {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 18px;
  opacity: 0.4;
  letter-spacing: 1px;
}

.signup-hint a {
  color: var(--cyan);
  text-decoration: underline;
}

/* ---- socials ---- */

.socials-section {
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  image-rendering: pixelated;
}

.social-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(196, 75, 107, 0.4);
}

.social-icon {
  font-size: 24px;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.social-name {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

/* ---- footer ---- */

.footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: 1px;
}

/* ---- responsive ---- */

@media (max-width: 700px) {
  .title {
    font-size: 28px;
    letter-spacing: 3px;
  }

  .subtitle { font-size: 10px; }
  .tagline  { font-size: 12px; }

  .section-inner {
    flex-direction: column;
    text-align: center;
  }

  .section-inner.reverse {
    flex-direction: column-reverse;
    text-align: center;
  }

  .section-content {
    min-width: unset;
  }

  .section-title { font-size: 20px; }
  .section-desc  { font-size: 10px; }
}