/* ==========================================================================
   Portalstorm Gaming Community
   Palette: night sky + the storm logo's electric blue fading to lilac
   Type: Space Grotesk for display, Inter for body/UI
   ========================================================================== */

:root {
  --bg: #080914;
  --surface: #10122a;
  --surface-2: #161938;
  --border: #23284f;
  --border-strong: #343b72;

  --accent: #4d5bff;
  --accent-bright: #7b86ff;
  --accent-soft: #b9bfff;
  --cyan: #43b3e0;
  --discord: #5865f2;

  --text: #eceefe;
  --text-muted: #9ca2cc;
  --text-faint: #6a7099;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --container: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 600px at 80% -10%, rgba(77, 91, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 40%, rgba(67, 179, 224, 0.10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-bright); text-decoration: none; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-bright) 45%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6a4dff);
  color: #fff;
  box-shadow: 0 6px 24px -6px rgba(77, 91, 255, 0.6);
}

.btn-primary:hover { box-shadow: 0 10px 32px -6px rgba(77, 91, 255, 0.8); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent-bright); background: rgba(77, 91, 255, 0.08); }

.btn-sm { padding: 8px 18px; font-size: 0.9rem; }
.btn-sm .btn-icon { width: 18px; height: 18px; }

/* -------------------------------------------------------------------- Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 9, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin-right: auto;
}

.brand img { width: 36px; }

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

/* ------------------------------------------------------------------- Hero */

.hero { padding: 96px 0 72px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 32px;
}

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(circle, rgba(77, 91, 255, 0.45), transparent 65%);
  filter: blur(30px);
}

.hero-art img {
  position: relative;
  width: 100%;
  max-width: 420px;
  animation: drift 7s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

/* --------------------------------------------------------------- Sections */

section { padding: 80px 0; }

.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head p:last-child { color: var(--text-muted); }

/* ------------------------------------------------------------------ Games */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px 26px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -18px rgba(77, 91, 255, 0.55);
}

.game img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 18px;
  transition: transform 0.25s ease;
}

.game:hover img { transform: scale(1.06); }

.game-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 4px;
}

.game-link {
  font-size: 0.88rem;
  color: var(--accent-bright);
}

/* -------------------------------------------------------------- Community */

.discord-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 32px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(88, 101, 242, 0.28), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.discord-card .discord-logo { width: 56px; height: 56px; color: var(--discord); margin-bottom: 18px; }
.discord-card p:not(.eyebrow) { color: var(--text-muted); max-width: 52ch; }
.discord-card .btn { margin-top: 12px; }

.btn-discord {
  gap: 10px;
  background: var(--discord);
  color: #fff;
  box-shadow: 0 6px 24px -6px rgba(88, 101, 242, 0.65);
}

.btn-discord:hover { background: #4752c4; box-shadow: 0 10px 32px -6px rgba(88, 101, 242, 0.85); }

.btn-icon { width: 22px; height: 22px; }

/* -------------------------------------------------------------- Subreddit */

.reddit-card {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 36px 40px;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reddit-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -18px rgba(255, 69, 0, 0.35);
}

.reddit-card img { width: 96px; flex-shrink: 0; }
.reddit-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.reddit-card p { color: var(--text-muted); margin-bottom: 8px; max-width: 64ch; }

/* ----------------------------------------------------------------- Footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--text-faint);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* ------------------------------------------------------------- Responsive */

@media (max-width: 860px) {
  .hero { padding: 56px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 220px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 520px) {
  .game-grid { grid-template-columns: 1fr; }
  .reddit-card { flex-direction: column; align-items: flex-start; padding: 28px; }
  section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { animation: none !important; transition: none !important; }
}
