/* ============================================
   SHARED STYLES - korekt.ai
   Common styles used across all pages
   ============================================ */

:root {
  /* Colors */
  --bg-deep: #050508;
  --bg-base: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a24;
  --bg-hover: #22222e;

  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-600: #16a34a;
  --green-glow: rgba(34, 197, 94, 0.15);

  --blue-500: #3b82f6;
  --blue-400: #60a5fa;

  --amber-500: #f59e0b;
  --amber-400: #fbbf24;

  --yellow-500: #eab308;
  --orange-500: #f97316;

  --red-500: #ef4444;
  --red-400: #f87171;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-display: 'Inter', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --container-max: 1200px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59, 130, 246, 0.05), transparent);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--green-400);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding) 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--green-400), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--text-secondary);
}

.text-green {
  color: #10b981;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 0.625rem 1.25rem;
  background: var(--green-500);
  color: var(--bg-deep);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s var(--ease-out-expo);
}

.nav-cta:hover {
  background: var(--green-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--green-glow);
  text-decoration: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.25s var(--ease-out-expo);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green-500);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: var(--green-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--green-glow);
  text-decoration: none;
}

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

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

/* ============================================
   CONTENT PAGES (docs, privacy, terms)
   ============================================ */
.content {
  padding: 8rem 0 4rem;
}

.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Policy sections (privacy, terms) */
.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.policy-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.policy-section ul {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-section li {
  margin-bottom: 0.5rem;
}

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

/* Markdown body (docs) */
.markdown-body h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--green-400);
}

.markdown-body h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.markdown-body p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
}

.markdown-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-surface);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  color: var(--green-400);
}

.markdown-body pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .page-header h1,
  .markdown-body h1 {
    font-size: 1.75rem;
  }

  .markdown-body h2 {
    font-size: 1.25rem;
  }

  .markdown-body pre {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
