/* style.css */
:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-2: #edf3ff;
  --primary: #0d47a1;
  --primary-2: #1565c0;
  --accent: #f7c948;
  --text: #12233f;
  --muted: #5f6f8b;
  --border: rgba(13, 71, 161, 0.12);
  --shadow: 0 18px 45px rgba(13, 71, 161, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(247, 201, 72, 0.26), transparent 26%),
    linear-gradient(180deg, #f9fbff 0%, #edf3ff 100%);
  line-height: 1.85;
}

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
textarea { resize: vertical; }

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  right: 16px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 40;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(13, 71, 161, 0.08);
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.brand-text strong { display: block; font-size: 1.02rem; }
.brand-text small { color: var(--muted); }

.menu {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu a {
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}
.menu a:hover {
  background: var(--surface-2);
  color: var(--primary);
}
.nav-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
}

.hero { padding: 62px 0 26px; }
.hero-grid,
.contact-grid,
.learning-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: center;
}

.hero-badge,
.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.22);
  color: #7a5600;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 1.3;
}
.hero h1 span { color: var(--primary); }
.hero p,
.section-head p,
.course-card p,
.feature-card p,
.timeline-item p,
.contact-card p,
.faq-item p,
.form-card small {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.btn {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline {
  background: var(--surface);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--surface-2); }
.full-btn { width: 100%; }

.stats-grid,
.cards-grid {
  display: grid;
  gap: 18px;
}
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.four-col { grid-template-columns: repeat(4, 1fr); }
.three-col { grid-template-columns: repeat(3, 1fr); }

.stat-card,
.course-card,
.feature-card,
.contact-card,
.form-card,
.floating-card,
.timeline-item,
.faq-item {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card { padding: 18px; }
.stat-card strong,
.contact-item strong { display: block; margin-bottom: 6px; }

.hero-panel {
  position: relative;
  min-height: 560px;
  padding: 18px;
}
.floating-card {
  position: absolute;
  width: 72%;
  padding: 18px;
  z-index: 2;
}
.floating-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.floating-card.top { top: 0; left: 0; }
.floating-card.bottom { bottom: 0; right: 0; }

.hero-visual {
  min-height: 400px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(145deg, var(--primary), #2d7ef7);
  position: relative;
}
.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
}
.circle-1 {
  width: 230px;
  height: 230px;
  background: rgba(247, 201, 72, 0.45);
  top: 30px;
  right: 26px;
}
.circle-2 {
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.18);
  left: 16px;
  bottom: 38px;
}
.device-card {
  width: min(350px, 88%);
  background: rgba(255,255,255,0.97);
  border-radius: 24px;
  padding: 20px;
  transform: rotate(-5deg);
  position: relative;
  z-index: 3;
}
.device-top {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.device-top i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d5def5;
}
.code-blocks span {
  display: block;
  height: 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--primary), #8ab4ff);
}
.code-blocks span:nth-child(2) { width: 78%; }
.code-blocks span:nth-child(3) { width: 64%; }
.code-blocks span:nth-child(4) { width: 52%; }
.mini-tags {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.mini-tags b {
  background: var(--surface-2);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 999px;
}

.section { padding: 58px 0; }
.alt-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(238,243,255,0.7));
}
.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}
.section-head h2,
.contact-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  line-height: 1.4;
}

.course-card,
.feature-card,
.form-card,
.contact-card,
.timeline-item,
.faq-item {
  padding: 24px;
}
.icon-box {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ffe08a);
  color: #5d4300;
  border-radius: 18px;
  font-weight: 800;
  margin-bottom: 18px;
}
.course-card h3,
.feature-card h3,
.timeline-item h3,
.form-card h3 {
  margin-top: 0;
}
.course-card ul {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}
.course-card li {
  position: relative;
  padding-right: 22px;
  margin-bottom: 10px;
  color: var(--muted);
}
.course-card li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  right: 0;
  top: 11px;
}

.feature-grid .feature-card {
  min-height: 220px;
}
.timeline {
  display: grid;
  gap: 16px;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.timeline-step {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.faq-list {
  display: grid;
  gap: 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}
.faq-item p { margin: 12px 0 0; }

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.contact-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}
.contact-item span { color: var(--muted); }

.form-card label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
}
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  margin-top: 8px;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(18, 35, 63, 0.14);
  background: #fff;
}
.form-card textarea { min-height: 120px; }
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: 2px solid rgba(13, 71, 161, 0.18);
  border-color: var(--primary);
}

.site-footer {
  padding: 18px 0 34px;
}
.footer-wrap {
  border-top: 1px solid rgba(13, 71, 161, 0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.22s; }

@media (max-width: 1024px) {
  .four-col { grid-template-columns: repeat(2, 1fr); }
  .three-col,
  .stats-grid,
  .hero-grid,
  .contact-grid,
  .learning-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: relative; }
  .menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 220px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
  }
  .menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .hero-grid,
  .contact-grid,
  .learning-grid,
  .three-col,
  .four-col,
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions,
  .footer-wrap { flex-direction: column; align-items: stretch; }
  .footer-wrap { text-align: center; }
  .hero-panel {
    min-height: auto;
    padding: 0;
  }
  .floating-card {
    position: static;
    width: 100%;
    margin-top: 14px;
  }
  .hero-visual { min-height: 300px; }
}