*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --ink: #0E0B09;
    --ink2: #17101a;
    --ink3: #2a182c;
    --parch: #F5EFE6;
    --cream: #FAF6F0;
    --clay: #a47fad;
    --terra: #77258d;
    --gold: #D4A843;
    --sage: #7A8C72;
    --mist: #e3d0e8;
    --soft: #876a8a;
    --err: #C0392B;
}

html,
body {
    height: 100%;
    overflow: hidden
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--ink);
    color: var(--ink);
    display: flex;
}

/* ══════════════════════════════════
   LEFT PANEL — immersive visual
══════════════════════════════════ */
.visual {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* slideshow images */
.slides {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.slide.active {
    opacity: 1
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    animation: none;
}

.slide.active img {
    animation: slowZoom 12s ease-in-out forwards;
}

@keyframes slowZoom {
    from {
        transform: scale(1.06)
    }

    to {
        transform: scale(1.13)
    }
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(14, 11, 9, .15) 0%, rgba(14, 11, 9, .75) 100%),
        linear-gradient(to top, rgba(14, 11, 9, .8) 0%, transparent 45%);
}

/* grain */
.visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.visual-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
}

.v-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--parch);
    letter-spacing: .03em;
    text-decoration: none;
}

.v-logo img {
    width: 150px;
    /* height: 32px; */
}

.v-logo .dot {
    color: var(--clay)
}

.v-bottom {}

.v-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    font-weight: 400;
    font-style: italic;
    color: var(--parch);
    line-height: 1.35;
    max-width: 420px;
    animation: fadeUp .8s ease both;
}

.v-quote em {
    color: var(--clay);
    font-style: normal
}

.v-attr {
    font-size: .75rem;
    font-weight: 300;
    color: rgba(245, 239, 230, .5);
    margin-top: 14px;
    letter-spacing: .06em;
    animation: fadeUp .8s .15s ease both;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-attr::before {
    content: '';
    width: 24px;
    height: 1px;
    background: rgba(245, 239, 230, .3)
}

/* slide dots */
.v-dots {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    animation: fadeUp .8s .25s ease both;
}

.v-dot {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: rgba(245, 239, 230, .25);
    transition: background .4s, width .4s;
    cursor: pointer;
}

.v-dot.active {
    background: var(--clay);
    width: 36px
}

/* slide caption */
.v-dest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245, 239, 230, .45);
    margin-top: 10px;
    animation: fadeUp .8s .3s ease both;
}

.v-dest ion-icon {
    font-size: .85rem;
    color: var(--clay)
}

/* ══════════════════════════════════
   RIGHT PANEL — form
══════════════════════════════════ */
.form-panel {
    width: 480px;
    flex-shrink: 0;
    background: var(--cream);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-panel::-webkit-scrollbar {
    width: 4px
}

.form-panel::-webkit-scrollbar-thumb {
    background: var(--mist)
}

.form-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 52px;
    min-height: 100vh;
}

/* ── mode toggle ──────────────────────────────── */
.mode-tabs {
    display: flex;
    background: var(--mist);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 40px;
}

.mode-tab {
    flex: 1;
    padding: 9px;
    border-radius: 9px;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    font-weight: 400;
    color: var(--soft);
    transition: all .25s;
    cursor: pointer;
}

.mode-tab.active {
    background: #fff;
    color: var(--ink);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(44, 36, 32, .1);
}

/* ── headings ─────────────────────────────────── */
.form-head {
    margin-bottom: 32px
}

.form-eyebrow {
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.form-eyebrow::before {
    content: '';
    width: 16px;
    height: 1px;
    background: var(--terra)
}

.form-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink);
}

.form-title em {
    font-style: italic;
    color: var(--terra)
}

.form-sub {
    font-size: .83rem;
    font-weight: 300;
    color: var(--soft);
    margin-top: 8px;
    line-height: 1.6;
}

/* ── inputs ───────────────────────────────────── */
.field {
    margin-bottom: 16px;
    position: relative
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0
}

.field-row .field {
    margin-bottom: 0
}

label {
    display: block;
    font-size: .73rem;
    font-weight: 500;
    color: var(--ink3);
    margin-bottom: 6px;
    letter-spacing: .02em;
}

.input-wrap {
    position: relative
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--clay);
    pointer-events: none;
    transition: color .2s;
}

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
select.select-styled {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--mist);
    border-radius: 10px;
    background: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
}

input::placeholder {
    color: var(--soft);
    font-weight: 300
}

input:focus,
select.select-styled:focus {
    border-color: var(--clay);
    box-shadow: 0 0 0 3px rgba(201, 168, 130, .12);
    background: #fff;
}

input.error {
    border-color: var(--err)
}

input.valid {
    border-color: var(--sage)
}

.field-err {
    font-size: .68rem;
    color: var(--err);
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 3px;
}

.field-err.show {
    display: flex
}

.field-err ion-icon {
    font-size: .8rem
}

/* eye toggle */
.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--soft);
    font-size: 1rem;
    transition: color .2s;
    padding: 0;
}

.eye-btn:hover {
    color: var(--ink)
}

/* strength bar */
.strength-wrap {
    margin-top: 6px
}

.strength-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--mist);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width .4s, background .4s;
}

.strength-label {
    font-size: .67rem;
    color: var(--soft);
    margin-top: 4px
}

/* ── interests chips (register) ──────────────── */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
}

.int-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--mist);
    background: #fff;
    font-size: .75rem;
    color: var(--soft);
    transition: all .2s;
    cursor: pointer;
}

.int-chip ion-icon {
    font-size: .9rem
}

.int-chip.sel {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--parch);
}

.int-chip.sel ion-icon {
    color: var(--clay)
}

/* ── terms ────────────────────────────────────── */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--mist);
    background: #fff;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}

.custom-check.checked {
    background: var(--ink);
    border-color: var(--ink)
}

.custom-check ion-icon {
    font-size: .75rem;
    color: #fff;
    display: none
}

.custom-check.checked ion-icon {
    display: block
}

.check-label {
    font-size: .77rem;
    color: var(--soft);
    line-height: 1.5
}

.check-label a {
    color: var(--terra);
    text-decoration: none;
    border-bottom: 1px solid rgba(181, 103, 76, .3)
}

.check-label a:hover {
    border-color: var(--terra)
}

/* ── submit ───────────────────────────────────── */
.submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--ink3) 0%, var(--ink) 100%);
    color: var(--parch);
    font-family: 'DM Sans', sans-serif;
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s, background .2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: .02em;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--terra), #7A3C28);
    opacity: 0;
    transition: opacity .3s;
}

.submit-btn:hover::before {
    opacity: 1
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(181, 103, 76, .3);
}

.submit-btn span,
.submit-btn ion-icon {
    position: relative;
    z-index: 1
}

.submit-btn ion-icon {
    font-size: 1rem
}

/* loading spinner on button */
.submit-btn.loading .btn-text {
    display: none
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(245, 239, 230, .3);
    border-top-color: var(--parch);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ── footer links ─────────────────────────────── */
.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: .78rem;
    color: var(--soft);
}

.form-footer a {
    color: var(--terra);
    font-weight: 500;
    cursor: pointer
}

.form-footer a:hover {
    text-decoration: underline
}

/* ── success screen ───────────────────────────── */
.success-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 52px;
    animation: fadeIn .5s ease both;
}

.success-screen.show {
    display: flex
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sage), #4A7A42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    margin-bottom: 20px;
    animation: popIn .5s cubic-bezier(.22, .68, 0, 1.4) both;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.success-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.15;
}

.success-title em {
    font-style: italic;
    color: var(--terra)
}

.success-sub {
    font-size: .85rem;
    color: var(--soft);
    margin-top: 10px;
    line-height: 1.6
}

.success-btn {
    margin-top: 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--ink);
    color: var(--parch);
    border: none;
    font-size: .85rem;
    font-weight: 500;
    transition: background .2s, transform .15s;
    cursor: pointer;
}

.success-btn:hover {
    background: var(--terra);
    transform: scale(1.02)
}

/* ── transitions between modes ───────────────── */
.form-view {
    transition: opacity .3s, transform .3s;
}

.form-view.out {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

/* ── Animations ───────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

/* stagger form fields */
.fi-1 {
    animation: fadeUp .45s .05s ease both
}

.fi-2 {
    animation: fadeUp .45s .1s ease both
}

.fi-3 {
    animation: fadeUp .45s .15s ease both
}

.fi-4 {
    animation: fadeUp .45s .2s ease both
}

.fi-5 {
    animation: fadeUp .45s .25s ease both
}

.fi-6 {
    animation: fadeUp .45s .3s ease both
}

.fi-7 {
    animation: fadeUp .45s .35s ease both
}

.fi-8 {
    animation: fadeUp .45s .4s ease both
}

/* ── Responsive ───────────────────────────────── */
@media(max-width:900px) {
    .visual {
        display: none
    }

    .form-panel {
        width: 100%
    }

    html,
    body {
        overflow: auto
    }

    .form-inner {
        min-height: 100svh;
        padding: 40px 32px
    }
}

@media(max-width:480px) {
    .form-inner {
        padding: 32px 24px
    }

    .field-row {
        grid-template-columns: 1fr
    }

    .social-row {
        flex-direction: column
    }
}