@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-Medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-SemiBold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root {
    color-scheme: light;
    --background: #fbf3ee;
    --surface: #fffdfb;
    --surface-strong: #ffffff;
    --text: #20201d;
    --muted: #6d675f;
    --border: #eadfd5;
    --border-strong: #d9c9bb;
    --teal: #078f84;
    --teal-dark: #056d65;
    --teal-soft: #ddf2ef;
    --coral: #fd7650;
    --coral-soft: #ffe4da;
    --error: #a83c2c;
    --error-soft: #fff0eb;
    --shadow: 0 24px 70px rgba(74, 49, 34, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f8f4f0 0%, #f6f6f3 50%, #fbefe8 100%);
    color: var(--text);
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

button,
input,
textarea {
    font: inherit;
}

a {
    color: var(--teal-dark);
    font-weight: 500;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--teal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(7, 143, 132, 0.26);
    outline-offset: 3px;
}

.support-page {
    width: min(1180px, calc(100% - 48px));
    min-height: calc(100vh - 104px);
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    min-height: 118px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

.brand-card {
    position: absolute;
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    box-shadow: 0 5px 12px rgba(68, 50, 36, 0.12);
}

.brand-card-coral {
    right: 0;
    bottom: 0;
    background: var(--coral);
    transform: rotate(8deg);
}

.brand-card-teal {
    left: 5px;
    bottom: 4px;
    background: #71c8bf;
    transform: rotate(-5deg);
}

.brand-card-front {
    top: 0;
    left: 0;
    place-items: center;
    border: 1px solid rgba(32, 32, 29, 0.06);
    background: var(--surface-strong);
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
}

.brand-card-front::after {
    content: "";
    position: absolute;
    right: 7px;
    bottom: 6px;
    left: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--coral);
}

.brand-name {
    max-width: 290px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.support-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1fr);
    gap: clamp(56px, 8vw, 120px);
    align-items: start;
    padding: 28px 0 104px;
}

.intro {
    align-self: start;
    padding-top: 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--coral);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1 {
    max-width: 590px;
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.75rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.04;
}

.intro-copy {
    max-width: 560px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.16rem);
    line-height: 1.75;
}

.reply-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    color: var(--muted);
    font-size: 15px;
}

.reply-note strong,
.reply-note a {
    display: block;
}

.reply-note strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.reply-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 15px;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.reply-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.form-card {
    position: relative;
    align-self: start;
    margin-top: -16px;
    padding: clamp(26px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid rgba(217, 201, 187, 0.72);
    border-radius: 32px;
    background: rgba(255, 253, 251, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.form-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--coral) 0 42%, #72c8bf 42% 72%, var(--teal) 72%);
}

.field + .field {
    margin-top: 23px;
}

.field label,
.label-row label {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

#message-count {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

input[type="email"],
textarea {
    display: block;
    width: 100%;
    margin-top: 9px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-strong);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input[type="email"] {
    min-height: 54px;
    padding: 13px 16px;
}

textarea {
    min-height: 184px;
    padding: 15px 16px;
    resize: vertical;
    line-height: 1.55;
}

input[type="email"]::placeholder,
textarea::placeholder {
    color: #9a938c;
    opacity: 1;
}

input[type="email"]:hover,
textarea:hover {
    border-color: var(--border-strong);
}

input[type="email"]:focus,
textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(7, 143, 132, 0.1);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--error);
}

.field-hint,
.field-error {
    margin: 7px 2px 0;
    font-size: 13px;
    line-height: 1.45;
}

.field-hint {
    color: var(--muted);
}

.field-error {
    min-height: 19px;
    color: var(--error);
}

.field-hint + .field-error {
    margin-top: 2px;
}

.consent-field {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-top: 22px;
}

.consent-field input {
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    accent-color: var(--teal);
}

.consent-field label {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.consent-error {
    margin-left: 34px;
}

#submit-button {
    position: relative;
    display: inline-grid;
    min-width: 174px;
    min-height: 54px;
    margin-top: 19px;
    padding: 13px 22px;
    place-items: center;
    border: 0;
    border-radius: 16px;
    background: var(--teal);
    box-shadow: 0 10px 24px rgba(7, 143, 132, 0.22);
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#submit-button:hover:not(:disabled) {
    background: var(--teal-dark);
    box-shadow: 0 13px 28px rgba(5, 109, 101, 0.24);
    transform: translateY(-1px);
}

#submit-button:active:not(:disabled) {
    transform: translateY(1px);
}

#submit-button:disabled {
    cursor: wait;
    opacity: 0.76;
}

.button-spinner {
    position: absolute;
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

#submit-button.is-loading .button-label {
    visibility: hidden;
}

#submit-button.is-loading .button-spinner {
    display: block;
}

.form-status {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
}

.form-status-success {
    border-color: #bfdfd7;
    background: var(--teal-soft);
    color: #075e57;
}

.form-status-error {
    border-color: #f0c9bc;
    background: var(--error-soft);
    color: var(--error);
}

.site-footer {
    display: flex;
    width: min(1180px, calc(100% - 48px));
    min-height: 104px;
    margin: 0 auto;
    padding: 28px 0;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-top: 1px solid rgba(217, 201, 187, 0.72);
    color: var(--muted);
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    display: flex;
    gap: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 880px) {
    .support-page {
        min-height: 0;
    }

    .support-layout {
        grid-template-columns: 1fr;
        gap: 44px;
        padding: 20px 0 72px;
    }

    .intro {
        padding-top: 0;
    }

    .intro-copy {
        max-width: 670px;
    }

}

@media (max-width: 560px) {
    .support-page,
    .site-footer {
        width: min(100% - 32px, 1180px);
    }

    .site-header {
        min-height: 94px;
    }

    .brand {
        gap: 13px;
    }

    .brand-mark {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .brand-card {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-card-front {
        font-size: 15px;
    }

    .brand-name {
        max-width: 225px;
        font-size: 15px;
    }

    .support-layout {
        gap: 34px;
        padding: 10px 0 56px;
    }

    h1 {
        font-size: clamp(2.55rem, 14vw, 3.65rem);
    }

    .intro-copy {
        margin-top: 22px;
    }

    .reply-note {
        margin-top: 28px;
    }

    .form-card {
        margin-right: -4px;
        margin-left: -4px;
        padding: 28px 20px;
        border-radius: 24px;
    }

    #submit-button {
        width: 100%;
    }

    .site-footer {
        min-height: 0;
        padding: 28px 0 36px;
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 18px;
    }

    .site-footer nav {
        gap: 18px;
        flex-wrap: wrap;
    }
}

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