/* ==========================================================================
   BLOCK SCULPTURE: 3D PUZZLE — DESIGN SYSTEM & BASE STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Dark Cozy / Minimalist 3D */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-surface: rgba(17, 24, 39, 0.75);
  --bg-surface-hover: rgba(30, 41, 59, 0.85);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(15, 23, 42, 0.65);
  
  /* Vibrant Accents */
  --accent-primary: #6366f1; /* Indigo / PolyCube */
  --accent-primary-light: #818cf8;
  --accent-cyan: #06b6d4;   /* Hologram Snap */
  --accent-amber: #f59e0b;  /* Stars / Gold Coins */
  --accent-emerald: #10b981;/* Solved / Perfect */
  --accent-rose: #f43f5e;   /* Love / Favorite */
  --accent-purple: #a855f7; /* Magic Diorama */

  /* Text & Border */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);
  --border-cyan: rgba(6, 182, 212, 0.4);

  /* Shadows & Glows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --glow-primary: 0 0 35px rgba(99, 102, 241, 0.35);
  --glow-cyan: 0 0 35px rgba(6, 182, 212, 0.35);
  --glow-amber: 0 0 30px rgba(245, 158, 11, 0.3);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-max: 1240px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-hover: rgba(241, 245, 249, 0.95);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.8);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.25);
  --border-cyan: rgba(6, 182, 212, 0.3);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --glow-primary: 0 0 25px rgba(99, 102, 241, 0.2);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.2);
}

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Ambient Background Light FX */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  transition: opacity 0.5s ease;
}

.ambient-glow-1 {
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.ambient-glow-2 {
  top: 35%;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  opacity: 0.3;
}

.ambient-glow-3 {
  bottom: 10%;
  left: -150px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
  opacity: 0.25;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Gradient Text Utilities */
.text-gradient-primary {
  background: linear-gradient(135deg, #ffffff 0%, #818cf8 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color var(--transition-smooth), backdrop-filter var(--transition-smooth), border-color var(--transition-smooth);
}

.site-header.scrolled {
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transition: transform var(--transition-bounce);
}

.brand-logo:hover img {
  transform: rotate(-6deg) scale(1.08);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
  background: var(--bg-surface-hover);
  transform: scale(1.05);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: all var(--transition-bounce);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px) scale(1.02);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cyan:hover {
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6);
  transform: translateY(-2px) scale(1.02);
}

.btn-glass {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-glass:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-full);
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: #fff;
  transition: all var(--transition-fast);
  text-align: left;
}

[data-theme="light"] .btn-store {
  background: #0f172a;
  color: #ffffff;
}

.btn-store:hover {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Store badge for a platform that has not shipped yet: readable, but clearly inert. */
.btn-store-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.btn-store svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.btn-store .store-meta {
  display: flex;
  flex-direction: column;
}

.btn-store .store-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
  line-height: 1;
}

.btn-store .store-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Badge Pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 20px;
}

.badge-pill-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.25);
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Section Header Styles */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px auto;
}

.section-header .badge-pill {
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 30px 0;
  position: relative;
  z-index: 10;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand-info p {
  color: var(--text-muted);
  margin: 16px 0 24px 0;
  font-size: 0.95rem;
  max-width: 340px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--text-main);
  transform: translateX(4px);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal-links {
  display: flex;
  gap: 24px;
}

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

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

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition-smooth);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
