:root {
    --ink: #172536;
    --muted: #65717e;
    --cream: #f4efe7;
    --card: rgba(255, 255, 255, .92);
    --gold: #ad742b;
    --gold-dark: #8a5718;
    --green: #20724d;
    --line: rgba(23, 37, 54, .12);
    --shadow: 0 28px 80px rgba(23, 37, 54, .14);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--cream); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(231, 192, 135, .36), transparent 33rem),
        radial-gradient(circle at 92% 76%, rgba(43, 126, 94, .13), transparent 31rem),
        var(--cream);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: .32;
    background-image: linear-gradient(rgba(23, 37, 54, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 37, 54, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.registration-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 52px;
}

.registration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.brand {
    display: block;
    width: 136px;
    line-height: 0;
    text-decoration: none;
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
    filter: invert(1);
    mix-blend-mode: multiply;
}

.login-link,
.verification-actions a {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-underline-offset: 4px;
}

.registration-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .72fr);
    gap: clamp(48px, 8vw, 110px);
    align-items: center;
}

.registration-story {
    animation: enter-left .65s cubic-bezier(.22, 1, .36, 1) both;
}

.eyebrow,
.form-kicker {
    margin: 0 0 16px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1 {
    max-width: 720px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 5.2vw, 76px);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: .99;
}

.lead {
    max-width: 630px;
    margin: 28px 0 34px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.course-preview {
    display: grid;
    grid-template-columns: 210px 1fr;
    max-width: 650px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 26px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 18px 50px rgba(23, 37, 54, .09);
    backdrop-filter: blur(16px);
}

.course-preview-list {
    display: grid;
    max-width: 650px;
    gap: 14px;
}

.course-preview--compact {
    grid-template-columns: 116px 1fr;
    border-radius: 20px;
}

.course-preview--compact .course-preview__visual { min-height: 118px; }
.course-preview--compact .course-preview__code { font-size: 42px; }
.course-preview--compact .course-preview__body { padding: 18px 22px; }
.course-preview--compact .course-preview__body p { margin-bottom: 9px; font-size: 17px; }
.course-preview--compact .course-preview__body ul { gap: 5px; font-size: 13px; }

.course-preview__visual {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    color: white;
    background: linear-gradient(145deg, #172536, #214d53 58%, #267451);
}

.course-preview__visual svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: rgba(238, 201, 139, .44);
    stroke-width: 2;
}

.course-preview__code {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: Georgia, serif;
    font-size: 64px;
    letter-spacing: -.06em;
}

.data-node {
    position: absolute;
    z-index: 2;
    width: 10px;
    height: 10px;
    border: 2px solid #f1c986;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(241, 201, 134, .1);
}

.data-node--one { left: 17%; top: 22%; }
.data-node--two { right: 18%; top: 35%; }
.data-node--three { left: 27%; bottom: 17%; }

.course-preview__body { padding: 26px 28px; }
.course-preview__body p { margin: 0 0 16px; font-size: 20px; font-weight: 800; }
.course-preview__body ul { display: grid; gap: 10px; margin: 0; padding: 0; color: var(--muted); list-style: none; }
.course-preview__body li::before { margin-right: 9px; color: var(--green); content: "✓"; font-weight: 900; }

.registration-card {
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 32px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    animation: enter-right .65s .08s cubic-bezier(.22, 1, .36, 1) both;
}
.registration-card--password { animation: none; }

.steps { display: grid; grid-template-columns: auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto; align-items: start; margin-bottom: 36px; }
.step { display: grid; justify-items: center; gap: 7px; color: #9ca5ad; }
.step span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-weight: 800; background: white; }
.step small { font-size: 11px; font-weight: 700; }
.step.is-current, .step.is-done { color: var(--ink); }
.step.is-current span { color: white; border-color: var(--ink); background: var(--ink); box-shadow: 0 8px 18px rgba(23, 37, 54, .2); }
.step.is-done span { color: white; border-color: var(--green); background: var(--green); }
.step-line { height: 1px; margin: 16px 12px 0; background: var(--line); }
.step-line.is-done { background: var(--green); }

.form-heading h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.form-heading > p:last-child { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.form-heading strong { color: var(--ink); overflow-wrap: anywhere; }

.registration-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 750; }
.field input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid rgba(23, 37, 54, .16);
    border-radius: 14px;
    outline: none;
    background: rgba(249, 248, 245, .85);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus { border-color: var(--gold); background: white; box-shadow: 0 0 0 4px rgba(173, 116, 43, .12); }
.field input::placeholder { color: #a2aab1; }
.field--code input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .28em; }

.password-field { position: relative; }
.password-field input { padding-right: 90px; }
.password-field button { position: absolute; top: 50%; right: 14px; padding: 6px; color: var(--gold-dark); border: 0; background: transparent; font-size: 12px; font-weight: 800; transform: translateY(-50%); cursor: pointer; }

.consent { display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: start; color: var(--muted); font-size: 12px; line-height: 1.45; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); }
.consent a { color: var(--ink); font-weight: 750; text-underline-offset: 3px; }

.primary-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    margin-top: 4px;
    padding: 0 22px;
    color: white;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--ink), #27485a);
    box-shadow: 0 14px 28px rgba(23, 37, 54, .2);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(23, 37, 54, .26); }
.primary-button span { font-size: 23px; font-weight: 400; }
.free-access-note { margin: -4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; line-height: 1.5; }

.field-error, .errorlist { color: #b32e32; font-size: 12px; font-weight: 650; }
.field-error--standalone { margin-top: -12px; }
.errorlist { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(179, 46, 50, .08); list-style: none; }

.notices { display: grid; gap: 8px; margin: -10px 0 24px; }
.notice { padding: 12px 14px; border-radius: 12px; color: #335a48; background: rgba(32, 114, 77, .1); font-size: 13px; line-height: 1.45; }
.notice--error { color: #9b2b30; background: rgba(179, 46, 50, .09); }

.verification-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.verification-actions form { margin: 0; }
.text-button { padding: 0; color: var(--gold-dark); border: 0; background: transparent; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.verification-actions a { font-size: 13px; }
.security-note { margin: 20px 0 0; padding-top: 18px; color: #879099; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.55; }

.password-stage-wrap { position: relative; }
.verification-success {
    position: absolute;
    inset: -8px 0 0;
    z-index: 3;
    display: grid;
    min-height: 310px;
    align-content: center;
    justify-items: center;
    padding: 34px;
    text-align: center;
    border: 1px solid rgba(32, 114, 77, .18);
    border-radius: 22px;
    background: rgba(246, 250, 247, .98);
    box-shadow: 0 20px 46px rgba(32, 114, 77, .14);
    animation: verification-success 1.35s cubic-bezier(.22, 1, .36, 1) both;
    pointer-events: none;
}
.verification-success__label {
    margin-bottom: 18px;
    padding: 8px 13px;
    color: var(--green);
    border-radius: 999px;
    background: rgba(32, 114, 77, .1);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.verification-success strong {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 40px;
    font-weight: 500;
    letter-spacing: -.035em;
}
.verification-success p {
    max-width: 330px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}
.password-stage--enter { animation: password-stage-in .55s .72s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes enter-left { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes enter-right { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes verification-success {
    0% { opacity: 0; transform: translateY(12px) scale(.97); }
    18%, 58% { opacity: 1; transform: translateY(0) scale(1); }
    100% { visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.985); }
}
@keyframes password-stage-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 940px) {
    .registration-main { grid-template-columns: 1fr; gap: 44px; }
    .registration-story { text-align: center; }
    .lead, .course-preview, .course-preview-list { margin-left: auto; margin-right: auto; }
    .eyebrow { margin-top: 12px; }
    .registration-card { width: min(560px, 100%); margin: 0 auto; }
}

@media (max-width: 600px) {
    .registration-shell { width: min(100% - 24px, 560px); padding-top: 18px; }
    .registration-header { margin-bottom: 32px; }
    .brand { width: 112px; }
    .login-link { font-size: 12px; }
    h1 { font-size: 43px; }
    .lead { margin-top: 22px; font-size: 16px; }
    .course-preview { grid-template-columns: 1fr; text-align: left; }
    .course-preview__visual { min-height: 150px; }
    .course-preview--compact { grid-template-columns: 86px 1fr; }
    .course-preview--compact .course-preview__visual { min-height: 108px; }
    .course-preview--compact .course-preview__body { padding: 16px 18px; }
    .registration-card { padding: 26px 20px; border-radius: 24px; }
    .step { gap: 6px; }
    .step small { font-size: 10px; }
    .step-line { margin-right: 7px; margin-left: 7px; }
    .form-heading h2 { font-size: 30px; }
    .verification-success { padding: 26px 20px; }
    .verification-success strong { font-size: 34px; }
    .verification-actions { align-items: flex-start; flex-direction: column; }
}

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