/* ─── Theme Variables ─────────────────────────────────── */

:root {
  --accent: #6d5ace;
  --accent-light: #8b74e0;
  --accent-glow: rgba(109, 90, 206, 0.2);
  --radius: 12px;
  --max-width: 960px;
  --transition: 0.3s ease;

  /* Light mode (default) */
  --bg: #fafafa;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f7;
  --text: #1e1f21;
  --text-secondary: #6b6f76;
  --text-muted: #9a9ea6;
  --border: #e4e5e8;
  --border-hover: #c8c9cd;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(250, 250, 250, 0.85);
  --code-bg: #f0f0f2;
}

[data-theme="dark"] {
  --bg: #0f0f11;
  --bg-alt: #16171a;
  --bg-card: #1a1b1f;
  --bg-card-hover: #222328;
  --text: #e8e8ed;
  --text-secondary: #a1a5ab;
  --text-muted: #6b6f76;
  --border: #2a2b30;
  --border-hover: #3a3b40;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(15, 15, 17, 0.85);
  --code-bg: #2a2b30;
}

/* ─── Reset ──────────────────────────────────────────── */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

/* ─── Animations ─────────────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
  opacity: 0;
  animation: slideInRight 0.6s ease forwards;
}

.animate-scale-in {
  opacity: 0;
  animation: scaleIn 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Layout ─────────────────────────────────────────── */

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

section {
  padding: 80px 0;
}

/* ─── Nav ────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
  transition: color var(--transition);
}

.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px !important;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover { background: var(--accent-light) !important; transform: translateY(-1px); }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: rotate(15deg);
}

/* ─── Hero ───────────────────────────────────────────── */

.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(109, 90, 206, 0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 24px;
  animation: pulse 3s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--accent-light);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

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

/* ─── Features Grid ──────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-glow);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15);
  animation: float 2s ease-in-out infinite;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ─── Section Headers ────────────────────────────────── */

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

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ─── Steps ──────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 24px 16px;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform 0.3s ease;
}

.step:hover .step-number {
  transform: scale(1.1);
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Step connector lines */
.step::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -12px;
  width: 24px;
  height: 2px;
  background: var(--border);
}

.step:last-child::after { display: none; }

/* ─── Settings Section ───────────────────────────────── */

.settings-section {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.settings-text {
  flex: 1;
  min-width: 280px;
}

.settings-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.settings-text p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

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

.settings-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.settings-list li::before {
  content: "✓";
  color: var(--accent-light);
  font-weight: 700;
  font-size: 16px;
}

.settings-preview {
  flex: 1;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.settings-preview:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.settings-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.settings-preview-row:last-child { border-bottom: none; }

.settings-preview-label {
  font-size: 13px;
  font-weight: 500;
}

.settings-preview-value {
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 500;
}

.settings-preview-toggle {
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--accent);
  position: relative;
  transition: background 0.3s ease;
}

.settings-preview-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.settings-preview-toggle.off {
  background: var(--border-hover);
}

.settings-preview-toggle.off::after {
  right: auto;
  left: 3px;
}

/* ─── Privacy Grid ───────────────────────────────────── */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.privacy-card {
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.privacy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.privacy-card .icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.privacy-card:hover .icon {
  transform: scale(1.2);
}

.privacy-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.privacy-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

.privacy-card code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ─── CTA Section ────────────────────────────────────── */

.cta-section {
  text-align: center;
  padding: 60px 0 100px;
}

.cta-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ─── Alt Background Sections ────────────────────────── */

.bg-alt {
  background: var(--bg-alt);
  transition: background var(--transition);
}

/* ─── Footer ─────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  transition: border-color var(--transition);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Privacy Policy Page Specific ───────────────────── */

.policy-content {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 80px;
}

.policy-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.policy-content .last-updated {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.policy-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.policy-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.policy-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.policy-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.policy-content li {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.policy-content strong {
  color: var(--text);
}

.policy-content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: background var(--transition);
}

.policy-content a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

.policy-content a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.policy-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.policy-table td {
  color: var(--text-secondary);
}

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

/* ─── Back Link ──────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s, transform 0.2s;
}

.back-link:hover {
  color: var(--accent-light);
  transform: translateX(-3px);
}

/* ─── Responsive ─────────────────────────────────────── */

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

@media (max-width: 640px) {
  .hero { padding-top: 120px; }
  section { padding: 60px 0; }
  .settings-section { flex-direction: column; }
  .nav-links a:not(.nav-cta) { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .privacy-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
