/* ============================================================
   FIX IT — MAIN STYLESHEET
   Edit CSS variables in :root to customise the entire site.
   Accent colour: #339af0 (blue) and its shades.
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

/* ============================================================
   1. CSS VARIABLES (Light Mode Defaults)
   ============================================================ */
:root {
  /* --- Brand Accent (blue palette) --- */
  --accent-50: #e7f5ff;
  --accent-100: #d0ebff;
  --accent-200: #a5d8ff;
  --accent-300: #74c0fc;
  --accent-400: #4dabf7;
  --accent-500: #339af0; /* PRIMARY ACCENT */
  --accent-600: #228be6;
  --accent-700: #1c7ed6;
  --accent-800: #1971c2;
  --accent-900: #1864ab;

  /* --- Neutral palette --- */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.92);

  --text-primary: #0d1117;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --text-inverse: #ffffff;

  --border-color: #dee2e6;
  --border-subtle: #e9ecef;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --shadow-accent: 0 8px 32px rgba(51, 154, 240, 0.25);

  /* --- Typography --- */
  --font-sans: 'Sora', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;

  /* --- Spacing --- */
  --section-pad: 7rem 6rem;
  --nav-height: 68px;

  /* --- Radius --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* ============================================================
   2. DARK MODE VARIABLES
   ============================================================ */
[data-theme='dark'] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #161b22;
  --bg-nav: rgba(13, 17, 23, 0.92);

  --text-primary: #f0f6fc;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --text-inverse: #0d1117;

  --border-color: #30363d;
  --border-subtle: #21262d;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 8px 32px rgba(51, 154, 240, 0.2);
}

/* Auto dark mode (respects OS preference unless manually overridden) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #161b22;
    --bg-nav: rgba(13, 17, 23, 0.92);
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --text-inverse: #0d1117;
    --border-color: #30363d;
    --border-subtle: #21262d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 32px rgba(51, 154, 240, 0.2);
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background var(--duration-base) var(--ease-in-out),
    color var(--duration-base) var(--ease-in-out);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip to main content (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-500);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: 1rem;
}

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
}
h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
}
h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}
h4 {
  font-size: 1.1rem;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--accent-500);
}

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

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-500);
  margin-bottom: 1rem;
}
.label::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 1.5px;
  background: var(--accent-500);
  flex-shrink: 0;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity var(--duration-fast);
}
.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--accent-500);
  color: #fff;
  border-color: var(--accent-500);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(51, 154, 240, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-outline:hover {
  border-color: var(--accent-500);
  color: var(--accent-500);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-500);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn-ghost:hover {
  gap: 0.75rem;
}
.btn-ghost .arrow {
  transition: transform var(--duration-base) var(--ease-out);
}
.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* ============================================================
   6. NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition:
    background var(--duration-base),
    border-color var(--duration-base),
    box-shadow var(--duration-base);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  gap: 2rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
/*
  The logo PNG has a solid black background.
  We wrap it in a dark pill — visible in both light and dark mode.
  JS (LogoWrap in main.js) can optionally remove the pill in dark mode
  since the nav background already blends with the logo naturally.
*/
.logo-wrap {
  /* background: #0d1117; */
  border-radius: var(--radius-md);
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  transition:
    background var(--duration-base),
    padding var(--duration-base);
}
.nav-logo img {
  height: 80px;
  width: auto;
  display: block;
}
/* .footer-brand .logo-wrap img {
  height: 80px;
} */

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast),
    background var(--duration-fast);
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme='dark'] .nav-links a:hover,
[data-theme='dark'] .nav-links a.active {
  background: rgba(51, 154, 240, 0.1);
}

/* Nav right controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Social icons in nav */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition:
    color var(--duration-fast),
    background var(--duration-fast);
}
.nav-social-link:hover {
  color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme='dark'] .nav-social-link:hover {
  background: rgba(51, 154, 240, 0.1);
}
.nav-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Divider */
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* Language dropdown */
.lang-switcher {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--duration-fast);
}
.lang-btn:hover {
  border-color: var(--accent-500);
  color: var(--accent-500);
}
.lang-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform var(--duration-fast);
}
.lang-btn[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition:
    opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
  z-index: 600;
}
.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--duration-fast),
    color var(--duration-fast);
  text-align: left;
  gap: 0.6rem;
}
.lang-option:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.lang-option.active {
  background: var(--accent-50);
  color: var(--accent-600);
  font-weight: 600;
}
[data-theme='dark'] .lang-option.active {
  background: rgba(51, 154, 240, 0.12);
  color: var(--accent-400);
}
.lang-option .lang-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-500);
  opacity: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.lang-option.active .lang-dot {
  opacity: 1;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.theme-toggle:hover {
  border-color: var(--accent-500);
  color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme='dark'] .theme-toggle:hover {
  background: rgba(51, 154, 240, 0.1);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.icon-sun,
.icon-moon {
  transition:
    opacity var(--duration-fast),
    transform var(--duration-fast);
}
/* Light mode: show moon; Dark mode: show sun */
.icon-moon {
  display: block;
}
.icon-sun {
  display: none;
}
[data-theme='dark'] .icon-moon {
  display: none;
}
[data-theme='dark'] .icon-sun {
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-out);
  transform-origin: center;
}
.hamburger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem 2rem;
  z-index: 490;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-link-mob {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: block;
  transition: color var(--duration-fast);
}
.mobile-menu .nav-link-mob:hover {
  color: var(--accent-500);
}
.mobile-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}
.mobile-lang-btns {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.mobile-lang-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: all var(--duration-fast);
}
.mobile-lang-btn:hover,
.mobile-lang-btn.active {
  border-color: var(--accent-500);
  color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme='dark'] .mobile-lang-btn.active {
  background: rgba(51, 154, 240, 0.1);
}
.mobile-socials {
  display: flex;
  gap: 0.5rem;
}
.mobile-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}
.mobile-socials a:hover {
  color: var(--accent-500);
  border-color: var(--accent-500);
}
.mobile-socials svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ============================================================
   7. HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

/* Subtle grid/dot background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 70% 50%,
      rgba(51, 154, 240, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(51, 154, 240, 0.04) 0%,
      transparent 50%
    );
  pointer-events: none;
}
[data-theme='dark'] .hero::before {
  background-image:
    radial-gradient(
      circle at 70% 50%,
      rgba(51, 154, 240, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(51, 154, 240, 0.06) 0%,
      transparent 50%
    );
}

.hero-left {
  padding: 5rem 4rem 5rem 6%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-50);
  color: var(--accent-700);
  border: 1px solid var(--accent-100);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.8rem;
  width: fit-content;
}
[data-theme='dark'] .hero-badge {
  background: rgba(51, 154, 240, 0.1);
  border-color: rgba(51, 154, 240, 0.25);
  color: var(--accent-300);
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 500px;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

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

.hero-right {
  padding: 5rem 6% 5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Correction showcase card */
.correction-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.correction-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-400), var(--accent-600));
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.card-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-600);
  background: var(--accent-50);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  margin-bottom: 1.2rem;
}
[data-theme='dark'] .card-chip {
  background: rgba(51, 154, 240, 0.12);
  color: var(--accent-300);
}
.correction-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.correction-before,
.correction-after {
  direction: rtl;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.8;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}
.correction-before {
  background: rgba(239, 68, 68, 0.06);
  border-left: 3px solid #ef4444;
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
}
[data-theme='dark'] .correction-before {
  background: rgba(239, 68, 68, 0.08);
}
.correction-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-500);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 0.5rem;
}
.correction-divider::before,
.correction-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.correction-after {
  background: rgba(51, 154, 240, 0.06);
  border-left: 3px solid var(--accent-500);
  color: var(--text-primary);
}
[data-theme='dark'] .correction-after {
  background: rgba(51, 154, 240, 0.1);
}
.card-footer-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   8. STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 2.5rem;
}
.stat-item {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border-subtle);
  transition: background var(--duration-base);
}
.stat-item:last-child {
  border-right: none;
}
.stat-item:hover {
  background: var(--bg-tertiary);
}
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-500);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   9. SECTION WRAPPERS
   ============================================================ */
section {
  padding: var(--section-pad);
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.section-header {
  margin-bottom: 3.5rem;
}
.section-header .label {
  margin-bottom: 0.75rem;
}
.section-header h2 {
  margin-bottom: 0.75rem;
}
.section-header p {
  font-size: 1.05rem;
  max-width: 560px;
  color: var(--text-secondary);
}

/* Alternate backgrounds */
.bg-secondary {
  background: var(--bg-secondary);
}
.bg-dark {
  background: #0d1117;
  color: #f0f6fc;
}
.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: #f0f6fc;
}
.bg-dark p {
  color: #8b949e;
}
.bg-dark .label {
  color: var(--accent-400);
}
.bg-dark .label::before {
  background: var(--accent-400);
}

/* ============================================================
   10. SERVICES SECTION
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-card);
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background var(--duration-base) var(--ease-out);
  cursor: default;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-400), var(--accent-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}
.service-card:hover::after {
  transform: scaleX(1);
}
.service-card:hover {
  background: var(--bg-secondary);
}

.service-num {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border-subtle);
  line-height: 1;
  transition: color var(--duration-base);
}
.service-card:hover .service-num {
  color: var(--accent-100);
}
[data-theme='dark'] .service-card:hover .service-num {
  color: rgba(51, 154, 240, 0.15);
}

.service-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  display: block;
}
.service-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}
.service-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ============================================================
   11. HOW IT WORKS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: calc(12.5% + 1.5rem);
  right: calc(12.5% + 1.5rem);
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--accent-200) 0%,
    var(--accent-400) 50%,
    var(--accent-200) 100%
  );
  z-index: 0;
}
[data-theme='dark'] .steps-grid::before {
  background: linear-gradient(
    90deg,
    rgba(51, 154, 240, 0.2) 0%,
    rgba(51, 154, 240, 0.5) 50%,
    rgba(51, 154, 240, 0.2) 100%
  );
}

.step {
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.step-number {
  width: 3rem;
  height: 3rem;
  background: var(--bg-primary);
  border: 2px solid var(--accent-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-500);
  margin-bottom: 1.5rem;
  position: relative;
  transition:
    background var(--duration-base),
    color var(--duration-base);
}
.step:hover .step-number {
  background: var(--accent-500);
  color: #fff;
}
.step-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.step-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ============================================================
   12. WHO WE SERVE (CLIENTS)
   ============================================================ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.client-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition:
    border-color var(--duration-base),
    background var(--duration-base),
    transform var(--duration-base) var(--ease-out);
}
.client-card:hover {
  border-color: rgba(51, 154, 240, 0.4);
  background: rgba(51, 154, 240, 0.05);
  transform: translateY(-2px);
}
.client-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}
.client-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f0f6fc;
}
.client-desc {
  font-size: 0.84rem;
  color: #6e7681;
  line-height: 1.7;
}

/* ============================================================
   13. PROOF / MISTAKES SECTION
   ============================================================ */
.mistakes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.mistake-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base);
}
.mistake-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.mistake-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(239, 68, 68, 0.12);
}
[data-theme='dark'] .mistake-tag {
  background: rgba(239, 68, 68, 0.12);
  border-bottom-color: rgba(239, 68, 68, 0.15);
}
.mistake-tag::before {
  content: '✗';
  font-size: 0.85rem;
}
.mistake-body {
  padding: 1.4rem;
}
.mistake-text {
  direction: rtl;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #ef4444;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.mistake-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Proof CTA */
.proof-cta-box {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  border: 1px solid rgba(51, 154, 240, 0.2);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.proof-cta-box::before {
  content: 'أصلحها';
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 12rem;
  font-weight: 700;
  color: rgba(51, 154, 240, 0.05);
  pointer-events: none;
  line-height: 1;
}
.proof-cta-box h3 {
  color: #f0f6fc;
  margin-bottom: 0.75rem;
}
.proof-cta-box p {
  color: #8b949e;
  margin-bottom: 1.8rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   14. ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.highlight-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.highlight-icon {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--accent-50);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--accent-600);
  border: 1px solid var(--accent-100);
}
[data-theme='dark'] .highlight-icon {
  background: rgba(51, 154, 240, 0.1);
  border-color: rgba(51, 154, 240, 0.2);
  color: var(--accent-400);
}
.highlight-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}
.highlight-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Team placeholder */
.team-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.team-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.team-avatar {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--accent-400), var(--accent-700));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  flex-shrink: 0;
}
.team-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.team-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.team-bio {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================================
   15. FOOTER
   ============================================================ */
footer {
  background: #0d1117;
  color: #8b949e;
  border-top: 1px solid #21262d;
}
.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand .logo-wrap {
  margin-bottom: 1rem;
  display: inline-flex;
}
.footer-brand p {
  color: #6e7681;
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 1.5rem;
}
.footer-socials {
  display: flex;
  gap: 0.5rem;
}
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: var(--radius-sm);
  color: #6e7681;
  transition: all var(--duration-fast);
}
.footer-social:hover {
  background: rgba(51, 154, 240, 0.1);
  border-color: rgba(51, 154, 240, 0.3);
  color: var(--accent-400);
}
.footer-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0f6fc;
  margin-bottom: 1.2rem;
}
.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links-list a {
  font-size: 0.875rem;
  color: #6e7681;
  transition: color var(--duration-fast);
}
.footer-links-list a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.2rem 2.5rem;
  border-top: 1px solid #21262d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: #484f58;
}
.footer-lang-links {
  display: flex;
  gap: 1rem;
}
.footer-lang-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: #484f58;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--duration-fast);
}
.footer-lang-links a:hover,
.footer-lang-links a.active {
  color: var(--accent-400);
}

/* ============================================================
   16. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}
.stagger.revealed > *:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
.stagger.revealed > *:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}
.stagger.revealed > *:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.19s;
}
.stagger.revealed > *:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.26s;
}
.stagger.revealed > *:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 0.33s;
}
.stagger.revealed > *:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}

/* ============================================================
   17. UTILITIES
   ============================================================ */
.text-center {
  text-align: center;
}
.text-center .label {
  justify-content: center;
}
.text-center .section-header p {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   18. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* XL — 1280px */
@media (max-width: 1280px) {
  :root {
    --section-pad: 6rem 4rem;
  }
  .nav-inner {
    padding: 0 2rem;
  }
  .hero-left {
    padding: 5rem 3rem 5rem 4%;
  }
  .hero-right {
    padding: 5rem 4% 5rem 2rem;
  }
}

/* LG — 1024px */
@media (max-width: 1024px) {
  :root {
    --section-pad: 5rem 3rem;
  }
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 2rem);
  }
  .hero-left {
    padding: 3rem 3rem 2rem;
    text-align: center;
    align-items: center;
  }
  .hero-sub {
    max-width: 600px;
  }
  .hero-right {
    padding: 0 3rem 4rem;
  }
  .correction-card {
    max-width: 460px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .steps-grid::before {
    display: none;
  }
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

/* MD — 768px: hamburger appears */
@media (max-width: 768px) {
  :root {
    --section-pad: 4rem 1.5rem;
    --nav-height: 60px;
  }
  .nav-links,
  .nav-socials,
  .nav-divider {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .clients-grid {
    grid-template-columns: 1fr;
  }
  .mistakes-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem 2rem;
  }
  .footer-bottom {
    padding: 1rem 1.5rem;
    flex-direction: column;
    text-align: center;
  }
  .proof-cta-box {
    padding: 2.5rem 1.5rem;
  }
}

/* SM — 480px */
@media (max-width: 480px) {
  :root {
    --section-pad: 3.5rem 1.2rem;
  }
  .hero-left {
    padding: 2.5rem 1.2rem 1.5rem;
  }
  .hero-right {
    padding: 0 1.2rem 3rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1.2rem;
  }
  .nav-inner {
    padding: 0 1.2rem;
  }
  .mobile-menu {
    padding: 1.2rem 1.2rem 1.8rem;
  }
}
