:root {
    --rahmati-red: #d5001c;
    --rahmati-red-dark: #ad0017;
    --text: #3f454d;
    --muted: #6f7782;
    --line: #e6e8eb;
    --soft: #f6f7f8;
    --white: #ffffff;
    --shadow: 0 16px 45px rgba(33, 37, 41, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    background: var(--white);
}

a {
    color: inherit;
}

.topbar {
    background: var(--rahmati-red);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 142px;
    height: auto;
    filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.22));
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
    font-weight: 700;
}

.navlinks a {
    text-decoration: none;
    opacity: 0.96;
}

.navlinks a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.hero {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 42px;
    text-align: center;
}

.hero-logo {
    width: min(350px, 72vw);
    height: auto;
    margin-bottom: 32px;
    filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.22));
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--rahmati-red);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--rahmati-red);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    text-transform: uppercase;
}

.lead {
    max-width: 760px;
    margin: 22px auto 0;
    color: #555d66;
    font-size: 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 2px solid var(--rahmati-red);
    border-radius: 3px;
    background: var(--rahmati-red);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
}

.button.secondary {
    background: var(--white);
    color: var(--rahmati-red);
}

.intro-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    width: min(1060px, calc(100% - 32px));
    margin: 18px auto 72px;
    gap: 48px;
    align-items: center;
}

.market-card {
    min-height: 285px;
    border-radius: 4px;
    background:
        linear-gradient(135deg, rgba(213, 0, 28, 0.1), rgba(255, 255, 255, 0.7)),
        repeating-linear-gradient(90deg, #f3f3f3 0, #f3f3f3 16px, #ffffff 16px, #ffffff 32px);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.market-card::before {
    content: "";
    position: absolute;
    inset: 30px;
    border: 3px solid rgba(213, 0, 28, 0.16);
}

.market-card::after {
    content: "REWE Rahmati";
    position: absolute;
    left: 36px;
    bottom: 30px;
    color: var(--rahmati-red);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.intro-copy h2,
.form-shell h2 {
    margin: 0 0 16px;
    color: var(--rahmati-red);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    text-transform: uppercase;
}

.intro-copy p {
    margin: 0 0 16px;
    color: #555d66;
    font-size: 18px;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: min(1060px, calc(100% - 32px));
    margin: 0 auto 74px;
    gap: 18px;
}

.benefit {
    border-top: 4px solid var(--rahmati-red);
    padding: 24px;
    background: var(--soft);
}

.benefit h3 {
    margin: 0 0 8px;
    color: var(--rahmati-red);
    font-size: 20px;
}

.benefit p {
    margin: 0;
    color: var(--muted);
}

.form-band {
    background: linear-gradient(180deg, #fafafa, #ffffff);
    border-top: 1px solid var(--line);
    padding: 72px 0;
}

.form-shell {
    width: min(940px, calc(100% - 32px));
    margin: 0 auto;
}

.form-shell > p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #555d66;
    font-size: 18px;
}

.notice {
    margin: 0 0 26px;
    padding: 14px 16px;
    border-left: 5px solid var(--rahmati-red);
    background: #fff6f7;
}

.success {
    margin: 0 0 26px;
    padding: 18px;
    border-left: 5px solid #148642;
    background: #f0fff5;
    color: #185c32;
    font-weight: 700;
}

.error-list {
    margin: 0 0 26px;
    padding: 18px 18px 18px 38px;
    border-left: 5px solid var(--rahmati-red);
    background: #fff6f7;
    color: #8a0012;
}

.application-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
}

.required {
    color: var(--rahmati-red);
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfd4da;
    border-radius: 3px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    background: var(--white);
}

textarea {
    min-height: 170px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(213, 0, 28, 0.24);
    border-color: var(--rahmati-red);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 18px 22px;
}

.privacy {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: var(--soft);
}

.privacy input {
    width: auto;
    min-height: 0;
    margin-top: 5px;
}

.privacy a {
    color: var(--rahmati-red);
    font-weight: 700;
}

.turnstile-wrap {
    grid-column: 1 / -1;
}

.submit-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
}

button {
    min-height: 48px;
    border: 0;
    border-radius: 3px;
    padding: 0 26px;
    background: var(--rahmati-red);
    color: var(--white);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

button:hover {
    background: var(--rahmati-red-dark);
}

.footer {
    background: #2d3035;
    color: var(--white);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
    gap: 18px;
}

.footer-links {
    display: flex;
    gap: 20px;
    font-weight: 700;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

@media (max-width: 860px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
        gap: 14px;
    }

    .navlinks {
        width: 100%;
        overflow-x: auto;
        gap: 18px;
        padding-bottom: 4px;
    }

    .intro-grid,
    .benefits {
        grid-template-columns: 1fr;
    }

    .intro-grid {
        gap: 28px;
        margin-bottom: 50px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 38px;
    }

    .lead,
    .intro-copy p,
    .form-shell > p {
        font-size: 17px;
    }

    .application-form,
    .file-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
