/* ==========================================================================
   SnapSheet - Base Styles & Design Tokens
   ========================================================================== */

:root {
  /* Color Palette - Light */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --border-color: rgba(226, 232, 240, 0.9);
  --border-focus: rgba(16, 185, 129, 0.4);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px -8px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.12);
  --shadow-primary: 0 12px 28px -6px rgba(16, 185, 129, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, monospace;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-card: #111a2e;
  --bg-card-subtle: #17233d;
  --bg-glass: rgba(17, 26, 46, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);
  --primary-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);

  --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 12px 32px -6px rgba(16, 185, 129, 0.45);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.bg-ambient-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle at center, var(--primary-glow) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.mobile-nav-cta {
  display: none;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.w-full {
  width: 100%;
}

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

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-subtle);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Common Buttons */
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-primary);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -4px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-subtle);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* Footer */
.site-footer {
  padding: 50px 0 30px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
  margin-top: auto;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-nav {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

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

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--primary);
}

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

/* Legal Page Common Styles */
.legal-container {
  max-width: 800px;
  margin: 50px auto 80px;
  padding: 0 24px;
}

.legal-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.legal-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-content {
  color: var(--text-main);
  line-height: 1.8;
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.legal-content ul {
  margin: 0 0 20px 24px;
  color: var(--text-muted);
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-callout {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.legal-callout p {
  color: var(--text-main);
  margin-bottom: 0;
  font-weight: 500;
}
