:root {
    --blue-deep: #1B3F91;
    --blue-ink: #12295E;
    --red-brand: #D62727;
    --wheat: #C89B3C;
    --cream: #F6F3EC;
    --paper: #FFFFFF;
    --ink: #1E2126;
    --steel: #667085;
    --line: #E4DFD3;
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-ar: 'Cairo', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

optgroup option {
    padding-left: revert-layer;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
    font-family: var(--font-ar);
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .step-num {
    font-family: var(--font-ar);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Furrow divider — signature element: repeating diagonal plow lines */
.furrow {
    height: 14px;
    background-image: repeating-linear-gradient(120deg, var(--wheat) 0 2px, transparent 2px 22px);
    opacity: .55;
}

html[dir="rtl"] .furrow {
    background-image: repeating-linear-gradient(60deg, var(--wheat) 0 2px, transparent 2px 22px);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(18, 41, 94, .04), 0 4px 14px rgba(18, 41, 94, .05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
}

.lang-switch {
    display: flex;
    gap: 4px;
    background: var(--cream);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.lang-switch button {
    border: none;
    background: transparent;
    padding: 6px 13px;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--steel);
    cursor: pointer;
    border-radius: 999px;
    transition: all .15s ease;
}

.lang-switch button.active {
    background: var(--blue-deep);
    color: #fff;
}

/* Hero */
.hero {
    padding: 64px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 680px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--red-brand);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--red-brand);
    border-radius: 50%;
    display: inline-block;
}

h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 4.6vw, 54px);
    line-height: 1.05;
    color: var(--blue-ink);
    letter-spacing: -.01em;
    margin-bottom: 18px;
}

.hero p.lead {
    font-size: 17px;
    color: var(--steel);
    max-width: 46ch;
    margin-bottom: 28px;
}

.cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 26px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary {
    background: var(--red-brand);
    color: #fff;
    box-shadow: 0 6px 18px rgba(214, 39, 39, .28);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--blue-ink);
    border: 1.5px solid var(--line);
}

.btn-ghost:hover {
    border-color: var(--blue-deep);
}

/* trust strip */
.trust {
    background: var(--blue-ink);
    padding: 34px 0;
}

.trust-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 64px;
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.trust-item {
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    flex: 0 1 300px;
}

.trust-item .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--wheat);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--wheat);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
}

.trust-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.trust-item p {
    font-size: 13px;
    color: #C9D2E6;
}

/* form section */
.form-section {
    padding: 64px 0 100px;
}

.form-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}

.form-head h2 {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.4vw, 36px);
    color: var(--blue-ink);
    margin-bottom: 10px;
}

.form-head p {
    color: var(--steel);
    font-size: 15px;
}

form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 50px -30px rgba(18, 41, 94, .25);
}

.step {
    padding: 32px;
    border-bottom: 1px solid var(--line);
}

.step:last-of-type {
    border-bottom: none;
}

.step-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.step-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--blue-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-head h3 {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--blue-ink);
    font-weight: 600;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1/-1;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

label .opt {
    font-weight: 400;
    color: var(--steel);
    font-size: 12px;
}

input,
select {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--cream);
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}

html[dir="rtl"] input,
html[dir="rtl"] select {
    font-family: var(--font-ar);
}

input:focus,
select:focus {
    border-color: var(--blue-deep);
    background: #fff;
}

input:invalid:not(:placeholder-shown) {
    border-color: var(--red-brand);
}

small.hint {
    font-size: 12px;
    color: var(--steel);
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 28px 32px 8px;
}

.consent input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue-deep);
    flex-shrink: 0;
}

.consent label {
    font-weight: 400;
    font-size: 13.5px;
    color: var(--steel);
    line-height: 1.5;
}

.submit-row {
    padding: 20px 32px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.submit-row .btn-primary {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 15px;
}

#formError {
    color: var(--red-brand);
    font-size: 13px;
    display: none;
}

/* success panel */
.success-panel {
    display: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}

.seal {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: conic-gradient(var(--blue-deep) 0 50%, var(--red-brand) 50% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal::after {
    content: "";
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--paper);
    display: flex;
}

.seal-check {
    position: absolute;
    color: #fff;
    font-size: 0;
}

.success-panel h3 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--blue-ink);
    margin-bottom: 10px;
}

.success-panel p {
    color: var(--steel);
    font-size: 15px;
    max-width: 44ch;
    margin: 0 auto 6px;
}

.ref-code {
    display: inline-block;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--cream);
    border: 1px dashed var(--wheat);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--blue-ink);
}

footer {
    padding: 36px 0;
    text-align: center;
    color: var(--steel);
    font-size: 13px;
    border-top: 1px solid var(--line);
}

@media (max-width:820px) {
    .trust-row {
        flex-direction: column;
        gap: 22px;
        align-items: stretch;
        padding: 0 24px;
    }

    .trust-item {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: row;
    }

    .brand img {
        height: 28px;
    }
}