/* ═══════════════════════════════════════
   DESIGN TOKENS — Day / Ivory
═══════════════════════════════════════ */
:root {
    --bg: #f5f2ed;
    --surface: #ffffff;
    --panel: #ffffff;
    --border: #e6e0d8;
    --border-hi: #d4c9b8;
    --gold: #9a7a45;
    --gold-mid: #b8934a;
    --gold-light: #c9a96e;
    --gold-tint: #fdf8f1;
    --gold-dim: rgba(154, 122, 69, 0.10);
    --ink: #1c1814;
    --ink-mid: #3d3530;
    --text: #2c2620;
    --text-mid: #5e5549;
    --text-soft: #9c9189;
    --muted: #bcb5ae;
    --success: #4a7c59;
    --error: #9c4040;
    --shadow-sm: 0 1px 4px rgba(60, 40, 20, 0.07);
    --shadow-md: 0 4px 20px rgba(60, 40, 20, 0.10), 0 1px 4px rgba(60, 40, 20, 0.06);
    --shadow-lg: 0 16px 56px rgba(60, 40, 20, 0.13), 0 4px 16px rgba(60, 40, 20, 0.07);
    --radius: 5px;
    --radius-lg: 12px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════
   PAGE
═══════════════════════════════════════ */
.reg-page {
    min-height: 100vh;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 100% 50% at 50% 0%, rgba(184, 147, 74, 0.07) 0%, transparent 60%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 12px 24px;
    font-family: 'DM Sans', sans-serif;
}

/* ═══════════════════════════════════════
   CARD
═══════════════════════════════════════ */
.reg-card {
    width: 100%;
    max-width: 572px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.988);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.reg-header {
    padding: 16px 28px 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: linear-gradient(160deg, #fffdf9 0%, #ffffff 100%);
    text-align: center;
}

.reg-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
}

/* decorative mark */
.reg-mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.reg-mark-line {
    width: 20px;
    height: 1px;
    background: var(--gold-light);
}

.reg-mark-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-mid);
}

.reg-eyebrow {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2px;
}

.reg-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.1;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}

.reg-subtitle {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════
   BODY
═══════════════════════════════════════ */
.reg-body {
    padding: 16px 28px 24px;
}

/* section label */
.reg-sec {
    display: none;
}

/* ═══════════════════════════════════════
   FORM GROUPS
═══════════════════════════════════════ */
.fg {
    position: relative;
    margin-bottom: 8px;
}

.fg label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 2px;
    transition: color var(--transition);
}

.fg:focus-within>label {
    color: var(--gold);
}

.fg input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 300;
    padding: 8px 12px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.fg input::placeholder {
    color: var(--muted);
}

.fg input:focus {
    border-color: var(--gold-light);
    background: var(--gold-tint);
    box-shadow: 0 0 0 3px rgba(184, 147, 74, 0.10);
}

.fg input[readonly] {
    background: #faf8f5;
    color: var(--text-soft);
    cursor: default;
}

.fg input[readonly]:focus {
    border-color: var(--border-hi);
    background: #faf8f5;
    box-shadow: none;
}

.fg-hint {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.fg-msg {
    display: block;
    font-size: 11.5px;
    margin-top: 6px;
    min-height: 16px;
    transition: all var(--transition);
}

.fg-msg.ok {
    color: var(--success);
}

.fg-msg.error {
    color: var(--error);
}

.fg-msg.wait {
    color: var(--text-soft);
}

/* inline row */
.fg-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.fg-row .fg {
    flex: 1;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════
   OUTLINE BUTTON
═══════════════════════════════════════ */
.btn-outline {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border-hi);
    color: var(--gold);
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 18px;
    height: 46px;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-outline:hover {
    background: var(--gold-dim);
    border-color: var(--gold-light);
    box-shadow: 0 2px 8px rgba(184, 147, 74, 0.12);
}

.btn-outline:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════
   ADDRESS
═══════════════════════════════════════ */
.addr-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.addr-stack .fg {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════
   TERMS BOX
═══════════════════════════════════════ */
.terms-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fdfcfa;
}

.terms-all {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    background: var(--gold-tint);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.terms-all:hover {
    background: #fdf5e6;
}

.terms-all-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-mid);
    letter-spacing: 0.01em;
}

.terms-item {
    border-bottom: 1px solid var(--border);
}

.terms-item:last-child {
    border-bottom: none;
}

.terms-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    gap: 12px;
}

.terms-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.terms-item-text {
    font-size: 12.5px;
    color: var(--text-mid);
}

.badge-req {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(154, 122, 69, 0.10);
    border: 1px solid rgba(154, 122, 69, 0.22);
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
}

.badge-opt {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
}

.btn-terms-toggle {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: 3px;
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
}

.btn-terms-toggle:hover {
    color: var(--text-mid);
    background: rgba(0, 0, 0, 0.04);
}

.terms-drawer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-drawer.open {
    max-height: 220px;
}

.terms-drawer-inner {
    padding: 14px 18px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-soft);
    background: #f9f7f3;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    max-height: 220px;
}

.terms-drawer-inner p {
    margin: 0 0 6px;
}

.terms-drawer-inner strong {
    color: var(--gold);
    font-weight: 500;
}

/* ═══════════════════════════════════════
   CUSTOM CHECKBOXES
═══════════════════════════════════════ */
.custom-cb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--border-hi);
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.custom-cb:checked {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 147, 74, 0.15);
}

.custom-cb:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: 2px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(42deg);
}

.custom-cb:hover:not(:checked) {
    border-color: var(--gold-light);
}

/* ═══════════════════════════════════════
   SUBMIT
═══════════════════════════════════════ */
.btn-submit {
    width: 100%;
    margin-top: 16px;
    padding: 13px;
    background: var(--ink);
    border: none;
    border-radius: var(--radius);
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

/* gold shimmer line on top */
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.6), transparent);
}

.btn-submit:hover {
    background: #2c2620;
    box-shadow: 0 8px 28px rgba(28, 24, 20, 0.22), 0 2px 8px rgba(28, 24, 20, 0.12);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.reg-footer {
    text-align: center;
    padding: 18px 52px 30px;
    border-top: 1px solid var(--border);
    background: linear-gradient(to bottom, #fdfcfa, var(--bg));
    font-size: 13px;
    color: var(--text-soft);
}

.reg-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.reg-footer a:hover {
    color: var(--ink);
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast-wrap {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-wrap.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast {
    background: var(--ink);
    color: #f0ece6;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 300;
    padding: 13px 24px;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    white-space: nowrap;
    letter-spacing: 0.01em;
    border-top: 1px solid rgba(201, 169, 110, 0.35);
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 620px) {

    .reg-header,
    .reg-body {
        padding-left: 26px;
        padding-right: 26px;
    }

    .reg-footer {
        padding-left: 26px;
        padding-right: 26px;
    }

    .reg-title {
        font-size: 30px;
    }

    .fg-row {
        flex-direction: column;
        align-items: stretch;
    }

    .fg-row .btn-outline {
        height: 46px;
        width: 100%;
    }
}