/* ── Variables ───────────────────────────────────────────── */
:root {
  --red:        #FF2020;
  --red-mid:    #FF0000;
  --red-glow:   #CC0000;
  --red-deep:   #900000;
  --red-dark:   #8B0000;
  --red-deeper: #5C0000;
  --font:       'Press Start 2P', monospace;
}

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

::selection {
  background-color: var(--red);
  color: #000;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  color-scheme: dark;
}

body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: page-fade-in 0.4s ease forwards;
}

/* ── CRT overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.055) 2px,
    rgba(0, 0, 0, 0.055) 4px
  );
  pointer-events: none;
  z-index: 8;
}

body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(transparent, rgba(255, 32, 32, 0.07), transparent);
  animation: scanline 10s linear infinite;
  pointer-events: none;
  z-index: 9;
}

/* ── Background ──────────────────────────────────────────── */
.bg-wrapper {
  position: fixed;
  inset: 0;
  perspective: 900px;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 93%;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

/* ── Top nav ─────────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 4%;
  right: 3%;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.top-nav-links {
  display: flex;
  gap: 1.4em;
  align-items: center;
}

.menu-header {
  display: none;
}

.top-nav-links a {
  color: rgba(255, 32, 32, 0.5);
  font-family: var(--font);
  font-size: clamp(7px, 0.9vw, 11px);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 6px  rgba(255, 32, 32, 0.5),
    0 0 14px rgba(200, 0, 0, 0.3);
  transition: color 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
}

.top-nav-links a:hover {
  color: rgba(255, 32, 32, 0.95);
  text-shadow:
    0 0 8px  var(--red),
    0 0 18px var(--red-mid),
    0 0 35px var(--red-glow),
    0 0 55px var(--red-deep);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 32, 32, 0.7);
  box-shadow: 0 0 6px rgba(255, 32, 32, 0.5), 0 0 14px rgba(255, 32, 32, 0.3);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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


.cart-link {
  color: rgba(255, 32, 32, 0.5);
  font-size: clamp(11px, 1.2vw, 15px);
  text-decoration: none;
  text-shadow:
    0 0 6px  rgba(255, 32, 32, 0.5),
    0 0 14px rgba(200, 0, 0, 0.3);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cart-link:hover {
  color: rgba(255, 32, 32, 0.95);
  text-shadow:
    0 0 8px  var(--red),
    0 0 18px var(--red-mid),
    0 0 35px var(--red-glow);
}

.cart-text { display: none; }

.menu-footer {
  display: none;
}

/* ── Logo ────────────────────────────────────────────────── */
.logo-wrapper {
  position: fixed;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: transform 0.12s ease-out;
}

.logo-link {
  display: block;
  line-height: 0;
}

.logo {
  display: block;
  width: 24vw;
  height: auto;
  user-select: none;
  opacity: 0.93;
  transform: scale(1.1);
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.65));
  transition: transform 0.2s ease-out, filter 0.2s ease-out, opacity 0.2s ease-out;
}

.logo:hover {
  transform: scale(1.17);
  opacity: 1;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.75));
}

/* ── Bottom section ──────────────────────────────────────── */
.bottom-section {
  position: fixed;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%) perspective(500px) rotateX(10deg) scaleX(1.07);
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55em;
  will-change: transform;
  transition: transform 0.12s ease-out;
}

/* ── Hotline ─────────────────────────────────────────────── */
.hotline {
  display: block;
  text-align: center;
  color: var(--red);
  font-family: var(--font);
  font-size: clamp(9px, 1.3vw, 15px);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0.6;
  text-shadow:
    1px 1px 0 var(--red-dark),
    2px 2px 0 var(--red-deeper),
    3px 3px 5px rgba(0, 0, 0, 0.7),
    0 0 8px  var(--red),
    0 0 18px var(--red-mid),
    0 0 35px var(--red-glow),
    0 0 60px var(--red-deep);
  animation: neon-flicker 6s infinite;
  user-select: text;
  cursor: text;
}

.hotline::selection,
.hotline *::selection {
  background-color: var(--red);
  color: #000;
}

.hotline:hover {
  animation: neon-hover-flicker 0.22s infinite;
}

.oway-o {
  font-style: italic;
}

/* ── Instagram nav ───────────────────────────────────────── */
.insta-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.insta-nav a {
  color: rgba(255, 32, 32, 0.45);
  font-size: clamp(12px, 1.2vw, 16px);
  text-decoration: none;
  text-shadow:
    0 0 6px  rgba(255, 32, 32, 0.5),
    0 0 14px rgba(200, 0, 0, 0.35);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.insta-nav a:hover {
  color: rgba(255, 32, 32, 0.95);
  text-shadow:
    0 0 8px  var(--red),
    0 0 18px var(--red-mid),
    0 0 35px var(--red-glow),
    0 0 55px var(--red-deep);
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes scanline {
  from { top: -3px; }
  to   { top: 100vh; }
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes neon-flicker {
  0%, 17%, 19%, 22%, 51%, 55%, 100% {
    opacity: 0.6;
    text-shadow:
      1px 1px 0 var(--red-dark),
      2px 2px 0 var(--red-deeper),
      3px 3px 5px rgba(0, 0, 0, 0.7),
      0 0 8px  var(--red),
      0 0 18px var(--red-mid),
      0 0 35px var(--red-glow),
      0 0 60px var(--red-deep);
  }
  18%, 21% {
    opacity: 0.1;
    text-shadow: none;
  }
  53% {
    opacity: 0.3;
    text-shadow: 0 0 4px var(--red);
  }
}

@keyframes neon-hover-flicker {
  0%, 85%, 100% {
    opacity: 0.75;
    text-shadow:
      1px 1px 0 var(--red-dark),
      2px 2px 0 var(--red-deeper),
      0 0 8px  var(--red),
      0 0 18px var(--red-mid),
      0 0 35px var(--red-glow),
      0 0 60px var(--red-deep);
  }
  87%, 92% {
    opacity: 0.08;
    text-shadow: none;
  }
  89% {
    opacity: 0.45;
    text-shadow: 0 0 4px var(--red);
  }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body         { animation: none; }
  body::after  { animation: none; }
  .hotline     { animation: none; opacity: 0.6; }
  .top-nav-links { transition: none; }
}

/* ── Mobile portrait only (landscape falls back to desktop) ── */
@media (max-width: 767px) and (orientation: portrait) {
  /* Prevent .top-nav from becoming a containing block for the fixed panel */
  .top-nav {
    will-change: auto;
  }

  /* Contain the background image to a small centered box, overflow:hidden clips border lines */
  .bg-wrapper {
    inset: 33% 15%;
  }

  .hamburger {
    display: flex;
  }

  .top-nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60vw;
    max-width: 240px;
    background: #000;
    border-left: 1px solid rgba(255, 32, 32, 0.45);
    box-shadow:
      -4px 0 30px rgba(255, 32, 32, 0.08),
      inset 0 0 60px rgba(255, 32, 32, 0.03);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.8rem;
    padding: 2.5rem 1.8rem;
    z-index: 105;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateX(105%);
    transition:
      transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      opacity   0.26s ease,
      visibility 0s linear 0.32s;
  }

  /* CRT scanlines inside the panel */
  .top-nav-links::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(0, 0, 0, 0.12) 4px
    );
    pointer-events: none;
    z-index: 0;
  }

  /* Inner border frame */
  .top-nav-links::after {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid rgba(255, 32, 32, 0.08);
    pointer-events: none;
    z-index: 0;
  }

  .top-nav.open .top-nav-links {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition:
      transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      opacity   0.26s ease,
      visibility 0s linear 0s;
  }

  .menu-header {
    display: block;
    font-family: var(--font);
    font-size: clamp(6px, 2.2vw, 9px);
    color: rgba(255, 32, 32, 0.35);
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
  }

  .menu-cursor {
    animation: cursor-blink 1s step-end infinite;
  }

  .top-nav-links a {
    font-size: clamp(10px, 3.2vw, 14px);
    position: relative;
    z-index: 1;
    padding-left: 1.4em;
  }

  .top-nav-links a::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--red);
    opacity: 0;
    transition: opacity 0.12s ease;
    text-shadow:
      0 0 6px var(--red),
      0 0 14px var(--red-mid);
  }

  .top-nav-links a:hover::before {
    opacity: 1;
  }

  .top-nav.open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .top-nav.open .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .top-nav.open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .bottom-section {
    display: contents;
  }

  .hotline {
    position: fixed;
    top: 7%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) scaleX(1.07);
    font-size: clamp(6px, 2.5vw, 11px);
  }

  .insta-nav {
    position: fixed;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    justify-content: center;
    gap: 1.8em;
  }

  .logo {
    width: 40vw;
  }

  .logo:hover {
    transform: scale(1.05);
  }

  .cart-text { display: inline; font-family: var(--font); font-size: clamp(10px, 3.2vw, 14px); }
  .cart-icon { display: none; }

  .cart-link {
    position: relative;
    z-index: 1;
    padding-left: 1.4em;
  }

  .cart-link::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--red);
    opacity: 0;
    transition: opacity 0.12s ease;
    text-shadow: 0 0 6px var(--red);
  }

  .cart-link:hover::before { opacity: 1; }

  .menu-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    font-family: var(--font);
    font-size: clamp(4px, 1.8vw, 6px);
    position: absolute;
    bottom: 1.2rem;
    left: 1.8rem;
    right: 1.8rem;
    z-index: 1;
  }

  .menu-footer a {
    color: rgba(255, 32, 32, 0.28);
    text-decoration: none;
    text-shadow: 0 0 4px rgba(255, 32, 32, 0.25);
    transition: color 0.2s ease;
  }

  .menu-footer a:hover { color: rgba(255, 32, 32, 0.65); }

  .menu-footer .sep {
    color: rgba(255, 32, 32, 0.18);
  }
}

