/* Color system — tuned to logo palette (neon violet ↔ neon cyan on near-black) */
:root {
  --color-bg: #0b0d10;         /* Near-black vinyl */
  --color-surface: #10131a;    /* Panel */
  --color-text: #eaf1ff;       /* Primary text */
  --color-muted: #9aa7b6;      /* Muted text */
  --color-accent: #b36bff;     /* Neon violet */
  --color-accent-2: #18e7ff;   /* Neon cyan */
  --glow-strong: 0 0 24px rgba(179, 107, 255, 0.35), 0 0 48px rgba(24, 231, 255, 0.25);
}

* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  scroll-behavior: auto;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  background: radial-gradient(1200px 800px at 80% -10%, color-mix(in oklab, var(--color-accent-2) 22%, transparent) 0%, transparent 60%),
              radial-gradient(1000px 700px at 10% 110%, color-mix(in oklab, var(--color-accent) 18%, transparent) 0%, transparent 68%),
              var(--color-bg);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { min-height: 100%; }

.section {
  position: relative;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ===== SECTION 1: HERO ===== */
.section--hero {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Fade hero to pure black toward the bottom for seamless transition */
.section--hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 45%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #000 70%, #000 100%);
  pointer-events: none;
  z-index: 1;
}

.hero__backdrop {
  position: absolute;
  inset: -10%;
  background: radial-gradient(600px 600px at 50% 40%, rgba(255,255,255,0.02), transparent 60%);
  filter: blur(32px) saturate(105%);
  pointer-events: none;
}

.hero__portrait {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: none;
  transform-origin: right bottom;
  max-height: 100vh;
  max-width: 100vw;
  width: auto;
  height: 80%;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.7;
  z-index: 3;
  pointer-events: none;
  will-change: opacity;
}

.hero__title {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-size: clamp(2.8rem, 8vw + 1rem, 10rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  line-height: 0.95;
  text-shadow: 0 0 10px rgba(255,255,255,0.04), 0 0 24px rgba(23, 232, 255, 0.12);
  overflow: hidden;
}

.word { display: inline-flex; gap: 0.02em; align-items: baseline; }
.letter {
  position: relative;
  display: inline-block;
  font-weight: 800;
  color: var(--color-text);
  padding: 0 0.02em;
}
.letter::after {
  content: "";
  position: absolute;
  inset: -8% -8% -25% -8%;
  background: radial-gradient(220px 100px at 50% 90%, color-mix(in oklab, var(--color-accent) 70%, transparent) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(12px);
  z-index: -1;
}
.letter--space { width: 0.35em; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  opacity: 0.8;
}
.scroll-indicator .arrow { width: 20px; height: 20px; opacity: 0.9; }

/* ===== SECTION 2: TITLE SLIDE ===== */
.section--title-slide {
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#projects-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 800;
  color: var(--color-text);
  text-align: center;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(179, 107, 255, 0.3);
}

/* ===== SECTION 3: VIDEO ===== */
.section--video {
  height: 100vh;
  background: #000;
  position: relative;
  z-index: 3;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 20;
  text-align: right;
  color: var(--color-text);
  max-width: 400px;
}

.video-overlay h3 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.video-overlay p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-style: italic;
  opacity: 0.9;
  margin: 0;
}

/* ===== SECTION 4: CONTENT ===== */
.section--content {
  background: #000;
  padding: 2rem 1.25rem;
  min-height: 100vh;
  z-index: 4;
}

.container { max-width: 1100px; margin: 0 auto; }

/* Beats visualization */
.beats__root { 
  display: grid; 
  gap: 1rem; 
  justify-items: center; 
}

.beats__svg { 
  width: min(100%, 1200px); 
  height: auto; 
  display: block; 
  margin-inline: auto; 
  margin-top: clamp(2rem, 4vw, 4rem); 
}

.beat-baseline { 
  fill: color-mix(in oklab, var(--color-accent-2) 25%, black 75%); 
  opacity: 0.75; 
}

/* Colors for intensities */
.intensity-1 { fill: #a2a9b3; } /* grey */
.intensity-2 { fill: #6aa7ff; } /* blue */
.intensity-3 { fill: #3df06a; } /* green */
.intensity-4 { fill: #fff661; } /* yellow */
.intensity-5 { fill: #ff2a2a; } /* red */

/* Soft shimmer sweep over the bars */
.beats__svg { 
  position: relative; 
  overflow: visible; 
}

.beats__svg::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -20%; right: -20%;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.14) 50%, transparent 60%);
  mix-blend-mode: screen;
  animation: beatsShimmer 4s linear infinite;
  pointer-events: none;
}

@keyframes beatsShimmer {
  0% { transform: translateX(-30%); opacity: 0; }
  10% { opacity: 0.25; }
  50% { transform: translateX(30%); opacity: 0.25; }
  60% { opacity: 0; }
  100% { transform: translateX(60%); opacity: 0; }
}

/* Mobile Zone Cards */
.zone-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: min(100%, 1200px);
  margin: 0 auto;
}

.zone-card {
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.zone-card__title {
  font-size: 12px;
  line-height: 1.1;
}

.zone-card__subtitle {
  font-size: 12px;
  opacity: 0.95;
}

/* Fixed spinning logo */
.site-logo-link {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.site-logo-link:hover {
  transform: scale(1.1);
}

.site-logo {
  width: clamp(72px, 12vw, 126px);
  height: auto;
  filter: drop-shadow(0 0 18px color-mix(in oklab, var(--color-accent-2) 45%, transparent));
  animation: spinRecord 18s linear infinite;
  will-change: transform;
}

@keyframes spinRecord {
  to { transform: rotate(360deg); }
}

/* Neon flash glow inside each letter */
.glow {
  position: absolute;
  inset: -15% -10% -35% -10%;
  background: radial-gradient(180px 80px at 50% 85%, color-mix(in oklab, var(--color-accent) 80%, white 0%) 0%, transparent 70%);
  filter: blur(10px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* Shimmer sweep over the title */
.title-shimmer {
  position: absolute;
  top: 0; bottom: 0; left: -20%; right: -20%;
  background: linear-gradient(105deg,
    transparent 45%,
    color-mix(in oklab, var(--color-text) 12%, transparent) 50%,
    color-mix(in oklab, var(--color-accent-2) 90%, white 0%) 53%,
    transparent 58%
  );
  mix-blend-mode: screen;
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 1;
}

/* Contact Footer */
.contact-footer {
  background: #000;
  padding: 3rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.contact-text {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.contact-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-link:hover {
  color: var(--color-accent-2);
  text-shadow: 0 0 8px rgba(24, 231, 255, 0.4);
}

.contact-link:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Accessibility: focus styles */
:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--color-accent) 60%, white 0%);
  outline-offset: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .hero__portrait { transition: none !important; }
  .site-logo { animation: none; }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  html, body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }
  
  .hero__title {
    font-size: clamp(2rem, 12vw + 0.5rem, 4.6rem);
    letter-spacing: 0.03em;
    line-height: 1.02;
    overflow: hidden;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    will-change: transform;
  }
  
  .site-logo-link {
    top: env(safe-area-inset-top);
    right: env(safe-area-inset-right);
    z-index: 100;
  }
  
  .site-logo {
    width: clamp(36px, 10vw, 64px);
  }
  
  .hero__portrait {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 80%;
    object-fit: cover;
    object-position: center;
    opacity: 0.5;
    z-index: 3;
    filter: saturate(120%) contrast(110%);
    will-change: opacity;
  }
  
  .hero__backdrop { inset: 0; }
  .scroll-indicator { bottom: 1rem; }
  
  .video-overlay {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    text-align: center;
  }
  
  .video-overlay h3 {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }
  
  .video-overlay p {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
  }
  
  .zone-cards {
    position: relative;
    top: 8px;
    padding-inline: 8px;
  }
  
  .beats__svg {
    margin-top: 1.25rem;
  }
  
  /* Mobile WHY section - stack cards vertically */
  .why-section .cards-container {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .why-card {
    padding: 24px 20px;
  }
  
  .why-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }
  
  .why-card__icon img {
    width: 36px;
    height: 36px;
  }
  
  .why-card__title {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .why-card__text {
    font-size: 14px;
    max-width: none;
  }
  
  /* Additional mobile WHY section overrides */
  .why-section {
    width: calc(100% - 40px) !important;
    margin: 20px auto 40px auto !important;
    padding: 30px 20px !important;
  }
  
  .why-section .cards-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {
  .why-section .cards-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .why-card {
    padding: 20px 16px !important;
  }
}

/* Prefer small viewport height to avoid jump when mobile chrome hides/shows */
@supports (height: 100svh) {
  .section--hero, .section--title-slide, .section--video { height: 100svh; }
}

@supports ((height: -webkit-fill-available) and (not (height: 100svh))) {
  html { height: -webkit-fill-available; }
  body { min-height: -webkit-fill-available; }
  .section--hero, .section--title-slide, .section--video { height: -webkit-fill-available; }
}