:root {
  --navy: #071A2F; --ocean: #075985; --teal: #0AB8AA; --mint: #19CD9F; --white: #F7FBFC; --gold: #F5C723;
  --muted: #3d5670; --line: rgba(7, 89, 133, .16); --ease: cubic-bezier(.2, .7, .2, 1);
  --latin: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fa: "Vazirmatn", Tahoma, system-ui, sans-serif;
  --fa-display: "Lalezar", "Vazirmatn", Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--navy); line-height: 1.7; font-family: var(--fa); overflow-x: hidden;
  background: radial-gradient(60% 50% at 88% 6%, rgba(25,205,159,.24), transparent 70%),
              radial-gradient(55% 55% at 6% 60%, rgba(7,89,133,.15), transparent 70%), var(--white);
  background-attachment: fixed;
}
html[lang="en"] body { font-family: var(--latin); }
:focus-visible { outline: 2px solid var(--ocean); outline-offset: 3px; border-radius: 6px; }

.nav { position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem clamp(1.25rem, 5vw, 3.5rem); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; font: 600 1.35rem var(--latin); }
.logo img { height: 34px; width: auto; }
.lang { font: inherit; font-size: .9rem; cursor: pointer; min-height: 44px; padding: 0 1.1rem; color: var(--navy); background: rgba(255,255,255,.7); border: 1px solid #fff; border-radius: 999px; box-shadow: 0 8px 20px -14px rgba(7,89,133,.5); }
.lang:hover { background: #fff; }

/* Hero */
.hero {
  min-height: 100vh; min-height: 100svh; display: grid; align-items: center; gap: clamp(1rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); padding: 7rem clamp(1.25rem, 6vw, 5rem) 4rem;
}
.info { max-width: 38rem; }
.badge { display: inline-block; margin: 0 0 1.5rem; padding: .35rem .95rem; font-size: .78rem; font-weight: 500; color: var(--ocean); background: rgba(255,255,255,.7); border: 1px solid #fff; border-radius: 999px; box-shadow: 0 8px 20px -14px rgba(7,89,133,.5); }
html[lang="en"] .badge { letter-spacing: .14em; font-weight: 600; }
.badge::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: .6rem; border-radius: 50%; background: var(--gold); animation: pulse 2s ease-out infinite; }
h1 {
  margin: 0 0 .8rem; font: 400 clamp(2.5rem, 7.5vw, 4.8rem)/1.25 var(--fa-display); text-wrap: balance;
  background: linear-gradient(100deg, var(--navy) 35%, var(--ocean) 75%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[lang="en"] h1 { font: 600 clamp(2.5rem, 7.5vw, 4.8rem)/1.06 var(--latin); letter-spacing: -.035em; }
.tagline { margin: 0 0 1.2rem; font-size: 1.2rem; font-weight: 500; color: var(--ocean); }
.desc { max-width: 34rem; margin: 0 0 1.8rem; color: var(--muted); font-size: 1.05rem; line-height: 1.9; white-space: pre-line; }
.meta { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.meta[hidden] { display: none; }
.meta li { display: flex; gap: .6rem; align-items: baseline; padding: .6rem 1.1rem; background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.55)); border: 1px solid #fff; border-radius: 18px; box-shadow: 0 16px 34px -26px rgba(7,89,133,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.meta b { color: var(--muted); font-weight: 500; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.btn {
  font: inherit; font-size: 1.05rem; font-weight: 500; cursor: pointer; color: #fff; border: 0; min-height: 52px; padding: 0 2.2rem; border-radius: 999px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, var(--ocean), var(--teal)); box-shadow: 0 14px 28px -16px rgba(7,89,133,.8); transition: transform .35s var(--ease), filter .35s;
}
.btn::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent); }
.btn:hover { transform: translateY(-2px); filter: saturate(1.15); }
.btn:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn.wide { width: 100%; }
.link { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; color: var(--ocean); font-weight: 500; background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 82% / 0 2px; transition: background-size .4s var(--ease); }
html[dir="rtl"] .link { background-position: 100% 82%; }
.link:hover { background-size: 100% 2px; }

/* Signature visual */
.visual { --px: 0; position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 32rem; justify-self: center; }
.ribbons { position: absolute; inset: -12%; width: 124%; height: 124%; pointer-events: none; }
.ribbons path { stroke-dasharray: 340 160; animation: flow 18s linear infinite; }
.ribbons path:nth-child(2) { animation-duration: 22s; animation-direction: reverse; } .ribbons path:nth-child(3) { animation-duration: 26s; }
.ribbons path:nth-child(4) { animation-duration: 20s; animation-direction: reverse; } .ribbons path:nth-child(5) { animation-duration: 30s; }
.glow { position: absolute; width: 85%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(10,184,170,.34), rgba(25,205,159,.1) 45%, transparent 70%); animation: breathe 7s ease-in-out infinite alternate; }
.mark { position: relative; width: 62%; height: auto; filter: drop-shadow(0 30px 40px rgba(7,89,133,.28)); animation: bob 9s ease-in-out infinite alternate; }

/* Dialog */
dialog { border: 0; padding: 0; background: transparent; width: min(100% - 1.5rem, 30rem); max-height: 94vh; overflow: visible; color: var(--navy); }
dialog::backdrop { background: rgba(7,26,47,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.panel { position: relative; padding: 2rem 1.6rem 1.8rem; background: rgba(255,255,255,.95); border: 1px solid #fff; border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(7,26,47,.6); max-height: 92vh; overflow: auto; animation: rise .5s var(--ease); }
.panel h2 { margin: 0 0 1.2rem; font: 400 1.9rem/1.3 var(--fa-display); }
html[lang="en"] .panel h2 { font: 600 1.6rem/1.3 var(--latin); }
.close { position: absolute; top: .7rem; inset-inline-end: .9rem; width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; border: 0; background: none; cursor: pointer; color: var(--muted); }
label { display: block; margin-bottom: 1rem; font-size: .92rem; color: var(--muted); }
label span { display: block; margin-bottom: .3rem; }
input:not([type=checkbox]) { width: 100%; min-height: 48px; padding: 0 1rem; font: inherit; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .3s, box-shadow .3s; }
input:not([type=checkbox]):focus { border-color: var(--teal); outline: 0; box-shadow: 0 0 0 4px rgba(10,184,170,.18); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: .35rem; width: 18px; height: 18px; accent-color: var(--ocean); }
.check span { margin: 0; }
.error { min-height: 1.4em; margin: 0 0 .8rem; color: #b42318; font-size: .9rem; }
.done { text-align: center; padding: 1rem 0; }
.done p { color: var(--muted); margin: 0 0 1.5rem; }
.tick { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2.2rem; color: #fff; border-radius: 50%; background: linear-gradient(135deg, var(--mint), var(--teal)); animation: pop .6s var(--ease); }
.demo { position: fixed; bottom: 14px; inset-inline-start: 14px; z-index: 20; padding: .4rem .9rem; font-size: .78rem; color: var(--navy); background: rgba(245,199,35,.9); border-radius: 999px; }

/* Motion */
.info > * { animation: rise .9s var(--ease) both; }
.info > :nth-child(2) { animation-delay: .1s; } .info > :nth-child(3) { animation-delay: .2s; } .info > :nth-child(4) { animation-delay: .3s; } .info > :nth-child(5) { animation-delay: .4s; } .info > :nth-child(6) { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,199,35,.6); } 80%, 100% { box-shadow: 0 0 0 9px rgba(245,199,35,0); } }
@keyframes flow { to { stroke-dashoffset: -1000; } }
@keyframes breathe { from { transform: scale(.88); opacity: .6; } to { transform: scale(1.1); opacity: 1; } }
@keyframes bob { to { transform: translateY(-14px); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 6rem; }
  .visual { order: -1; max-width: 14rem; margin-bottom: -.5rem; }
  .ribbons { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.referral-group {
    margin: 18px 0;
}

.field-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.field-hint {
    font-size: 12px;
    color: #718096;
    margin-bottom: 12px;
}

.referral-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.referral-options .option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dce8e8;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: .2s;
}

.referral-options .option:has(input:checked) {
    border-color: #159b8b;
    background: #eaf8f5;
}

.referral-options input {
    accent-color: #159b8b;
}

@media(max-width: 480px) {
    .referral-options {
        grid-template-columns: 1fr;
    }
}

/* هماهنگی ظاهر Select با سایر ورودی‌ها */
form select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--border, #ddd);
    border-radius: 12px;
    background: var(--input-bg, #fff);
    color: inherit;
    font: inherit;
    outline: none;
    appearance: none;
    cursor: pointer;
}

form select:focus {
    border-color: var(--accent, #159b8b);
}

/* Referral */
.referral-group {
    width: 100%;
    margin-top: 12px;
}

.referral-group > p {
    margin-bottom: 12px;
}

.referral-group > p span {
    color: #e05252;
}

.referral-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.referral-options .check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.referral-options .check input {
    accent-color: var(--accent, #159b8b);
}