/* pixelab — Minimal Dark Design System */

:root {
  --bg-base: #0A0A0A;
  --bg-surface: #111113;
  --bg-elevated: #161619;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.42);
  --accent-blue: #3B82F6;
  --accent-blue-soft: rgba(59, 130, 246, 0.14);
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Pretendard Variable', 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Pretendard Variable', 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(59, 130, 246, 0.32);
  color: #ffffff;
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0A0A0A;
}

::-webkit-scrollbar-thumb {
  background: #27272A;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3F3F46;
}

/* Subtle architectural grid background for Hero */
.hero-grid-bg {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 35%, transparent 100%);
}

/* Restrained ambient glow behind hero mockup */
.ambient-blue-glow {
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.04) 42%, transparent 72%);
  pointer-events: none;
}

/* Sticky Header scrolled state */
.site-header {
  transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  background-color: rgba(10, 10, 10, 0.78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Bento Card with mouse-tracking spotlight & 1px border glow */
.bento-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  overflow: hidden;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.11),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background-color: #131316;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card > * {
  position: relative;
  z-index: 1;
}

/* Glass surface */
.glass-panel {
  background: rgba(20, 20, 24, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Phone Mockup Chassis */
.phone-frame {
  position: relative;
  width: 300px;
  max-width: 100%;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #27272A 0%, #141417 50%, #1E1E22 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.phone-screen {
  position: relative;
  border-radius: 35px;
  background: #0B0B0D;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-height: 560px;
}

.phone-island {
  width: 92px;
  height: 24px;
  border-radius: 9999px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 10px auto 0;
}

/* Audio equalizer bars */
@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.28); }
  50% { transform: scaleY(1); }
}

.eq-bar {
  transform-origin: bottom;
  animation: eqPulse 1.1s ease-in-out infinite;
}

.eq-paused .eq-bar {
  animation-play-state: paused;
  transform: scaleY(0.25);
  transition: transform 0.25s ease;
}

/* Pixel grid subtle pulse */
@keyframes pixelFade {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.pixel-pulse {
  animation: pixelFade 2.6s ease-in-out infinite;
}

/* Showcase Carousel */
.showcase-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.showcase-slide {
  min-width: 100%;
  flex-shrink: 0;
}

/* FAQ Accordion */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-content > div {
  overflow: hidden;
}

.accordion-item.is-open .accordion-content {
  grid-template-rows: 1fr;
}

.accordion-icon {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent-blue);
}

.accordion-item.is-open {
  border-color: rgba(59, 130, 246, 0.32);
  background-color: #121215;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

/* Toast Notification */
.toast-banner {
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Mobile Menu Transition */
.mobile-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
}

.mobile-drawer.is-open {
  max-height: 360px;
  opacity: 1;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .eq-bar,
  .pixel-pulse {
    animation: none;
  }
}
