/* Orbit Browser Website Styles */
/* Dark-first design with light mode support */

/* ================================
   CSS Variables & Theme
   ================================ */

:root {
  /* Dark theme (default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-elevated: #22222e;
  --bg-card: #16161f;
  
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-tertiary: #6b6b7b;
  --text-muted: #4a4a5a;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-hover: #818cf8;
  --accent-subtle: rgba(99, 102, 241, 0.1);
  
  --border-primary: #2a2a3a;
  --border-secondary: #1f1f2a;
  --border-accent: rgba(99, 102, 241, 0.3);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
  
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  
  --text-primary: #111118;
  --text-secondary: #4a4a5a;
  --text-tertiary: #6b6b7b;
  --text-muted: #9ca3af;
  
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-hover: #6366f1;
  --accent-subtle: rgba(79, 70, 229, 0.08);
  
  --border-primary: #e5e5ea;
  --border-secondary: #f0f0f5;
  --border-accent: rgba(79, 70, 229, 0.2);
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ================================
   Base Styles
   ================================ */

*, *::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-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ================================
   Typography
   ================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-tertiary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
}

pre {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* ================================
   Layout
   ================================ */

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

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2rem 0;
}

.section-lg {
  padding: 6rem 0;
}

/* ================================
   Navigation
   ================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(var(--bg-primary), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-secondary);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
}

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

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

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.nav-links a.active {
  color: var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ================================
   Buttons
   ================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

/* ================================
   Cards
   ================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--border-accent);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

/* ================================
   Tags
   ================================ */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: var(--radius-sm);
}

.tag-added {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.tag-improved {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.tag-fixed {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.tag-security {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

/* ================================
   Forms
   ================================ */

.input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ================================
   Theme Toggle
   ================================ */

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

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

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

.hero {
  padding: 5rem 0;
  text-align: center;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* ================================
   Features
   ================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  padding: 1.5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* ================================
   Screenshot Showcase
   ================================ */

.showcase {
  padding: 4rem 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.showcase-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

.showcase-item:hover {
  transform: translateY(-4px);
}

.showcase-item img {
  width: 100%;
  display: block;
}

.showcase-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ================================
   Changelog
   ================================ */

.changelog-header {
  margin-bottom: 2rem;
}

.changelog-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.changelog-filters .input {
  flex: 1;
  min-width: 200px;
}

.changelog-filters .select {
  width: 160px;
}

.release {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-secondary);
}

.release:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.release-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.release-version {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.release-date {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

.release-section {
  margin-bottom: 1.5rem;
}

.release-section:last-child {
  margin-bottom: 0;
}

.release-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.release-section-title.added { color: var(--success); }
.release-section-title.improved { color: var(--info); }
.release-section-title.fixed { color: var(--warning); }
.release-section-title.security { color: var(--error); }

.release-list {
  list-style: none;
  padding-left: 0;
}

.release-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.release-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.release-section.added .release-list li::before { background: var(--success); }
.release-section.improved .release-list li::before { background: var(--info); }
.release-section.fixed .release-list li::before { background: var(--warning); }
.release-section.security .release-list li::before { background: var(--error); }

.changelog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-tertiary);
}

.changelog-error {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.changelog-error p {
  color: var(--text-secondary);
}

/* ================================
   Privacy & Security Pages
   ================================ */

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

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

.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.summary-box {
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.summary-box h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.summary-list {
  list-style: none;
}

.summary-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.summary-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-secondary);
}

.content-section h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.75rem;
}

.content-section p {
  margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.info-box {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.info-box p {
  margin-bottom: 0;
}

.pgp-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  overflow-x: auto;
}

.pgp-box code {
  background: none;
  color: var(--text-secondary);
  white-space: pre;
  display: block;
}

/* ================================
   Tables
   ================================ */

.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
}

th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

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

tr:hover td {
  background: var(--bg-tertiary);
}

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

.footer {
  border-top: 1px solid var(--border-secondary);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-brand img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

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

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

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

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

/* ================================
   Animations
   ================================ */

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

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .changelog-filters {
    flex-direction: column;
  }
  
  .changelog-filters .input,
  .changelog-filters .select {
    width: 100%;
  }
  
  .release-header {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.25rem; }
  
  .page-title {
    font-size: 2rem;
  }
}

/* ================================
   Print Styles
   ================================ */

@media print {
  .nav,
  .theme-toggle,
  .footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
