@font-face {
  font-family: Vazirmatn;
  src: url('/assets/vazirmatn.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffaf7;
  --ink: #222226;
  --muted: #736e6c;
  --line: #eee5df;
  --accent: #df784e;
  --accent-dark: #bd5a35;
  --accent-pale: #fff0e7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.site-shell { max-width: 1240px; min-height: 100vh; margin: auto; padding: 0 44px; display: flex; flex-direction: column; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; direction: ltr; text-decoration: none; font-size: 24px; font-weight: 760; letter-spacing: -.06em; font-family: ui-sans-serif, system-ui, sans-serif; }
.brand img { display: block; }
.brand-dot { color: var(--accent); }
.language-nav { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.language-nav a { text-decoration: none; }
.language-nav a:hover { color: var(--accent-dark); }
.language-nav [aria-current] { color: var(--ink); font-weight: 700; }

main { flex: 1; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 74px 0 70px; text-align: center; }
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; border: 1px solid #f6e8df; border-radius: 50%; width: 130%; height: 220px; left: -15%; top: 238px; transform: rotate(-7deg); }
.hero::after { top: 285px; border-color: #f7ede7; transform: rotate(6deg); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; border: 1px solid #f1ded2; border-radius: 999px; background: #fff7f1; color: #9d583d; font-size: 12px; font-weight: 750; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fae3d6; }
.hero h1 { margin: 24px auto 15px; max-width: 880px; font-size: clamp(48px, 6vw, 76px); line-height: 1.19; letter-spacing: -.045em; font-weight: 780; }
.hero h1 em { color: var(--accent); font-style: normal; }
.intro { max-width: 640px; margin: 0 auto 36px; color: #696564; font-size: 17px; line-height: 1.85; }
.form-card { max-width: 800px; margin: 0 auto; padding: 27px; text-align: start; background: #fff; border: 1px solid #f0e7e1; border-radius: 20px; box-shadow: 0 22px 55px rgba(84,53,38,.08), 0 2px 10px rgba(84,53,38,.03); }
label { display: block; margin-bottom: 11px; font-size: 14px; font-weight: 720; }
.input-row { display: flex; gap: 10px; }
.input-row input { min-width: 0; flex: 1; height: 58px; padding: 0 17px; border: 1px solid #e4ddd8; border-radius: 11px; outline: 0; color: var(--ink); background: #fdfbf9; }
.input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #fae4d9; }
.input-row input::placeholder { color: #a69d98; }
.input-row button { display: flex; align-items: center; justify-content: center; gap: 11px; min-width: 170px; padding: 0 17px; border: 0; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 750; transition: background .15s, transform .15s; }
.input-row button:hover, .input-row button:focus-visible { background: var(--accent-dark); }
.input-row button:active { transform: translateY(1px); }
.input-row button:disabled { opacity: .6; cursor: wait; }
.input-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field-note { margin: 15px 0 0; color: #817975; font-size: 12px; }
.form-error { margin: 16px 0 0; color: #a02d28; font-size: 13px; }
.result { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 16px 18px; border: 1px solid #f1d8c9; border-radius: 11px; background: var(--accent-pale); }
.result[hidden], .form-error[hidden] { display: none; }
.result-label { display: block; margin-bottom: 5px; color: #a35c3d; font-size: 11px; font-weight: 760; }
.result a { display: inline-block; overflow-wrap: anywhere; font-size: 17px; font-weight: 740; text-align: left; text-decoration: none; }
.result a:hover { text-decoration: underline; }
.copy-button { white-space: nowrap; padding: 10px 14px; border: 1px solid #ebc3ae; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; }
.copy-button:hover { background: #fffaf7; }
.hero-foot { margin: 22px 0 0; color: #827872; font-size: 12px; }
.foot-mark { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; margin-inline-end: 5px; border-radius: 50%; background: #f9e3d5; color: #ae6546; }

.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0 0 62px; }
.detail { padding: 23px 25px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.7); }
.detail-number { color: var(--accent); font-size: 12px; font-weight: 800; }
.detail h2 { margin: 11px 0 6px; font-size: 17px; letter-spacing: -.02em; }
.detail p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 23px 0 30px; border-top: 1px solid var(--line); color: #938b85; font-size: 12px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

html[lang=fa] { font-family: Vazirmatn, Tahoma, sans-serif; }
html[lang=fa] .hero h1 { max-width: 900px; font-size: clamp(38px, 5.4vw, 62px); line-height: 1.4; letter-spacing: 0; }
html[lang=fa] .input-row input { text-align: left; }
html[lang=fa] .input-row svg { transform: scaleX(-1); }

@media (max-width: 700px) {
  .site-shell { padding: 0 20px; }
  .topbar { height: 72px; }
  .brand { font-size: 21px; }
  .brand img { width: 32px; height: 32px; }
  .hero { padding: 59px 0 57px; }
  .hero::before { top: 250px; height: 160px; }
  .hero::after { top: 280px; height: 170px; }
  .hero h1 { font-size: clamp(42px, 10vw, 58px); }
  html[lang=fa] .hero h1 { font-size: clamp(34px, 8.8vw, 47px); line-height: 1.45; }
  .intro { font-size: 15px; margin-bottom: 28px; }
  .form-card { padding: 20px; }
  .input-row { flex-direction: column; }
  .input-row button { min-height: 54px; }
  .result { align-items: flex-start; flex-direction: column; }
  .details { grid-template-columns: 1fr; gap: 10px; padding-bottom: 42px; }
  .detail { padding: 17px 19px; }
  .detail h2 { margin: 5px 0 3px; }
  footer { padding: 20px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .input-row button { transition: none; }
}
