/* ══════════════════════════════════════════════════════════
   SETS.FYI — Digital Cartographer
   ══════════════════════════════════════════════════════════ */

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

:root {
  --warm: #C4956A;
  --warm-light: #E8C99B;
  --cool: #00D4FF;
  --cool-dim: #0099CC;
  --bg: #0A0A0F;
  --font: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ═══ LAYERS ═══ */

#piri-bg {
  position: fixed;
  inset: 0;
  background: url('img/piri-reis-map.jpg') center/cover no-repeat;
  opacity: 0.09;
  filter: sepia(0.7) contrast(1.2) brightness(0.7);
  z-index: 5;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 2s ease;
  animation: mapDrift 180s ease-in-out infinite alternate;
}

@keyframes mapDrift {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1.5%, -1%); }
}

#canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  cursor: none;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#overlay a, #overlay nav {
  pointer-events: auto;
}

#vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 25%,
    rgba(10, 10, 15, 0.4) 60%,
    rgba(10, 10, 15, 0.8) 100%
  );
  pointer-events: none;
}

/* ═══ SCANLINE ═══ */

#scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
}

#scanline::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(
    transparent,
    rgba(0, 212, 255, 0.012),
    transparent
  );
  animation: scanMove 10s linear infinite;
}

@keyframes scanMove {
  0%   { top: -12px; }
  100% { top: 100%; }
}

/* ═══ BOOT SCREEN ═══ */

#boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 1s ease;
}

#boot-screen.fade-out {
  opacity: 0;
}

#boot-inner {
  min-width: 340px;
  max-width: 90vw;
}

#boot-text {
  font-family: var(--font);
  font-size: 12px;
  color: var(--warm);
  opacity: 0.7;
  line-height: 2.2;
}

.boot-line {
  white-space: nowrap;
  overflow: hidden;
}

#boot-cursor {
  font-family: var(--font);
  font-size: 12px;
  color: var(--warm);
  opacity: 0.7;
  animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 0; }
}

/* ═══ COORDINATES HUD ═══ */

.coords {
  position: fixed;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 2px;
  pointer-events: none;
}

#coords-tl {
  top: 24px;
  left: 24px;
  color: var(--warm);
  opacity: 0.35;
}

#coords-tr {
  top: 24px;
  right: 24px;
  color: var(--cool-dim);
  opacity: 0.25;
  text-align: right;
}

#coords-bl {
  bottom: 24px;
  left: 24px;
  color: var(--cool-dim);
  opacity: 0.25;
}

#coords-br {
  bottom: 24px;
  right: 24px;
  color: var(--cool);
  opacity: 0.3;
}

#coords-tr.revealed { opacity: 0.25; }
#coords-bl.revealed { opacity: 0.25; }

/* ═══ TAGLINE ═══ */

#tagline {
  position: fixed;
  top: 58%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--warm);
  opacity: 0.5;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* ═══ WAYPOINTS ═══ */

#waypoints {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
  list-style: none;
}

.waypoint {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: rgba(196, 149, 106, 0.35);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 2px;
  transition: color 0.5s ease;
}

.waypoint:hover {
  color: var(--cool);
}

/* Icon — always visible, subtle pulse */

.wp-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.4s ease, filter 0.4s ease;
  animation: iconPulse 4s ease-in-out infinite;
}

.waypoint:hover .wp-icon {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.35));
  animation: none;
}

.waypoint:nth-child(1) .wp-icon { animation-delay: 0s; }
.waypoint:nth-child(2) .wp-icon { animation-delay: 0.8s; }
.waypoint:nth-child(3) .wp-icon { animation-delay: 1.6s; }
.waypoint:nth-child(4) .wp-icon { animation-delay: 2.4s; }
.waypoint:nth-child(5) .wp-icon { animation-delay: 3.2s; }

@keyframes iconPulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.65; }
}

/* Greek letter — slides in from left on hover */

.wp-greek {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 1px;
  transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  padding-right: 0;
}

.waypoint:hover .wp-greek {
  max-width: 20px;
  opacity: 0.7;
  padding-right: 7px;
}

/* Platform name — slides in from right on hover */

.wp-name {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(0, 212, 255, 0.45);
  transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.08s,
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 0;
}

.waypoint:hover .wp-name {
  max-width: 90px;
  opacity: 1;
  padding-left: 7px;
}

/* ═══ HINT ═══ */

#hint {
  position: fixed;
  bottom: 16%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 6px;
  color: var(--warm);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0; }
  40%, 60% { opacity: 0.35; }
}

/* ═══ EASTER EGG ═══ */

.easter-msg {
  position: fixed;
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 8px;
  color: var(--warm-light);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 1.5s ease;
  white-space: nowrap;
  pointer-events: none;
}

.easter-msg.visible {
  opacity: 0.6;
}

/* ═══ HIDDEN LAYER TRANSITIONS ═══ */

.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 2s ease, visibility 0s 2s;
  pointer-events: none !important;
}

.revealed {
  visibility: visible !important;
  transition: opacity 2s ease, visibility 0s;
  pointer-events: auto;
}

#coords-tl.revealed { opacity: 0.35; }
#coords-br.revealed { opacity: 0.3; }
#tagline.revealed   { opacity: 0.45; }
#waypoints.revealed { opacity: 1; }
#hint.revealed      { opacity: 1; animation: hintPulse 4s ease-in-out infinite; }

/* ═══ RESPONSIVE ═══ */

@media (max-width: 768px) {
  #tagline {
    font-size: 9px;
    letter-spacing: 2px;
  }

  #waypoints {
    gap: 20px;
    bottom: 20px;
  }

  .waypoint {
    font-size: 9px;
  }

  .wp-name {
    display: none;
  }

  .coords {
    font-size: 9px;
  }

  #hint {
    font-size: 9px;
    letter-spacing: 4px;
  }

  #boot-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  #waypoints {
    gap: 14px;
  }

  #tagline {
    font-size: 8px;
    letter-spacing: 1px;
  }
}
