/* ===== CSS Variables ===== */
:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-warm: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 5rem;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-weight: 600;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  inset-inline: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-menu a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  margin-inline-start: 0.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.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);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 5rem;
  overflow: hidden;
  background: linear-gradient(160deg, #eff6ff 0%, #f0fdfa 50%, #f8fafc 100%);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.hero::before {
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.25);
  top: -100px;
  inset-inline-start: -150px;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: rgba(13, 148, 136, 0.2);
  bottom: -80px;
  inset-inline-end: -100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Hero Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mockup-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.mockup-browser {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #22c55e; }

.mockup-url {
  flex: 1;
  margin-inline-start: 0.5rem;
  background: #fff;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.mockup-body {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  min-height: 280px;
}

.mockup-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mockup-sidebar-item {
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
}

.mockup-sidebar-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.mockup-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mockup-stat {
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08), rgba(13, 148, 136, 0.08));
  border: 1px solid var(--border);
}

.mockup-chart {
  flex: 1;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid var(--border);
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.mockup-chart::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 60%;
  background: linear-gradient(90deg,
    transparent 0%, rgba(59, 130, 246, 0.3) 20%,
    rgba(13, 148, 136, 0.4) 50%,
    rgba(59, 130, 246, 0.2) 80%, transparent 100%);
  clip-path: polygon(0 80%, 15% 60%, 30% 70%, 50% 30%, 70% 50%, 85% 20%, 100% 40%, 100% 100%, 0 100%);
}

.mockup-phone {
  position: absolute;
  bottom: -20px;
  inset-inline-start: -30px;
  width: 120px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 3px solid #334155;
  overflow: hidden;
  padding: 8px 6px;
}

.mockup-phone-notch {
  width: 40px;
  height: 4px;
  background: #334155;
  border-radius: 4px;
  margin: 0 auto 8px;
}

.mockup-phone-screen {
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 12px;
  height: 160px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-phone-line {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.mockup-phone-line.short { width: 60%; }

/* ===== Stats Bar ===== */
.stats-bar {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding-block: 2.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item + .stat-item {
  border-inline-start: 1px solid var(--border);
}

.stat-number {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ===== App Cards ===== */
.apps-section {
  background: var(--bg);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.app-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.3);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

.app-icon.blue { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.app-icon.teal { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.app-icon.amber { background: linear-gradient(135deg, #d97706, var(--accent-warm)); }
.app-icon.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.app-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.app-card .app-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.app-features {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.app-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.app-features li svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===== Admin Modules Grid ===== */
.admin-section {
  background: var(--surface);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.module-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.module-card:hover {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, 0.3);
}

.module-icon {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  margin-bottom: 0.75rem;
  background: rgba(30, 64, 175, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition);
}

.module-card:hover .module-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.module-icon svg {
  width: 24px;
  height: 24px;
}

.module-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.module-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Mobile Apps Section ===== */
.mobile-section {
  background: linear-gradient(180deg, var(--bg) 0%, #eff6ff 100%);
}

.mobile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.mobile-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.mobile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.mobile-card-top {
  padding: 1.75rem 1.75rem 1rem;
  text-align: center;
}

.mobile-phone-preview {
  width: 140px;
  height: 240px;
  margin: 0 auto 1.25rem;
  background: #1e293b;
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow-md);
}

.mobile-phone-inner {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-phone-header {
  padding: 12px 10px 8px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.mobile-phone-header.teacher { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.mobile-phone-header.student { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.mobile-phone-header.parent { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.mobile-phone-body {
  flex: 1;
  background: #f8fafc;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-ui-row {
  height: 28px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.mobile-ui-row.accent {
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.1), rgba(13, 148, 136, 0.1));
}

.mobile-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.mobile-card .role-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.mobile-card-bottom {
  padding: 0 1.75rem 1.75rem;
}

.mobile-features {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mobile-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.mobile-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== System Features ===== */
.system-section {
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(13, 148, 136, 0.1));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.feature-item:hover .feature-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.feature-item p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Roles ===== */
.roles-section {
  background: var(--bg);
}

.roles-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.role-pill {
  padding: 0.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  transition: var(--transition);
  cursor: default;
}

.role-pill:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

/* ===== CTA ===== */
.cta-section {
  padding-block: 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-block: 5rem;
}

.cta-box::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  top: -100px;
  inset-inline-end: -50px;
}

.cta-box::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  bottom: -60px;
  inset-inline-start: -30px;
}

.cta-box h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.cta-box .btn {
  position: relative;
  z-index: 1;
}

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.7);
  padding-block: 3.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-col li {
  line-height: 1.6;
}

.contact-sep {
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-credit a {
  color: var(--accent-light);
  font-weight: 700;
  transition: color var(--transition);
}

.footer-credit a:hover {
  color: #fff;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-desc {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .modules-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    bottom: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 999;
  }

  [dir="rtl"] .nav-menu {
    transform: translateX(100%);
  }

  .nav-menu.open,
  [dir="rtl"] .nav-menu.open {
    transform: translateX(0);
  }

  .nav-menu a {
    font-size: 1.15rem;
  }

  .nav-cta {
    margin-inline-start: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-item + .stat-item {
    border-inline-start: none;
  }

  .stat-item:nth-child(even) {
    border-inline-start: 1px solid var(--border);
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  .mockup-phone {
    inset-inline-start: -10px;
    width: 100px;
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: 3.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modules-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
