/* PPCO Prototype — Artistic Landing Page */

:root {
  /* Base palette (cosmic gold) */
  --bg: #0a0a0f;
  --bg-secondary: #1a1a2e;
  --accent: #fbbf24;
  --accent-secondary: #f97316;
  --text: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.7);

  /* Palette variations for scroll/hover */
  --meteor-orange: #f97316;
  --deep-ember: #ef4444;
  --aurora-teal: #14b8a6;
  --cosmic-purple: #a855f7;
}

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

/* Disable text selection highlights */
::selection {
  background: transparent;
}

::-moz-selection {
  background: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'VT323', 'Courier New', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* Hide default cursor on interactive elements */
a, button, .interactive {
  cursor: none;
}

*, *::before, *::after {
  cursor: none !important;
}

/* ========== BACKGROUND LAYERS ========== */

.bg-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bg-layer svg,
.bg-layer canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#nebula-canvas {
  position: absolute;
  inset: 0;
  filter: brightness(1.1);
}

.bg-nebula { z-index: -10; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; overflow: visible; }
.bg-stars { z-index: -5; }
.bg-orbitals { z-index: -3; }

/* ========== CUSTOM CURSOR ========== */

.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-30%, -5%);
  opacity: 0;
  transition: opacity 0.3s ease;
  background-image: url('../assets/cursor-hand-states.png');
  background-position: left center;
  background-size: 200% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.cursor.grabbing {
  background-position: right center;
}

body:hover .cursor {
  opacity: 1;
}

.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

/* ========== LOADING SCREEN (Harry Design style - binary counter) ========== */

/* Dot-matrix LED font simulation */
@font-face {
  font-family: 'DotMatrix';
  src: local('Courier New');
}

body.loading-active {
  overflow: hidden;
  height: 100vh;
}

.loading {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.loading-binary {
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  gap: 0.2em;
  /* Subtle gold glow */
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.6),
    0 0 10px rgba(251, 191, 36, 0.3),
    0 0 20px rgba(251, 191, 36, 0.1);
}

.binary-digit {
  display: inline-block;
  min-width: 0.65em;
  text-align: center;
  opacity: 0;
}

.loading-text {
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-top: 0.8rem;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
  text-align: center;
}

.loading-bar-container {
  width: clamp(180px, 30vw, 280px);
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 1rem;
}

.loading-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.6), rgba(255, 255, 255, 0.8));
  transform-origin: left;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* START GAME button */
.start-game {
  display: none;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: none;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: blink-text 1s step-end infinite;
  padding: 1rem 2rem;
}

.start-game .start-arrow {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  font-size: 1.3em;
  display: inline-block;
  margin-left: 0.15em;
  transform: translateY(-0.15em);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.start-game:hover {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  animation: none;
}

.start-game:hover .start-arrow {
  color: #ef4444;
  text-shadow:
    0 0 10px #ef4444,
    0 0 25px rgba(239, 68, 68, 0.8),
    0 0 50px rgba(239, 68, 68, 0.5);
}

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

/* ========== SLIDE SECTIONS ========== */

.slide {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  overflow: hidden;
}

/* Section-specific palettes (applied via JS) */
.slide[data-palette="gold"] {
  --accent: #fbbf24;
}

.slide[data-palette="orange"] {
  --accent: #f97316;
}

.slide[data-palette="ember"] {
  --accent: #ef4444;
}

.slide[data-palette="teal"] {
  --accent: #14b8a6;
}

/* ========== TYPOGRAPHY (Pixel Style) ========== */

.headline {
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: clamp(0.7rem, 3.2vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-transform: uppercase;
  max-width: 90vw;
  /* Glowing outline effect — lightest blue from PPCO logo */
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
  text-shadow:
    0 0 10px rgba(184, 220, 232, 0.5),
    0 0 20px rgba(184, 220, 232, 0.3),
    0 0 40px rgba(184, 220, 232, 0.2);
}

/* CTA slide headline - same size as hero */
.slide-cta .headline {
  font-size: clamp(0.7rem, 3.2vw, 2.5rem);
}

/* Small headline variant for Portfolio/FAQ */
.headline.small {
  font-size: clamp(0.6rem, 2.5vw, 1.8rem);
  margin-bottom: 1.5rem;
}

.headline.filled {
  color: var(--text);
  -webkit-text-stroke: none;
}

.headline .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100px);
}

.subtext {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1rem, 3.2vw, 2.4rem);
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.subtext-second {
  margin-top: 0;
  margin-bottom: 2rem;
}

.subtext .word {
  display: inline-block;
  opacity: 0;
}

/* ========== TYPEWRITER EFFECT ========== */

.typewriter {
  font-family: 'VT323', 'Courier New', monospace;
  display: inline;
  overflow: hidden;
}

.typewriter-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
}

.typewriter-cursor {
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  background: var(--text);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.7s step-end infinite;
}

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

.typewriter-char {
  display: inline;
  opacity: 0;
}

.typewriter-char.visible {
  opacity: 1;
}

/* Quote style for Problem section */
.quote {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1rem, 3.2vw, 2.4rem);
  font-style: normal;
  color: var(--text);
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.quote .line {
  display: block;
  opacity: 0;
  transform: translateX(-30px);
  min-height: 1.2em; /* Ensure spacer lines have height */
}

/* Feature list for Offer section */
.features {
  --indent: 2.5rem;
  list-style: none;
  text-align: left;
  max-width: 650px;
  margin: 2rem 0;
}

.features li {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  padding: 0.75rem 0;
  padding-left: var(--indent);
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  letter-spacing: 0.03em;
}

.features li::before {
  content: '✳';
  color: var(--accent);
  font-family: 'Press Start 2P', system-ui, monospace;
  font-size: 0.6em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.features li:not(.feature-desc) {
  font-weight: bold;
  color: var(--text);
}

.features li.feature-desc {
  color: var(--text-muted);
  padding-top: 0.25rem;
  padding-bottom: 1.25rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-left: 0;
}

.features li.feature-desc::before {
  content: none;
  display: none;
}

/* ========== LASER SCAN REVEAL ========== */

.laser-reveal {
  position: relative;
  display: block;
}

.laser-reveal .laser-content {
  clip-path: inset(0 100% 0 0);
  transition: none;
}

.laser-reveal .laser-content.revealed {
  clip-path: inset(0 0 0 0);
}

.laser-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 15%,
    #ffffff 35%,
    var(--accent) 50%,
    #ffffff 65%,
    rgba(255, 255, 255, 0.4) 85%,
    transparent 100%
  );
  box-shadow:
    0 0 15px var(--accent),
    0 0 30px var(--accent),
    0 0 50px rgba(255, 255, 255, 0.6),
    5px 0 20px rgba(255, 255, 255, 0.3);
  opacity: 0;
  pointer-events: none;
}

/* Ensure laser works with feature items */
.features li.laser-reveal .laser-content {
  display: inline;
}

.features li.laser-emboss {
  position: relative;
}

/* ========== LASER EMBOSS EFFECT ========== */

.laser-emboss-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 40px rgba(255,255,255,0.8);
  pointer-events: none;
  z-index: 10;
}

.emboss-wrapper {
  display: inline;
}

.emboss-char {
  opacity: 0.1;
  transition: color 60ms ease, text-shadow 60ms ease;
  display: inline;
}

.emboss-char[data-state="burning"] {
  color: #fff;
  text-shadow: 0 0 20px #fff, 0 0 30px #fff;
  opacity: 1;
}

.emboss-char[data-state="hot"] {
  color: #fbbf24;
  text-shadow: 0 0 12px #fbbf24;
  opacity: 1;
}

.emboss-char[data-state="warm"] {
  color: #f97316;
  text-shadow: 0 0 8px #f97316;
  opacity: 1;
}

.emboss-char[data-state="cooling"] {
  color: #ef4444;
  text-shadow: 0 0 6px #ef4444;
  opacity: 1;
}

.emboss-char[data-state="settled"] {
  opacity: 1;
  color: var(--text-muted);
  text-shadow: none;
}

.emboss-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px #fff, 0 0 8px #fbbf24;
  pointer-events: none;
}

.footnote {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1.4rem;
  color: var(--text-muted);
  text-align: left;
  margin-top: 2.5rem;
  padding-left: 2.5rem;
  opacity: 0; /* Hidden until animated */
}

/* ========== PORTFOLIO GRID ========== */

/* Portfolio slide uses default centering */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
  width: 85vw;
  max-width: 900px;
  height: 60vh;
  margin: 2rem auto;
  padding: 0 1rem;
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-item {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  transition: border-color 0.2s ease;
  cursor: none;
  display: flex;
  flex-direction: column;
}

.portfolio-item:hover {
  border-color: #ffffff;
}

.portfolio-item:hover .portfolio-label {
  color: #ffffff;
}

.portfolio-item:hover .portfolio-thumb::after {
  border-color: rgba(255, 255, 255, 0.4);
  width: 1.9rem;
  height: 1.9rem;
  animation: diamond-spin 0.75s linear infinite;
}

@keyframes diamond-spin {
  from { transform: translate(-50%, -50%) rotate(45deg); }
  to { transform: translate(-50%, -50%) rotate(405deg); }
}

.portfolio-item.placeholder {
  cursor: none;
}

.portfolio-thumb {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: linear-gradient(
    135deg,
    rgba(20, 184, 166, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(251, 191, 36, 0.1) 100%
  );
  position: relative;
}

.portfolio-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 4px
  );
}

.portfolio-thumb::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.4rem;
  height: 1.4rem;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  transition: border-color 0.2s ease, width 0.3s ease, height 0.3s ease;
}

.portfolio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-muted);
  text-align: center;
  padding: 0.4rem 0.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

/* ========== FAQ ACCORDION ========== */

.faq-list {
  --indent: 2.5rem;
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateX(-20px);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  text-align: left;
  padding: 1.25rem 0;
  padding-left: var(--indent);
  position: relative;
  cursor: none;
  transition: color 0.2s ease;
}

.faq-question::before {
  content: '>';
  color: #ef4444;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question::before {
  transform: translateY(-50%) rotate(90deg);
}

.faq-question:hover {
  color: #ef4444;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-family: 'VT323', monospace;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: var(--indent);
}

/* ========== CTA BUTTON ========== */

.cta {
  display: inline-block;
  padding: 1rem 2rem;
  margin-top: 4rem;
  opacity: 0;
  background: transparent;
  color: #ffffff;
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-weight: 400;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.2s ease, border-color 0.3s ease, color 0.3s ease;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
}

.cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cta:hover .cta-glow {
  animation-play-state: paused;
}

.cta:active::before,
.cta.filling::before {
  transform: scaleX(1);
  transition: transform 1.2s ease-out;
}

.cta:active,
.cta.filling {
  color: var(--bg);
  border-color: var(--accent);
}

.cta-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent));
  border-radius: 6px;
  opacity: 0;
  filter: blur(15px);
  z-index: -2;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* Meteor on CTA hover */
.cta-meteor {
  position: absolute;
  top: 50%;
  left: -100px;
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: translateY(-50%) rotate(-15deg);
  opacity: 0;
  pointer-events: none;
}

/* ========== LOGO ========== */

.logo-img {
  width: clamp(96px, 16vw, 160px);
  height: auto;
  opacity: 0;
  filter: blur(0.4px) drop-shadow(0 0 4px rgba(248, 250, 252, 0.2)) drop-shadow(0 0 12px rgba(248, 250, 252, 0.08));
}

.logo-container {
  margin-top: 6rem;
}

/* ========== PROGRESS INDICATOR ========== */

.progress {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.progress-track {
  width: 2px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.progress-dot {
  position: absolute;
  left: -3px;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  transition: top 0.3s ease;
}

/* ========== NAVIGATION ========== */

.nav {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3rem;
  z-index: 100;
}

/* Liquid glass effect - only on subpages */
.nav.nav-glass {
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  justify-content: center;
  padding: 1.5rem 2rem;
  background: rgba(10, 10, 15, 0.35);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav a {
  font-family: 'Press Start 2P', 'VT323', monospace;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.nav a:hover::after {
  width: 100%;
}

/* Current page underline */
.nav a.active {
  color: var(--text);
}

.nav a.active::after {
  width: 100%;
}

/* ========== CRT SCANLINES EFFECT ========== */

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
}

.crt-overlay canvas {
  width: 100%;
  height: 100%;
}

/* Brief flicker on section change */
.crt-overlay.flicker {
  animation: crt-flicker 0.15s ease-out;
}

@keyframes crt-flicker {
  0% { opacity: 0.6; }
  25% { opacity: 1; }
  50% { opacity: 0.7; }
  75% { opacity: 1; }
  100% { opacity: 1; }
}

/* Scan line sweep effect */
.crt-scanline {
  position: fixed;
  left: -50vw;
  width: 200vw;
  height: 4px;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 20%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 80%,
    transparent 100%
  );
  opacity: 0;
  top: -4px;
}

/* ========== VIGNETTE OVERLAY ========== */

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.4) 65%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

/* ========== FRAME BORDER (color scheme hover) ========== */

.frame-border {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9992;
  border: 6px solid transparent;
  opacity: 0;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.frame-border.active {
  opacity: 1;
}

.frame-border[data-scheme="articles"] {
  border-color: var(--cosmic-purple);
  box-shadow: inset 0 0 80px rgba(168, 85, 247, 0.2);
}

.frame-border[data-scheme="about"] {
  border-color: var(--aurora-teal);
  box-shadow: inset 0 0 80px rgba(20, 184, 166, 0.2);
}

.frame-border[data-scheme="contact"] {
  border-color: var(--deep-ember);
  box-shadow: inset 0 0 80px rgba(239, 68, 68, 0.2);
}

/* Article-specific color schemes */
.frame-border[data-scheme="article-discovery"] {
  border-color: #f97316;
  box-shadow: inset 0 0 80px rgba(249, 115, 22, 0.2);
}

.frame-border[data-scheme="article-mvp"] {
  border-color: #06b6d4;
  box-shadow: inset 0 0 80px rgba(6, 182, 212, 0.2);
}

.frame-border[data-scheme="article-maintenance"] {
  border-color: #22c55e;
  box-shadow: inset 0 0 80px rgba(34, 197, 94, 0.2);
}

.frame-border[data-scheme="article-tokens"] {
  border-color: #a855f7;
  box-shadow: inset 0 0 80px rgba(168, 85, 247, 0.2);
}

.frame-border[data-scheme="article-taste"] {
  border-color: #ec4899;
  box-shadow: inset 0 0 80px rgba(236, 72, 153, 0.2);
}

/* ========== STAR PROXIMITY GLOW ========== */

.star-hover {
  /* filter controlled by JS for proximity-based intensity */
  fill: #fff !important;
  transition: filter 0.2s ease, fill 0.2s ease;
}

.star-outline {
  stroke: var(--accent);
  stroke-width: 0.5;
  stroke-opacity: 0.8;
}

/* Star click - handled via GSAP radius animation */

/* ========== METEORS ========== */

.meteor {
  opacity: 0;
  will-change: stroke-dashoffset, opacity;
}

/* ========== NOISE TEXTURE OVERLAY ========== */

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor, .cursor-trail {
    display: none;
  }

  .progress {
    display: none;
  }

  .nav {
    padding: 1rem;
    gap: 1.5rem;
  }

  .nav a {
    font-size: 0.5rem;
  }

  .slide {
    padding: 1rem;
  }

  .features li {
    font-size: 1rem;
  }

  .faq-question {
    font-size: clamp(1rem, 3vw, 1.4rem);
  }

  .faq-answer p {
    font-size: 1rem;
  }

  .footnote {
    font-size: 1rem;
  }

  .cta {
    font-size: 0.6rem;
  }

  .logo-container {
    max-width: 70vw;
  }
}

/* ========== BACK TO TOP BUTTON ========== */

.mute-btn {
  position: fixed;
  bottom: 108px;
  right: calc(54px + 48px + 1em);
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.mute-btn.visible {
  opacity: 1;
  visibility: visible;
}

.mute-btn:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.mute-btn.muted {
  border-color: rgba(239, 68, 68, 0.5);
  color: rgba(239, 68, 68, 0.7);
}

.mute-btn.muted:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.star-counter {
  position: fixed;
  bottom: 108px;
  right: calc(54px + 48px + 1em + 48px + 1em);
  height: 48px;
  display: flex;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  white-space: nowrap;
}

.star-counter.visible,
.star-counter.stars-depleted {
  opacity: 1;
  visibility: visible;
}

.star-counter-num {
  color: #ef4444;
  font-weight: bold;
}

.back-to-top {
  position: fixed;
  bottom: 108px;
  right: 54px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* ========== TYPEWRITER CURSOR ========== */

.typewriter-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: #ffffff;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.6s step-end infinite;
}

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

/* ========== HUD CORNER BRACKETS ========== */

.hud-brackets {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9993;
}

.hud-bracket {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
  border-radius: 3px;
  opacity: 0.2;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.hud-brackets.hud-active .hud-bracket {
  opacity: 0.85;
}

.hud-bracket--tl {
  top: 18px;
  left: 18px;
  border-top-width: 3px;
  border-left-width: 3px;
}

.hud-bracket--tr {
  top: 18px;
  right: 18px;
  border-top-width: 3px;
  border-right-width: 3px;
}

.hud-bracket--bl {
  bottom: 72px;
  left: 18px;
  border-bottom-width: 3px;
  border-left-width: 3px;
}

.hud-bracket--br {
  bottom: 72px;
  right: 18px;
  border-bottom-width: 3px;
  border-right-width: 3px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
