/* ===========================
   MEGABYTE TECH HELP - STYLES
   PIXEL ART THEME
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  /* Three core purples + neutrals — used sparingly */
  --p1: #5b21b6;   /* deep purple — shadows, backgrounds */
  --p2: #a855f7;   /* mid purple  — primary accent, borders */
  --p3: #e9d5ff;   /* pale purple — body text */

  --black:  #0a0a0a;
  --dark:   #111111;
  --white:  #f0f0f0;
  --grey:   #2a2a2a;

  --yellow: #fbbf24;
  --green:  #22c55e;
  --red:    #ef4444;
  --cyan:   #06b6d4;

  --font-pixel: 'Press Start 2P', monospace;
  --font-vt:    'VT323', monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-pixel);
  font-size: 10px;
  overflow-x: hidden;
  cursor: default;
}

/* ===== SCANLINES ===== */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.10) 3px,
    rgba(0,0,0,0.10) 4px
  );
}

/* ===== ANIMATIONS ===== */
@keyframes blink      { 0%,49%{opacity:1} 50%,100%{opacity:0} }
@keyframes blink-slow { 0%,79%{opacity:1} 80%,100%{opacity:0} }
@keyframes float      { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes ticker     { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes glow-text  {
  0%,100%{ text-shadow: 3px 3px 0 #1a0533, 0 0 18px var(--p2); }
  50%{     text-shadow: 3px 3px 0 #1a0533, 0 0 36px var(--p3), 0 0 60px var(--p2); }
}
@keyframes slide-in-left  { from{transform:translateX(-60px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes slide-in-right { from{transform:translateX(60px);opacity:0}  to{transform:translateX(0);opacity:1} }
@keyframes slide-in-up    { from{transform:translateY(40px);opacity:0}  to{transform:translateY(0);opacity:1} }
@keyframes shark-swim     { 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-10px) rotate(1deg)} }

.blink      { animation: blink 1s step-end infinite; }
.blink-slow { animation: blink-slow 2s step-end infinite; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: #0a0a0a;
  border-bottom: 3px solid #222;
}

.nav-logo {
  font-family: var(--font-pixel);
  font-size: 15px;
  text-decoration: none;
}
.logo-meg   { color: var(--p2); }
.logo-abyte { color: var(--white); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #999;
  text-decoration: none;
  padding: 6px 10px;
  border: 2px solid transparent;
  transition: all 0.1s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--p2);
  border-color: var(--p2);
  background: rgba(168,85,247,0.12);
  box-shadow: 2px 2px 0 var(--p1);
}

.nav-status {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 60px 120px 60px;
  overflow: hidden;
  background: var(--black);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  flex-shrink: 0;
  animation: slide-in-left 0.7s ease both;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border: 2px solid var(--white);
  padding: 6px 14px;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.hero-title {
  font-family: var(--font-pixel);
  line-height: 1.5;
  margin-bottom: 16px;
}
.title-meg {
  font-size: clamp(36px, 6vw, 64px);
  color: var(--p2);
  animation: glow-text 3s ease-in-out infinite;
}
.title-abyte { font-size: clamp(36px, 6vw, 64px); color: var(--white); }
.title-sub {
  display: block;
  font-size: clamp(14px, 2.5vw, 22px);
  color: var(--p3);
  letter-spacing: 6px;
  margin-top: 8px;
}

.hero-tagline {
  font-family: var(--font-vt);
  font-size: 22px;
  color: #888;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.hero-desc {
  font-family: var(--font-vt);
  font-size: 20px;
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 440px;
}
.hero-btns { display: flex; gap: 20px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 14px 24px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 1px;
}
.btn-primary {
  background: var(--p2);
  color: var(--black);
  box-shadow: 4px 4px 0 var(--p1);
}
.btn-primary:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--p1);
  background: var(--p3);
  color: var(--black);
}
.btn-primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--p1); }
.btn-secondary {
  background: transparent;
  color: var(--p2);
  border: 3px solid var(--p2);
  box-shadow: 4px 4px 0 var(--p1);
}
.btn-secondary:hover {
  background: rgba(168,85,247,0.12);
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--p1);
}
.btn-large { font-size: 12px; padding: 20px 36px; }

/* ===== HERO LOGO IMAGE ===== */
.hero-logo-wrap {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slide-in-right 0.7s ease 0.2s both;
  margin-right: 220px;
}
.hero-logo-img {
  width: 680px;
  max-width: 50vw;
  filter: drop-shadow(0 0 30px rgba(168,85,247,0.5)) drop-shadow(0 0 60px rgba(91,33,182,0.3));
  animation: float 4s ease-in-out infinite;
}

/* ===== TICKER ===== */
.ticker-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--p1);
  border-top: 3px solid var(--p2);
  overflow: hidden;
  padding: 10px 0;
}
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 22s linear infinite;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--white);
  letter-spacing: 1px;
}
.ticker span { padding: 0 10px; }

/* ===== SECTION SHARED ===== */
.section-header { text-align: center; margin-bottom: 50px; }
.section-tag {
  font-family: var(--font-vt);
  font-size: 18px;
  color: #888;
  letter-spacing: 4px;
  display: block;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(18px, 3vw, 28px);
  color: var(--p2);
  text-shadow: 3px 3px 0 var(--p1);
}

/* ===== SERVICES PREVIEW ===== */
.services-preview {
  padding: 80px 60px;
  background: var(--dark);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 24px;
  background: var(--black);
  border: 2px solid var(--grey);
  text-decoration: none;
  color: var(--white);
  position: relative;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 var(--grey);
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--p2);
  transform: scaleX(0);
  transition: transform 0.2s;
  transform-origin: left;
}
.service-card:hover {
  border-color: var(--p2);
  transform: translate(-4px,-4px);
  box-shadow: 8px 8px 0 var(--p1);
}
.service-card:hover::before { transform: scaleX(1); }

/* Pixel art icons in cards */
.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.service-card h3 {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--p2);
  margin-bottom: 12px;
}
.service-card p {
  font-family: var(--font-vt);
  font-size: 18px;
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}
.card-cta { font-family: var(--font-pixel); font-size: 8px; color: #666; }
.service-card:hover .card-cta { color: var(--p2); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  background: var(--black);
  border-top: 2px solid var(--grey);
  border-bottom: 2px solid var(--grey);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 50px; }
.stat-num {
  font-family: var(--font-pixel);
  font-size: 24px;
  color: var(--p2);
  text-shadow: 2px 2px 0 var(--p1);
}
.stat-label { font-family: var(--font-vt); font-size: 18px; color: #888; letter-spacing: 2px; }
.stat-divider { color: var(--grey); font-size: 40px; font-weight: 100; }

/* ===== WHY US ===== */
.why-us { padding: 80px 60px; background: var(--dark); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.why-card {
  text-align: center;
  padding: 36px 24px;
  border: 2px solid var(--grey);
  background: var(--black);
  transition: all 0.15s;
}
.why-card:hover {
  border-color: var(--p2);
  transform: translateY(-4px);
}
/* Pixel icons in why cards */
.why-icon {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
}
.why-card h4 { font-family: var(--font-pixel); font-size: 10px; color: var(--p2); margin-bottom: 14px; }
.why-card p  { font-family: var(--font-vt); font-size: 18px; color: #bbb; line-height: 1.6; }

/* ===== CTA BANNER ===== */
.cta-banner {
  position: relative;
  padding: 80px 60px;
  background: var(--black);
  text-align: center;
  border-top: 3px solid var(--p2);
  border-bottom: 3px solid var(--p2);
}
.cta-content h2 {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 3vw, 26px);
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 3px 3px 0 var(--p1);
}
.cta-content p { font-family: var(--font-vt); font-size: 22px; color: #bbb; margin-bottom: 36px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  border-top: 3px solid var(--grey);
  padding: 50px 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-logo {
  font-family: var(--font-pixel);
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 0;
}
.footer-tagline {
  display: block;
  font-size: 9px;
  color: #888;
  letter-spacing: 4px;
  margin-top: 8px;
  text-align: center;
}
.footer-links { display: flex; gap: 30px; }
.footer-links a { font-family: var(--font-pixel); font-size: 8px; color: #888; text-decoration: none; }
.footer-links a:hover { color: var(--p2); }
.footer-copy { font-family: var(--font-vt); font-size: 16px; color: #555; text-align: center; line-height: 2; }

/* ===========================
   SERVICES PAGE
   =========================== */
.page-hero {
  padding: 60px 60px 40px;
  background: var(--dark);
  text-align: center;
  border-bottom: 2px solid var(--grey);
}
.page-hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(22px, 4vw, 36px);
  color: var(--p2);
  text-shadow: 4px 4px 0 var(--p1);
  margin-bottom: 14px;
}
.page-hero p { font-family: var(--font-vt); font-size: 22px; color: #bbb; max-width: 600px; margin: 0 auto; line-height: 1.6; }

.services-full { padding: 80px 60px; background: var(--black); }
.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 40px;
  background: var(--dark);
  border: 2px solid var(--grey);
  box-shadow: 5px 5px 0 var(--p1);
  transition: all 0.15s;
}
.service-row:hover {
  border-color: var(--p2);
  transform: translate(-3px,-3px);
  box-shadow: 8px 8px 0 var(--p1);
}
.service-row-icon { width: 52px; height: 52px; align-self: start; flex-shrink: 0; }
.service-row-content h2 { font-family: var(--font-pixel); font-size: 16px; color: var(--p2); margin-bottom: 16px; }
.service-row-content p  { font-family: var(--font-vt); font-size: 20px; color: #bbb; line-height: 1.7; margin-bottom: 20px; }
.service-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.service-list li {
  font-family: var(--font-vt);
  font-size: 18px;
  color: var(--p2);
  background: rgba(168,85,247,0.08);
  border: 1px solid var(--p1);
  padding: 4px 12px;
}
.service-list li::before { content: "▶ "; }

/* ===========================
   ABOUT PAGE
   =========================== */
.about-section { padding: 80px 60px; max-width: 900px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 60px; }
.about-text h2 { font-family: var(--font-pixel); font-size: 18px; color: var(--p2); margin-bottom: 20px; }
.about-text p  { font-family: var(--font-vt); font-size: 20px; color: #bbb; line-height: 1.8; margin-bottom: 16px; }
.about-pixel-art { display: flex; justify-content: center; align-items: center; }
.pixel-box {
  width: 340px; height: 340px;
  border: 4px solid var(--p2);
  box-shadow: 8px 8px 0 var(--p1);
  display: flex; align-items: center; justify-content: center;
  background: var(--black);
  animation: float 4s ease-in-out infinite;
  overflow: visible;
}

.values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px; }
.value-item { padding: 28px 20px; border: 2px solid var(--grey); text-align: center; background: var(--dark); }
.value-item .val-icon { display: block; width: 36px; height: 36px; margin: 0 auto 12px; }
.value-item h4 { font-family: var(--font-pixel); font-size: 9px; color: var(--p2); margin-bottom: 10px; }
.value-item p  { font-family: var(--font-vt); font-size: 17px; color: #bbb; line-height: 1.5; }

/* ===========================
   CONTACT PAGE
   =========================== */
.contact-section { padding: 80px 60px; max-width: 1000px; margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info h2 { font-family: var(--font-pixel); font-size: 14px; color: var(--p2); margin-bottom: 24px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 20px; padding: 16px;
  border: 2px solid var(--grey);
  background: var(--dark);
}
.contact-item-icon { width: 26px; height: 26px; flex-shrink: 0; }
.contact-item-text strong { display: block; font-family: var(--font-pixel); font-size: 8px; color: var(--p2); margin-bottom: 6px; }
.contact-item-text span  { font-family: var(--font-vt); font-size: 18px; color: #bbb; }

.contact-form {
  background: var(--dark);
  border: 2px solid var(--grey);
  padding: 36px;
  box-shadow: 5px 5px 0 var(--p1);
}
.contact-form h2 { font-family: var(--font-pixel); font-size: 12px; color: var(--p2); margin-bottom: 28px; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-family: var(--font-pixel); font-size: 8px; color: #888; margin-bottom: 8px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px;
  background: var(--black);
  border: 2px solid var(--grey);
  color: var(--white);
  font-family: var(--font-vt);
  font-size: 18px;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--p2); }
.form-group select { appearance: none; cursor: pointer; }
.form-group select option { background: var(--dark); }
.form-submit { width: 100%; font-size: 11px; padding: 16px; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 40px 30px 100px; text-align: center; }
  .hero-btns { justify-content: center; }
  /* FIX 1: Center the logo on mobile by removing the desktop right-margin offset */
  .hero-logo-wrap {
    margin-top: 40px;
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .hero-logo-img { max-width: 340px; width: 80vw; }
  .services-grid, .why-grid { grid-template-columns: repeat(2,1fr); }
  /* FIX 2: Center stats items when they wrap */
  .stats-bar {
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
  }
  .stat {
    padding: 0 20px;
    text-align: center;
    align-items: center;
    /* Each stat takes roughly half width so they pair up neatly */
    flex: 0 0 calc(50% - 30px);
  }
  .stat-num {
    font-size: 16px;
    text-align: center;
  }
  .stat-divider { display: none; }
  .about-grid, .contact-grid, .values-grid { grid-template-columns: 1fr; }
  .navbar { padding: 12px 20px; }
  .nav-links { gap: 14px; }
  .services-preview, .why-us, .stats-bar, .cta-banner, .footer,
  .page-hero, .services-full, .about-section, .contact-section { padding-left: 24px; padding-right: 24px; }
  .service-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .services-grid, .why-grid, .values-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  /* On small phones, stack stats fully centered one per row */
  .stat {
    flex: 0 0 100%;
    padding: 0;
  }
}