/* آموزشگاه رانندگی استاد شهریار — لندینگ ایستا
   حداقل مرورگر: Chrome/Edge 109، Firefox 121، Safari 16.4 (همان کف سامانه). از light-dark() و :has() استفاده نشود. */

@font-face { font-family: 'Vazirmatn FD'; src: url('../fonts/Vazirmatn-FD-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn FD'; src: url('../fonts/Vazirmatn-FD-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn FD'; src: url('../fonts/Vazirmatn-FD-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn FD'; src: url('../fonts/Vazirmatn-FD-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --brand: #1f6feb;
  --brand-2: #3b86ff;
  --brand-ink: #ffffff;
  --accent: #ffb020;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --surface: #ffffff;
  --ink: #18202f;
  --ink-2: #4a5568;
  --line: #e3e8f0;
  --ok: #1a9e5f;
  --shadow: 0 10px 30px rgba(24, 32, 47, 0.08);
  --radius: 18px;
  --art-sky-1: #dbe9ff;
  --art-sky-2: #f4f8ff;
  --art-sun: #ffd166;
  --art-hill: #bfe3c7;
  --art-road: #4b5563;
  --art-glass: #cfe2ff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4c8dff;
    --brand-2: #6aa2ff;
    --bg: #0f141d;
    --bg-alt: #151c28;
    --surface: #1a2230;
    --ink: #e8edf5;
    --ink-2: #a9b4c6;
    --line: #2a3445;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --art-sky-1: #1c2b47;
    --art-sky-2: #142033;
    --art-sun: #f2c14e;
    --art-hill: #23493a;
    --art-road: #374151;
    --art-glass: #9cc0ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: 'Vazirmatn FD', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }

.skip { position: absolute; right: -9999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { right: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.5rem 1.2rem; border-radius: 999px;
  font: inherit; font-weight: 700; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(31, 111, 235, 0.3); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: rgba(31, 111, 235, 0.08); }
.btn-light { background: #fff; color: #1f6feb; }
.btn-lg { min-height: 52px; padding: 0.6rem 1.6rem; font-size: 1.05rem; }

/* ---- header ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
@media (prefers-color-scheme: dark) { .topbar { background: rgba(15, 20, 29, 0.92); } }
.topbar-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text b { font-size: 1.05rem; font-weight: 800; }
.brand-text small { font-size: 0.78rem; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-inline-start: auto; }
.nav a { color: var(--ink-2); padding: 0.4rem 0.7rem; border-radius: 10px; font-weight: 500; }
.nav a:hover { color: var(--brand); background: rgba(31, 111, 235, 0.08); text-decoration: none; }
.nav-register { display: none; }
.login-btn { margin-inline-start: 0.5rem; }
.menu-toggle { display: none; }

@media (max-width: 959px) {
  .topbar-in { gap: 0.5rem; }
  .login-btn { margin-inline-start: auto; padding: 0.4rem 0.9rem; font-size: 0.92rem; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); cursor: pointer; padding: 0 11px;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; right: 0; left: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 0.5rem 16px 1rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .nav-register { display: block; color: var(--brand); font-weight: 700; border-bottom: 0; }
}
@media (max-width: 420px) {
  .brand-text small { display: none; }
  .login-btn svg { display: none; }
}

/* ---- hero ---- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(59, 134, 255, 0.18), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, rgba(255, 176, 32, 0.14), transparent 60%),
    var(--bg);
  padding: 3.5rem 0 3rem;
}
.hero-in { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand); background: rgba(31, 111, 235, 0.1); padding: 0.2rem 0.8rem; border-radius: 999px; font-size: 0.9rem; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; margin: 0.8rem 0 1rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1.25rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--ink-2); font-size: 0.95rem; }
.hero-points li::before { content: '✓'; color: var(--ok); font-weight: 800; margin-inline-end: 0.35rem; }
.hero-art { filter: drop-shadow(0 20px 40px rgba(31, 111, 235, 0.18)); }
.road-svg { display: block; width: 100%; height: auto; }
.road-svg .car { animation: drive 6s ease-in-out infinite alternate; }
@keyframes drive { from { transform: translateX(0); } to { transform: translateX(40px); } }
@media (max-width: 859px) {
  .hero { padding: 2rem 0; }
  .hero-in { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
}

/* ---- sections ---- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-lead { color: var(--ink-2); margin-bottom: 2rem; }
@media (max-width: 600px) { .section { padding: 2.75rem 0; } }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.card:hover { transform: translateY(-3px); }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--ink-2); margin: 0; font-size: 0.95rem; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(31, 111, 235, 0.1); margin-bottom: 1rem; }
.card-icon svg, .contact-list svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.steps h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.step-no { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; }

.portal { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2.5rem; align-items: center; }
@media (max-width: 859px) { .portal { grid-template-columns: 1fr; } }
.portal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 520px) { .portal-cols { grid-template-columns: 1fr; } }
.portal-cols h3 { font-size: 1.1rem; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding: 0.25rem 0; color: var(--ink-2); }
.check li::before { content: '✓'; color: var(--ok); font-weight: 800; margin-inline-end: 0.5rem; }
.hint { font-size: 0.88rem; color: var(--ink-2); background: var(--bg-alt); border-radius: 12px; padding: 0.6rem 0.9rem; }

.phone { justify-self: center; width: 260px; max-width: 100%; border-radius: 36px; padding: 12px; background: #1d2433; box-shadow: 0 30px 60px rgba(24, 32, 47, 0.25); }
.phone-screen { background: var(--bg-alt); border-radius: 26px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 420px; }
.ph-bar { background: var(--brand); color: #fff; font-weight: 700; border-radius: 14px; padding: 10px 12px; font-size: 0.95rem; }
.ph-card { display: flex; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; color: var(--ink-2); }
.ph-card.ok b { color: var(--ok); }
.ph-card.now { border-color: var(--brand); color: var(--ink); font-weight: 700; }
.ph-card.now b { color: var(--brand); }
.ph-btn { margin-top: auto; text-align: center; background: var(--accent); color: #1d2433; font-weight: 800; border-radius: 999px; padding: 10px; font-size: 0.92rem; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.75rem; padding: 0 1.1rem; }
summary { cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--brand); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { color: var(--ink-2); padding-bottom: 1rem; margin: 0; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 859px) { .contact { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.contact-list li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; }
.contact-list svg { flex: none; margin-top: 2px; }
.cta-box { background: linear-gradient(135deg, #1f6feb, #3b86ff); color: #fff; border-radius: 24px; padding: 2rem; box-shadow: 0 20px 40px rgba(31, 111, 235, 0.3); }
.cta-box h3 { font-size: 1.5rem; }
.cta-box p { opacity: 0.92; }
.cta-login { display: block; color: #fff; margin-top: 1rem; text-decoration: underline; opacity: 0.95; }

.footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--ink-2); font-size: 0.92rem; }
.footer-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
