:root {
    --brand: #e51c23;
    --brand-dark: #9b1b24;
    --brand-soft: #fff0f1;
    --accent: #2baf2b;
    --action: #2baf2b;
    --action-dark: #218f24;
    --ink: #201b1c;
    --muted: #6a6263;
    --line: #e6dfe0;
    --surface: #ffffff;
    --background: #fbf9f9;
    --success: #218f24;
    --shadow: 0 24px 70px rgba(155, 27, 36, 0.14);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% 18%, rgba(229, 28, 35, 0.07), transparent 28rem),
        var(--background);
    color: var(--ink);
    font-family: Tahoma, "Noto Sans Thai", sans-serif;
    line-height: 1.6;
}

button,
select {
    font: inherit;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    background: var(--brand);
    border-bottom: 0;
    box-shadow: 0 4px 14px rgba(155, 27, 36, 0.16);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    min-height: 74px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    display: block;
    width: 210px;
    height: auto;
    filter: brightness(0) invert(1);
}

.contact-link {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.contact-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
}

.contact-link strong {
    letter-spacing: 0.02em;
}

main {
    flex: 1 0 auto;
    overflow: hidden;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 600px);
    justify-content: center;
    align-items: center;
    width: min(1180px, calc(100% - 40px));
    min-height: auto;
    margin: 0 auto;
    padding: 58px 0 68px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.application-card {
    position: relative;
    padding: clamp(28px, 4vw, 46px);
    overflow: hidden;
    border: 1px solid rgba(229, 28, 35, 0.12);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.application-card::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 88px;
    height: 8px;
    border-radius: 0 0 0 8px;
    background: var(--accent);
    content: "";
}

.step-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 700;
}

.card-heading h2,
.card-heading h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.3;
}

.card-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

#product-form {
    margin-top: 30px;
}

#product-form > label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.88rem;
    font-weight: 700;
}

#product-form > label span {
    color: var(--brand);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

#product {
    width: 100%;
    min-height: 58px;
    padding: 0 48px 0 16px;
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: #fcfbfb;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

#product:hover {
    border-color: #c9b8bb;
}

#product:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(229, 28, 35, 0.1);
}

#product[aria-invalid="true"] {
    border-color: #b42318;
}

.field-help,
.field-error {
    margin: 8px 2px 0;
    font-size: 0.78rem;
}

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

.field-error {
    color: #b42318;
}

#continue-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    margin-top: 24px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--action);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(43, 175, 43, 0.22);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#continue-button:hover {
    background: var(--action-dark);
    box-shadow: 0 15px 28px rgba(43, 175, 43, 0.28);
    transform: translateY(-1px);
}

#continue-button:focus-visible {
    outline: 3px solid rgba(43, 175, 43, 0.32);
    outline-offset: 3px;
}

#continue-button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.button-arrow {
    font-size: 1.35rem;
    font-weight: 400;
}

.privacy-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.privacy-note p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.privacy-icon {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #eaf6f0;
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 700;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px max(20px, calc((100% - 1180px) / 2));
    background: var(--brand);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    margin-top: auto;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.noscript-message {
    position: fixed;
    z-index: 50;
    right: 20px;
    bottom: 20px;
    left: 20px;
    padding: 14px;
    border-radius: 10px;
    background: #fff3cd;
    color: #664d03;
    text-align: center;
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 56px 0 72px;
    }

    .application-card {
        max-width: 680px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .hero {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .brand img {
        width: 166px;
    }

    .contact-label {
        display: none;
    }

    .contact-link strong {
        font-size: 0.78rem;
    }

    .hero {
        gap: 40px;
        padding: 46px 0 60px;
    }

    .application-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .site-footer {
        flex-direction: column;
        gap: 6px;
    }
}

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