/* ============================================================
   Maximpact — main stylesheet
   Dark, modern, electric-accent design system.
   ============================================================ */

:root {
  --bg:            #0a0a0f;
  --bg-elev:       #14141c;
  --bg-elev-2:     #1c1c26;
  --border:        #26262e;
  --text:          #e8e8ed;
  --text-muted:    #8b8b97;
  --text-dim:      #61616b;
  --accent:        #00d9ff;
  --accent-2:      #ff3da6;
  --accent-glow:   rgba(0, 217, 255, 0.35);
  --danger:        #ff5d5d;
  --success:       #2ee6a6;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);

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

  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent-2); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; }

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

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #001019;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: #1be3ff;
  color: #001019;
  transform: translateY(-1px);
  box-shadow: 0 12px 36px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.site-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px var(--accent-glow);
  display: inline-block;
}
.site-brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--text);
}
.site-nav .current-menu-item a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 800px) {
  .site-nav ul { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.open ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 24px;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(closest-side, var(--accent), transparent);
  top: -160px; left: -120px;
}
.hero::after {
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, var(--accent-2), transparent);
  bottom: -200px; right: -120px;
}
.hero h1 {
  background: linear-gradient(180deg, #ffffff 0%, #b8b8c4 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: .35em;
}
.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 217, 255, .08);
  border: 1px solid rgba(0, 217, 255, .25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-muted); max-width: 540px; }

.section .section-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ============================================================
   Games grid
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.game-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.game-card .cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev));
  position: relative;
  overflow: hidden;
}
.game-card .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.game-card:hover .cover img { transform: scale(1.04); }
.game-card .body { padding: 18px 20px 22px; }
.game-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.game-card h3 a { color: var(--text); }
.game-card h3 a:hover { color: var(--accent); }
.game-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.game-card .meta {
  display: inline-flex;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ============================================================
   Blog list
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.post-card .cover {
  aspect-ratio: 16/9;
  margin: -24px -24px 18px;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev));
  overflow: hidden;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.post-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-muted); margin: 0; }
.post-card .read-more {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

/* ============================================================
   Article (single post / page)
   ============================================================ */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}
.article header h1 { margin-bottom: 16px; }
.article header .post-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 30px;
}
.article .featured {
  aspect-ratio: 16/9;
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}
.article .featured img { width: 100%; height: 100%; object-fit: cover; }
.article .content { font-size: 1.08rem; line-height: 1.75; }
.article .content h2 { margin-top: 1.6em; }
.article .content h3 { margin-top: 1.4em; }
.article .content a { border-bottom: 1px solid var(--border); }
.article .content a:hover { border-color: var(--accent); }
.article .content blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  color: var(--text-muted);
  font-style: italic;
}
.article .content pre, .article .content code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}
.article .content code { padding: 2px 6px; }
.article .content pre { padding: 18px; overflow-x: auto; }
.article .content pre code { background: transparent; border: 0; padding: 0; }
.article .content img { border-radius: var(--radius); margin: 20px 0; }

/* ============================================================
   Subscribe section (Kit/ConvertKit embed lives inside)
   ============================================================ */
.subscribe {
  padding: 110px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--border);
}
.subscribe::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(0,217,255,.18), transparent),
    radial-gradient(500px 300px at 80% 80%, rgba(255,61,166,.16), transparent);
  z-index: -1;
}
.subscribe .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.subscribe h2 { margin-bottom: 14px; }
.subscribe p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.subscribe .embed-host {
  max-width: 480px;
  margin: 0 auto;
}
/* Style Kit's default form so it matches the theme without custom CSS in Kit */
.subscribe .formkit-form,
.subscribe form[data-sv-form] {
  background: transparent !important;
  border: 0 !important;
}
.subscribe .formkit-field input,
.subscribe form[data-sv-form] input[type=email],
.subscribe form[data-sv-form] input[type=text] {
  width: 100%;
  background: var(--bg-elev) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 14px 16px !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
}
.subscribe .formkit-submit,
.subscribe form[data-sv-form] button[type=submit] {
  width: 100%;
  background: var(--accent) !important;
  color: #001019 !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  padding: 14px 16px !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer;
  margin-top: 10px !important;
}
/* Kit pads the inner <span>; keep the padding in one place. */
.subscribe .formkit-submit > span { padding: 0 !important; }
/* Kit's "Built with Kit" badge is a dark logo; flip it for the dark page. */
.subscribe .formkit-powered-by-convertkit[data-variant="dark"] { filter: invert(1); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--accent);
  color: #001019;
  border-color: var(--accent);
}

/* ============================================================
   Misc
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px; top: 16px;
  background: var(--accent);
  color: #001019;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
