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

:root {
  --burnt-orange: #CC5500;
  --orange-light: #e65c00;
  --orange-glow: rgba(204, 85, 0, 0.4);
  --darker-bg: #232323;
  --text-primary: #FFCC99;
  --text-secondary: #ffffff;
  --text-muted: #999999;
  --border-color: #333333;
  --heading: 'Audiowide', sans-serif;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--darker-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: url('images/futurescapes-cover.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(35, 35, 35, 0.85);
  background-image:
    linear-gradient(rgba(204, 85, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204, 85, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px 20px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Game screen frame around hero image */
.game-screen {
  position: relative;
  display: inline-block;
  padding: 6px;
  border: 2px solid var(--burnt-orange);
  box-shadow:
    0 0 0 1px var(--border-color),
    0 0 24px var(--orange-glow),
    0 0 60px rgba(204, 85, 0, 0.12);
}

/* Corner bracket decorations */
.game-screen::before,
.game-screen::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--text-primary);
  border-style: solid;
}

.game-screen::before {
  top: -5px;
  left: -5px;
  border-width: 3px 0 0 3px;
}

.game-screen::after {
  bottom: -5px;
  right: -5px;
  border-width: 0 3px 3px 0;
}

.logo-img {
  display: block;
  width: min(300px, 80vw);
  height: auto;
  -webkit-user-drag: none;
}

/* Headings */
h1 {
  font-family: var(--heading);
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 400;
  color: var(--burnt-orange);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow:
    2px 2px 0px rgba(0, 0, 0, 0.8),
    4px 4px 8px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(204, 85, 0, 0.6),
    0 0 30px rgba(204, 85, 0, 0.4),
    0 0 60px rgba(204, 85, 0, 0.2);
}

/* Ransom-note card letter tagline */
.tagline-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 560px;
}

.tagline-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.card-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 5vw, 42px);
  height: clamp(32px, 5.5vw, 48px);
  background: var(--burnt-orange);
  color: var(--darker-bg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 700;
  border-radius: 3px;
  transform: rotate(var(--rotation, 0deg));
  box-shadow:
    2px 2px 0px rgba(0, 0, 0, 0.8),
    4px 4px 8px rgba(0, 0, 0, 0.5);
}

/* Slight random rotations for ransom-note feel */
/* Row 1: F o r g e [space] Y o u r */
.tagline-row:first-child .card-letter:nth-child(1) { --rotation: -2deg; }
.tagline-row:first-child .card-letter:nth-child(2) { --rotation: 1deg; }
.tagline-row:first-child .card-letter:nth-child(3) { --rotation: -1deg; }
.tagline-row:first-child .card-letter:nth-child(4) { --rotation: 3deg; }
.tagline-row:first-child .card-letter:nth-child(5) { --rotation: -1deg; }
.tagline-row:first-child .card-letter:nth-child(7) { --rotation: 2deg; }
.tagline-row:first-child .card-letter:nth-child(8) { --rotation: -2deg; }
.tagline-row:first-child .card-letter:nth-child(9) { --rotation: 1deg; }
.tagline-row:first-child .card-letter:nth-child(10) { --rotation: -3deg; }
/* Row 2: F u t u r e */
.tagline-row:last-child .card-letter:nth-child(1) { --rotation: 1deg; }
.tagline-row:last-child .card-letter:nth-child(2) { --rotation: -2deg; }
.tagline-row:last-child .card-letter:nth-child(3) { --rotation: 3deg; }
.tagline-row:last-child .card-letter:nth-child(4) { --rotation: -1deg; }
.tagline-row:last-child .card-letter:nth-child(5) { --rotation: 2deg; }
.tagline-row:last-child .card-letter:nth-child(6) { --rotation: -2deg; }

.card-spacer {
  width: clamp(10px, 2vw, 18px);
}

/* Dimension colors from the FutureScapes Design System */
.color-passion    { background: #BF4A3F; }
.color-talent     { background: #D4A04B; }
.color-service    { background: #3D8A5E; }
.color-livelihood { background: #3A6D94; }
.color-balance    { background: #7D5C97; }
.color-belonging  { background: #B36B35; }

.description {
  font-size: 15px;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.8;
  max-width: 520px;
}

.description.closing {
  font-weight: 500;
}

/* CTA */
.cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--burnt-orange);
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow:
    2px 2px 0px rgba(0, 0, 0, 0.6),
    4px 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: var(--orange-light);
  box-shadow:
    2px 2px 0px rgba(0, 0, 0, 0.6),
    4px 4px 12px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(204, 85, 0, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow:
    2px 2px 0px rgba(0, 0, 0, 0.6),
    4px 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  border-color: var(--burnt-orange);
  color: var(--burnt-orange);
  transform: translateY(-2px);
}

/* Offline message */
.offline-msg {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  font-size: 13px;
  color: #fbbf24;
  max-width: 480px;
  text-align: left;
}

.offline-msg.visible { display: flex; }
.offline-msg a { color: var(--burnt-orange); text-decoration: underline; }

/* Footer */
.footer {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  width: 100%;
  padding-top: 20px;
}

.footer a { color: var(--burnt-orange); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.copyright {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  line-height: 1.6;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
  }

  main {
    padding: 28px 16px;
  }

  .container {
    gap: 20px;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }

  .description {
    font-size: 14px;
    max-width: 100%;
  }

  .offline-msg {
    max-width: 100%;
  }
}
