/* =============================================
   WorldWideWeb Entertainment
   style.css
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== CSS Variables ===== */
:root {
  --bg: #100d08;
  --accent: #FF0000;
  --accent-rgb: 255, 0, 0;
  --accent-light: #fff000;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.45);
  --border: rgba(0, 100, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.03);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Back to Portfolio Button ===== */
#back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 99999;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, opacity 0.4s ease;
}

#back-btn:hover {
  color: #f5c400;
  border-color: rgba(245, 196, 0, 0.5);
  background: rgba(245, 196, 0, 0.08);
}

/* ===== Page Loader ===== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #100d08;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 0.6s ease;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loader-logo {
  width: 500px;
  opacity: 0;
  transform: translateY(16px);
  animation: loader-in 0.7s ease 0.2s forwards;
}

#loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: loader-in 0.5s ease 0.5s forwards;
}

#loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  animation: loader-progress 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

@keyframes loader-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loader-progress {
  to {
    width: 100%;
  }
}

/* ===== CRT TV Bezel (SVG) ===== */
#crt-tv-bezel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8998;
  pointer-events: none;
  filter: drop-shadow(0 60px 120px rgba(0, 0, 0, 1)) drop-shadow(0 0 60px rgba(0, 0, 0, 0.9));
}

/* ===== CRT Screen Edge (vignette + glass glare) ===== */
#crt-screen-edge {
  position: fixed;
  top: 5vh;
  left: 5vw;
  right: 5vw;
  bottom: 14vh;
  z-index: 8997;
  pointer-events: none;
  background: linear-gradient(128deg,
      rgba(255, 255, 255, 0.045) 0%,
      rgba(255, 255, 255, 0.01) 18%,
      transparent 42%);
  box-shadow:
    inset 0 0 150px rgba(0, 0, 0, 0.88),
    inset 0 0 70px rgba(0, 0, 0, 0.55),
    inset 0 0 25px rgba(0, 0, 0, 0.3),
    inset 0 0 100px rgba(15, 40, 15, 0.08);
}

/* ===== Power LED ===== */
#crt-led {
  position: fixed;
  bottom: 5.6vh;
  left: calc(6.4vw - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1aee44;
  box-shadow: 0 0 5px #1aee44, 0 0 12px rgba(26, 238, 68, 0.6);
  z-index: 8999;
  pointer-events: none;
  animation: led-pulse 4s ease-in-out infinite;
}

@keyframes led-pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 5px #1aee44, 0 0 12px rgba(26, 238, 68, 0.6);
  }

  50% {
    opacity: 0.1;
    box-shadow: 0 0 0px #1aee44, 0 0 0px rgba(26, 238, 68, 0);
  }
}

/* ===== CRT Noise Canvas ===== */
#crt-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ===== CRT Overlay (scanlines + vignette + flicker) ===== */
#crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

#crt-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(0, 0, 0, 0.12) 4px);
}

#crt-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 48%, rgba(0, 0, 0, 0.72) 100%);
  animation: crt-flicker 6s infinite;
}

@keyframes crt-flicker {

  0%,
  88%,
  90%,
  94%,
  96%,
  100% {
    opacity: 1;
  }

  89% {
    opacity: 0.75;
  }

  95% {
    opacity: 0.85;
  }
}

/* ===== Chromatic Aberration on headings ===== */
.section-title,
.cta-title {
  text-shadow: -1px 0 rgba(255, 30, 30, 0.22), 1px 0 rgba(30, 30, 255, 0.22);
}

/* ===== Scroll Progress Bar ===== */

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 8vh;
  left: 6vw;
  right: 0;
  z-index: 1000;
  overflow: visible;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar.nav-scrolled {
  top: 7vh;
  left: 0;
  z-index: 1000;
  pointer-events: auto;
}

#navbar.nav-scrolled .nav-inner {
  max-width: 800px;
  max-height: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 100px;
  padding: 0px 60px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#navbar.nav-scrolled .nav-logo img {
  max-height: 100px;
  max-width: 150px;
}

.nav-logo img {
  top: 0;
  width: 350px;
  display: block;
}

.nav-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 16px;
}

#navbar.nav-scrolled .nav-links {
  display: flex;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #f5c400;
}

.nav-links .nav-cta {
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 8px 20px;
  border-radius: 100px;
  transition: all 0.2s ease;
}

.nav-links .nav-cta:hover {
  color: #f5c400;
  border-color: rgba(245, 196, 0, 0.6);
  background: rgba(245, 196, 0, 0.08);
}

/* ===== Hero ===== */
#hero {
  position: relative;
  height: 100vh;
  z-index: 1;
  overflow: visible;
}

/* ===== Web Nav Links (positioned at web endpoints) ===== */
.web-nav-link {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -50%);
  color: var(--text);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  white-space: nowrap;
}

.web-nav-link:hover {
  color: #f5c400;
  border-color: rgba(245, 196, 0, 0.6);
  background: rgba(245, 196, 0, 0.08);
  transform: translate(-50%, -50%) scale(1.08);
}

.web-nav-cta {
  border-color: rgba(60, 120, 255, 0.4);
  color: #6ea8ff;
}

#webCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: absolute;
  bottom: 28vh;
  left: 8vw;
  z-index: 2;
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-title {
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
  max-width: 700px;
}

.accent-text {
  color: var(--accent);
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.85s forwards;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  transition: gap 0.3s ease;
}

.scroll-hint:hover {
  gap: 18px;
}

.scroll-hint span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-2);
  letter-spacing: 2px;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.scroll-hint:hover span {
  color: #f5c400;
  letter-spacing: 3px;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: rotate(45deg) translateY(-3px);
  animation: bounce 1.6s ease-in-out infinite;
  transition: border-color 0.3s ease;
}

.scroll-hint:hover .scroll-arrow {
  border-color: #f5c400;
}

@keyframes bounce {

  0%,
  100% {
    transform: rotate(45deg) translateY(-3px);
  }

  50% {
    transform: rotate(45deg) translateY(3px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Section Reveal ===== */
.content-section {
  position: relative;
  z-index: 1;
  padding: 120px 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.content-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.glass-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.glass-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Section Layout ===== */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 480px;
}

/* ===== Features (Glass Cards) ===== */
#features {
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.02), transparent);
}

.glass-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  transform: translateY(-4px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.card-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent), 0.2;
  color: var(--accent);
  border: 1px solid var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.glass-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.glass-card p {
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.card-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  background: (var(--accent), .02);
  border: px solid var(--accent);
  border-radius: 30px;
  padding: 4px 10px;
}

/* ===== Stats ===== */
#specs {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.03), transparent);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 48px;
  text-align: center;
}


.spec-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}

.spec-number.counting {
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.5);
}

.spec-label {
  font-size: 0.85rem;
  color: var(--text-2);
  display: block;
}

/* ===== CTA Section ===== */
#cta {
  position: relative;
  z-index: 1;
}

.cta-box {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 440px;
  margin: 0 auto 40px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0a;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 36px;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-block;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 36px;
  border-radius: 100px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.05);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 0px 48px 18vh;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  height: 200px;
  width: auto;
  margin: 0 auto 8px auto;
  display: block;
  opacity: 0.8;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-2);
  font-size: 0.78rem;
}

/* ===== Red → Gold hover on accent-colored text ===== */
.hero-eyebrow,
.section-label,
.accent-text,
.card-badge,
.card-tags span,
.spec-number,
.cta-eyebrow,
.nav-links .nav-cta {
  transition: color 0.25s ease;
}

.hero-eyebrow:hover,
.section-label:hover,
.accent-text:hover,
.card-badge:hover,
.card-tags span:hover,
.spec-number:hover,
.cta-eyebrow:hover,
.footer-brand-name:hover,
.nav-links .nav-cta:hover {
  color: #f5c400;
}

/* ===== Contact Form ===== */
.contact-grid {
  max-width: 700px;
}

.contact-card {
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-2);
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  resize: none;
  transition: border-color 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(60, 120, 255, 0.4);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-2);
}

.contact-submit {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

/* ===== Responsive Viewports ===== */

/* Laptop Viewport (max 1440px) */
@media (max-width: 1440px) {
  .nav-logo img {
    width: 320px;
  }

  .section-inner,
  .gallery-container {
    padding: 0 60px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 600px;
  }

  .specs-grid {
    padding: 80px 60px;
    gap: 30px;
  }

  .nav-inner {
    padding: 12px 30px;
  }

  #navbar.nav-scrolled .nav-inner {
    padding: 0px 40px;
  }
}

/* Tablet Viewport (max 1024px) */
@media (max-width: 1024px) {
  .nav-logo img {
    width: 280px;
  }

  .glass-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-inner,
  .gallery-container {
    padding: 0 40px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .nav-links .nav-cta {
    padding: 8px 16px;
  }

  .spec-number {
    font-size: 2.8rem;
  }

  .cta-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }

  .cta-box {
    padding: 60px 40px;
  }

  .footer-links {
    gap: 20px;
  }
}

/* Mobile Viewport (max 768px) */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  /* Hide sticky nav links on mobile — handled by web buttons */
  .nav-links {
    display: none;
  }

  /* Logo strictly positioned in center of hero matching the web hub */
  #navbar {
    position: absolute;
    top: 32vh;
    left: 0;
    right: 0;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable nav scrolling changes on mobile so logo stays put UNTIL scrolled */
  #navbar.nav-scrolled {
    position: fixed;
    top: 3vh;
  }

  #navbar.nav-scrolled .nav-inner {
    max-height: 36px;
    padding: 0px 24px;
    width: 80%;
    margin: 0 auto;
  }

  #navbar.nav-scrolled .nav-logo img {
    height: 52px;
    width: 52px;
  }

  #navbar.nav-scrolled .nav-links a {
    font-size: 0.65rem;
  }

  #navbar.nav-scrolled .nav-links .nav-cta {
    padding: 4px 10px;
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .nav-inner {
    justify-content: center;
    padding: 8px 20px;
  }

  .nav-logo img {
    width: clamp(200px, 72vw, 340px);
    pointer-events: none !important;
    cursor: default !important;
  }

  /* Smaller landing buttons in a radial triangle around the logo */
  .web-nav-link {
    font-size: 0.62rem !important;
    padding: 7px 14px !important;
    letter-spacing: 1.5px !important;
  }

  /* Positions are set dynamically by JS (section 3 in script.js) */

  /* Hide the CRT bezel on mobile */
  #crt-tv-bezel,
  #crt-screen-edge,
  #crt-led {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.4rem, 10vw, 3.8rem);
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 60px 24px;
    gap: 28px;
    text-align: center;
  }

  .spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .spec-item:last-child {
    grid-column: span 2;
  }

  .spec-number {
    font-size: 2.6rem;
  }

  .glass-grid {
    grid-template-columns: 1fr;
  }

  .section-inner {
    padding: 0 24px;
  }

  .content-section {
    padding: 80px 0;
  }

  .cta-box {
    padding: 50px 28px;
  }

  footer {
    padding: 0px 24px 18vh;
  }

  .footer-links {
    gap: 20px;
    flex-wrap: wrap;
  }
}

/* ===== 360px viewport ===== */
@media (max-width: 360px) {

  #navbar {
    top: 18vh;
  }

}

/* ===== 412px viewport (Galaxy S-series) ===== */
@media (max-width: 430px) {

  body, #hero {
    overflow-x: hidden;
  }

  .nav-logo img {
    width: clamp(180px, 68vw, 280px);
  }

  .web-nav-link {
    font-size: 0.58rem !important;
    padding: 6px 11px !important;
    letter-spacing: 1px !important;
  }

  .section-inner {
    padding: 0 16px;
  }

  .specs-grid {
    padding: 50px 16px;
    gap: 20px;
  }

  .spec-number {
    font-size: 2.2rem;
  }

  .cta-box {
    padding: 40px 20px;
  }

  .gallery-container {
    padding: 0 16px;
  }

  footer {
    padding: 0 16px 18vh;
  }
}

/* ===== Gallery & Carousels ===== */
.gallery-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
}

.carousel-section {
  position: relative;
  z-index: 4;
  margin-bottom: 80px;
}

.carousel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: #fff;
}

.carousel-caption h4 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.carousel-caption p {
  color: var(--text-2);
  margin-bottom: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.carousel-section:last-child {
  margin-bottom: 0px;
}

#gallery {
  padding-bottom: 20px;
}

#cta {
  padding-top: 40px;
  scroll-margin-top: 25vh;
}

#contact {
  padding-bottom: 40px;
}

#specs {
  scroll-margin-top: 35vh;
}

@media (min-width: 769px) {
  .web-nav-link[data-radial="10"] {
    margin-top: -30px;
  }
}

/* ===== Music Player Toggle ===== */
#music-player {
  position: fixed;
  bottom: 18vh;
  right: 7vw;
  z-index: 9000;
  display: none;
  /* Hidden on desktop, rely on CRT bezel buttons */
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#music-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 13, 8, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

#music-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 60%);
  pointer-events: none;
}

#music-toggle:hover {
  border-color: rgba(245, 196, 0, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 196, 0, 0.15);
}

#music-toggle.playing {
  border-color: rgba(245, 196, 0, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 196, 0, 0.2);
  animation: music-pulse 2s ease-in-out infinite;
}

@keyframes music-pulse {

  0%,
  100% {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 196, 0, 0.15);
  }

  50% {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 35px rgba(245, 196, 0, 0.3);
  }
}

.music-icon {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.eq-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.eq-bar:nth-child(1) {
  height: 6px;
}

.eq-bar:nth-child(2) {
  height: 10px;
}

.eq-bar:nth-child(3) {
  height: 14px;
}

.eq-bar:nth-child(4) {
  height: 8px;
}

.eq-bar:nth-child(5) {
  height: 12px;
}

/* Paused state — static bars */
#music-toggle:not(.playing) .eq-bar {
  animation: none;
}

/* Playing state — animated equalizer */
#music-toggle.playing .eq-bar {
  background: #f5c400;
}

#music-toggle.playing .eq-bar:nth-child(1) {
  animation: eq-bounce 0.45s ease-in-out infinite alternate;
  animation-delay: 0s;
}

#music-toggle.playing .eq-bar:nth-child(2) {
  animation: eq-bounce 0.55s ease-in-out infinite alternate;
  animation-delay: 0.1s;
}

#music-toggle.playing .eq-bar:nth-child(3) {
  animation: eq-bounce 0.4s ease-in-out infinite alternate;
  animation-delay: 0.15s;
}

#music-toggle.playing .eq-bar:nth-child(4) {
  animation: eq-bounce 0.5s ease-in-out infinite alternate;
  animation-delay: 0.05s;
}

#music-toggle.playing .eq-bar:nth-child(5) {
  animation: eq-bounce 0.48s ease-in-out infinite alternate;
  animation-delay: 0.2s;
}

@keyframes eq-bounce {
  0% {
    height: 4px;
  }

  100% {
    height: 18px;
  }
}

.music-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  pointer-events: none;
  transition: color 0.3s ease;
}

#music-toggle.playing~.music-label {
  color: rgba(245, 196, 0, 0.6);
}

/* Mobile adjustments for music player */
@media (max-width: 768px) {
  #music-player {
    display: flex;
    /* Turn it back on for touching */
    bottom: 24px;
    right: 24px;
  }

  #music-player.playing .mobile-controls {
    display: flex;
  }

  .mobile-controls {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
  }

  .sub-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 13, 8, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }

  .sub-btn:active {
    transform: scale(0.9);
    border-color: var(--accent);
  }

  #music-toggle {
    width: 42px;
    height: 42px;
  }

  .music-icon {
    height: 14px;
  }

  .eq-bar {
    width: 2.5px;
  }

  .music-label {
    font-size: 0.48rem;
  }
}

/* ===== CRT Button Interactability ===== */
#crt-tv-bezel text {
  user-select: none;
  -webkit-user-select: none;
}

#power-btn,
#vol-down,
#vol-up,
#ch-down,
#ch-up {
  transition: fill 0.1s ease;
}

#power-btn:active,
#vol-down:active,
#vol-up:active,
#ch-down:active,
#ch-up:active {
  fill: #443c30 !important;
}