/* Brand typography: self-hosted Noto Kufi Arabic for a clear, geometric Persian UI. */
@font-face {
  font-family: "Tosee Kufi";
  src: url("/assets/fonts/NotoKufiArabic-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tosee Kufi";
  src: url("/assets/fonts/NotoKufiArabic-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #10233e;
  --navy: #071b36;
  --teal: #078e83;
  --line: #e3eaee;
  --muted: #71808e;
  --shadow: 0 14px 40px rgba(11, 38, 58, .08);
}
* { font-family: "Tosee Kufi", Tahoma, sans-serif; }
body {
  background: #f4f8fa url("/assets/fintech-bg.png") center 115px / cover fixed no-repeat;
  background-blend-mode: screen;
}
.topbar { background: rgba(255,255,255,.95); }
.brand img { width: 188px; }
.nav-cta, .btn { border-radius: 14px; box-shadow: 0 8px 22px rgba(0,125,127,.14); }
.btn-primary, .nav-cta { background-size: 170% 170%; animation: buttonShimmer 7s ease infinite; }
.hero { background: linear-gradient(110deg,rgba(255,255,255,.91),rgba(243,251,250,.88)); }
.hero:before, .hero:after { opacity: .65; }
.hero h1 { letter-spacing: -.04em; }
.section-head h2, .page-head h1 { letter-spacing: -.025em; }
.steps-section .features { align-items: stretch; }
.step-card { position: relative; display: flex; flex-direction: column; min-height: 280px; padding: 27px; overflow: hidden; }
.step-card:after { content: ""; position: absolute; width: 170px; height: 170px; inset: auto auto -105px -80px; border-radius: 50%; background: radial-gradient(circle,rgba(7,142,131,.1),transparent 70%); pointer-events: none; }
.step-number { position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #eff8f6; color: #087e73; font-weight: 700; }
.step-card .btn { margin-top: auto; align-self: flex-start; }
.step-card p { margin-bottom: 22px; }
.page-head .btn { margin-top: 18px; }
.application-form { max-width: 930px; margin: 0 auto; padding: clamp(20px,4vw,38px); }
.form-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.form-heading h2 { margin: 8px 0 0; }
.required-note { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select { border-color: #dbe4e8; border-radius: 14px; padding: 13px 15px; min-height: 52px; }
.field textarea { min-height: 112px; }
.field label b { color: #cf3853; }
.upload-drop { position: relative; min-height: 92px; padding: 15px 16px; display: flex; align-items: center; gap: 14px; border: 1px dashed #9ac9c1; border-radius: 17px; background: linear-gradient(135deg,#fbfefd,#f0faf7); cursor: pointer; transition: .2s; }
.upload-drop:hover, .upload-drop.is-dragging { border-color: #078e83; background: #eaf8f4; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(8,126,115,.1); }
.upload-native { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.upload-symbol { width: 47px; height: 47px; flex: 0 0 47px; border-radius: 15px; display: grid; place-items: center; color: #078b80; background: #dff4ef; font-size: 27px; font-weight: 700; }
.upload-copy { display: grid; gap: 3px; }
.upload-copy strong { font-size: 14px; color: var(--navy); }
.upload-copy small { font-size: 12px; color: #73838e; }
.upload-choose { margin-right: auto; padding: 8px 12px; border-radius: 11px; background: #fff; border: 1px solid #dce9e6; color: #087d73; font-size: 12px; font-weight: 700; }
.upload-previews { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview { position: relative; width: 82px; height: 82px; overflow: hidden; border-radius: 13px; border: 1px solid #dce8e8; background: #fff; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview span { position: absolute; inset: auto 0 0; background: rgba(7,27,54,.75); color: #fff; padding: 2px 5px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.sample-dialog { width: min(760px,calc(100% - 24px)); max-height: 92vh; border: 1px solid #dce6ec; border-radius: 24px; padding: 22px; background: #fff; color: var(--ink); box-shadow: 0 25px 90px rgba(4,22,42,.3); }
.sample-dialog::backdrop { background: rgba(5,18,34,.64); backdrop-filter: blur(4px); }
.sample-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sample-dialog-head h2 { font-size: 20px; margin: 8px 0 0; }
.dialog-close { width: 42px; height: 42px; border: 0; border-radius: 13px; background: #f2f6f7; color: #17314b; font-size: 27px; cursor: pointer; }
.sample-dialog > img { display: block; max-height: 68vh; width: auto; max-width: 100%; margin: auto; border-radius: 14px; object-fit: contain; }
.sample-dialog > p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.float-links { gap: 11px; }
.float-link { position: relative; width: 50px; height: 50px; border: 0; transition: transform .22s, box-shadow .22s; }
.float-link:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 13px 30px rgba(10,38,54,.24); }
.float-link svg { width: 25px; height: 25px; }
.telegram-pv { color: #fff; background: linear-gradient(145deg,#35b7ed,#168acb); }
.telegram-pv svg { fill: currentColor; }
.telegram-channel { color: #fff; background: linear-gradient(145deg,#20b49a,#078476); }
.telegram-channel svg { fill: currentColor; }
.telegram-channel svg path:nth-child(2) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.telegram-mark { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #071b36; color: #fff; font: 700 10px/1 Arial,sans-serif; }
.admin-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 18px 0 20px; }
.admin-stat { min-height: 92px; padding: 16px; display: flex; align-items: center; gap: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.admin-stat:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(11,38,58,.12); }
.admin-stat.is-selected { border-color: #0a9d91; box-shadow: 0 0 0 3px rgba(10,157,145,.12), var(--shadow); }
.admin-stat small { display: block; color: var(--muted); }
.admin-stat strong { display: block; color: var(--navy); font-size: 24px; }
.admin-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-list-head h2 { margin: 0; font-size: 20px; }
.admin-list-head span { color: var(--muted); font-size: 13px; }
.login-card { max-width: 520px; }
.admin-top .btn { min-width: 100px; }
.btn:focus-visible, .float-link:focus-visible, .navlinks a:focus-visible { outline: 3px solid #65cbbc; outline-offset: 3px; }

/* Scroll reveals and gentle motion across the full page. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.25,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.feature.reveal:nth-of-type(2), .footer-grid > .reveal:nth-child(2) { transition-delay: .08s; }
.feature.reveal:nth-of-type(3), .footer-grid > .reveal:nth-child(3) { transition-delay: .16s; }
.hero-grid > :first-child { animation: fadeSlide .7s both; }
.hero-grid > :last-child { animation: fadeScale .8s .12s both; }
.hero-logo { animation: logoDrift 6.2s ease-in-out infinite; }
.coin { animation: float 5s ease-in-out infinite; }
.float-links { animation: floatIn .65s .3s both; }
.sample-dialog[open] { animation: dialogIn .24s ease-out both; }
@keyframes fadeSlide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeScale { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes logoDrift { 50% { transform: translateY(-7px); } }
@keyframes floatIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes buttonShimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

@media (max-width: 700px) {
  body { background-position: center 80px; background-size: auto 100vh; background-attachment: scroll; }
  .brand img { width: 145px; height: 48px; }
  .hero { padding: 44px 0; }
  .hero-visual { min-height: 225px; }
  .step-card { min-height: 0; }
  .step-card .btn { align-self: stretch; }
  .form-heading { align-items: flex-start; flex-direction: column; }
  .admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .admin-stat { min-height: 78px; padding: 12px; gap: 9px; }
  .admin-stat strong { font-size: 20px; }
  .admin-list-head { align-items: flex-start; flex-direction: column; }
  .upload-drop { min-height: 82px; padding: 12px; }
  .upload-choose { font-size: 11px; padding: 7px 9px; }
  .upload-symbol { width: 42px; height: 42px; flex-basis: 42px; }
  .sample-dialog { padding: 15px; border-radius: 18px; }
  .sample-dialog > img { max-height: 66vh; }
  .float-links { left: 12px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
