/* ABOUTME: Styles for Pixel Pusher 3000 launch website */
/* ABOUTME: CGA color palette with dot matrix paper edges and sprite carousel */

:root {
  /* CGA Color Palette */
  --black: #000000;
  --blue: #0000AA;
  --cyan: #55FFFF;
  --magenta: #FF55FF;
  --yellow: #FFFF55;
  --white: #FFFFFF;
  --paper: #FFFFCC;
  --paper-hole: #000000;

  /* Sizing */
  --paper-edge-width: 48px;
}

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

html, body {
  height: 100%;
}

body {
  background-color: var(--black);
  color: var(--cyan);
  font-family: 'Press Start 2P', monospace;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Dot Matrix Paper Edges */
.paper-edge {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--paper-edge-width);
  z-index: 100;
  background-image: url('assets/dot-matrix-edge.webp');
  background-repeat: repeat-y;
  background-size: var(--paper-edge-width) auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.paper-edge-left {
  left: 0;
  background-position: right top;
}

.paper-edge-right {
  right: 0;
  background-position: left top;
  transform: scaleX(-1);
}

/* Hide paper edges on mobile */
@media (max-width: 768px) {
  .paper-edge {
    display: none;
  }

  main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Scanline Overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
}

/* Main Content */
main {
  padding: 0 calc(var(--paper-edge-width) + 40px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero with orbiting sprites */
.hero-with-sprites {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  perspective: 1000px;
  overflow: visible;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 30px 0 20px;
  position: relative;
  z-index: 10;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.logo {
  max-width: 100%;
  width: 500px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* Diagonal shine effect - masked to logo shape */
.logo-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  -webkit-mask-image: url('assets/splash.png');
  mask-image: url('assets/splash.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation: shine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    background-position: -100% 0;
  }
  50%, 100% {
    background-position: 200% 0;
  }
}

.tagline {
  font-size: clamp(12px, 2.5vw, 20px);
  color: var(--magenta);
  margin-bottom: 16px;
}

.subtitle {
  font-size: clamp(8px, 1.5vw, 12px);
  color: var(--cyan);
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Notify Form */
.notify-form-container {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.notify-label {
  font-size: clamp(10px, 1.5vw, 14px);
  color: var(--cyan);
  margin-bottom: 16px;
  text-align: center;
}

/* Notify form - DOS style */
.notify-form {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: stretch;
}

.notify-form input[type="email"] {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 14px 16px;
  background-color: var(--black);
  color: var(--cyan);
  border: 3px solid var(--cyan);
  border-right: none;
  border-radius: 0;
  outline: none;
  width: 280px;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.notify-form input[type="email"]::placeholder {
  color: var(--cyan);
  opacity: 0.4;
}

.notify-form input[type="email"]:focus {
  border-color: var(--yellow);
  color: var(--yellow);
}

.notify-form button {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 14px 24px;
  background-color: var(--cyan);
  color: var(--black);
  border: 3px solid var(--cyan);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.1s ease;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(0, 255, 255, 0.3);
  white-space: nowrap;
}

.notify-form button:hover {
  background-color: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
  box-shadow: 3px 3px 0 rgba(255, 255, 0, 0.3);
}

.notify-form button:active {
  box-shadow: 1px 1px 0 rgba(255, 255, 0, 0.3);
  transform: translate(2px, 2px);
}

.notify-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success/error messages */
.notify-message {
  font-size: 10px;
  padding: 16px 0;
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
}

.notify-message.success {
  color: var(--cyan);
}

.notify-message.error {
  color: var(--magenta);
}

/* Mobile styles for form */
@media (max-width: 480px) {
  .notify-form {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .notify-form input[type="email"] {
    width: 100%;
    max-width: 280px;
    border-right: 3px solid var(--cyan);
  }

  .notify-form button {
    width: 100%;
    max-width: 280px;
  }
}

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 1.5vw, 14px);
  padding: 16px 32px;
  text-decoration: none;
  border: 3px solid;
  transition: all 0.1s ease;
  cursor: pointer;
  image-rendering: pixelated;
}

.btn-primary {
  background-color: var(--black);
  color: var(--yellow);
  border-color: var(--yellow);
}

.btn-primary:hover {
  background-color: var(--yellow);
  color: var(--black);
}

.btn-secondary {
  background-color: var(--black);
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn-secondary:hover {
  background-color: var(--cyan);
  color: var(--black);
}

.platform-note {
  font-size: 8px;
  color: var(--cyan);
  opacity: 0.5;
}

/* Carousel container - positioned behind hero */
.carousel-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.sprite {
  position: absolute;
  width: 64px;
  height: 64px;
  left: 50%;
  top: 50%;
  margin-left: -32px;
  margin-top: -32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sprite:hover {
  transform: scale(1.5);
  z-index: 1000;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0;
  border-top: 2px dashed var(--cyan);
}

.footer p {
  font-size: 10px;
  margin-bottom: 0;
}

/* Extra small screens */
@media (max-width: 480px) {
  .sprite-showcase {
    min-height: 300px;
  }

  .carousel-container {
    height: 250px;
  }

  .sprite {
    width: 48px;
    height: 48px;
    margin-left: -24px;
    margin-top: -24px;
  }
}
