/* =========================
   Design System
========================= */

:root {
  --bg: #0f1115;
  --bg-dark: #0a0c10;
  --surface: #171a21;
  --primary: #4cc9f0;
  --accent: #f72585;
  --text: #f5f7fa;
  --text-muted: #9aa4b2;
  --border: rgba(255, 255, 255, 0.08);

  --radius: 14px;
  --container-width: 1200px;
  --transition: 0.3s ease;
}

/* =========================
   Reset
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================
   Layout Utilities
========================= */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section.dark {
  background: var(--bg-dark);
}

.center {
  text-align: center;
}

/* =========================
   Header
========================= */

.header {
  position: fixed;
  width: 100%;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(15, 17, 21, 0.6);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
}

nav button {
  background: none;
  border: none;
  color: var(--text-muted);
  margin-left: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

nav button:hover {
  color: var(--primary);
}

/* =========================
   Hero
========================= */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 160px;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* =========================
   ScrollTrigger
========================= */

.scroll-wrapper {
  margin-top: 4rem;
  height: 200px;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 1rem;
}

.scroll-box {
  display: grid;
  place-content: center;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
}

/* =========================
   Draggable
========================= */

.drag-area {
  margin-top: 3rem;
  height: 250px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drag-box {
  display: grid;
  place-content: center;
  width: 100px;
  height: 100px;
  background: var(--accent);
  border-radius: var(--radius);
  cursor: grab;
}

/* =========================
   Flip Grid
========================= */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.grid.column {
  grid-template-columns: 1fr;
}

.card {
  display: grid;
  place-content: center;
  background: var(--surface);
  height: 100px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* =========================
   Motion Path
========================= */

.motion-container {
  position: relative;
  height: 300px;
}

.motion-svg {
  width: 100%;
  height: 200px;
}

.motion-dot {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
}

/* =========================
   Canvas
========================= */

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}

canvas,
#pixiContainer {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  height: auto;
}

/* =========================
   Buttons
========================= */

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.primary-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}