:root {
    --green: #83bd00;
    --green-dark: #0f4f35;
    --orange: #f07a00;
    --yellow: #f7b500;
    --ink: #16322a;
    --muted: #61736d;
    --surface: #ffffff;
    --line: #dce7e2;
    --danger: #a62922;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 8%, rgba(247, 181, 0, 0.26), transparent 28%),
        linear-gradient(145deg, #0f4f35 0%, #267b4b 42%, #f4f8f1 42%, #f4f8f1 100%);
}

.page-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.signup-panel {
    width: min(100%, 430px);
    background: var(--surface);
    border: 1px solid rgba(15, 79, 53, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(12, 54, 38, 0.26);
    overflow: hidden;
}

.brand {
    display: grid;
    place-items: center;
    padding: 28px 28px 24px;
    background: var(--green-dark);
}

.brand__logo {
    width: min(100%, 320px);
    height: auto;
    display: block;
}

#form-view,
.success-view {
    padding: 30px 26px 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.08;
    font-size: clamp(2rem, 9vw, 2.55rem);
    letter-spacing: 0;
}

.intro,
.success-view > p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.lead-form {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

label {
    font-size: 0.92rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 15px;
    color: var(--ink);
    font: inherit;
    outline: none;
    background: #fbfdfc;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(131, 189, 0, 0.18);
}

button,
.instagram-button {
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    background: var(--orange);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, filter 140ms ease;
}

button:hover,
.instagram-button:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.form-message {
    min-height: 22px;
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 0.92rem;
    line-height: 1.35;
}

.success-view {
    text-align: center;
}

.success-mark {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--green);
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
}

.instagram-button {
    width: 100%;
    margin-top: 24px;
    background: linear-gradient(90deg, #833ab4, #e1306c, var(--orange), var(--yellow));
}

.rules-note {
    padding: 14px;
    border-left: 4px solid var(--yellow);
    border-radius: 8px;
    background: #fff8e4;
    text-align: left;
}

[hidden] {
    display: none !important;
}

@media (max-width: 520px) {
    .page-shell {
        padding: 20px;
    }

    .signup-panel {
        width: min(100%, 430px);
    }

    .brand {
        padding: 24px 24px 20px;
    }

    .brand__logo {
        width: min(100%, 310px);
    }

    #form-view,
    .success-view {
        padding: 28px 24px 26px;
    }

    h1,
    h2 {
        font-size: clamp(1.9rem, 9vw, 2.3rem);
    }
}

@media (max-width: 380px) {
    #form-view,
    .success-view {
        padding: 24px 24px 22px;
    }
}

@media (max-height: 680px) and (max-width: 520px) {
    .page-shell {
        padding: 16px;
    }

    .signup-panel {
        max-height: calc(100dvh - 32px);
    }

    .brand {
        padding: 16px 22px 14px;
    }

    .brand__logo {
        width: min(100%, 260px);
    }

    #form-view,
    .success-view {
        padding: 18px 24px 16px;
    }

    .eyebrow {
        margin-bottom: 7px;
        font-size: 0.72rem;
    }

    h1,
    h2 {
        font-size: 1.78rem;
    }

    .intro,
    .success-view > p {
        margin-top: 8px;
        font-size: 0.9rem;
        line-height: 1.34;
    }

    .lead-form {
        gap: 7px;
        margin-top: 16px;
    }

    label,
    .form-message {
        font-size: 0.84rem;
    }

    input,
    button,
    .instagram-button {
        min-height: 46px;
    }

    .form-message {
        min-height: 18px;
        margin-top: 4px;
    }
}
