/* ==========================================================================
   Arrowsly - Design System & Styles
   Midnight Obsidian & Zen Light Theme
   ========================================================================== */

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

:root {
  /* Midnight Obsidian (Dark Mode - Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2b;
  --bg-tertiary: #1b243b;
  --surface: rgba(19, 26, 43, 0.72);
  --surface-hover: rgba(27, 36, 59, 0.85);
  --surface-solid: #151d30;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Geometric Colors */
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --sky: #38bdf8;
  --sky-glow: rgba(56, 189, 248, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --terracotta: #f97316;
  --terracotta-glow: rgba(249, 115, 22, 0.25);

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 10px 40px -10px rgba(245, 158, 11, 0.3);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Zen Light Theme */
  --bg-primary: #faf7f2;
  --bg-secondary: #f3ede2;
  --bg-tertiary: #e9e1d2;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(217, 119, 6, 0.4);
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.15);
  --sky: #0284c7;
  --sky-glow: rgba(2, 132, 199, 0.15);
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.15);
  --terracotta: #ea580c;
  --terracotta-glow: rgba(234, 88, 12, 0.15);
  
  --shadow-subtle: 0 4px 20px rgba(100, 80, 50, 0.08);
  --shadow-glow: 0 10px 30px -10px rgba(217, 119, 6, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header / Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

.brand:hover .brand-icon {
  transform: rotate(5deg) scale(1.05);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--amber);
  transform: scale(1.05);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--amber), var(--terracotta));
  color: #ffffff;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -5px rgba(245, 158, 11, 0.45);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--amber) 20%, var(--sky) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.store-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.store-badge {
  display: inline-block;
  transition: var(--transition);
  border-radius: 10px;
  overflow: hidden;
}

.store-badge img {
  display: block;
  height: 48px;
  width: auto;
}

.store-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  color: var(--emerald);
}

/* Interactive Canvas Card */
.hero-demo-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.demo-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-subtle), 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  position: relative;
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.demo-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  background: var(--amber-glow);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.demo-reset-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.demo-reset-btn:hover {
  color: var(--text-primary);
  border-color: var(--amber);
}

.canvas-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#arrowCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

.demo-tip {
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.demo-tip span {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-section {
  padding: 90px 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
  border-color: var(--amber);
  box-shadow: var(--shadow-subtle);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 22px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon-amber { color: var(--amber); background: var(--amber-glow); }
.feature-icon-sky { color: var(--sky); background: var(--sky-glow); }
.feature-icon-emerald { color: var(--emerald); background: var(--emerald-glow); }
.feature-icon-terracotta { color: var(--terracotta); background: var(--terracotta-glow); }

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   How to Play Section
   ========================================================================== */
.how-to-play-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--sky);
}

.step-number {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--amber);
  opacity: 0.85;
  margin-bottom: 18px;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Silhouettes & Shapes Showcase
   ========================================================================== */
.shapes-section {
  padding: 90px 0;
}

.shapes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.shape-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
}

.shape-item:hover {
  transform: translateY(-5px);
  border-color: var(--emerald);
  box-shadow: 0 10px 25px -5px var(--emerald-glow);
}

.shape-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.shape-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.shape-difficulty {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   Download CTA Section
   ========================================================================== */
.cta-section {
  padding: 80px 0 100px;
}

.cta-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--surface-solid) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--amber-glow) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 60px 0 36px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.footer-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

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

.footer-link {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--amber);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shapes-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--surface-solid);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .shapes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .cta-title {
    font-size: 2rem;
  }
}

