﻿/* ==========================================================
   Heritage Capital Trust - Account Application (register)
   Self-contained stylesheet - no dependency on auth.css.
   v2 - refined premium UI
   Palette: burgundy #0F2A44 / deep #0A1C30 / gold #C6A15B /
            dark gold #A68142 / ivory #F6F4EE / taupe #D9D0BF /
            charcoal #1E2A36
   ========================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #1E2A36;
    background-color: #F6F4EE;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Ambient page background ---------- */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
body::before {
    width: 620px; height: 620px;
    top: -200px; right: -160px;
    background: radial-gradient(circle, rgba(15, 42, 68,0.10) 0%, rgba(15, 42, 68,0) 68%);
}
body::after {
    width: 560px; height: 560px;
    bottom: -200px; left: -150px;
    background: radial-gradient(circle, rgba(198,161,91,0.14) 0%, rgba(198,161,91,0) 68%);
}

/* ---------- Floating home button ---------- */
.home-btn {
    position: fixed;
    top: 18px; left: 18px;
    z-index: 50;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background-color: #FFFFFF;
    border: 1px solid #D9D0BF;
    border-radius: 8px;
    color: #0F2A44;
    font-size: 17px;
    box-shadow: 0 8px 25px rgba(10, 28, 48,.06);
    transition: all .25s ease-in-out;
}
.home-btn:hover {
    background-color: #0F2A44;
    border-color: #0F2A44;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* ---------- Page shell ---------- */
.app-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 20px 34px;
}

.app-shell {
    width: 100%;
    max-width: 680px;
    background-color: #FFFFFF;
    border: 1px solid #E3DBCB;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(10, 28, 48,.05),
        0 12px 34px rgba(10, 28, 48,.08),
        0 30px 70px rgba(10, 28, 48,.05);
    overflow: hidden;
    position: relative;
}
/* champagne gold hairline accent on the card top */
.app-shell::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background-color: #C6A15B;
    z-index: 2;
}

/* ---------- Letterhead band ---------- */
.app-letterhead {
    position: relative;
    background:
        radial-gradient(130% 170% at 88% -40%, rgba(198,161,91,.30) 0%, rgba(198,161,91,0) 55%),
        radial-gradient(120% 190% at 0% 140%, rgba(15, 42, 68,.55) 0%, rgba(10, 28, 48,0) 60%),
        #0A1C30;
    border-bottom: 3px solid #C6A15B;
    padding: 46px 48px 38px;
    text-align: center;
    overflow: hidden;
}
.app-letterhead::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 1px;
    background: rgba(198,161,91,.4);
}
.letterhead-logo {
    height: 40px;
    width: auto;
    margin-bottom: 18px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.letterhead-rule {
    display: block;
    width: 64px; height: 2px;
    background-color: #C6A15B;
    border-radius: 2px;
    margin: 0 auto 20px;
}
.letterhead-title {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
    letter-spacing: .2px;
}
.letterhead-sub {
    font-size: 13.5px;
    color: rgba(246,244,238,.82);
    margin-bottom: 14px;
    max-width: 520px;
    margin-left: auto; margin-right: auto;
}
.letterhead-signin {
    font-size: 12.5px;
    color: rgba(246,244,238,.66);
}
.letterhead-signin a {
    color: #C6A15B;
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 1px;
    border-bottom: 1px solid transparent;
    transition: all .2s ease;
}
.letterhead-signin a:hover {
    color: #FFFFFF;
    border-bottom-color: rgba(198,161,91,.6);
}

/* ---------- Application body ---------- */
.app-body { padding: 40px 48px 44px; }

/* ---------- Connected numbered stepper ---------- */
.step-indicator {
    display: flex; align-items: flex-start;
    margin-bottom: 32px;
    border-bottom: 1px solid #EFE9DD;
    padding-bottom: 24px;
}
.step-dot {
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column; align-items: center;
    gap: 9px;
    cursor: pointer;
    position: relative;
}
.step-dot::before {
    content: '';
    position: absolute;
    top: 16px; right: 50%;
    width: 100%; height: 2px;
    background: #E4DCCC;
    z-index: 0;
    transition: background .3s ease;
}
.step-dot:first-child::before { display: none; }
.step-dot .dot-num {
    position: relative; z-index: 1;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #D9D0BF;
    color: #A0816B;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 13.5px; font-weight: 700;
    transition: all .3s ease;
}
.step-dot .dot-label {
    font-size: 11.5px; font-weight: 500;
    color: #8A8378;
    letter-spacing: .3px;
    transition: color .3s ease;
}
.step-dot:hover .dot-num { border-color: #C6A15B; color: #0F2A44; }
.step-dot.active .dot-num {
    background: #0F2A44;
    border-color: #0F2A44;
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(15, 42, 68,.14);
}
.step-dot.active .dot-label { color: #0F2A44; font-weight: 600; }
.step-dot.active::before { background: #0F2A44; }
.step-dot.done .dot-num {
    background: #C6A15B;
    border-color: #C6A15B;
    color: #0A1C30;
}
.step-dot.done .dot-label { color: #1E2A36; }
.step-dot.done::before { background: #C6A15B; }

/* ---------- Global message ---------- */
#globalMsg { margin-bottom: 18px; }
#globalMsg.error {
    color: #B4434F;
    background: #FDF3F4;
    border: 1px solid #F0D6D9;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
}

/* ---------- Steps ---------- */
.step { display: none; }
.step.active { display: block; animation: stepIn .32s ease both; }
@keyframes stepIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    display: flex; align-items: center; gap: 12px;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 18px; font-weight: 700;
    color: #0A1C30;
    margin-bottom: 22px;
}
.step-title span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px; font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #A68142;
    background: #FBF6EC;
    border: 1px solid #E7D9BC;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.step-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 26px;
}
.step-footer > div:empty { flex: 1; }

/* ---------- Form layout ---------- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    margin-bottom: 4px;
}
.input-group { margin-bottom: 16px; }
.input-group label {
    display: block;
    font-size: 12px; font-weight: 600;
    color: #3B3530;
    margin-bottom: 7px;
    letter-spacing: .2px;
}
.input-wrap {
    position: relative;
}
.input-wrap > .field-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #B9A27F;
    font-size: 14px;
    pointer-events: none;
    transition: color .25s ease;
    z-index: 1;
}
.input-wrap:focus-within > .field-icon { color: #0F2A44; }

.input-wrap input,
.input-wrap select {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #1E2A36;
    background-color: #FFFFFF;
    border: 1.5px solid #E3DBCB;
    border-radius: 8px;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
    -webkit-appearance: none; appearance: none;
}
.input-wrap select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23A0816B' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
.input-wrap input::placeholder { color: #B7AEA0; opacity: 1; }
.input-wrap input:hover, .input-wrap select:hover { border-color: #CDBFA4; }
.input-wrap input:focus, .input-wrap select:focus {
    border-color: #0F2A44;
    box-shadow: 0 0 0 3px rgba(15, 42, 68,.10);
}
.input-wrap input.cap { text-transform: capitalize; }

/* Password visibility toggle */
.toggle-vis {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    color: #A99B86;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: color .2s ease, background .2s ease;
    z-index: 1;
}
.toggle-vis:hover { color: #0F2A44; background: #F6F4EE; }

/* ---------- Field errors & hints ---------- */
.field-error {
    display: none;
    color: #B4434F;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 6px;
}
.field-hint {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #A68142;
}
.field-hint.show { display: block; }

.input-wrap input.field-invalid,
.input-wrap select.field-invalid {
    border-color: #B4434F;
    background-color: #FDF6F7;
}
.input-wrap input.field-invalid:focus,
.input-wrap select.field-invalid:focus {
    box-shadow: 0 0 0 3px rgba(180,67,79,.12);
}

/* ---------- Photo upload ---------- */
.photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
    padding: 16px 18px;
    background: #FBF8F1;
    border: 1px dashed #D9D0BF;
    border-radius: 10px;
}
.photo-upload .avatar {
    width: 68px; height: 68px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0F2A44, #0A1C30);
    color: #C6A15B;
    font-size: 26px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(10, 28, 48,.18);
    transition: border .25s ease;
}
.photo-upload .avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload .avatar i { color: #C6A15B; }
.photo-upload .upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #FFFFFF;
    color: #0F2A44;
    border: 1.5px solid #C6A15B;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all .22s ease;
}
.photo-upload .upload-btn:hover {
    background: #0F2A44;
    border-color: #0F2A44;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10, 28, 48,.18);
}
.photo-upload .file-name {
    font-size: 12px;
    color: #8A8378;
    margin-top: 6px;
    max-width: 220px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-upload input[type="file"] { display: none; }

/* ---------- Strength meter ---------- */
.strength-meter {
    display: flex; align-items: center; gap: 10px;
    margin: 4px 0 10px;
}
.strength-track {
    flex: 1; height: 6px;
    border-radius: 3px;
    background-color: #EFE9DB;
    overflow: hidden;
}
.strength-fill {
    height: 100%; width: 0%;
    border-radius: 3px;
    background-color: #D9D0BF;
    transition: width .35s ease, background-color .35s ease;
}
.strength-fill.weak   { width: 25%; background-color: #B4434F; }
.strength-fill.fair   { width: 50%; background-color: #C08A2E; }
.strength-fill.good   { width: 75%; background-color: #A68142; }
.strength-fill.strong { width: 100%; background-color: #3E6B4F; }
.strength-label {
    font-size: 12px; font-weight: 600;
    color: #6B655C; white-space: nowrap;
}

.pw-reqs {
    list-style: none;
    margin: 0 0 18px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    background-color: #F6F4EE;
    border: 1px solid #E5DCC9;
    border-radius: 8px;
}
.pw-reqs li {
    font-size: 12px; color: #6B655C;
    display: flex; align-items: center; gap: 7px; line-height: 1.4;
}
.pw-reqs li i { font-size: 10px; color: #C9C0AE; transition: color .25s ease; }
.pw-reqs li.met { color: #1E2A36; font-weight: 500; }
.pw-reqs li.met i { color: #3E6B4F; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
    line-height: 1;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s ease-in-out;
}
.btn:disabled { opacity: .65; cursor: not-allowed; }

.btn-prev {
    background-color: #FFFFFF;
    border-color: #D9D0BF;
    color: #0F2A44;
}
.btn-prev:hover {
    border-color: #0F2A44;
    background-color: #FBF7EF;
    transform: translateY(-1px);
}

.btn-next,
.btn-submit {
    background-color: #0F2A44;
    border-color: #0F2A44;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(10, 28, 48,.14);
}
.btn-next:hover,
.btn-submit:hover {
    background-color: #0A1C30;
    border-color: #0A1C30;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(10, 28, 48,.22);
}

/* ---------- Back to login ---------- */
.login-link {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
}
.login-link a {
    color: #0F2A44;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s ease;
}
.login-link a:hover { color: #A68142; }

/* ---------- Secure footer band ---------- */
.app-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 48px;
    background-color: #FBF8F1;
    border-top: 1px solid #EFE9DD;
    font-size: 12.5px;
    color: #6B655C;
    text-align: center;
}
.app-secure i { color: #C6A15B; font-size: 13px; }

.app-footnote {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: .4px;
    color: #8A8378;
    text-align: center;
}

/* ---------- Submit overlay ---------- */
.submit-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(33,16,20,.55);
    backdrop-filter: blur(3px);
}
.submit-overlay.show { display: flex; }
.submit-overlay-box {
    background-color: #FFFFFF;
    border-radius: 14px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(33,16,20,.35);
    max-width: 340px;
    width: calc(100% - 40px);
    border-top: 4px solid #C6A15B;
}
.submit-overlay-box h4 {
    font-family: 'Merriweather', Georgia, serif;
    color: #0A1C30;
    font-size: 18px;
    margin-bottom: 6px;
}
.submit-overlay-box p { color: #6B655C; font-size: 13px; margin: 0; }
.overlay-ring { font-size: 34px; color: #0F2A44; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .app-page { padding: 40px 14px 26px; }
    .app-letterhead { padding: 34px 22px 28px; }
    .letterhead-title { font-size: 24px; }
    .app-body { padding: 28px 22px 30px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .step-footer { flex-wrap: wrap; }
    .step-footer .btn { flex: 1; }
    .app-secure { padding: 14px 22px; }
}

@media (max-width: 480px) {
    .home-btn { top: 12px; left: 12px; }
    .letterhead-logo { height: 32px; }
    .step-indicator { gap: 8px; padding-bottom: 18px; }
    .step-dot .dot-label { font-size: 10px; }
    .dot-num { width: 30px; height: 30px; font-size: 13px; }
    .step-title { font-size: 16px; }
    .photo-upload { flex-direction: column; text-align: center; }
    .photo-upload .file-name { max-width: 100%; }
    .strength-label { font-size: 11px; }
}