﻿* {
    box-sizing: border-box;
}

:root {
    --accent: #d8a24a;
    --accent2: #a9772c;
    --accent-hover: #f0c477;
    --bg-dark: #06070a;
    --card-bg: rgba(10, 12, 17, 0.9);
    --border-color: rgba(216, 162, 74, 0.22);
    --pbd: #232a36;
}

body {
    margin: 0;
    background: #0a0c11;
    color: #e6e3dc;
    font-family: 'Barlow', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Base Layout & Canvas */
.registration-wrapper {
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 50% -10%, #151b26 0%, #0a0c11 62%);
}

.step-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* STEP 1: FACTION SELECTION */
.top-title-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(7px, 1.5vh, 14px);
    padding: clamp(14px, 3.4vh, 40px) 24px 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(6, 7, 10, 0.92), rgba(6, 7, 10, 0.55) 55%, transparent);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.brand-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(18px, min(2.3vw, 3.6vh), 34px);
    font-weight: 400;
    letter-spacing: .3em;
    color: #e8e2d4;
}

.brand-subtitle {
    font-family: 'Cinzel', serif;
    font-size: clamp(9px, .85vw, 12px);
    letter-spacing: .42em;
    color: #8d8578;
}

.main-heading {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(22px, min(3.6vw, 5.6vh), 52px);
    font-weight: 500;
    letter-spacing: .07em;
    color: #f2ece0;
    text-shadow: 0 2px 28px rgba(0,0,0,.9);
    white-space: nowrap;
}

.server-stats {
    position: absolute;
    top: clamp(14px, 3vh, 26px);
    left: clamp(16px, 2.4vw, 34px);
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8b93a1;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dot.green { background: #5fbf7a; }
.dot.gold { background: var(--accent); }

.mono {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: .04em;
    color: #cfd3da;
}

/* Faction Split Canvas */
.faction-split {
    position: relative;
    flex: 1;
    min-height: 100vh;
    display: flex;
    background: #06070a;
    overflow: hidden;
}

.faction-card {
    position: relative;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.card-art-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: filter .45s ease, transform .45s ease;
}

.order-bg { background-image: url('../images/art/splash-order.png'); }
.empire-bg { background-image: url('../images/art/splash-empire.png'); }

.card-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.order-scrim {
    background: linear-gradient(to right, rgba(6,7,10,.34), rgba(6,7,10,.04) 40%, rgba(6,7,10,.5)),
    linear-gradient(to top, rgba(4,5,8,.97) 0%, rgba(4,5,8,.93) 34%, rgba(5,6,9,.72) 56%, rgba(6,7,10,.3) 74%, rgba(6,7,10,.1) 100%);
}

.empire-scrim {
    background: linear-gradient(to left, rgba(6,7,10,.34), rgba(6,7,10,.04) 40%, rgba(6,7,10,.5)),
    linear-gradient(to top, rgba(4,5,8,.97) 0%, rgba(4,5,8,.93) 34%, rgba(5,6,9,.72) 56%, rgba(6,7,10,.3) 74%, rgba(6,7,10,.1) 100%);
}

.split-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(to bottom, transparent, rgba(216,162,74,.35) 22%, rgba(216,162,74,.5) 50%, rgba(216,162,74,.35) 78%, transparent);
}

.faction-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(9px, 1.6vh, 20px);
    padding: clamp(150px, 26vh, 240px) clamp(20px, 5vw, 84px) clamp(54px, 8vh, 92px);
    text-align: center;
    z-index: 5;
}

/* Crests */
.crest-container {
    position: relative;
    flex: none;
    width: clamp(40px, 7vh, 74px);
    height: clamp(40px, 7vh, 74px);
    display: grid;
    place-items: center;
}

.crest-outer, .crest-mid {
    position: absolute;
    inset: 0;
    border: 1px solid #e6e2d6;
    transform: rotate(45deg);
    opacity: .9;
}
.empire .crest-outer, .empire .crest-mid { border-color: #e0b27a; }
.round { border-radius: 50%; }
.square { border-radius: 3px; }

.crest-mid { inset: 18%; opacity: .5; }
.crest-dot { width: 11px; height: 11px; background: #e6e2d6; }
.empire .crest-dot { background: #e0b27a; }

.faction-content h2 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, min(4.4vw, 6.4vh), 62px);
    font-weight: 500;
    letter-spacing: .14em;
    color: #efebe0;
    text-shadow: 0 2px 24px rgba(0,0,0,.85);
}

.divider-line {
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(340px, 100%);
}

.line-left, .line-right {
    flex: 1;
    height: 1px;
}
.order .line-left { background: linear-gradient(to right, transparent, rgba(230,226,214,.55)); }
.order .line-right { background: linear-gradient(to left, transparent, rgba(230,226,214,.55)); }
.empire .line-left { background: linear-gradient(to right, transparent, rgba(224,178,122,.55)); }
.empire .line-right { background: linear-gradient(to left, transparent, rgba(224,178,122,.55)); }

.line-diamond {
    width: 5px;
    height: 5px;
    background: rgba(230,226,214,.55);
    transform: rotate(45deg);
}

.lead {
    margin: 0;
    max-width: 32ch;
    font-family: 'Cinzel', serif;
    font-size: clamp(12.5px, min(1.15vw, 1.9vh), 17px);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .05em;
    color: #efebe0;
    text-shadow: 0 1px 14px rgba(0,0,0,.9);
}

.creed {
    margin: -8px 0 0;
    max-width: 38ch;
    font-family: 'EB Garamond', serif;
    font-size: clamp(13px, min(1.25vw, 2vh), 18.5px);
    line-height: 1.55;
    color: #c4c9d2;
    text-shadow: 0 1px 14px rgba(0,0,0,.9);
}

.btn-select-faction {
    width: min(420px, 100%);
    height: clamp(44px, 7.5vh, 58px);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: clamp(14px, 1.3vw, 19px);
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: filter .2s ease;
}
.btn-select-faction:hover { filter: brightness(1.12); }

.order-btn {
    background: linear-gradient(180deg,#e2ded1,#a9a49a);
    border: 1px solid #f2efe6;
    color: #14161a;
    box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 16px 40px rgba(0,0,0,.55);
}

.empire-btn {
    background: linear-gradient(180deg,#9a2e33,#5e1a1e);
    border: 1px solid #c4585c;
    color: #f6e4e1;
    box-shadow: 0 0 0 1px rgba(196,88,92,.22), 0 16px 40px rgba(0,0,0,.55);
}

.values-list {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.values-list span {
    font-family: 'Cinzel', serif;
    font-size: clamp(9.5px, .85vw, 12px);
    font-weight: 500;
    letter-spacing: .24em;
    color: rgba(230,227,220,.66);
    text-transform: uppercase;
}

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(6, 8, 12, 0.6);
    backdrop-filter: blur(4px);
}

.modal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: rgba(10, 12, 17, 0.9);
    border: 1px solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 28px 70px rgba(0,0,0,.75);
}

.confirm-msg {
    font-family: 'Cinzel', serif;
    font-size: clamp(10px, .9vw, 12.5px);
    font-weight: 500;
    letter-spacing: .3em;
    color: #a8afba;
    text-transform: uppercase;
}

.btn-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(320px, 70vw);
    height: 52px;
    background: linear-gradient(180deg,#e2ded1,#a9a49a);
    border: 1px solid #f2efe6;
    color: #14161a;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-reconsider {
    background: none;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    color: #7d8798;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 11.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.btn-reconsider:hover { color: #e6e3dc; }

/* STEP 2: FORGE */
.forge-bg-canvas {
    background: #070808 url('../images/art/step2-camp.png') center/cover no-repeat;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px;
}

.forge-header {
    text-align: center;
    z-index: 10;
}
.forge-header h1 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(24px, min(3.4vw, 5.2vh), 48px);
    font-weight: 500;
    letter-spacing: .07em;
    color: #f2ece0;
    text-shadow: 0 2px 26px rgba(0,0,0,.9);
}
.forge-header p {
    margin: 4px 0 0;
    font-family: 'EB Garamond', serif;
    font-size: clamp(13px, min(1.2vw, 2vh), 18px);
    color: #b3b8c2;
}

/* Hotspots Layout */
.gender-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gender-card {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    border: 1px solid rgba(216,162,74,.16);
    border-radius: 6px;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.gender-card:hover {
    border-color: rgba(216,162,74,.55);
    background: rgba(216,162,74,.04);
}
.gender-card.selected {
    border-color: var(--accent);
    background: rgba(216,162,74,.07);
    box-shadow: 0 0 0 1px rgba(216,162,74,.3), inset 0 0 60px rgba(216,162,74,.1);
}

.hotspot-peter { top: 26%; left: 17%; width: 22%; height: 32%; }
.hotspot-jane { top: 26%; left: 61%; width: 22%; height: 32%; }

.hotspot-info {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: min(260px, 30vw);
    pointer-events: none;
    text-align: center;
}

.gender-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(13px, 1.4vw, 19px);
    font-weight: 500;
    letter-spacing: .2em;
    color: #f4efe3;
    text-shadow: 0 2px 16px rgba(0,0,0,.95);
}

.gender-line {
    width: clamp(70px, 9vw, 120px);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.gender-desc {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: clamp(12px, 1.05vw, 15px);
    color: #c3c7ce;
}

.gender-hint {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #7d8798;
}

.badge-chosen {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(8, 9, 12, 0.88);
    border: 1px solid var(--accent);
    border-radius: 3px;
    white-space: nowrap;
    font-family: 'Cinzel', serif;
    font-size: 10.5px;
    letter-spacing: .22em;
    color: #ece7db;
    text-transform: uppercase;
}

.diamond-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    transform: rotate(45deg);
}

/* Forge Controls Dock */
.forge-bottom-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(54px, 8vh, 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 1.6vh, 16px);
    z-index: 20;
}

.forge-controls-card {
    display: flex;
    width: min(518px, 90vw);
    padding: clamp(11px, 1.6vh, 16px);
    background: rgba(8,9,12,.82);
    border: 1px solid rgba(216,162,74,.22);
    border-radius: 5px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 22px 60px rgba(0,0,0,.6);
    backdrop-filter: blur(7px);
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-group label {
    font-family: 'Cinzel', serif;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .24em;
    color: #8b93a1;
    text-transform: uppercase;
}
.input-group input {
    height: 38px;
    padding: 0 12px;
    background: rgba(4,5,8,.85);
    border: 1px solid #1f2634;
    border-radius: 3px;
    color: #ece7db;
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    outline: none;
}
.input-group input:focus { border-color: var(--accent); }

.validation-msg {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #636c7c;
}
.validation-msg.valid { color: #7fc596; }
.validation-msg.invalid { color: #d98a8e; }

/* Buttons */
.button-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    height: clamp(42px, 6vh, 52px);
    border-radius: 3px;
    font-family: 'Cinzel', serif;
    font-size: clamp(11.5px, 1.05vw, 15px);
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: clamp(230px, 26vw, 340px);
    background: linear-gradient(180deg, rgba(216,162,74,.92), rgba(140,100,40,.92));
    border: 1px solid var(--accent);
    color: #14100a;
    box-shadow: 0 0 0 1px rgba(216,162,74,.25), 0 18px 44px rgba(0,0,0,.6);
}
.btn-primary:disabled {
    background: rgba(10,12,16,.72);
    border-color: rgba(216,162,74,.18);
    color: #5f6775;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0 20px;
    background: rgba(8,9,12,.7);
    border: 1px solid rgba(216,162,74,.22);
    color: #9aa4b4;
}
.btn-secondary:hover { color: #ece7db; border-color: rgba(216,162,74,.5); }

/* Step Rail */
.step-rail {
    position: absolute;
    left: clamp(18px, 2.4vw, 36px);
    bottom: clamp(14px, 2.6vh, 28px);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.rail-step { color: #6a7280; }
.rail-step.active { color: #ece7db; }
.rail-step.done { color: #9aa4b4; }
.rail-step .tick { color: var(--accent); margin-right: 4px; }

.rail-line {
    width: clamp(28px, 4vw, 64px);
    height: 1px;
    background: rgba(216,162,74,.5);
}
.rail-line.dimmed { background: rgba(216,162,74,.2); }

/* STEP 3: OATH */
.oath-canvas {
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.oath-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: 100%;
    max-width: 520px;
}

.oath-title-block {
    text-align: center;
}
.step-badge {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 11px;
    letter-spacing: .32em;
    color: var(--accent);
    text-transform: uppercase;
}
.oath-title-block h1 {
    margin: 4px 0 0;
    font-family: 'Marcellus', serif;
    font-size: 36px;
    font-weight: 400;
}

.oath-card {
    position: relative;
    width: 100%;
    padding: 26px;
    background: #101520;
    border: 1px solid #232a36;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 14px 34px rgba(0,0,0,.35);
}

.card-glow-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(216,162,74,.45), transparent);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1a202b;
}

.avatar-box {
    width: 62px;
    height: 76px;
    border-radius: 9px;
    background: repeating-linear-gradient(135deg, #1b212d 0 7px, #171d27 7px 14px);
    border: 1px solid #8c2f34;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.char-display-name {
    font-family: 'Marcellus', serif;
    font-size: 26px;
}
.faction-tag {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 12px;
    letter-spacing: .18em;
    color: #8c2f34;
    text-transform: uppercase;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 0;
}
.summary-details .row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #7d8798;
}
.summary-details .val {
    font-family: 'IBM Plex Mono', monospace;
    color: #dcd6c8;
}

.oath-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    background: #0c111a;
    border: 1px solid #1f2634;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 18px;
}

.oath-checkbox input { display: none; }

.checkbox-box {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1px solid #1f2634;
    border-radius: 5px;
    background: #0b0f16;
    flex-shrink: 0;
}

.checkbox-tick {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: transparent;
}

.oath-checkbox input:checked + .checkbox-box {
    border-color: var(--accent);
    background: rgba(216,162,74,.12);
}
.oath-checkbox input:checked + .checkbox-box .checkbox-tick {
    background: var(--accent);
}

.checkbox-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: #9aa4b4;
}

.btn-enter {
    flex: 1;
}