/* ============================================
   Foot Forward AI — Retro Pager Landing Page
   90s Motorola pager, pure CSS, green LCD
   ============================================ */

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

html, body {
  height: 100%;
}

body {
  background: #131318;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   PALIMPSEST — ghostly background text
   ============================================ */
.palimpsest {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  gap: 0;
}

.palimpsest-line {
  font-family: 'VT323', monospace;
  font-size: clamp(8rem, 22vw, 22rem);
  color: rgba(255, 130, 160, 0.32);
  text-shadow:
    0 0 30px rgba(255, 64, 129, 0.16),
    0 0 80px rgba(194, 24, 91, 0.08);
  line-height: 0.85;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.desktop-only { display: block; }
.mobile-only  { display: none; }

/* ============================================
   PAGER WRAPPER
   ============================================ */
.pager-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   PAGER BODY
   ============================================ */
.pager {
  position: relative;
  width: 280px;
  height: 440px;
  background: linear-gradient(
    160deg,
    #d4803a 0%,
    #c65d28 30%,
    #a34420 70%,
    #8b3520 100%
  );
  border-radius: 24px 24px 28px 28px;
  box-shadow:
    /* outer glow */
    0 0 60px rgba(198, 93, 40, 0.15),
    /* depth shadow */
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3),
    /* edge highlight */
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    /* inner body depth */
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Subtle texture overlay */
.pager::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   ANTENNA NUB
   ============================================ */
.pager-antenna {
  position: absolute;
  top: -14px;
  left: 40px;
  width: 18px;
  height: 22px;
  background: linear-gradient(180deg, #2b2b2b 0%, #1a1a1a 100%);
  border-radius: 6px 6px 4px 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 -2px 4px rgba(0, 0, 0, 0.3);
}

.pager-antenna::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* ============================================
   BELT CLIP
   ============================================ */
.pager-clip {
  position: absolute;
  top: 30px;
  right: -10px;
  width: 14px;
  height: 60px;
  background: linear-gradient(90deg, #1a1a1a 0%, #333 50%, #1a1a1a 100%);
  border-radius: 0 6px 6px 0;
  box-shadow:
    2px 2px 6px rgba(0, 0, 0, 0.4),
    inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.pager-clip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 2px;
  width: 10px;
  height: 12px;
  background: linear-gradient(90deg, #1a1a1a, #2a2a2a);
  border-radius: 0 0 4px 4px;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SPEAKER GRILLE
   ============================================ */
.pager-grille {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 6px 40px;
  position: relative;
  z-index: 2;
}

.pager-grille span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pager-grille--top {
  margin-top: 8px;
}

.pager-grille--bottom {
  margin-bottom: 4px;
}

/* ============================================
   LCD SCREEN
   ============================================ */
.pager-screen {
  position: relative;
  z-index: 2;
  width: 220px;
  height: 130px;
  background: #1a2a1a;
  border-radius: 6px;
  border: 3px solid #0d0d0d;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 20px rgba(0, 40, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* LCD backlight effect */
.pager-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(50, 180, 50, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Scanline overlay */
.pager-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
}

.pager-screen-inner {
  padding: 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* LCD text lines */
.lcd-line {
  font-family: 'VT323', monospace;
  color: #33cc33;
  text-shadow: 0 0 6px rgba(51, 204, 51, 0.5);
  line-height: 1.3;
}

.lcd-line--label {
  font-size: 1.1rem;
  opacity: 0.7;
  letter-spacing: 0.1em;
}

.lcd-line--from {
  font-size: 1.15rem;
  margin-top: 6px;
  opacity: 0.8;
}

.lcd-line--message {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Blinking cursor */
.lcd-cursor {
  width: 10px;
  height: 2px;
  background: #33cc33;
  box-shadow: 0 0 4px rgba(51, 204, 51, 0.6);
  margin-top: 6px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================
   BUTTONS
   ============================================ */
.pager-buttons {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
  width: 100%;
}

/* Small side buttons */
.pager-side-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
  border: 2px solid #0d0d0d;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Main red button */
.pager-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e63946 0%, #c1121f 60%, #9b1020 100%);
  border: 2px solid #6d0a14;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  box-shadow:
    0 4px 0 #6d0a14,
    0 6px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.1s ease;
}

.pager-main-btn:hover {
  background: linear-gradient(180deg, #f04855 0%, #d41a2a 60%, #a51525 100%);
  box-shadow:
    0 4px 0 #6d0a14,
    0 6px 16px rgba(230, 57, 70, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pager-main-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #6d0a14,
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pager-main-btn-face {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* ============================================
   SCREW DETAILS
   ============================================ */
.pager-screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b6930 0%, #5c4520 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* Phillips head cross */
.pager-screw::before,
.pager-screw::after {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.35);
}

.pager-screw::before {
  top: 50%;
  left: 2px;
  right: 2px;
  height: 1px;
  transform: translateY(-50%);
}

.pager-screw::after {
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 1px;
  transform: translateX(-50%);
}

.pager-screw--tl { top: 14px; left: 14px; }
.pager-screw--tr { top: 14px; right: 14px; }
.pager-screw--bl { bottom: 14px; left: 14px; }
.pager-screw--br { bottom: 14px; right: 14px; }

/* ============================================
   PALIMPSEST — hide on mobile (page 1)
   ============================================ */
@media (max-width: 700px) {
  .palimpsest {
    display: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 400px) {
  .pager {
    width: 240px;
    height: 380px;
    padding: 16px;
    border-radius: 20px 20px 24px 24px;
  }

  .pager-screen {
    width: 190px;
    height: 110px;
  }

  .pager-screen-inner {
    padding: 10px 12px;
  }

  .lcd-line--message {
    font-size: 1.25rem;
  }

  .pager-main-btn {
    width: 100px;
    height: 42px;
  }

  .pager-main-btn-face {
    font-size: 1.1rem;
  }

  .pager-grille {
    padding: 4px 30px;
  }

  .pager-clip {
    top: 24px;
    right: -8px;
    width: 12px;
    height: 48px;
  }
}

@media (max-height: 500px) {
  .pager {
    transform: scale(0.8);
  }
}
