/* ================================================
   IfaOS Website Stylesheet
   Dotrous Enterprises LLC
   ================================================ */

/* CSS Custom Properties */
:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --primary-dark: #0e2f44;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --accent-dark: #d35400;
  --success: #27ae60;
  --success-light: #2ecc71;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-white: #ecf0f1;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-dark: #1a1a2e;
  --bg-darker: #16213e;
  --border: #dfe6e9;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --font-primary: 'Segoe UI', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --yoruba-green: #008751;
  --yoruba-white: #ffffff;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.8rem; font-weight: 800; }
h2 { font-size: 2.2rem; font-weight: 700; }
h3 { font-size: 1.6rem; font-weight: 600; }
h4 { font-size: 1.3rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============ NAVIGATION ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Safari flexbox gap fallback - use margins for critical flex layouts */
@supports not (gap: 1rem) {
  .hero-buttons > * + * { margin-left: 1rem; }
  .hero-stats > * + * { margin-left: 2rem; }
  .nav-links > * + * { margin-left: 2rem; }
  .feature-tags > * + * { margin-left: 8px; }
  .cta-buttons > * + * { margin-left: 1rem; }
  .footer-bottom > * + * { margin-left: 1rem; }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  text-decoration: none;
}

.nav-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  font-weight: 900;
}

.nav-brand span.brand-highlight {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white !important;
  padding: 10px 24px !important;
  border-radius: 50px;
  font-weight: 600 !important;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.nav-cta::after {
  display: none !important;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 5px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-white);
  transition: var(--transition);
}

/* ============ HERO SECTION ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 50%, #0a0a1a 100%);
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(230,126,34,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(41,128,185,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  color: var(--text-white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(230,126,34,0.15);
  border: 1px solid rgba(230,126,34,0.3);
  color: var(--accent-light);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
  max-width: 500px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  -webkit-box-pack: start;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mockup {
  width: 100%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-darker);
  overflow: hidden;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
}

.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-screen {
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-white);
  min-height: 300px;
}

.mockup-screen .line {
  margin-bottom: 0.6rem;
  opacity: 0;
  animation: typeIn 0.5s ease forwards;
}

.mockup-screen .line:nth-child(1) { animation-delay: 0.3s; }
.mockup-screen .line:nth-child(2) { animation-delay: 0.6s; }
.mockup-screen .line:nth-child(3) { animation-delay: 0.9s; }
.mockup-screen .line:nth-child(4) { animation-delay: 1.2s; }
.mockup-screen .line:nth-child(5) { animation-delay: 1.5s; }
.mockup-screen .line:nth-child(6) { animation-delay: 1.8s; }
.mockup-screen .line:nth-child(7) { animation-delay: 2.1s; }
.mockup-screen .line:nth-child(8) { animation-delay: 2.4s; }

@keyframes typeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.mockup-screen .prompt { color: var(--success-light); }
.mockup-screen .cmd { color: var(--accent-light); }
.mockup-screen .output { color: rgba(255,255,255,0.6); }
.mockup-screen .success { color: var(--success-light); }
.mockup-screen .yoruba { color: #a29bfe; }

/* ============ BUTTONS ============ */
.btn {
  display: -webkit-inline-flex;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(230,126,34,0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230,126,34,0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
  color: white;
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #219a52);
  color: white;
  box-shadow: 0 4px 15px rgba(39,174,96,0.3);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(39,174,96,0.4);
  color: white;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.9rem;
}

.btn-icon {
  font-size: 1.2em;
}

/* ============ SECTIONS ============ */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-badge {
  display: inline-block;
  background: rgba(230,126,34,0.1);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ============ FEATURES GRID ============ */
.features-grid {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(230,126,34,0.3);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.feature-icon.yoruba { background: rgba(0,135,81,0.1); }
.feature-icon.ai { background: rgba(142,68,173,0.1); }
.feature-icon.security { background: rgba(231,76,60,0.1); }
.feature-icon.office { background: rgba(41,128,185,0.1); }
.feature-icon.kernel { background: rgba(243,156,18,0.1); }
.feature-icon.boot { background: rgba(39,174,96,0.1); }

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.2rem;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-alt);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

/* ============ TECH SPECS ============ */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.spec-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.spec-item:hover {
  box-shadow: var(--shadow);
}

.spec-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.spec-item h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.spec-item p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0;
}

/* ============ CTA SECTION ============ */
.cta-section {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
  color: var(--text-white);
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ ABOUT SECTION ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.about-highlights {
  list-style: none;
  margin-top: 1.5rem;
}

.about-highlights li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-weight: 500;
}

.about-highlights li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(39,174,96,0.1);
  color: var(--success);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.about-image {
  position: relative;
}

.about-image-card {
  background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
  border-radius: var(--radius-lg);
  padding: 3rem;
  color: white;
  box-shadow: var(--shadow-lg);
}

.about-image-card .yoruba-text {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-image-card .english-text {
  color: rgba(255,255,255,0.6);
  font-style: italic;
}

.about-image-card .chars-demo {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  letter-spacing: 4px;
  text-align: center;
}

/* ============ YORUBA SHOWCASE ============ */
.yoruba-showcase {
  background: var(--bg-alt);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.showcase-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.showcase-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.showcase-card-header h3 {
  color: white;
  margin-bottom: 0.3rem;
}

.showcase-card-header p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin: 0;
}

.showcase-card-body {
  padding: 1.5rem;
}

.showcase-example {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.showcase-example:last-child {
  border-bottom: none;
}

.showcase-yo {
  font-weight: 600;
  color: var(--primary-dark);
}

.showcase-en {
  color: var(--text-light);
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin: 0;
}

.footer-company {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ============ DOCUMENTATION PAGE ============ */
.page-hero {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
  padding: 10rem 0 4rem;
  text-align: center;
  color: var(--text-white);
}

.page-hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 4rem 0;
}

.docs-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
  -webkit-overflow-scrolling: touch;
}

.docs-nav {
  list-style: none;
}

.docs-nav-section {
  margin-bottom: 1.5rem;
}

.docs-nav-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  padding-left: 12px;
}

.docs-nav-section a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.docs-nav-section a:hover,
.docs-nav-section a.active {
  background: rgba(230,126,34,0.08);
  color: var(--accent);
  border-left-color: var(--accent);
}

.docs-content {
  min-width: 0;
}

.doc-section {
  margin-bottom: 4rem;
  scroll-margin-top: 90px;
}

.doc-section h2 {
  font-size: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.doc-section h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.doc-section p {
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Info/Warning/Tip boxes */
.info-box {
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.info-box.info {
  background: rgba(41,128,185,0.08);
  border-color: var(--primary-light);
}

.info-box.warning {
  background: rgba(243,156,18,0.08);
  border-color: var(--warning);
}

.info-box.success {
  background: rgba(39,174,96,0.08);
  border-color: var(--success);
}

.info-box.danger {
  background: rgba(231,76,60,0.08);
  border-color: var(--danger);
}

.info-box-title {
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.info-box p {
  margin: 0;
  font-size: 0.9rem;
}

/* Code blocks */
.code-block {
  background: #1e1e2e;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0,0,0,0.3);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.code-block pre {
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin: 0;
}

.code-block code {
  font-family: inherit;
}

code:not(.code-block code) {
  background: rgba(230,126,34,0.1);
  color: var(--accent-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Tables */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.doc-table th {
  background: var(--bg-alt);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.doc-table tr:hover {
  background: rgba(230,126,34,0.03);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.steps li:last-child {
  border-bottom: none;
}

/* ============ DOWNLOAD PAGE ============ */
.download-hero {
  background: linear-gradient(135deg, var(--bg-dark), #0d1b2a);
  padding: 10rem 0 4rem;
  text-align: center;
  color: var(--text-white);
}

.download-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: -3rem auto 3rem;
  max-width: 700px;
  position: relative;
  z-index: 10;
}

.download-card-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 2.5rem;
  text-align: center;
  color: white;
}

.download-card-header h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.download-card-header .version {
  font-size: 1rem;
  opacity: 0.9;
}

.download-card-body {
  padding: 2.5rem;
}

.download-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.download-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.download-info-item .label {
  color: var(--text-light);
}

.download-info-item .value {
  font-weight: 700;
}

.download-btn-wrap {
  text-align: center;
  margin-top: 2rem;
}

/* Requirements Cards */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.req-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.req-card-header {
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.req-card-header.minimum {
  background: rgba(41,128,185,0.1);
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
}

.req-card-header.recommended {
  background: rgba(39,174,96,0.1);
  color: var(--success);
  border-bottom: 2px solid var(--success);
}

.req-card-body {
  padding: 1.5rem;
}

.req-card-body ul {
  list-style: none;
}

.req-card-body li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.req-card-body li:last-child {
  border-bottom: none;
}

.req-card-body li .icon {
  flex-shrink: 0;
  font-size: 1rem;
}

/* Installation Tabs */
.install-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.install-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: var(--font-primary);
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.install-tab:hover {
  color: var(--text);
}

.install-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.install-content {
  display: none;
}

.install-content.active {
  display: block;
}

/* Compatibility Table */
.compat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.compat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.compat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.compat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.compat-card h4 {
  margin-bottom: 0.3rem;
}

.compat-card p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0;
}

.compat-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.8rem;
}

.compat-status.full { background: rgba(39,174,96,0.1); color: var(--success); }
.compat-status.partial { background: rgba(243,156,18,0.1); color: var(--accent); }
.compat-status.untested { background: rgba(127,140,141,0.1); color: var(--text-light); }

/* ============ KEYBOARD SHORTCUTS TABLE ============ */
.shortcut-table {
  width: 100%;
  margin: 1rem 0;
}

.shortcut-table td {
  padding: 8px 12px;
}

kbd {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ============ RESPONSIVE ============ */

/* --- Tablet & Small Laptops (≤968px) --- */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    margin: 0 auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    order: -1;
  }

  .hero-mockup {
    max-width: 450px;
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .download-info {
    grid-template-columns: 1fr;
  }

  .cta-section h2 {
    font-size: 2rem;
  }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
  /* Mobile navigation */
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: calc(100% - 70px);
    height: calc(100dvh - 70px);
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(255,255,255,0.05);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .lang-toggle {
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
    display: -webkit-flex;
  }

  /* Hamburger animation */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.3rem; }

  .container {
    padding: 0 1.25rem;
  }

  /* Hero */
  .hero {
    min-height: auto;
    min-height: unset;
    padding: 7rem 0 3rem;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero-content {
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-buttons {
    flex-direction: column;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .hero-buttons > * + * {
    margin-top: 0.5rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
  }

  .stat {
    flex: 0 0 calc(50% - 1rem);
    -webkit-flex: 0 0 calc(50% - 1rem);
  }

  .stat-number {
    font-size: 1.6rem;
  }

  /* Mockup */
  .hero-mockup {
    max-width: 100%;
  }

  .mockup-screen {
    padding: 1.25rem;
    font-size: 0.75rem;
    min-height: 200px;
    overflow-x: auto;
  }

  /* Sections */
  section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-desc {
    font-size: 1rem;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 1.75rem;
  }

  /* Showcase */
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  /* About */
  .about-grid {
    gap: 2rem;
  }

  .about-image-card {
    padding: 2rem;
  }

  .about-image-card .yoruba-text {
    font-size: 1.5rem;
  }

  .about-image-card .chars-demo {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }

  /* Specs */
  .specs-grid {
    grid-template-columns: 1fr;
  }

  /* CTA */
  .cta-section {
    padding: 3.5rem 0;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .cta-buttons {
    flex-direction: column;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .cta-buttons > * + * {
    margin-top: 0.5rem;
  }

  /* Footer */
  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Docs page */
  .page-hero {
    padding: 7rem 0 3rem;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .page-hero p {
    font-size: 1rem;
  }

  .docs-layout {
    gap: 2rem;
  }

  /* Download page */
  .download-hero {
    padding: 7rem 0 3rem;
  }

  .download-card {
    max-width: 100%;
    margin: -2rem auto 2rem;
  }

  .download-card-header {
    padding: 1.75rem;
  }

  .download-card-body {
    padding: 1.75rem;
  }

  .download-info-item {
    flex-wrap: wrap;
    gap: 4px;
  }

  .download-btn-wrap .btn {
    white-space: normal;
    line-height: 1.4;
  }

  .req-grid {
    grid-template-columns: 1fr;
  }

  /* Standalone app cards (download page) */
  .app-card-header {
    padding: 1.5rem !important;
  }

  .app-card-body {
    padding: 1.5rem !important;
  }

  /* Tables: horizontal scroll wrapper */
  .doc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Code blocks */
  .code-block pre {
    font-size: 0.78rem;
    padding: 1rem;
  }

  /* Inline code wrapping */
  code:not(.code-block code) {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Steps content overflow */
  .steps li > div {
    min-width: 0;
    overflow-wrap: break-word;
  }

  /* Buttons: better touch targets + allow text wrapping */
  .btn {
    padding: 14px 28px;
    font-size: 0.95rem;
    white-space: normal;
    text-align: center;
  }

  .btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
  }

  /* Compatibility */
  .compat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .compat-card {
    padding: 1.25rem 1rem;
  }

  /* Install tabs - allow horizontal scroll */
  .install-tabs {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .install-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

/* --- Small Phones (≤480px) --- */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 1rem;
  }

  .nav-content {
    padding: 0 1rem;
    height: 60px;
  }

  .nav-brand {
    font-size: 1.2rem;
    gap: 8px;
  }

  .nav-brand .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .nav-links {
    top: 60px;
    padding: 1.5rem;
    height: calc(100% - 60px);
    height: calc(100dvh - 60px);
  }

  .hero {
    padding: 5.5rem 0 2rem;
  }

  .hero-content {
    gap: 1rem;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .hero-buttons .btn {
    max-width: 100%;
    padding: 14px 20px;
  }

  .hero-stats {
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .mockup-screen {
    padding: 1rem;
    font-size: 0.7rem;
    min-height: 160px;
  }

  .mockup-dot {
    width: 8px;
    height: 8px;
  }

  section {
    padding: 2.5rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-badge {
    font-size: 0.7rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .about-grid {
    gap: 1.5rem;
  }

  .about-image-card {
    padding: 1.5rem;
  }

  .about-image-card .chars-demo {
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 1rem;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .cta-section p {
    font-size: 0.95rem;
  }

  .cta-buttons .btn {
    max-width: 100%;
  }

  .page-hero {
    padding: 5rem 0 2rem;
  }

  .page-hero h1 {
    font-size: 1.65rem;
  }

  /* Download page - small phones */
  .download-hero {
    padding: 5rem 0 2rem;
  }

  .download-card {
    margin: -1.5rem auto 1.5rem;
  }

  .download-card-header {
    padding: 1.25rem;
  }

  .download-card-header h2 {
    font-size: 1.3rem;
  }

  .download-card-body {
    padding: 1.25rem;
  }

  .download-btn-wrap .btn {
    padding: 14px 20px;
    font-size: 0.9rem;
  }

  .app-card-header {
    padding: 1.25rem !important;
  }

  .app-card-body {
    padding: 1.25rem !important;
  }

  .compat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .compat-icon {
    font-size: 2rem;
  }

  .steps li {
    gap: 0.75rem;
  }

  .steps li::before {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .info-box {
    padding: 1rem 1.2rem;
  }

  .showcase-card-header {
    padding: 1.25rem;
  }

  .showcase-card-body {
    padding: 1.25rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }
}

/* ============ SCROLL ANIMATIONS ============ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ UTILITY CLASSES ============ */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============ LANGUAGE TOGGLE ============ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 6px 14px;
  transition: var(--transition);
  user-select: none;
  margin-left: 8px;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--accent);
}

.lang-toggle .lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-toggle .lang-current {
  color: var(--text-white);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  min-width: 20px;
  text-align: center;
}

.lang-toggle .lang-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.3);
}

.lang-toggle .lang-switch-icon {
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.lang-toggle:hover .lang-switch-icon {
  transform: rotate(180deg);
}

.lang-toggle[data-lang="yo"] {
  background: rgba(230,126,34,0.2);
  border-color: rgba(230,126,34,0.4);
}

.lang-toggle[data-lang="yo"] .lang-switch-icon {
  color: var(--accent-light);
}

/* Mobile language toggle */
@media (max-width: 768px) {
  .lang-toggle {
    margin-left: 0;
    margin-top: 1rem;
    justify-content: center;
  }
}
