:root {
    color-scheme: light;
    --page: #f7f6ff;
    --surface: #ffffff;
    --surface-soft: #f5f7ff;
    --text: #292343;
    --muted: #706b86;
    --line: #dfdcf1;
    --purple: #7058d8;
    --purple-dark: #5d46c4;
    --blue: #7fb9f2;
    --success: #26966a;
    --danger: #c94a67;
    --shadow: 0 18px 50px rgba(74, 60, 130, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(127, 185, 242, 0.22), transparent 30rem),
        radial-gradient(circle at 88% 18%, rgba(112, 88, 216, 0.13), transparent 32rem),
        var(--page);
    font-family: "Segoe UI Variable", "Avenir Next", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
[hidden] { display: none !important; }

.site-header {
    width: min(calc(100% - 40px), 720px);
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(112, 88, 216, 0.18);
}
.brand {
    color: var(--purple-dark);
    text-decoration: none;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.03em;
}
.header-note { color: var(--muted); font-size: 12px; font-weight: 650; }

.hero {
    width: min(calc(100% - 40px), 720px);
    margin: 0 auto;
    padding: 68px 0 40px;
}
.hero-copy { max-width: 620px; margin: 0 auto 36px; text-align: center; }
.hero h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(38px, 7vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.055em;
    text-wrap: balance;
}
.hero h1 span { color: var(--purple); }
.hero-text {
    max-width: 570px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
    text-wrap: pretty;
}

.form-shell {
    padding: clamp(24px, 5vw, 42px);
    background: var(--surface);
    border: 1px solid rgba(112, 88, 216, 0.15);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.form-heading { margin-bottom: 30px; }
.form-heading h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.03em; }
.form-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 22px; }
.field label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}
.field label span { color: var(--purple); }
.field label em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.field small { display: block; margin-top: 7px; color: #8c87a0; font-size: 11px; }

input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    color: var(--text);
    background: #fcfcff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    font: 600 15px/1 inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input::placeholder { color: #a09caf; font-weight: 450; }
input:hover { border-color: #bbb3e1; }
input:focus { background: #fff; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(112, 88, 216, 0.12); }

.input-prefix {
    height: 52px;
    display: flex;
    align-items: center;
    background: #fcfcff;
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.input-prefix:focus-within { background: #fff; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(112, 88, 216, 0.12); }
.input-prefix > span { padding-left: 15px; color: #9a96aa; font-size: 14px; white-space: nowrap; }
.input-prefix input { height: 50px; padding-left: 4px; background: transparent; border: 0; box-shadow: none; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.checks {
    margin: 30px 0 24px;
    padding: 4px 18px;
    background: var(--surface-soft);
    border-radius: 15px;
}
.check-row {
    min-height: 60px;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-icon { position: relative; width: 18px; height: 18px; border: 2px solid #c7c1df; border-radius: 50%; }
.check-row strong { display: block; font-size: 13px; }
.check-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.check-state { color: var(--muted); font-size: 12px; }
.check-row[data-state="loading"] .check-icon { border-color: rgba(112, 88, 216, 0.22); border-top-color: var(--purple); animation: spin 800ms linear infinite; }
.check-row[data-state="loading"] .check-state { color: var(--purple); }
.check-row[data-state="success"] .check-icon { border-color: var(--success); background: #e7f8f1; }
.check-row[data-state="success"] .check-icon::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid var(--success);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.check-row[data-state="success"] .check-state { color: var(--success); }
.check-row[data-state="error"] .check-icon { border-color: var(--danger); }
.check-row[data-state="error"] .check-icon::before,
.check-row[data-state="error"] .check-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 2px;
    height: 10px;
    background: var(--danger);
}
.check-row[data-state="error"] .check-icon::before { transform: rotate(45deg); }
.check-row[data-state="error"] .check-icon::after { transform: rotate(-45deg); }
.check-row[data-state="error"] .check-state { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }

.form-message {
    margin: 0 0 18px;
    padding: 13px 15px;
    color: #8e2941;
    background: #fff0f4;
    border: 1px solid #f3c4d0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}
.form-message a {
    display: inline-block;
    margin-top: 7px;
    color: var(--purple-dark);
    font-weight: 750;
}
.submit-button {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    background: var(--purple);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(112, 88, 216, 0.2);
    font: 750 15px/1 inherit;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.submit-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.submit-button:hover:not(:disabled) { background: var(--purple-dark); box-shadow: 0 12px 28px rgba(112, 88, 216, 0.26); transform: translateY(-1px); }
.submit-button:active:not(:disabled) { transform: translateY(1px); }
.submit-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.submit-button:disabled { opacity: 0.64; cursor: wait; }
.submit-button.is-loading svg { animation: nudge 700ms ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateX(4px); } }

.privacy-note { margin: 15px 0 0; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.privacy-note svg { flex: 0 0 auto; width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.success-panel { padding: 54px 10px; text-align: center; }
.success-mark { width: 74px; height: 74px; margin: 0 auto 24px; display: grid; place-items: center; color: var(--success); background: #eaf9f3; border-radius: 50%; }
.success-mark svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.success-label { margin: 0 0 10px; color: var(--success); font-size: 13px; font-weight: 700; }
.success-panel h2 { margin: 0; font-size: clamp(30px, 7vw, 42px); letter-spacing: -0.045em; }
.success-panel h2 span { color: var(--purple); }
.success-panel > p:not(.success-label) { max-width: 430px; margin: 18px auto 26px; color: var(--muted); line-height: 1.6; }
.success-panel a { color: var(--purple-dark); font-size: 13px; font-weight: 700; }

footer {
    width: min(calc(100% - 40px), 720px);
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    border-top: 1px solid rgba(112, 88, 216, 0.14);
    font-size: 11px;
}

@media (max-width: 600px) {
    .site-header, .hero, footer { width: min(calc(100% - 28px), 720px); }
    .site-header { min-height: 62px; }
    .hero { padding: 46px 0 28px; }
    .hero-copy { margin-bottom: 28px; }
    .hero h1 { font-size: 40px; }
    .hero-text { font-size: 15px; }
    .form-shell { padding: 24px 18px; border-radius: 18px; }
    .form-heading h2 { font-size: 21px; }
    .input-prefix > span { display: none; }
    .input-prefix input { padding-left: 15px; }
    .checks { padding: 4px 12px; }
    footer { padding: 18px 0; flex-direction: column; align-items: flex-start; gap: 6px; }
}

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