.affiliate-page {
    --affiliate-ink: #292524;
    --affiliate-muted: #57534e;
    --affiliate-paper: #fffdfd;
    background: #fff4f5;
}

.affiliate-navbar {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(190, 18, 60, 0.1);
    background: rgba(255, 250, 250, 0.94);
    box-shadow: 0 8px 28px -24px rgba(136, 19, 55, 0.55);
    backdrop-filter: blur(16px);
}

.affiliate-navbar-inner {
    width: min(1100px, calc(100% - 3rem));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.affiliate-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #be123c;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.affiliate-navbar-brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.affiliate-navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.affiliate-navbar-home {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.15rem;
    color: #57534e;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 150ms ease;
}

.affiliate-navbar-home:hover {
    color: #be123c;
}

.affiliate-language-switcher {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    background: #fff;
}

.affiliate-language-switcher a {
    min-width: 2.25rem;
    min-height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #78716c;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.affiliate-language-switcher a:hover {
    color: #be123c;
    background: #fff1f2;
}

.affiliate-language-switcher a.is-active {
    color: #fff;
    background: #be123c;
}

.affiliate-navbar-brand:focus-visible,
.affiliate-navbar-home:focus-visible,
.affiliate-language-switcher a:focus-visible {
    outline: 3px solid rgba(225, 29, 72, 0.32);
    outline-offset: 3px;
}

.affiliate-main {
    min-height: calc(100vh - 92px);
    padding: clamp(1rem, 3vw, 2.5rem) 1.25rem clamp(4rem, 8vw, 7rem);
    background:
        radial-gradient(circle at 8% 18%, rgba(251, 113, 133, 0.16), transparent 28rem),
        radial-gradient(circle at 92% 78%, rgba(251, 191, 36, 0.12), transparent 26rem),
        #fff4f5;
}

.affiliate-sheet {
    width: min(1100px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.5fr);
    background: var(--affiliate-paper);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 32px 80px -30px rgba(136, 19, 55, 0.34);
    animation: affiliate-sheet-arrive 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes affiliate-sheet-arrive {
    from {
        transform: translateY(18px);
        box-shadow: 0 20px 46px -28px rgba(136, 19, 55, 0.22);
    }
    to {
        transform: translateY(0);
        box-shadow: 0 32px 80px -30px rgba(136, 19, 55, 0.34);
    }
}

.affiliate-intro {
    position: relative;
    min-height: 100%;
    padding: clamp(2rem, 3.5vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    overflow: hidden;
    color: #fff;
    background: #a91642;
}

.affiliate-intro::after {
    content: '';
    position: absolute;
    width: 21rem;
    height: 21rem;
    right: -13rem;
    bottom: -9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    box-shadow:
        0 0 0 3rem rgba(255, 255, 255, 0.035),
        0 0 0 6rem rgba(255, 255, 255, 0.025);
    pointer-events: none;
}

.affiliate-brand-mark {
    position: relative;
    z-index: 1;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 12px 30px -14px rgba(62, 8, 26, 0.7);
}

.affiliate-brand-mark img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.affiliate-brand-mark:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.affiliate-intro-copy {
    position: relative;
    z-index: 1;
}

.affiliate-intro h1 {
    max-width: 10ch;
    margin: 0 0 1.25rem;
    color: #fff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.35rem, 3.2vw, 2.5rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.affiliate-intro p {
    max-width: 34ch;
    margin: 0;
    color: #fff2f4;
    font-size: 1.04rem;
    line-height: 1.65;
}

.affiliate-note {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    color: #ffe4e9;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
}

.affiliate-note i {
    height: 1px;
    background: rgba(255, 255, 255, 0.38);
}

.affiliate-form-panel {
    padding: clamp(2rem, 5vw, 4rem);
}

.affiliate-form-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.affiliate-form-heading h2 {
    margin: 0;
    color: var(--affiliate-ink);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.55rem, 2.3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.affiliate-form-heading p {
    margin: 0;
    color: var(--affiliate-muted);
    font-size: 0.83rem;
}

.affiliate-messages {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.affiliate-message {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    align-items: start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    color: #292524;
}

.affiliate-message > span {
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    line-height: 1;
}

.affiliate-message p {
    margin: 0;
    line-height: 1.5;
}

.affiliate-message--success {
    background: #ecfdf5;
}

.affiliate-message--success > span {
    background: #047857;
}

.affiliate-message--error {
    background: #fff1f2;
}

.affiliate-message--error > span {
    background: #be123c;
}

.affiliate-form {
    display: grid;
    gap: 1.5rem;
}

.affiliate-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
}

.affiliate-field {
    min-width: 0;
}

.affiliate-field label,
.affiliate-label-row label {
    display: block;
    margin-bottom: 0.55rem;
    color: #3f3a37;
    font-size: 0.91rem;
    font-weight: 700;
    line-height: 1.35;
}

.affiliate-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.affiliate-label-row > span {
    color: #78716c;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.affiliate-field input,
.affiliate-field select,
.affiliate-field textarea {
    width: 100%;
    margin: 0;
    border: 1px solid #cfc9c6;
    border-radius: 12px;
    background: #fff;
    color: var(--affiliate-ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.affiliate-field input,
.affiliate-field select {
    min-height: 50px;
    padding: 0.8rem 0.95rem;
}

.affiliate-field textarea {
    min-height: 146px;
    padding: 0.9rem 0.95rem;
    resize: vertical;
}

.affiliate-field input::placeholder,
.affiliate-field textarea::placeholder {
    color: #756e6a;
    opacity: 1;
}

.affiliate-field input:hover,
.affiliate-field select:hover,
.affiliate-field textarea:hover {
    border-color: #9f918c;
}

.affiliate-field input:focus,
.affiliate-field select:focus,
.affiliate-field textarea:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
    background: #fffdfd;
}

.affiliate-select-wrap {
    position: relative;
}

.affiliate-select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #78716c;
    border-bottom: 2px solid #78716c;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.affiliate-select-wrap select {
    appearance: none;
    padding-right: 2.8rem;
}

.affiliate-field small {
    display: block;
    margin-top: 0.45rem;
    color: var(--affiliate-muted);
    font-size: 0.79rem;
    line-height: 1.45;
}

.affiliate-consent {
    position: relative;
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    align-items: start;
    gap: 0.75rem;
    color: #4a4542;
    font-size: 0.88rem;
    line-height: 1.55;
    cursor: pointer;
}

.affiliate-consent input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.affiliate-consent > span[aria-hidden] {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.08rem;
    display: grid;
    place-items: center;
    border: 1px solid #a8a29e;
    border-radius: 5px;
    background: #fff;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.affiliate-consent input:checked + span[aria-hidden] {
    border-color: #be123c;
    background: #be123c;
}

.affiliate-consent input:checked + span[aria-hidden]::after {
    content: '';
    width: 0.3rem;
    height: 0.58rem;
    margin-top: -0.1rem;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.affiliate-consent input:focus-visible + span[aria-hidden] {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.16);
}

.affiliate-consent a {
    color: #9f1239;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.affiliate-consent a:hover {
    color: #be123c;
}

.affiliate-submit {
    min-height: 54px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border: 0;
    border-radius: 12px;
    background: #be123c;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 14px 28px -16px rgba(136, 19, 55, 0.8);
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.affiliate-submit:hover {
    background: #9f1239;
    transform: translateY(-1px);
    box-shadow: 0 18px 32px -17px rgba(136, 19, 55, 0.85);
}

.affiliate-submit:focus-visible {
    outline: 3px solid rgba(225, 29, 72, 0.3);
    outline-offset: 3px;
}

.affiliate-submit:disabled {
    background: #9f8e91;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.affiliate-submit-arrow {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.2rem;
    transition: transform 160ms ease;
}

.affiliate-submit:hover .affiliate-submit-arrow {
    transform: translateX(2px);
}

.affiliate-submit-loading {
    display: none;
}

.affiliate-form.is-submitting .affiliate-submit-label,
.affiliate-form.is-submitting .affiliate-submit-arrow {
    display: none;
}

.affiliate-form.is-submitting .affiliate-submit-loading {
    display: block;
}

.affiliate-submit-note {
    max-width: 58ch;
    margin: -0.7rem auto 0;
    color: var(--affiliate-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.affiliate-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 850px) {
    .affiliate-main {
        padding-top: 1.5rem;
    }

    .affiliate-sheet {
        grid-template-columns: 1fr;
    }

    .affiliate-intro {
        min-height: auto;
        padding: 2.25rem;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1.5rem;
    }

    .affiliate-intro-copy {
        grid-column: 2;
    }

    .affiliate-intro h1 {
        max-width: 16ch;
        font-size: clamp(2rem, 6vw, 3.1rem);
    }

    .affiliate-intro p {
        max-width: 58ch;
    }

    .affiliate-note {
        display: none;
    }
}

@media (max-width: 620px) {
    .affiliate-navbar-inner {
        width: calc(100% - 2rem);
        min-height: 64px;
    }

    .affiliate-navbar-brand {
        gap: 0.55rem;
        font-size: 1.32rem;
    }

    .affiliate-navbar-brand img {
        width: 38px;
        height: 38px;
        border-radius: 9px;
    }

    .affiliate-navbar-home {
        display: none;
    }

    .affiliate-main {
        padding: 0 0 3rem;
        background: #fff4f5;
    }

    .affiliate-sheet {
        border-radius: 0 0 16px 16px;
        box-shadow: 0 20px 48px -28px rgba(136, 19, 55, 0.28);
    }

    .affiliate-intro {
        padding: 1.8rem 1.25rem 2rem;
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .affiliate-brand-mark {
        display: none;
    }

    .affiliate-intro-copy {
        grid-column: 1;
    }

    .affiliate-intro h1 {
        margin-bottom: 0.9rem;
        font-size: clamp(2rem, 11vw, 2.8rem);
    }

    .affiliate-intro p {
        font-size: 0.96rem;
    }

    .affiliate-form-panel {
        padding: 2rem 1.25rem 2.25rem;
    }

    .affiliate-form-heading {
        display: block;
        margin-bottom: 1.75rem;
    }

    .affiliate-form-heading p {
        margin-top: 0.5rem;
    }

    .affiliate-field-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .affiliate-sheet {
        animation: none;
    }

    .affiliate-field input,
    .affiliate-field select,
    .affiliate-field textarea,
    .affiliate-consent > span[aria-hidden],
    .affiliate-submit,
    .affiliate-submit-arrow {
        transition: none;
    }

    .affiliate-navbar-home {
        transition: none;
    }
}
