:root {
    --member-red: #c10000;
    --member-purple: #8c4fb4;
    --member-paper: #e8ddc7;
}

html,
body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

body.member-page {
    background:
        linear-gradient(rgba(3, 10, 12, 0.83), rgba(3, 10, 12, 0.94)),
        url("/assets/images/backgrounds/patterns/dark-ornament.svg") center top / 520px auto repeat,
        #071012;
}

.member-main {
    position: relative;
    min-height: 100vh;
    padding: calc(var(--header-height) + clamp(56px, 8vw, 110px)) 5vw clamp(80px, 10vw, 150px);
    isolation: isolate;
}

.member-main::before,
.member-main::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: min(62vw, 860px);
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.member-main::before {
    top: 5%;
    left: -28%;
    background: rgba(105, 26, 39, 0.14);
}

.member-main::after {
    right: -30%;
    bottom: -25%;
    background: rgba(78, 36, 115, 0.14);
}

.member-shell {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.member-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(300px, 42vw, 470px);
    margin-bottom: clamp(44px, 7vw, 85px);
    text-align: center;
}

.member-hero-emblems {
    position: absolute;
    inset: 50% auto auto 50%;
    width: clamp(230px, 32vw, 420px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    opacity: 0.72;
    pointer-events: none;
}

.member-hero-emblems img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(193, 0, 0, 0.22));
    animation: member-emblem-spin 34s linear infinite;
}

.member-hero-emblems img + img {
    animation-direction: reverse;
    animation-duration: 25s;
}

.member-hero-copy {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
}

.member-kicker {
    margin: 0 0 18px;
    color: var(--gold);
    font-size: clamp(0.68rem, 1vw, 0.82rem);
    letter-spacing: 0.34em;
}

.member-hero h1 {
    margin: 0;
    color: #f4ead7;
    font-size: clamp(2.4rem, 7vw, 5.9rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.12em;
    text-shadow: 0 0 28px rgba(193, 0, 0, 0.34);
}

.member-hero-lead {
    margin: 26px auto 0;
    max-width: 640px;
    color: rgba(243, 238, 226, 0.76);
    font-size: clamp(0.9rem, 1.4vw, 1.06rem);
    line-height: 2;
    letter-spacing: 0.08em;
}

.member-panel {
    position: relative;
    margin-top: 28px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid rgba(213, 189, 130, 0.38);
    background: rgba(5, 17, 20, 0.88);
    box-shadow:
        inset 0 0 0 5px rgba(213, 189, 130, 0.035),
        0 22px 70px rgba(0, 0, 0, 0.28);
}

.member-panel::before,
.member-panel::after {
    content: "◆";
    position: absolute;
    color: var(--gold);
    font-size: 0.68rem;
}

.member-panel::before {
    top: 10px;
    left: 12px;
}

.member-panel::after {
    right: 12px;
    bottom: 10px;
}

.member-section-heading {
    margin-bottom: 30px;
    text-align: center;
}

.member-section-heading p {
    margin: 0 0 10px;
    color: rgba(213, 189, 130, 0.66);
    font-size: 0.66rem;
    letter-spacing: 0.28em;
}

.member-section-heading h2 {
    margin: 0;
    color: var(--ivory);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.14em;
}

.contract-intro {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(243, 238, 226, 0.78);
    line-height: 2.15;
    text-align: center;
}

.contract-benefits,
.room-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.contract-benefits li,
.room-menu button {
    min-height: 150px;
    padding: 24px 20px;
    border: 1px solid rgba(213, 189, 130, 0.25);
    color: var(--ivory);
    background: linear-gradient(145deg, rgba(18, 43, 47, 0.86), rgba(6, 18, 21, 0.94));
    text-align: center;
}

.contract-benefits strong,
.room-menu strong {
    display: block;
    margin-bottom: 13px;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.contract-benefits span,
.room-menu span {
    color: rgba(243, 238, 226, 0.66);
    font-size: 0.78rem;
    line-height: 1.8;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 38px;
}

.member-button {
    display: inline-grid;
    place-items: center;
    min-width: min(100%, 240px);
    min-height: 58px;
    padding: 13px 28px;
    border: 1px solid rgba(213, 189, 130, 0.62);
    color: var(--gold);
    background: rgba(5, 17, 20, 0.82);
    font: inherit;
    font-size: 0.84rem;
    letter-spacing: 0.16em;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.member-button:hover,
.member-button:focus-visible {
    color: #fff7e6;
    border-color: rgba(193, 0, 0, 0.8);
    background: rgba(78, 6, 12, 0.72);
    box-shadow: 0 0 25px rgba(193, 0, 0, 0.2);
    transform: translateY(-3px);
}

.member-button-primary {
    color: #fff0e9;
    border-color: rgba(193, 0, 0, 0.88);
    background: rgba(100, 0, 7, 0.72);
}

.member-form {
    display: grid;
    gap: 22px;
    width: min(100%, 680px);
    margin: 0 auto;
}

.member-field {
    display: grid;
    gap: 9px;
}

.member-field label {
    color: var(--gold);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
}

.member-field input,
.member-field select {
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid rgba(213, 189, 130, 0.32);
    border-radius: 0;
    outline: 0;
    color: var(--ivory);
    background: rgba(1, 8, 10, 0.82);
    font: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.member-field input:focus,
.member-field select:focus {
    border-color: var(--member-purple);
    box-shadow: 0 0 0 3px rgba(140, 79, 180, 0.14);
}

.member-note,
.member-status {
    margin: 24px auto 0;
    max-width: 680px;
    color: rgba(243, 238, 226, 0.58);
    font-size: 0.74rem;
    line-height: 1.8;
    text-align: center;
}

.member-status {
    padding: 12px 15px;
    border: 1px solid rgba(213, 189, 130, 0.18);
    color: rgba(232, 221, 199, 0.82);
    background: rgba(0, 0, 0, 0.2);
}

.member-stepper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.member-stepper li {
    display: grid;
    place-items: center;
    width: 34px;
    aspect-ratio: 1;
    border: 1px solid rgba(213, 189, 130, 0.28);
    color: rgba(213, 189, 130, 0.46);
    border-radius: 50%;
    font-size: 0.7rem;
}

.member-stepper li.is-current {
    color: #fff;
    border-color: var(--member-purple);
    box-shadow: 0 0 16px rgba(140, 79, 180, 0.42);
}

.member-preview-step[hidden] {
    display: none;
}

.room-profile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}

.room-mark {
    display: grid;
    place-items: center;
    width: 86px;
    aspect-ratio: 1;
    border: 1px solid rgba(140, 79, 180, 0.62);
    border-radius: 50%;
    color: var(--gold);
    background: rgba(12, 25, 28, 0.9);
    font-size: 1.7rem;
    box-shadow: 0 0 26px rgba(140, 79, 180, 0.18);
}

.room-profile p,
.room-profile h2 {
    margin: 0;
}

.room-profile p {
    color: rgba(213, 189, 130, 0.64);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
}

.room-profile h2 {
    margin-top: 8px;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;
    letter-spacing: 0.08em;
}

.room-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.room-menu button {
    width: 100%;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
}

.room-menu button:hover,
.room-menu button:focus-visible,
.room-menu button.is-active {
    border-color: rgba(140, 79, 180, 0.82);
    box-shadow: 0 0 24px rgba(140, 79, 180, 0.14);
    transform: translateY(-3px);
}

.room-content {
    margin-top: 20px;
    padding: 26px;
    border-left: 2px solid var(--member-purple);
    color: rgba(243, 238, 226, 0.72);
    background: rgba(0, 0, 0, 0.18);
    line-height: 1.9;
}

.member-footer {
    padding: 55px 5vw 30px;
    color: rgba(243, 238, 226, 0.36);
    font-size: 0.68rem;
    text-align: center;
}

@keyframes member-emblem-spin {
    to { transform: rotate(1turn); }
}

@media (max-width: 760px) {
    .member-main {
        padding-right: 18px;
        padding-left: 18px;
    }

    .member-hero {
        min-height: 330px;
    }

    .member-hero h1 {
        letter-spacing: 0.06em;
    }

    .contract-benefits,
    .room-menu {
        grid-template-columns: 1fr;
    }

    .contract-benefits li,
    .room-menu button {
        min-height: 0;
    }

    .room-profile {
        grid-template-columns: auto 1fr;
    }

    .room-profile .member-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .member-hero-emblems img {
        animation: none;
    }
}
