*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* blacks */
    --bg:           #080808;
    --surface:      #101010;
    --surface-2:    #181818;
    --border:       #2A2A2A;
    --border-2:     #383838;

    /* cream */
    --cream:         #F5EFE0;
    --cream-light:   #FAF6ED;
    --cream-bright:  #FDFAF4;
    --cream-dim:     rgba(245, 239, 224, 0.08);
    --cream-border:  rgba(245, 239, 224, 0.18);

    /* wine / champagne */
    --wine:          #7B2D3E;
    --champ:         #C9955A;
    --champ-light:   #DEBB8A;
    --champ-bright:  #EDD9B0;
    --champ-dim:     rgba(201, 149, 90, 0.09);
    --champ-border:  rgba(201, 149, 90, 0.25);

    /* aliases used by existing selectors */
    --gold:         var(--champ);
    --gold-light:   var(--champ-light);
    --gold-bright:  var(--champ-bright);
    --gold-dim:     var(--champ-dim);
    --gold-border:  var(--champ-border);

    /* text */
    --text-1:        #F5EFE0;
    --text-2:        #B0A898;
    --text-3:        #6A6258;

    /* status */
    --error:         #C0392B;
    --green:         #2E7D5A;
}

html,
body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    overflow: hidden;
}

/* ── LAYOUT ── */
.container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    width: 100vw;
    overflow: hidden;
}

/* ── LEFT PANEL ── */
.left {
    flex: 1 1 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px 52px;
}

.left-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/bg_growing.png');
    background-size: cover;
    background-position: center top;
    z-index: 0;
}

/* dark overlay so text stays readable */
.left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(8, 8, 8, 0.30)  0%,
            rgba(8, 8, 8, 0.15) 30%,
            rgba(8, 8, 8, 0.72) 68%,
            rgba(8, 8, 8, 0.96) 100%),
        linear-gradient(90deg,
            rgba(8, 8, 8, 0.55) 0%,
            transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.deco-lines {
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.deco-lines span {
    position: absolute;
    right: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, var(--cream) 30%, transparent 100%);
    opacity: 0.10;
    animation: linePulse 4s ease-in-out infinite;
}

.deco-lines span:nth-child(1) {
    height: 70%;
    top: 15%;
    right: 0;
    animation-delay: 0s;
}

.deco-lines span:nth-child(2) {
    height: 50%;
    top: 25%;
    right: 24px;
    animation-delay: 0.8s;
    opacity: 0.1;
}

.deco-lines span:nth-child(3) {
    height: 35%;
    top: 32%;
    right: 48px;
    animation-delay: 1.6s;
    opacity: 0.07;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.10; }
    50%       { opacity: 0.22; }
}

.arch {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 220px;
    border: 1px solid rgba(245, 239, 224, 0.10);
    border-radius: 130px 130px 0 0;
    z-index: 3;
}

.arch::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(217, 167, 115, 0.1);
    border-radius: 110px 110px 0 0;
}

.left-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.left-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 300;
    line-height: 1.15;
    color: var(--text-1);
    margin-bottom: 18px;
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.left-headline em {
    font-style: italic;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.left-desc {
    font-size: clamp(12.5px, 1.1vw, 14px);
    font-weight: 300;
    line-height: 1.75;
    color: var(--text-2);
    max-width: 380px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
    text-align: center;
}

.steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.steps li:hover {
    transform: translateX(8px);
}

.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--gold-dim);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--gold);
    margin-top: 1px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.steps li:hover .step-num {
    background: var(--gold);
    border-color: var(--border-accent);
    color: #0D0308;
    box-shadow: 0 0 12px rgba(217, 167, 115, 0.4);
}

.step-text strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    margin-bottom: 2px;
    text-align: left;
}

.step-text span {
    font-size: 11.5px;
    color: var(--text-3);
    line-height: 1.55;
    text-align: left;
    display: block;
}


.left-footer {
    font-size: 11.5px;
    color: var(--text-3);
    letter-spacing: 0.05em;
}

/* ── RIGHT PANEL ── */
.right {
    flex: 1 1 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.right-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(217, 167, 115, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 0;
    pointer-events: none;
}

.right-bg-glow {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 167, 115, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(20px);
}

/* Global registration error (replaces alert()) */
.global-error {
    display: none;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 5px;
    padding: 11px 15px;
    font-size: 13px;
    color: var(--error);
    margin-bottom: 18px;
    line-height: 1.5;
}

.global-error.show {
    display: block;
}

.register-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

#regFormContent .global-error {
    animation: none;
    opacity: 1;
    transform: none;
}

.register-header {
    margin-bottom: 22px;
}

.register-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 2.5vw, 36px);
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.15;
    margin-bottom: 4px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 167, 115, 0.22) 50%, transparent);
}

.divider i {
    font-size: 10px;
    color: var(--gold-light);
    letter-spacing: 0.25em;
    font-style: normal;
    text-transform: uppercase;
    font-weight: 500;
}

/* two-col form grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
    transition: color 0.2s;
}

.form-group:focus-within label {
    color: var(--gold);
}

.input-wrap {
    position: relative;
}

.input-wrap>svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-3);
    fill: none;
    stroke-width: 1.6;
    pointer-events: none;
    transition: stroke 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-3);
}

.input-wrap input,
.input-wrap select {
    width: 100%;
    padding: 11px 12px 11px 36px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-1);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    appearance: none;
}

.input-wrap input::placeholder {
    color: var(--text-3);
}

.input-wrap input:focus,
.input-wrap select:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(217, 167, 115, 0.08);
    background: rgba(22, 8, 16, 0.92);
}

.input-wrap input:focus~svg,
.input-wrap select:focus~svg {
    stroke: var(--gold-light);
    transform: translateY(-50%) scale(1.05);
    color: var(--gold-light);
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-3);
    pointer-events: none;
}

/* password toggle */
.eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.eye-btn:hover {
    color: var(--gold);
}

.eye-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    display: block;
}

.has-eye input {
    padding-right: 38px;
}

/* password strength */
.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.strength-seg {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(250, 246, 240, 0.12);
    transition: background 0.3s ease;
}

.strength-label {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 4px;
    min-height: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* terms checkbox */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.custom-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-2);
    border-radius: 3px;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.custom-checkbox:hover {
    border-color: var(--gold-border);
    box-shadow: 0 0 8px rgba(217, 167, 115, 0.1);
}

.custom-checkbox.checked {
    background: var(--gold);
    border-color: var(--border-accent);
    box-shadow: 0 2px 8px rgba(217, 167, 115, 0.25);
}

.custom-checkbox svg {
    width: 10px;
    height: 10px;
    stroke: #0D0308;
    fill: none;
    stroke-width: 2.5;
    display: none;
    color: #0D0308;
}

.custom-checkbox.checked svg {
    display: block;
}

.terms-text {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.6;
}

.terms-text a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

.terms-text a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* error message */
.field-error {
    font-size: 10.5px;
    color: var(--error);
    margin-top: 4px;
    display: none;
    font-weight: 400;
}

.field-error.show {
    display: block;
}

.input-wrap.has-error input,
.input-wrap.has-error select {
    border-color: var(--error);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

/* submit button — wine → champagne, no glow */
.submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(130deg,
        var(--wine)        0%,
        #A0433A           28%,
        var(--champ)       65%,
        var(--champ-light) 100%);
    color: var(--cream-bright);
    border: none;
    border-radius: 5px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.08em;
    position: relative;
    overflow: hidden;
    transition: filter 0.25s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.submit-btn:hover {
    filter: brightness(1.10);
    transform: translateY(-2px);
    box-shadow: none;
}

.submit-btn:hover::before {
    transform: translateX(100%);
}

.submit-btn:active {
    filter: brightness(0.96);
    transform: translateY(0);
    box-shadow: none;
}

.submit-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245, 239, 224, 0.25);
    border-top-color: var(--cream-bright);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.submit-btn.loading .btn-label {
    display: none;
}

.submit-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* success state */
.success-msg {
    display: none;
    text-align: center;
    padding: 32px 24px;
}

.success-msg.show {
    display: block;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(46, 125, 90, 0.1);
    border: 1px solid rgba(46, 125, 90, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--green);
    fill: none;
    stroke-width: 2;
    color: var(--green);
}

.success-msg h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 10px;
}

.success-msg p {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 20px;
}

/* back to login link */
.back-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-3);
}

.back-link a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}



/* ── RESPONSIVE: TABLET ── */
@media (max-width: 960px) {
    .left {
        flex: 1 1 50%;
        padding: 40px 36px;
    }

    .right {
        flex: 1 1 50%;
        padding: 28px 32px;
    }

    .left-headline {
        font-size: clamp(24px, 3vw, 36px);
    }
}

/* ── RESPONSIVE: MOBILE ── */
@media (max-width: 768px) {

    html,
    body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }

    .container {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        overflow: visible;
    }

    .left {
        display: none;
    }

    .right {
        flex: 1;
        width: 100%;
        padding: 64px 24px 48px;
        align-items: center;
        overflow: visible;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
    }

    .register-card {
        max-width: 440px;
        width: 100%;
    }
}

/* ── RESPONSIVE: SMALL MOBILE ── */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .left-headline {
        font-size: 24px;
    }

    .register-header h2 {
        font-size: 24px;
    }

    .right {
        padding: 72px 20px 36px;
    }
}

/* ── RESPONSIVE: LANDSCAPE SMALL PHONE ── */
@media (max-height: 500px) and (orientation: landscape) {
    .right {
        align-items: flex-start;
        padding-top: 60px;
    }

    .register-card {
        padding-bottom: 32px;
    }
}

/* ═══════════════════════════════════════════════════
   SOFT UI THEME — matches the portal (dark)
═══════════════════════════════════════════════════ */
:root {
    --bg:            #080707;
    --surface:       #121111;
    --surface-2:     #1b1a1a;
    --surface-3:     #232222;
    --border:        #201f1f;
    --border-2:      #2e2d2d;

    --text-1:        #f5f5f5;
    --text-2:        #a3a3a3;
    --text-3:        #727272;

    --champ:         #e8e8e8;
    --champ-light:   #f2f2f2;
    --champ-bright:  #fafafa;
    --champ-dim:     rgba(255, 255, 255, 0.084);
    --champ-border:  rgba(255, 255, 255, 0.30);

    --btn-solid-bg:  #f5f5f5;
    --btn-solid-fg:  #080707;
}

body {
    background-color: var(--bg);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--champ-light);
    outline-offset: 3px;
}
.left::before {
    background:
        linear-gradient(180deg, rgba(8, 7, 7, 0.30) 0%, rgba(8, 7, 7, 0.15) 30%, rgba(8, 7, 7, 0.75) 68%, rgba(8, 7, 7, 0.97) 100%),
        linear-gradient(90deg, rgba(8, 7, 7, 0.55) 0%, transparent 100%);
}

.right-bg-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

.right-bg-glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.042) 0%, transparent 70%);
}

.divider span {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10) 50%, transparent);
}

.form-group label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-2);
    padding-left: 4px;
}

.input-wrap input,
.input-wrap select {
    border-radius: 999px;
    background: var(--surface-2);
    border-color: var(--border-2);
    padding: 12px 16px 12px 42px;
}

.input-wrap > svg {
    left: 16px;
}

.has-eye input {
    padding-right: 46px;
}

.eye-btn {
    border-radius: 50%;
}

.select-wrap::after {
    right: 18px;
}

.input-wrap input:focus,
.input-wrap select:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10);
    background: var(--surface-3);
}

.strength-seg {
    border-radius: 999px;
}

.custom-checkbox {
    border-radius: 6px;
}

.global-error {
    border-radius: 16px;
}

.submit-btn {
    background: var(--btn-solid-bg);
    color: var(--btn-solid-fg);
    border: 1px solid var(--btn-solid-bg);
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.submit-btn::before {
    display: none;
}

.submit-btn:hover {
    filter: none;
    background: color-mix(in srgb, var(--btn-solid-bg) 86%, var(--champ));
    border-color: color-mix(in srgb, var(--btn-solid-bg) 86%, var(--border-accent));
    transform: translateY(-1px);
}

.submit-btn:active {
    filter: none;
    transform: translateY(0);
}

.submit-btn .spinner {
    border-color: rgba(8, 7, 7, 0.2);
    border-top-color: #080707;
}

/* Borders use a neutral light grey, not the accent colour */
:root,
html[data-theme="dark"] {
    --border-accent: #8a8a8a;
    --champ-border: rgba(255, 255, 255, 0.16);
    --gold-border: rgba(255, 255, 255, 0.16);
    --focus-ring: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] {
    --border-accent: #5c5c5c;
    --champ-border: rgba(0, 0, 0, 0.18);
    --gold-border: rgba(0, 0, 0, 0.18);
    --focus-ring: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

/* No outline or glow ring on focused inputs */
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}