/* ==========================================================================
   AR Drawing - Cool Colours Studio
   Universal Design System & Stylesheet
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121f;
  --bg-card: rgba(17, 24, 39, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-pill: rgba(255, 255, 255, 0.05);

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(129, 140, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;

  --gradient-brand: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 70%);

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

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 24px rgba(99, 102, 241, 0.15);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Light */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-blob-1 {
  position: absolute;
  top: -100px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  filter: blur(80px);
}

.ambient-blob-2 {
  position: absolute;
  top: 30%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  filter: blur(90px);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}

.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  color: #fff;
  font-size: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #050814;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(99, 102, 241, 0.5);
  color: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #a5b4fc;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 80px 0 60px;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin: 20px 0 16px;
}

.hero-title .gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Hero Showcase Card */
.hero-mockup-card {
  margin: 20px auto 0;
  max-width: 860px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.mockup-dots {
  display: flex;
  gap: 8px;
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-pill {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  text-align: left;
}

.feature-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: inline-block;
}

.feature-item h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Legal Hub Cards (on Index page)
   ========================================================================== */

.section-title-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 38px);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 580px;
  margin: 0 auto;
}

.legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 80px;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.legal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.legal-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
}

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

.legal-card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
}

.legal-card h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 12px;
}

.legal-card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.legal-card-highlights {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-card-highlights li {
  font-size: 13.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-card-highlights li span.check {
  color: var(--accent-emerald);
  font-weight: bold;
}

/* ==========================================================================
   Legal Document Layout (Privacy & Terms Pages)
   ========================================================================== */

.doc-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(13, 18, 31, 0.6) 0%, rgba(7, 9, 14, 0.8) 100%);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--text-primary);
}

.doc-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 46px);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-secondary);
}

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

.doc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 48px 0 80px;
}

/* Sticky Sidebar Table of Contents */
.doc-sidebar {
  position: sticky;
  top: 96px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Main Document Content */
.doc-content {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.75;
}

.doc-section {
  margin-bottom: 44px;
  scroll-margin-top: 96px;
}

.doc-section h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.doc-section h2 span.section-num {
  font-size: 16px;
  color: var(--accent-indigo);
  font-family: var(--font-sans);
  font-weight: 600;
}

.doc-section h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 600;
  margin: 22px 0 10px;
}

.doc-section p {
  margin-bottom: 14px;
}

.doc-section ul, 
.doc-section ol {
  margin: 12px 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-section li strong {
  color: var(--text-primary);
}

.doc-section a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.doc-section a:hover {
  color: #7dd3fc;
}

/* Callout Box */
.callout-box {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--accent-indigo);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 14.5px;
  color: #e2e8f0;
}

.callout-box.emerald {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--accent-emerald);
}

.callout-box.amber {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}

/* Legal Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.doc-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.doc-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 32px;
}

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

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 380px;
  margin-top: 14px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

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

.footer-col a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

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

/* ==========================================================================
   Responsive Queries
   ========================================================================== */

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .doc-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 16px;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .legal-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .bg-ambient,
  .site-header,
  .doc-sidebar,
  .site-footer,
  .btn,
  .badge {
    display: none !important;
  }

  .doc-layout {
    display: block;
    padding: 0;
  }

  .doc-content {
    color: #111;
  }

  .doc-section h2 {
    color: #000;
    border-bottom: 1px solid #ddd;
  }

  .doc-title {
    color: #000;
  }
}
