:root {
    --blue: #2b61e7;
    --blue-dark: #1d49bb;
    --blue-light: #eaf0ff;
    --ink: #111c32;
    --muted: #5c687c;
    --line: #dfe5ef;
    --surface: #f5f7fb;
    --white: #fff;
    --red: #f23333;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { color: var(--white); background: var(--blue); }
:focus-visible { outline: 3px solid #6c91f1; outline-offset: 4px; }

.page-width {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header { border-bottom: 1px solid rgba(223, 229, 239, 0.75); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-inner { min-height: 80px; }
.brand { display: block; width: 142px; }
.brand img { height: auto; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
}

.back-link:hover { color: var(--blue-dark); border-color: #b7c7ee; }

.registration {
    position: relative;
    overflow: hidden;
    display: grid;
    flex: 1;
    align-items: center;
    padding-block: clamp(24px, 6vh, 68px);
    background:
        radial-gradient(circle 31px at 17% 18%, #2b61e715 96%, transparent 100%),
        radial-gradient(circle 69px at 43% 87%, #2b61e70e 98%, transparent 100%),
        radial-gradient(circle 138px at 98% 37%, #2b61e712 99%, transparent 100%),
        radial-gradient(circle at 89% 20%, rgba(43, 97, 231, 0.1), transparent 33%),
        radial-gradient(circle at 7% 58%, rgba(43, 97, 231, 0.05), transparent 28%),
        var(--white);
}

.registration-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
    align-items: center;
    gap: 58px;
}

.intro { min-width: 0; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.eyebrow::before {
    flex: 0 0 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    content: "";
}

h1 {
    margin: 0;
    font-size: clamp(43px, 4.6vw, 62px);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 1.07;
    text-wrap: balance;
}

h1 span { display: block; color: var(--blue); }

.lead {
    max-width: 450px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.65;
}

.workspace-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    min-height: 142px;
    margin-top: 25px;
    padding: 15px;
    border-radius: 20px;
}

.address-card {
    width: min(100%, 370px);
    overflow: hidden;
    border: 1px solid #d9e1ee;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 14px 38px rgba(30, 56, 109, 0.14);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 27px;
    padding-inline: 13px;
    border-bottom: 1px solid #e8edf7;
    background: #f8faff;
}

.browser-bar i { width: 6px; height: 6px; border-radius: 50%; background: #b6c8ef; }
.browser-bar i:first-child { background: #f07575; }

.address-inner { display: flex; align-items: center; gap: 12px; padding: 15px 16px; }

.address-icon {
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e3eaf9;
    border-radius: 11px;
    background: #f5f8ff;
}

.address-copy { min-width: 0; }
.address-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.address-copy strong { display: block; overflow-wrap: anywhere; color: var(--blue-dark); font-size: 17px; }
.domain-muted { color: var(--muted); font-weight: 500; }

.registration-card {
    min-width: 0;
    padding: clamp(24px, 4vw, 43px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 24px 64px #162a5215;
}

.form-header { margin-bottom: 26px; }

.form-header h2 {
    margin: 0;
    font-size: clamp(27px, 3.2vw, 36px);
    font-weight: 750;
    letter-spacing: -0.042em;
    line-height: 1.13;
    text-wrap: balance;
}

.form-header p,
.field-help,
.returning p,
.creation-status p { color: var(--muted); }

.form-header p { margin: 10px 0 0; font-size: 15px; }
.field + .field { margin-top: 19px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }

.field input,
.domain-field {
    width: 100%;
    min-height: 50px;
    border: 1px solid #d4ddea;
    border-radius: 10px;
    background: #f8faff;
}

.field input {
    min-width: 0;
    padding: 10px 13px;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

.field input::placeholder { color: #64748b; opacity: 1; }

.domain-field { display: flex; align-items: stretch; }
.domain-field input { border: 0; background: transparent; }
.domain-field input:focus-visible { outline: none; }
.domain-field:focus-within { outline: 3px solid #6c91f1; outline-offset: 3px; }

.domain-field > span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 0 9px 9px 0;
    border-left: 1px solid #dfe7f7;
    background: #edf2fd;
    color: var(--muted);
    font-size: 14px;
}

.field-help { margin: 6px 0 0; font-size: 13px; }

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-top: 25px;
    padding: 0 24px;
    border: 1px solid var(--blue);
    border-radius: 12px;
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 10px 24px rgba(43, 97, 231, 0.2);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.25;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.submit-button:hover:not(:disabled) {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
    box-shadow: 0 14px 30px rgba(43, 97, 231, 0.27);
    transform: translateY(-2px);
}
.submit-button:disabled { opacity: 0.7; cursor: wait; }

.returning { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); }
.returning p { margin: 0; font-size: 13px; }
.returning strong { color: var(--ink); }

.messages {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #f4c7ca;
    border-radius: 10px;
    background: #fff4f5;
    color: #941f2b;
    font-size: 14px;
    white-space: pre-line;
}

.messages { list-style: none; }
.errorlist { margin: 5px 0 0; padding-left: 17px; color: #941f2b; font-size: 13px; }

.creation-status {
    width: min(440px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: clamp(22px, 5vw, 30px);
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 20px 60px rgba(22, 42, 82, 0.12);
}

.creation-status::backdrop { background: rgba(12, 24, 48, 0.42); }
.creation-status h2 { margin: 14px 0 7px; font-size: 21px; line-height: 1.25; letter-spacing: -0.025em; }
.creation-status p { margin: 0; overflow-wrap: anywhere; font-size: 14px; white-space: pre-line; }
.creation-status .back-link { margin-top: 20px; color: var(--ink); background: var(--white); font-family: inherit; cursor: pointer; }

.status-icon {
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: var(--blue-light);
    color: var(--blue);
    place-items: center;
}

.status-icon svg { display: none; width: 24px; height: 24px; }
.creation-status.is-error .status-icon { color: #b32634; background: #fff0f1; }
.creation-status.is-error .status-icon svg { display: block; }
.creation-status.is-error .spinner { display: none; }

.spinner {
    width: 25px;
    height: 25px;
    border: 3px solid #d6e2fc;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 850ms linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.site-footer { padding: 28px 0 14px; color: var(--white); background: radial-gradient(ellipse at top left, #15294a, #091426 65%); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.7fr 1fr; padding-bottom: 16px; gap: 48px; }
.brand--footer { width: 140px; margin-bottom: 8px; }
.footer-brand p { max-width: 370px; margin: 0 0 8px; color: #8f9db5; font-size: 13px; line-height: 1.7; }
.footer-region { display: inline-block; padding: 6px 11px; color: #b9c8e1; background: #111f35; border: 1px solid #26354c; border-radius: 100px; font-size: 10px; }
.footer-nav, .footer-contacts { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.footer-nav > strong, .footer-contacts > strong { margin-bottom: 4px; color: #e9eef8; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-nav a, .footer-contacts a { color: #94a3bc; font-size: 13px; transition: color 180ms ease; }
.footer-nav a:hover, .footer-contacts a:hover { color: var(--white); }
.footer-contacts a { display: flex; align-items: center; gap: 10px; }
.footer-contacts svg { width: 17px; height: 17px; color: #6588df; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; color: #94a3bc; border-top: 1px solid #223047; gap: 24px; font-size: 11px; }

@media (max-width: 1100px) {
    .registration-layout { gap: 32px; }
    .footer-grid { gap: 35px; }
}

@media (min-width: 901px) and (max-height: 950px) {
    .header-inner { min-height: 68px; }
    .registration { padding-block: 20px; }
    .registration-card { padding: 22px 28px; }
    .form-header { margin-bottom: 16px; }
    .form-header h2 { font-size: clamp(24px, 2.5vw, 32px); }
    .form-header p { margin-top: 6px; }
    .field + .field { margin-top: 12px; }
    .field input, .domain-field { min-height: 44px; }
    .submit-button { margin-top: 15px; }
    .returning { margin-top: 16px; padding-top: 12px; }
    .site-footer { padding: 18px 0 12px; }
    .footer-grid { padding-bottom: 12px; }
    .footer-nav, .footer-contacts { gap: 3px; }
    .footer-nav > strong, .footer-contacts > strong { margin-bottom: 3px; }
    .footer-bottom { padding-top: 8px; }
}

@media (max-width: 900px) {
    .registration { padding-block: 38px; }
    .registration-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .workspace-preview { display: none; }
    h1 { font-size: clamp(39px, 7vw, 60px); }
    .lead { margin-top: 13px; }
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .page-width { width: calc(100% - 32px); }
    .header-inner { min-height: 68px; }
    .brand { width: 124px; }
    .brand--footer { width: 140px; }
    .back-link { min-height: 38px; padding-inline: 10px; font-size: 13px; }
    .registration-card { padding: 22px 18px; border-radius: 18px; }
    .eyebrow { margin-bottom: 12px; }
    .submit-button { width: 100%; }
    .footer-grid { gap: 16px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 360px) {
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; }
    .submit-button { transition: none; }
}
