/* ═══════════ راه روشن — پایه: متغیرها، تایپوگرافی، اجزای مشترک ═══════════ */

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

:root {
  --night-950: #071322;
  --night-900: #102844;
  --night-800: #173e68;
  --night-700: #285b89;
  --turq-300: #c3d6e7;
  --turq-400: #86b2d4;
  --turq-500: #3976a7;
  --turq-600: #285b89;
  --gold-300: #fff0a3;
  --gold-400: #f2ce00;
  --gold-500: #ddba00;
  --gold-600: #b59700;
  --cream-50: #fffdf0;
  --cream-100: #f5f0e3;
  --cream-200: #e9e1cc;
  --ink-900: #14172b;
  --ink-700: #2c3151;
  --ink-500: #5a6082;
  --ink-300: #9aa0bd;
  --danger: #d6455b;
  --ok: #1f9d6b;

  --bar-h: 44px;
  --head-h: 60px;
  --topbar-h: calc(var(--bar-h) + var(--head-h));
  --gutter: 16px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(11, 18, 51, .35);
  --shadow-lg: 0 24px 60px -20px rgba(11, 18, 51, .55);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  padding-top: var(--topbar-h);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.95;
  color: var(--ink-900);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--turq-400); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--gold-400); color: var(--ink-900); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: calc(var(--topbar-h) + 6px); }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-500); }

/* ───────── دکمه‌ها ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .55em 1.5em; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.4; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s, color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-sm { min-height: 40px; padding: .35em 1.2em; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: .6em 2em; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-gold { color: #2a1c00; background: linear-gradient(135deg, var(--gold-300), var(--gold-500) 60%, var(--gold-600)); box-shadow: 0 8px 22px -8px rgba(230, 176, 75, .8); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(230, 176, 75, .95); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.btn-turq { color: #04211e; background: linear-gradient(135deg, var(--turq-300), var(--turq-500)); box-shadow: 0 8px 22px -8px rgba(25, 181, 165, .8); }
.btn-outline { color: var(--night-800); border: 1.5px solid var(--cream-200); background: #fff; }
.btn-outline:hover { border-color: var(--night-700); }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn .spin { width: 1.1em; height: 1.1em; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; color: inherit; transition: background-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }

.badge { display: inline-block; padding: .05em .8em; border-radius: 999px; font-size: .82rem; font-weight: 700; line-height: 1.9; }
.badge-gold { background: rgba(230, 176, 75, .2); color: #8a5d00; }
.badge-warn { background: #fff1d6; color: #8a5300; }

/* ───────── نوار بالا: شمارندهٔ تخفیف + سربرگ ───────── */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 60; }
.offer-bar {
  height: var(--bar-h); display: flex; align-items: center;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300) 50%, var(--gold-500));
  color: #2a1c00; box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.offer-bar[data-active="false"] { background: linear-gradient(90deg, var(--turq-600), var(--turq-400)); color: #03231f; }
.offer-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer-text { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.offer-pct { font-weight: 800; font-size: 1.05rem; }
.offer-sub { font-weight: 500; opacity: .85; }
/* ltr on purpose: reads days : hours : minutes : seconds from the left */
.cd { display: flex; align-items: center; gap: 3px; direction: ltr; }
.cd-unit { display: grid; justify-items: center; line-height: 1; min-width: 34px; }
.cd-unit b { font-weight: 800; font-size: 1.08rem; background: rgba(11, 18, 51, .9); color: var(--gold-300); border-radius: 7px; padding: 3px 5px 2px; min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.cd-unit i { font-style: normal; font-size: .58rem; font-weight: 700; margin-top: 1px; opacity: .8; }
.cd-sep { font-weight: 800; opacity: .6; margin-top: -10px; }
/* Desktop: a bigger, easier-to-read countdown */
@media (min-width: 900px) {
  :root { --bar-h: 76px; --head-h: 64px; }
  .offer-text { font-size: 1.25rem; }
  .offer-pct { font-size: 1.7rem; }
  .cd { gap: 8px; }
  .cd-unit { min-width: 72px; }
  .cd-unit b { font-size: 2.2rem; min-width: 68px; padding: 6px 10px 4px; border-radius: 12px; }
  .cd-unit i { font-size: .82rem; margin-top: 4px; }
  .cd-sep { font-size: 1.8rem; margin-top: -18px; }
}
@media (max-width: 520px) {
  :root { --bar-h: 46px; --head-h: 56px; }
  .offer-sub { display: none; }
  .offer-text { font-size: .85rem; }
  .cd-unit { min-width: 28px; }
  .cd-unit b { font-size: .95rem; min-width: 27px; padding-inline: 3px; }
  .cd-sep { display: none; }
  .cd { gap: 3px; }
}

.header { height: var(--head-h); background: rgba(11, 18, 51, .88); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; }
.brand-text { display: grid; line-height: 1.25; }
.brand-text b { font-size: 1.05rem; font-weight: 800; }
.brand-text small { font-size: .78rem; color: var(--gold-300); font-weight: 700; }
.nav { display: none; margin-inline-start: auto; gap: 4px; }
.nav a { padding: 6px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: rgba(255, 255, 255, .78); transition: color .2s, background-color .2s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active, .drawer-link.active { color: var(--night-900); background: var(--gold-400); font-weight: 700; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-actions { margin-inline-start: 0; }
  .menu-btn { display: none; }
}

.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(6, 10, 31, .6); backdrop-filter: blur(3px); animation: fade .25s both; }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: min(86vw, 340px);
  background: var(--night-900); color: #fff; padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-lg);
  animation: slide-in .32s var(--ease) both; overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.drawer-link:hover { background: rgba(255, 255, 255, .07); }
.drawer-panel .btn { margin-top: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }

/* ───────── فرم‌ها ───────── */
.field { display: grid; gap: 6px; }
.field > label, .legend { font-weight: 700; font-size: .95rem; color: var(--ink-700); }
.field .hint { font-size: .82rem; color: var(--ink-500); line-height: 1.7; }
.input {
  width: 100%; min-height: 52px; padding: .5em 1em; border-radius: var(--radius-sm);
  border: 1.5px solid var(--cream-200); background: #fff; font-size: 1.02rem;
  transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: #cfc6ac; }
.input:focus { outline: none; border-color: var(--turq-500); box-shadow: 0 0 0 4px rgba(25, 181, 165, .18); }
.input[data-state="valid"] { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(31, 157, 107, .14); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(214, 69, 91, .12); }
.input.ltr { direction: ltr; text-align: right; letter-spacing: .06em; }
.field .hint.ok { color: var(--ok); font-weight: 700; }
.err { color: var(--danger); font-size: .85rem; font-weight: 500; min-height: 0; display: none; align-items: center; gap: 6px; }
.err.show { display: flex; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .93rem; line-height: 1.8; }
.alert .icon { margin-top: 5px; }
.alert-error { background: #fdeaed; color: #8c1d30; border: 1px solid #f3c1c9; }
.alert-info { background: #e7f6f4; color: #0b5a52; border: 1px solid #bfe6e1; }
.alert-warn { background: #fff4de; color: #7a4b00; border: 1px solid #f1d9a4; }

/* ───────── اعلان‌ها و مودال ───────── */
.toast-region { position: fixed; inset-inline: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 120; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { pointer-events: auto; background: var(--night-900); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .93rem; box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease) both; max-width: 92vw; }
.toast.err-toast { background: #8c1d30; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 10, 31, .65); backdrop-filter: blur(4px); animation: fade .2s both; }
.modal-box { position: relative; width: min(100%, 440px); background: #fff; border-radius: 24px; padding: 28px 24px 22px; box-shadow: var(--shadow-lg); text-align: center; animation: pop .3s var(--ease) both; }
.modal-box h3 { font-size: 1.25rem; margin-bottom: 6px; }
.modal-box .amount { display: block; font-size: 2rem; font-weight: 800; color: var(--night-800); margin: 8px 0 4px; }
.modal-actions { display: grid; gap: 10px; margin-top: 20px; }
@keyframes pop { from { transform: scale(.92) translateY(10px); opacity: 0; } }

/* ───────── افکت نمایش هنگام اسکرول ───────── */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───────── صفحهٔ خطا ───────── */
.error-page { min-height: calc(100svh - var(--topbar-h)); display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); background: radial-gradient(circle at 50% 0, var(--night-700), var(--night-950)); color: #fff; }
.error-page h1 { font-size: clamp(4rem, 18vw, 8rem); line-height: 1.1; font-weight: 800; background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { margin: 8px 0 24px; color: rgba(255, 255, 255, .8); }

.brand-mark {width:100px;height:54px;object-fit:contain;border-radius:12px} .capacity-count{font-size:.9rem;white-space:nowrap}.capacity-count b{font-size:1.3rem}
