@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: 700 900;
    font-display: swap;
}

:root {
    --bg: #12151B;
    --surface: #242A33;
    --surface-raised: #2C333E;
    --text: #E6E7E8;
    --muted: #C7C9CC;
    --green: #6aaa64;
    --green-bright: #86c97f;
    --yellow: #c9b458;
    --line: rgba(255, 255, 255, 0.09);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    --radius-lg: 28px;
    --radius-md: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 84% 7%, rgba(106, 170, 100, 0.18), transparent 28rem),
        radial-gradient(circle at 8% 38%, rgba(201, 180, 88, 0.09), transparent 24rem),
        var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.75;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: linear-gradient(to bottom, black, transparent 68%);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    inset-inline-start: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: relative;
    z-index: 10;
    width: min(1120px, calc(100% - 40px));
    min-height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand img {
    border-radius: 10px;
    box-shadow: 0 8px 26px rgba(106, 170, 100, 0.18);
}

.brand span { display: grid; line-height: 1.05; }
.brand b { font-size: 1rem; font-weight: 800; }
.brand small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }

.language-switch {
    display: flex;
    padding: 4px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.language-switch button {
    min-height: 38px;
    padding: 6px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: 600 0.78rem 'Vazirmatn', sans-serif;
    cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
    background: var(--surface-raised);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

main {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

[hidden] { display: none !important; }

.language-panel { padding: 72px 0 96px; }

.hero {
    min-height: 470px;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: clamp(48px, 8vw, 104px);
}

[dir="rtl"] .hero { grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr); }
[dir="rtl"] .hero-copy { grid-column: 2; grid-row: 1; }
[dir="rtl"] .word-card { grid-column: 1; grid-row: 1; }

.eyebrow, .section-kicker {
    margin: 0 0 10px;
    color: var(--green-bright);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero-heading {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero h1 span,
.hero-heading span { display: block; color: var(--green-bright); }

.lede {
    max-width: 660px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 34px;
}

.primary-action, .feedback-card > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 21px;
    border-radius: 15px;
    background: var(--green);
    color: #081009;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(106, 170, 100, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.primary-action svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.primary-action:hover, .feedback-card > a:hover { background: var(--green-bright); transform: translateY(-2px); }

.text-action {
    color: var(--muted);
    font-size: 0.9rem;
    text-underline-offset: 5px;
}
.text-action:hover { color: var(--text); }

.word-card {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 94px);
    gap: 10px;
    justify-content: center;
    padding: 44px 28px 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(32, 39, 53, 0.88), rgba(23, 28, 39, 0.72));
    box-shadow: var(--shadow);
    transform: rotate(-2deg);
}

[dir="rtl"] .word-card { transform: rotate(2deg); }

.word-card::after {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    pointer-events: none;
}

.tile {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: #2b3240;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text);
}
.tile-green { background: var(--green); border-color: var(--green); color: #081009; }
.tile-yellow { background: var(--yellow); border-color: var(--yellow); color: #171406; }
.word-card p { grid-column: 1 / -1; margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 0.8rem; }

.contact-card, .report-guide, .feedback-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(23, 28, 39, 0.82);
    box-shadow: var(--shadow);
}

.contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    padding: clamp(30px, 5vw, 52px);
    margin: 42px 0 82px;
    overflow: hidden;
    position: relative;
}

.contact-card::before {
    content: '';
    position: absolute;
    width: 230px;
    height: 230px;
    inset-inline-end: -110px;
    top: -110px;
    border-radius: 50%;
    background: rgba(106, 170, 100, 0.11);
    filter: blur(2px);
}

.contact-card h2, .report-guide h2, .section-heading h2, .feedback-card h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.25;
}

.contact-card p:not(.section-kicker), .report-heading > p:not(.section-kicker), .feedback-card p:not(.section-kicker) {
    max-width: 640px;
    margin: 10px 0 0;
    color: var(--muted);
}

.email-address {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 14px 18px;
    border: 1px solid rgba(106, 170, 100, 0.34);
    border-radius: 15px;
    background: rgba(106, 170, 100, 0.08);
    color: var(--green-bright);
    font-weight: 800;
    text-decoration: none;
    direction: ltr;
}

.email-address svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.email-address:hover { border-color: var(--green-bright); background: rgba(106, 170, 100, 0.14); }

.report-guide {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(30px, 6vw, 72px);
    padding: clamp(30px, 5vw, 54px);
    margin-bottom: 82px;
}

.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li { display: flex; align-items: center; gap: 13px; min-height: 48px; color: var(--muted); border-bottom: 1px solid var(--line); }
.report-list li:last-child { border-bottom: 0; }
.report-list span { flex: 0 0 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-raised); color: var(--green-bright); font-weight: 800; font-size: 0.76rem; }

.privacy-note {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    padding: 15px 18px;
    border-inline-start: 3px solid var(--yellow);
    border-radius: 8px;
    background: rgba(201, 180, 88, 0.07);
    color: var(--muted);
    font-size: 0.84rem;
}
.privacy-note strong { color: var(--text); }

.quick-help { scroll-margin-top: 24px; margin-bottom: 82px; }
.section-heading { margin-bottom: 28px; }

.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(23, 28, 39, 0.72); overflow: clip; transition: border-color 0.2s ease, background 0.2s ease; }
.faq-list details[open] { border-color: rgba(106, 170, 100, 0.3); background: rgba(32, 39, 53, 0.78); }
.faq-list summary { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; cursor: pointer; font-weight: 700; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: 0 0 24px; height: 24px; }
.plus::before, .plus::after { content: ''; position: absolute; background: var(--green-bright); border-radius: 2px; transition: transform 0.22s ease; }
.plus::before { width: 14px; height: 2px; top: 11px; left: 5px; }
.plus::after { width: 2px; height: 14px; top: 5px; left: 11px; }
details[open] .plus::after { transform: rotate(90deg); }
.answer { padding: 0 22px 20px; }
.answer p { margin: 0; color: var(--muted); }

.feedback-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 36px;
    padding: clamp(30px, 5vw, 52px);
    background:
        linear-gradient(120deg, rgba(106, 170, 100, 0.1), transparent 52%),
        rgba(23, 28, 39, 0.82);
}

.feedback-card > a { white-space: nowrap; }

footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--green-bright); }
.sep { opacity: 0.4; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

@media (max-width: 780px) {
    .site-header { width: min(100% - 28px, 1120px); min-height: 76px; }
    .brand small { display: none; }
    .language-switch button { min-height: 40px; padding-inline: 11px; }
    main { width: min(100% - 28px, 1080px); }
    .language-panel { padding: 42px 0 68px; }
    .hero, [dir="rtl"] .hero { min-height: auto; grid-template-columns: 1fr; gap: 46px; }
    [dir="rtl"] .hero-copy, [dir="rtl"] .word-card { grid-column: 1; grid-row: auto; }
    [dir="rtl"] .hero-copy { grid-row: 1; }
    .word-card { width: min(310px, 100%); margin: 0 auto; grid-template-columns: repeat(2, 78px); padding: 34px 22px 28px; }
    .hero h1,
    .hero-heading { font-size: clamp(2.5rem, 14vw, 4.1rem); }
    .contact-card, .report-guide, .feedback-card { grid-template-columns: 1fr; }
    .contact-card { margin: 58px 0 64px; gap: 24px; }
    .email-address { width: 100%; justify-content: space-between; font-size: 0.9rem; }
    .report-guide, .quick-help { margin-bottom: 64px; }
    .feedback-card > a { width: 100%; }
}

@media (max-width: 420px) {
    .brand img { width: 34px; height: 34px; }
    .brand b { font-size: 0.9rem; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .primary-action, .text-action { width: 100%; text-align: center; }
    .text-action { padding: 8px; }
    .contact-card, .report-guide, .feedback-card { border-radius: 22px; padding: 26px 20px; }
    .faq-list summary { padding: 16px 17px; }
    .answer { padding: 0 17px 18px; }
    footer { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
