/* Website base. Page looks come from the design markup (inline styles); this file adds fonts,
   the desktop/mobile switch, focus, the mobile menu, accordions and the login code boxes. */
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/assets/Vazirmatn-Regular-e382101336.woff2) format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url(/assets/Vazirmatn-Medium-3333e31188.woff2) format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 600 700; font-display: swap; src: url(/assets/Vazirmatn-Bold-836fae7d42.woff2) format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 800; font-display: swap; src: url(/assets/Vazirmatn-ExtraBold-cd67558bbc.woff2) format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 900; font-display: swap; src: url(/assets/Vazirmatn-Black-e65a05523e.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; overflow-x: hidden; }
main { display: block; }
a { color: inherit; }
img, svg { max-width: none; }
[hidden] { display: none !important; }

/* One design for desktop (drawn at 1440) and one for phones (drawn at 390). */
.v-m { display: none; }
@media (max-width: 1023px) {
  .v-d { display: none; }
  .v-m { display: block; }
}
/* Between 1024 and 1440 the desktop design keeps its proportions (site.js sets --z = width / 1440). */
@media (min-width: 1024px) and (max-width: 1439px) {
  .v-d { width: 1440px; zoom: var(--z, 0.75); }
}
/* Phones wider than the drawing: keep the one-column layout readable, centred. */
@media (min-width: 560px) and (max-width: 1023px) {
  .v-m > * { padding-inline: max(16px, calc((100% - 640px) / 2)) !important; }
  .v-m > [aria-hidden="true"], .v-m > .m-menu { padding-inline: 0 !important; }
}

.skip { position: absolute; top: -100px; right: 16px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: #FFFFFF; color: #10221D; font-weight: 700; }
.skip:focus { top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #E39B12; outline-offset: 3px; }

/* Notched phones in landscape: content stays clear of the notch and the home bar (viewport-fit=cover). */
body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
@media (max-width: 1023px) { footer { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)) !important; } }

/* Hover feedback on every link and button (the design markup has none of its own). */
a[href], button, summary { transition: filter .15s ease, opacity .15s ease, background-color .15s ease; }
@media (hover: hover) {
  a[href]:hover, button:not([disabled]):hover { filter: brightness(1.08); }
  footer a[href]:hover, main p a[href]:hover { text-decoration: underline !important; text-underline-offset: 4px; }
  details.qa > summary:hover .qa-ic { box-shadow: 0 0 0 1.5px currentColor !important; }
}

/* Sticky header (site.js adds .hdr-stuck after the page scrolls past it). */
header.hdr-stuck { position: fixed !important; top: 0; left: 0; right: 0; z-index: 40 !important; padding-top: env(safe-area-inset-top, 0px);
  background: rgba(3, 27, 22, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6); animation: hdr-in .2s ease; }
@keyframes hdr-in { from { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { header.hdr-stuck { animation: none; } }

/* Footer links are 44px tap targets. */
footer a[href] { min-height: 44px; display: inline-flex; align-items: center; }
footer div[style*="flex-direction: column"]:has(> a[href]) { gap: 0 !important; }

/* Answers stay at a readable line length (about 75 letters). */
details.qa > p { max-width: 36em !important; }

/* Accordions (FAQ). */
details.qa > summary::-webkit-details-marker { display: none; }
details.qa .qa-ic { transition: transform .2s ease, background-color .2s ease, color .2s ease; color: #10221D; background: #FFFFFF; }
details.qa[open] .qa-ic { transform: rotate(45deg); background: #10221D; color: #FFFFFF; }
details.qa.qa-plain .qa-ic, details.qa.qa-plain[open] .qa-ic { background: transparent; color: #10221D; }
details.qa .qa-ic svg { stroke: currentColor; }

/* Mobile menu, under the header. */
.m-menu { position: relative; z-index: 5; margin: 0 16px 16px; padding: 10px; border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 0 0 1px rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 8px; }
.m-menu nav { display: flex; flex-direction: column; }
.m-menu nav a { min-height: 48px; padding: 0 14px; border-radius: 14px; display: flex; align-items: center; color: #EEF4F1; text-decoration: none; font-size: 16px; font-weight: 700; }
.m-menu nav a[aria-current="page"] { background: rgba(255,255,255,0.08); }
.m-menu-cta { height: 52px; border-radius: 999px; background: #E39B12; color: #241500; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.m-menu-alt { height: 48px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22); color: #EEF4F1; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* Login code boxes. */
.code-box:focus { background: rgba(255,255,255,0.14) !important; box-shadow: inset 0 0 0 2px #E39B12 !important; }
.login-form button[disabled] { opacity: .7; cursor: progress; }

/* FAQ search. */
.faq-search::placeholder { color: #93A69F; opacity: 1; }
.faq-search::-webkit-search-cancel-button { filter: invert(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mv, .mv * { animation: none !important; }
  details.qa .qa-ic { transition: none; }
}
