/* ==========================================================================
   ArDali Browser Official Website - Production Stylesheet
   Security-First, Privacy-Friendly, Zero External Dependencies
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-base: #080c14;
  --bg-surface: #0e1624;
  --bg-elevated: #152238;
  --bg-card: rgba(14, 22, 36, 0.85);
  --bg-card-hover: rgba(21, 34, 56, 0.95);
  --bg-code: #06090e;

  --accent-cyan: #38bdf8;
  --accent-cyan-hover: #7dd3fc;
  --accent-blue: #3b82f6;
  --accent-emerald: #34d399;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #3b82f6 50%, #6366f1 100%);
  --accent-glow: rgba(56, 189, 248, 0.15);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-focus: #38bdf8;

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

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Layout & Spacing */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 35px -5px var(--accent-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 100% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 0% 70%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Accessibility: Skip to main */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 1rem;
  background: var(--accent-cyan);
  color: #040914;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #fff;
}

/* Global Focus Styles */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

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

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-base);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.4));
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: var(--accent-glow);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-inline-start: 0.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
}

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

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

/* Language Selector */
.lang-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.3rem;
  gap: 0.2rem;
}

.lang-btn {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--accent-cyan);
  color: #080c14;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #040914;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  color: #040914;
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding-top: 4rem;
  padding-bottom: 5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

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

.hero-tagline {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.hero-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 3.5rem;
}

.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.platform-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Browser Mockup Showcase */
.browser-mockup {
  position: relative;
  max-width: 1040px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: #090e17;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

.mockup-controls {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.mockup-dot.close { background: #ff5f56; }
.mockup-dot.minimize { background: #ffbd2e; }
.mockup-dot.maximize { background: #27c93f; }

.mockup-address-bar {
  flex: 1;
  background: #04070c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 540px;
  margin-inline: auto;
  font-family: var(--font-mono);
}

.mockup-address-bar svg {
  width: 13px;
  height: 13px;
  color: var(--accent-cyan);
}

.mockup-image {
  width: 100%;
  height: auto;
  display: block;
  background-color: #080c14;
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */
.section {
  padding-block: 5rem;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-cyan);
}

.feature-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.feature-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.feature-tags {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feature-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Feature Spotlight / Showcase Rows */
.spotlight-wrapper {
  margin-top: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.spotlight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.spotlight-row.reverse {
  direction: rtl;
}

.spotlight-row.reverse > * {
  direction: ltr;
}

.spotlight-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.spotlight-pill {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: var(--accent-glow);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.spotlight-title {
  font-size: 2rem;
  line-height: 1.2;
}

.spotlight-desc {
  font-size: 1.05rem;
  line-height: 1.6;
}

.spotlight-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.spotlight-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.spotlight-bullet svg {
  width: 18px;
  height: 18px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.spotlight-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface);
}

.spotlight-preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Privacy by Design Section
   ========================================================================== */
.privacy-section {
  background: linear-gradient(180deg, rgba(8, 12, 20, 0) 0%, rgba(14, 22, 36, 0.5) 50%, rgba(8, 12, 20, 0) 100%);
}

.privacy-card {
  background: var(--bg-surface);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

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

.privacy-item {
  display: flex;
  gap: 1rem;
}

.privacy-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-item-icon svg {
  width: 18px;
  height: 18px;
}

.privacy-item-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.privacy-item-content p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.privacy-badge-note {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.privacy-badge-note svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==========================================================================
   Open Source Section
   ========================================================================== */
.open-source-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.open-source-content h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.open-source-content p {
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.license-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.license-pill svg {
  width: 16px;
  height: 16px;
}

.open-source-stats {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.stat-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

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

.stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Download Section
   ========================================================================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-base), transform var(--transition-base);
  position: relative;
}

.download-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.platform-icon svg {
  width: 24px;
  height: 24px;
}

.download-card-title {
  font-size: 1.4rem;
  color: var(--text-primary);
}

.download-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.install-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.install-method {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.install-method-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  display: block;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.code-box code {
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.copy-btn.copied {
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.download-card-cta {
  margin-top: auto;
}

.download-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: #05080e;
  border-top: 1px solid var(--border-subtle);
  padding-block: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .brand-link {
  font-size: 1.15rem;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.back-to-top {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.back-to-top:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   RTL (Arabic) Layout Specializations
   ========================================================================== */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .hero-pill,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-tagline,
html[dir="rtl"] .section-header {
  text-align: center;
}

html[dir="rtl"] .mockup-address-bar {
  direction: ltr; /* URLs are left-to-right */
}

html[dir="rtl"] .code-box {
  direction: ltr; /* Terminal commands are left-to-right */
  text-align: left;
}

html[dir="rtl"] .stat-value {
  direction: ltr;
}

html[dir="rtl"] .spotlight-row.reverse {
  direction: ltr;
}

html[dir="rtl"] .spotlight-row.reverse > * {
  direction: rtl;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .open-source-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .spotlight-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-medium);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.5rem;
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

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

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .privacy-card {
    padding: 1.75rem;
  }

  .download-card {
    padding: 1.75rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   Prefers Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
