/* Base */
body {
  background-color: #0a0a0a;
  margin: 0;
  padding: 0;
}
.crt-frame {
  position: relative;
  background-color: #271c26;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Desktop */
@media (min-width: 768px) {
  .crt-frame {
    width: calc(100vw - 40px);
    height: calc(100vh - 50px);
    min-height: 600px;
    margin: 25px 20px;
    border: 1px solid #444;
    border-radius: 8px;
  }
  .main-content { position: relative; z-index: 40; }
  .logo-container {
    transform: scale(clamp(0.7, calc(0.7 + ((100vh - 500px) / 500) * 0.3), 1));
    transform-origin: top center;
    transition: transform 0.3s ease;
  }
}

/* Optional video styles (kept) */
.video-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 1100px; z-index: 50; border-radius: 8px; overflow: hidden; }
.video-container iframe { width: 100%; height: 100%; aspect-ratio: 16 / 9; }
@media (max-width: 767px) { .video-container { width: 90%; max-width: none; } }

.demo-subtext {
  font-size: 0.8rem;
  color: #c0c0c0;
  font-family: 'VT323', monospace;
  text-align: center;
  margin: 20px;
}

/* Mobile */
@media (max-width: 767px) {
  .crt-frame { width: 100vw; height: 100dvh; }
  .logo-container { transform: scale(0.9); transform-origin: top center; margin-top: 0; }
}

/* Scanlines UNDER text but OVER background */
.scanlines {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 25; /* below text (40), above wave (20) */
}

/* Logo glow */
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(231,253,227,0.3)); } 50% { filter: drop-shadow(0 0 20px rgba(231,253,227,0.6)); } }
.logo-container { animation: glow 3s ease-in-out infinite; display: flex; justify-content: center; align-items: center; }

/* Wave Canvas */
#waveCanvas {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 20; /* behind scanlines/text */
}

/* Content wrapper — centered with breathing room above wave */
.main-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  height: 100%;
  text-align: center;
  color: #fff;
  z-index: 40;
  padding-top: 12vh;          /* generous top spacing */
  padding-bottom: 30vh;       /* ensure it sits well above the wave */
  font-family: 'VT323', monospace;
}

/* Email link / Support */
#emailLink {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 40;
  color: #fff; font-family: 'Pixelify Sans', monospace; font-size: 1.1rem;
  text-decoration: none; padding: 8px 12px; border-radius: 6px; transition: background 0.3s ease;
}
#emailLink:hover { background: rgba(0, 0, 0, 0.7); }

/* ===== Evercrate hero ===== */
.evercrate-hero {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}
.evercrate-title {
  font-family: 'Pixelify Sans', monospace;
  margin: 0.4rem 0 0.75rem;
  font-size: clamp(2rem, 1.2rem + 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(125, 227, 224, 0.15);
}
.evercrate-title .teal { color: #7de3e0; }
.evercrate-sub {
  margin: 0 auto 1.25rem;
  max-width: 66ch;
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  line-height: 1.55;
  color: #EDEDED;
  opacity: 0.95;
  letter-spacing: 0.02em;
}
.evercrate-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 0.25rem; }

/* Accent pixel button */
.pixel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 190px; padding: 10px 16px;
  border: 2px solid #7de3e0; border-radius: 8px;
  color: #7de3e0; background: transparent; text-decoration: none;
  font-family: 'Pixelify Sans', monospace; font-size: 1rem;
  transition: transform .06s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
  box-shadow: 0 0 0 0 rgba(125,227,224,0);
}
.pixel-btn:hover {
  background: rgba(125,227,224,0.08);
  color: #d6fffd;
  box-shadow: 0 0 14px rgba(125,227,224,0.35);
  transform: translateY(-1px);
}

/* App Store–style badge: CENTERED TEXT */
.store-badge-black {
  display: inline-flex;
  align-items: center;
  justify-content: center;       /* NEW: center contents horizontally */
  text-align: center;            /* ensure text itself is centered */
  gap: 0;                        /* no icon now */
  min-width: 210px;
  padding: 10px 18px;
  border: 2px solid #ffffff;
  border-radius: 10px;
  color: #ffffff;
  background: #000;
  text-decoration: none;
  font-family: 'Pixelify Sans', monospace;
  line-height: 1.1;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.store-badge-black .sb-text { display: inline-block; }
.store-badge-black .sb-top { font-family: 'VT323', monospace; font-size: .9rem; opacity: .9; letter-spacing: .01em; line-height: 1; }
.store-badge-black .sb-bottom { font-size: 1.12rem; font-weight: 700; line-height: 1.05; }
.store-badge-black:hover {
  transform: translateY(-1px);
  background: #0b0b0b;
  box-shadow: 0 0 16px rgba(255,255,255,0.12);
}

/* Small-screen tweaks */
@media (max-width: 767px) {
  .main-content { padding-top: 10vh; padding-bottom: 28vh; }
  .pixel-btn { min-width: 170px; }
  .store-badge-black { min-width: 185px; }
}