/* =========================
   CSS RESET
========================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   ROOT / BASE
========================= */
body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: #f5f5f5;
  color: #444;
  line-height: 1.6;

  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;

  position: relative;
}

/* =========================
   BACKGROUND GRID
========================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;

  opacity: 0.07;
  background-image:
    linear-gradient(#222 1px, transparent 1px),
    linear-gradient(90deg, #222 1px, transparent 1px);
  background-size: 60px 60px;

  animation: moveGrid 12s linear infinite;
}

/* Retina grid lines */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body::before {
    background-image:
      linear-gradient(#222 2px, transparent 2px),
      linear-gradient(90deg, #222 2px, transparent 2px);
  }
}

/* Larger grid on smaller screens */
@media (max-width: 1024px) {
  body::before {
    background-size: 80px 80px;
    opacity: 0.08;
  }
}

/* =========================
   TYPOGRAPHY SYSTEM
========================= */

/* Base text */
p,
body {
  font-weight: 300;
}

/* Page titles */
h1 {
  font-weight: 400;
  color: #222;
}

/* UI labels / controls */
h2,
.option-title,
.member-name,
button,
.button {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Inputs */
input,
textarea {
  font-family: "Space Grotesk", sans-serif;
}

/* =========================
   LAYOUT CONTAINERS
========================= */
.container {
  width: 100%;
  max-width: 500px;
  z-index: 1;
}

.container--wide {
  max-width: 900px;
  margin: auto;
  position: relative;
}

/* =========================
   HEADER
========================= */
header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeIn 0.6s ease forwards;
}

.subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: #666;
}

/* =========================
   NAV / LINKS
========================= */
.back-link {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: #444;

  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease 0.05s;
}

.back-link:hover {
  color: #111;
}

.back-link:hover::after {
  transform: scaleX(1);
}

/* Mobile back link */
.back-link-top {
  display: none;
}

@media (max-width: 768px) {
  .back-link-top {
    display: inline-block;
    margin-bottom: 40px;
  }
}

/* =========================
   BUTTONS
========================= */
.nav-button {
  background: #fcfcfc;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-button:hover {
  background: #f0f0f0;
}

.nav-button:hover .icon {
  transform: scale(1.1);
}

/* =========================
   HOVER UTILITIES
========================= */
.hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, box-shadow;
}

.hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* =========================
   ANIMATIONS
========================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes moveGrid {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 60px 60px, 60px 60px;
  }
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}