/* ==========================================================================
   PixelFolio — Retro Arcade Portfolio & Agency Template
   Design System & Stylesheet
   ========================================================================== */

:root {
  --bg-void: #080612;
  --bg-surface: #110d24;
  --bg-card: #161130;
  --bg-elevated: #1f1842;

  /* Synthwave Arcade Palette */
  --neon-pink: #ff2a85;
  --neon-cyan: #00e5ff;
  --neon-gold: #ffd700;
  --neon-green: #00ff88;
  --neon-purple: #9d4edd;

  --text-primary: #f5f2ff;
  --text-secondary: #b4a9d6;
  --text-muted: #6c6194;

  --border-pixel: #342963;
  --border-bright: #54429e;

  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'VT323', monospace;
  --font-body: 'Space Grotesk', system-ui, sans-serif;

  --container-max: 1160px;
  --section-pad: 92px 24px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-void);
}

/* Synthwave Pixel Grid Canvas */
#synthGrid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
}

.container {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.text-pink { color: var(--neon-pink); }
.text-cyan { color: var(--neon-cyan); }
.text-gold { color: var(--neon-gold); }
.text-green { color: var(--neon-green); }

/* Pixel Boxes & Buttons */
.pixel-box {
  background: rgba(22, 17, 48, 0.92);
  border: 3px solid var(--border-pixel);
  box-shadow: 6px 6px 0px #04030a;
  transition: transform 0.15s steps(2), border-color 0.15s ease, box-shadow 0.15s ease;
}

.pixel-box:hover {
  border-color: var(--neon-pink);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px #04030a;
}

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  padding: 14px 24px;
  border: 3px solid #000;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}

.pixel-btn-primary {
  background: var(--neon-pink);
  color: #fff;
  box-shadow:
    inset -4px -4px 0px #b30e55,
    inset 4px 4px 0px #ff77b0,
    4px 4px 0px #000;
}

.pixel-btn-primary:hover {
  background: #ff4796;
  transform: translate(-1px, -1px);
  box-shadow:
    inset -4px -4px 0px #b30e55,
    inset 4px 4px 0px #ff99c5,
    6px 6px 0px #000;
}

.pixel-btn-secondary {
  background: var(--bg-elevated);
  color: var(--neon-cyan);
  border: 3px solid var(--neon-cyan);
  box-shadow: 4px 4px 0px #000;
}

.pixel-btn-secondary:hover {
  background: rgba(0, 229, 255, 0.12);
  transform: translate(-1px, -1px);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 6, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--border-pixel);
  padding: 14px 24px;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--neon-pink);
  text-shadow: 2px 2px 0px #000;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 1.3rem;
}

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

.nav-hud {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-badge {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--neon-gold);
  background: var(--bg-surface);
  border: 2px solid var(--border-pixel);
  padding: 8px 12px;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-elevated);
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 8px 12px;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 88px 24px 72px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.08);
  border: 2px solid var(--neon-green);
  padding: 8px 16px;
  margin-bottom: 26px;
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.55rem, 4vw, 2.75rem);
  line-height: 1.38;
  margin-bottom: 22px;
  text-shadow: 4px 4px 0px #000;
}

.hero-subtitle {
  max-width: 660px;
  margin: 0 auto 34px;
  font-size: 1.12rem;
  color: var(--text-secondary);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 52px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.hero-stat-card {
  padding: 20px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.stat-txt {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Sections */
.section {
  padding: var(--section-pad);
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 48px;
}

.section-tag {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--neon-cyan);
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  line-height: 1.4;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-secondary);
}

/* Work Filter & Grid */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.filter-btn {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  padding: 10px 18px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 2px solid var(--border-pixel);
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.1);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.work-card.hidden {
  display: none;
}

.work-preview {
  height: 190px;
  background: var(--bg-elevated);
  border-bottom: 3px solid var(--border-pixel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  position: relative;
}

.work-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  background: var(--bg-void);
  color: var(--neon-gold);
  border: 2px solid var(--neon-gold);
  padding: 5px 8px;
}

.work-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  line-height: 1.5;
}

.work-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

/* Services & Testimonials */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card,
.review-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-num {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--neon-pink);
}

/* Contact Form */
.contact-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 32px;
  border-color: var(--neon-cyan);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pixel-input,
.pixel-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-void);
  border: 3px solid var(--border-bright);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  outline: none;
}

.pixel-input:focus,
.pixel-textarea:focus {
  border-color: var(--neon-pink);
}

.form-feedback {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--neon-green);
  min-height: 20px;
}

/* Footer */
.footer {
  border-top: 3px solid var(--border-pixel);
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-surface);
  position: relative;
  z-index: 2;
}

.footer-text {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .work-grid,
  .grid-3,
  .hero-stats,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .hud-badge {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 3px solid var(--border-pixel);
    padding: 20px;
    gap: 16px;
  }

  .mobile-menu-btn {
    display: inline-block;
  }
}
