/* Public application form. Same colours, type and shapes as the homepage. */
:root {
  --ink: #380038; --ink-deep: #26002a; --coral: #e80050; --coral-dark: #bc003f;
  --mist: #ffe6ef; --tint: #fbf2f6; --line: #ead9e3; --field: #c9b1c2; --smoke: #6a5a6c; --white: #fff;
  --font-en: 'Poppins', Arial, sans-serif; --font-fa: 'Vazirmatn', Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--tint); color: var(--ink); font-family: var(--font-en); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
html[lang=fa] body { font-family: var(--font-fa); font-size: 17px; line-height: 1.95; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1100px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }

/* nav */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 8px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-inline-end: auto; font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; }
.lang { min-height: 40px; padding: 6px 14px; border: 0; border-radius: 100px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font-fa); }
.lang[lang=en] { font-family: var(--font-en); }
.lang:hover, .home:hover { background: var(--mist); color: var(--coral-dark); }
.home { padding: 8px 14px; border-radius: 100px; font-size: 14px; font-weight: 500; }
html[lang=fa] .home { font-size: 15px; font-weight: 600; }

/* layout: words on one side, the form on the other */
.page { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(32px, 6vw, 80px) clamp(48px, 7vw, 96px); }
.intro { position: sticky; top: calc(68px + clamp(32px, 6vw, 80px)); }
.intro h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -.04em; overflow-wrap: break-word; }
html[lang=fa] .intro h1 { font-weight: 800; line-height: 1.4; letter-spacing: 0; }
.ring { display: inline-block; width: .3em; height: .3em; margin-inline-start: .09em; border: .085em solid var(--coral); border-radius: 50%; }
.lead { margin-top: clamp(16px, 2vw, 24px); font-size: clamp(16px, 1.4vw, 18px); color: #4d3550; white-space: pre-line; overflow-wrap: anywhere; }
.lead:empty { display: none; }
.privacy { display: flex; gap: 10px; align-items: flex-start; margin-top: clamp(20px, 2.6vw, 32px); padding-top: clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); font-size: 14px; color: var(--smoke); }
.privacy svg { flex: none; margin-top: 2px; color: var(--coral-dark); }
html[lang=fa] .privacy svg { margin-top: 5px; }

.panel { padding: clamp(20px, 3.4vw, 40px); border: 1px solid var(--line); border-radius: 28px; background: var(--white); box-shadow: 0 24px 60px -30px rgba(56, 0, 56, .25); }
.note { margin-bottom: 22px; font-size: 13px; color: var(--smoke); }
.req { color: var(--coral-dark); font-weight: 700; }

/* fields */
.q { margin-bottom: 22px; }
.q > label, .q > .label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
html[lang=fa] .q > label { line-height: 1.8; }
.q input:not([type=checkbox]), .q textarea, .q select {
  display: block; width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--field); border-radius: 14px;
  background: var(--white); line-height: 1.5; transition: border-color .15s, box-shadow .15s;
}
.q textarea { min-height: 132px; resize: vertical; }
.q input:hover, .q textarea:hover, .q select:hover { border-color: var(--ink); }
.q input:not([type=checkbox]):focus, .q textarea:focus, .q select:focus { outline: 0; border-color: var(--coral); box-shadow: 0 0 0 4px var(--mist); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; cursor: pointer; }
.select select:invalid, .select select.is-empty { color: var(--smoke); }
.select::after { content: ''; position: absolute; inset-inline-end: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.q .tick { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border: 1.5px solid var(--field); border-radius: 14px; cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; }
.q .tick:hover { border-color: var(--ink); }
.q .tick:has(input:checked) { border-color: var(--coral); background: #fff7fa; }
.tick input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--coral); cursor: pointer; }
html[lang=fa] .tick input { margin-top: 5px; }
.q.is-invalid input:not([type=checkbox]), .q.is-invalid textarea, .q.is-invalid select, .q.is-invalid .tick { border-color: var(--coral-dark); background: #fff7fa; }
.q-error { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--coral-dark); }

.alert { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--mist); color: #8c0030; font-size: 14.5px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 24px; border: 2px solid transparent; border-radius: 100px; background: var(--coral); color: #fff; font-size: 16px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
html[lang=fa] .btn { font-weight: 700; line-height: 1.6; }
.btn:hover { background: var(--coral-dark); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.is-busy::before { content: ''; width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-line { width: auto; background: none; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* sent, closed, missing */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-block: clamp(8px, 2vw, 24px); }
.state h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; outline: 0; }
html[lang=fa] .state h2 { line-height: 1.6; letter-spacing: 0; }
.state p { color: #4d3550; margin-bottom: 8px; }
.badge { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; background: var(--mist); color: var(--coral-dark); }
.badge.ok { background: var(--coral); color: #fff; }
.badge svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* loading */
.skeleton { display: grid; gap: 10px; }
.skeleton i, .skeleton b { display: block; border-radius: 14px; background: linear-gradient(90deg, var(--tint) 25%, #f3e4ec 50%, var(--tint) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i { width: 38%; height: 16px; margin-top: 12px; border-radius: 8px; }
.skeleton b { height: 50px; }
.skeleton b.tall { height: 132px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .intro { position: static; }
  .home { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
