:root {
    color-scheme: dark;
    --ink: #f5f0e8;
    --muted: #b9b1a5;
    --panel: rgba(17, 16, 14, 0.96);
    --field: #211f1b;
    --line: #4b443a;
    --line-strong: #796a55;
    --gold: #d4aa59;
    --gold-bright: #f2cf7a;
    --red: #9d392f;
    --green: #55b981;
    --danger: #ff8178;
    --shadow: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #11100e;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: #11100e;
    font-family: "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

.site-header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    display: flex;
    width: 100vw;
    max-width: 100vw;
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 18px clamp(20px, 4vw, 64px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(8, 8, 7, 0.88), rgba(8, 8, 7, 0));
}

.site-brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 13px;
    color: var(--ink);
    text-decoration: none;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.site-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    position: relative;
    padding: 10px 12px;
    color: #c9c1b5;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.site-nav a::after {
    position: absolute;
    right: 12px;
    bottom: 3px;
    left: 12px;
    height: 1px;
    background: var(--gold-bright);
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 150ms ease, transform 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
    color: #fff7e8;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-nav a:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 2px;
}

.page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 620px);
    min-height: 100vh;
    background-image: url("/assets/kustosz-register.png");
    background-position: center;
    background-size: cover;
}

.brand-panel {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    justify-content: flex-end;
    padding: 110px clamp(28px, 4vw, 64px) clamp(28px, 4vw, 64px);
    background: rgba(0, 0, 0, 0.24);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    background: rgba(17, 16, 14, 0.78);
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 700;
}

.brand-name {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
}

.brand-copy {
    width: 100%;
    max-width: 680px;
    padding-bottom: clamp(12px, 5vh, 64px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-copy h1 {
    margin: 0;
    color: #fff8e8;
    font-family: Georgia, serif;
    font-size: clamp(52px, 7vw, 96px);
    font-weight: 700;
    line-height: 0.95;
}

.brand-lead {
    max-width: 610px;
    margin: 26px 0 24px;
    overflow-wrap: break-word;
    color: #eee8dd;
    font-family: Georgia, serif;
    font-size: clamp(19px, 2vw, 28px);
    line-height: 1.42;
}

.server-state {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(12, 12, 11, 0.78);
    font-size: 13px;
    font-weight: 600;
}

.state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 12px currentColor;
}

.is-online .state-dot {
    color: var(--green);
    background: var(--green);
}

.register-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    border-left: 1px solid rgba(212, 170, 89, 0.35);
    background: var(--panel);
    box-shadow: -24px 0 60px var(--shadow);
}

.register-inner {
    width: min(100%, 520px);
    padding: 42px 34px;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2,
.success-view h2 {
    margin: 0 0 9px;
    font-family: Georgia, serif;
    font-size: 36px;
    line-height: 1.1;
}

.form-header > p:last-child,
.success-view > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

form {
    display: grid;
    gap: 19px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.field label {
    color: #e7dfd2;
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 4px;
    outline: none;
    color: var(--ink);
    background: var(--field);
    padding: 0 13px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:hover {
    border-color: var(--line-strong);
}

.field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 170, 89, 0.14);
}

.field input:user-invalid {
    border-color: var(--red);
}

.field-hint {
    color: #8f887d;
    font-size: 11px;
    line-height: 1.4;
}

.field-error {
    color: var(--danger);
    font-size: 12px;
    line-height: 1.4;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    color: var(--gold-bright);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff3cd;
    outline: 1px solid var(--gold);
    outline-offset: 1px;
}

.check-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 11px;
    align-items: start;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.5;
}

.check-row input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--gold);
}

.rules-error {
    margin-top: -13px;
}

.primary-button {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #f0cf86;
    border-radius: 4px;
    color: #17130c;
    background: var(--gold);
    cursor: pointer;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background-color 150ms ease, transform 150ms ease;
}

.primary-button:hover {
    background: var(--gold-bright);
    transform: translateY(-1px);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button:focus-visible {
    outline: 3px solid rgba(242, 207, 122, 0.42);
    outline-offset: 2px;
}

.form-alert {
    margin: -10px 0 20px;
    border-left: 3px solid var(--danger);
    color: #ffd3cf;
    background: rgba(157, 57, 47, 0.16);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
}

.form-success {
    margin: -10px 0 20px;
    border-left: 3px solid var(--green);
    color: #d7f8e5;
    background: rgba(85, 185, 129, 0.14);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
}

.account-panel .register-inner {
    width: min(100%, 560px);
}

.account-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    background: var(--line);
}

.account-summary div {
    min-width: 0;
    padding: 14px 16px;
    background: #191815;
}

.account-summary dt {
    margin: 0 0 6px;
    color: #8f887d;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.account-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #eee7da;
    font-size: 14px;
}

.account-form {
    padding-top: 26px;
    border-top: 1px solid rgba(212, 170, 89, 0.22);
}

.logout-form {
    margin-top: 12px;
}

.secondary-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #d2c9bb;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
    border-color: var(--line-strong);
    color: #fff7e8;
    background: rgba(255, 255, 255, 0.04);
}

.secondary-button:focus-visible {
    outline: 2px solid rgba(242, 207, 122, 0.35);
    outline-offset: 2px;
}

.security-note {
    margin: 22px 0 0;
    color: #817a70;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.success-view {
    text-align: center;
}

.success-view .primary-button {
    margin-top: 28px;
}

.success-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 24px;
    place-items: center;
    border: 1px solid var(--green);
    border-radius: 50%;
    color: var(--green);
    font-size: 28px;
}

.site-footer {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(20px, 5vw, 72px);
    border-top: 1px solid rgba(212, 170, 89, 0.22);
    color: #857d72;
    background: #0c0b0a;
    font-size: 11px;
}

.site-footer span:last-child {
    color: #b7aa95;
}

.presentation-page {
    background: #0e0d0c;
}

.presentation-shell {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.presentation-hero {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    min-height: min(860px, 92vh);
    align-items: flex-end;
    padding: 160px clamp(24px, 7vw, 110px) clamp(64px, 9vh, 92px);
    background:
        linear-gradient(90deg, rgba(7, 7, 6, 0.96) 0%, rgba(7, 7, 6, 0.72) 38%, rgba(7, 7, 6, 0.08) 72%),
        linear-gradient(0deg, #0e0d0c 0%, transparent 24%),
        url("/assets/presentation-kingdom.png") center / cover no-repeat;
}

.presentation-hero-copy {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    min-width: 0;
}

.presentation-hero h1 {
    max-width: 680px;
    margin: 0;
    color: #fff8e9;
    font-family: Georgia, serif;
    font-size: clamp(54px, 7vw, 96px);
    font-weight: 700;
    line-height: 0.98;
}

.presentation-hero-copy > p:not(.eyebrow) {
    max-width: 610px;
    margin: 26px 0 0;
    color: #d2cbc0;
    font-size: 18px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    max-width: 510px;
    gap: 12px;
    margin-top: 34px;
}

.hero-primary {
    width: auto;
    min-width: 220px;
    padding: 0 24px;
}

.secondary-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(242, 207, 122, 0.48);
    border-radius: 4px;
    color: #f1e6d2;
    background: rgba(10, 10, 9, 0.68);
    padding: 0 24px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.secondary-button:hover,
.secondary-button:focus-visible {
    border-color: var(--gold-bright);
    color: #fff8e9;
    background: rgba(32, 28, 22, 0.86);
}

.hero-status {
    position: absolute;
    z-index: 2;
    right: clamp(24px, 5vw, 72px);
    bottom: 64px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #eee6d9;
    background: rgba(10, 10, 9, 0.8);
    padding: 10px 13px;
    font-size: 12px;
    font-weight: 700;
}

.facts-band {
    display: grid;
    width: 100%;
    max-width: 100vw;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(212, 170, 89, 0.28);
    border-bottom: 1px solid rgba(212, 170, 89, 0.28);
    background: #13110f;
    padding: 0 clamp(24px, 5vw, 72px);
}

.fact {
    display: grid;
    min-width: 0;
    min-height: 142px;
    align-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px clamp(16px, 3vw, 42px);
}

.fact:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.fact strong {
    color: var(--gold-bright);
    font-family: Georgia, serif;
    font-size: 31px;
    line-height: 1;
}

.fact span {
    margin-top: 10px;
    color: #a79f94;
    font-size: 12px;
    line-height: 1.4;
}

.presentation-section {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 110px clamp(24px, 7vw, 110px);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 54px;
}

.section-heading h2,
.items-copy h2,
.development-band h2 {
    margin: 0;
    color: #fff7e7;
    font-family: Georgia, serif;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
}

.section-heading > p:last-child,
.items-copy > p:last-child,
.development-band > div > p:last-child {
    margin: 20px 0 0;
    color: #a9a196;
    font-size: 16px;
    line-height: 1.65;
}

.systems-section {
    background:
        linear-gradient(rgba(14, 13, 12, 0.97), rgba(14, 13, 12, 0.97)),
        url("/assets/kustosz-register.png") center / cover fixed;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item {
    min-height: 250px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(22, 20, 18, 0.74);
    padding: 30px;
}

.feature-index {
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 13px;
}

.feature-item h3 {
    margin: 34px 0 12px;
    color: #eee6d7;
    font-family: Georgia, serif;
    font-size: 22px;
    line-height: 1.25;
}

.feature-item p {
    margin: 0;
    color: #9f978d;
    font-size: 13px;
    line-height: 1.65;
}

.worlds-section {
    background: #12100e;
}

.world-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.world-item {
    overflow: hidden;
    border: 1px solid rgba(212, 170, 89, 0.2);
    border-radius: 4px;
    background: #181512;
}

.world-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.world-item > div {
    min-height: 210px;
    padding: 26px;
}

.world-item span {
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.world-item h3 {
    margin: 11px 0 13px;
    color: #eee6d8;
    font-family: Georgia, serif;
    font-size: 23px;
    line-height: 1.2;
}

.world-item p {
    margin: 0;
    color: #9e968b;
    font-size: 13px;
    line-height: 1.65;
}

.items-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(50px, 8vw, 120px);
    align-items: start;
    background: #0e0d0c;
}

.item-points {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    list-style: none;
}

.item-points li {
    display: grid;
    grid-template-columns: minmax(170px, 0.7fr) 1fr;
    gap: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 24px 0;
}

.item-points strong {
    color: #e8dfd0;
    font-family: Georgia, serif;
    font-size: 17px;
}

.item-points span {
    color: #928b81;
    font-size: 13px;
    line-height: 1.55;
}

.development-band {
    display: grid;
    width: 100%;
    max-width: 100vw;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    border-top: 1px solid rgba(212, 170, 89, 0.28);
    background:
        linear-gradient(90deg, rgba(15, 13, 11, 0.98), rgba(15, 13, 11, 0.78)),
        url("/assets/presentation-fire.png") center / cover;
    padding: 80px clamp(24px, 7vw, 110px);
}

.development-band > div {
    max-width: 800px;
}

.development-cta {
    width: auto;
    min-width: 250px;
    padding: 0 24px;
}

@media (max-width: 980px) {
    .page-shell {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 52vw);
    }

    .brand-copy h1 {
        font-size: 52px;
    }

    .brand-lead {
        font-size: 19px;
    }

    .feature-grid,
    .world-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .world-item:last-child {
        grid-column: 1 / -1;
    }

    .world-item:last-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .world-item:last-child img {
        height: 100%;
        aspect-ratio: auto;
    }

    .items-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 76px;
        gap: 12px;
        padding: 14px 20px;
        background: rgba(8, 8, 7, 0.88);
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .brand-name {
        font-size: 18px;
    }

    .site-nav {
        gap: 0;
    }

    .site-nav a {
        padding: 10px 6px;
        font-size: 12px;
    }

    .page-shell {
        display: block;
        background-position: 42% top;
    }

    .brand-panel {
        min-height: 300px;
        padding: 108px 20px 22px;
        justify-content: flex-end;
        background: rgba(0, 0, 0, 0.36);
    }

    .brand-copy {
        padding: 42px 0 0;
    }

    .brand-copy h1 {
        font-size: 46px;
    }

    .brand-lead {
        max-width: 480px;
        margin: 15px 0;
        font-size: 17px;
    }

    .register-panel {
        min-height: auto;
        border-top: 1px solid rgba(212, 170, 89, 0.35);
        border-left: 0;
        box-shadow: 0 -16px 40px var(--shadow);
    }

    .register-inner {
        width: 100%;
        padding: 38px 20px 46px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .presentation-hero {
        min-height: 720px;
        align-items: flex-end;
        padding: 130px 20px 78px;
        background:
            linear-gradient(0deg, #0e0d0c 0%, rgba(7, 7, 6, 0.7) 55%, rgba(7, 7, 6, 0.22) 100%),
            url("/assets/presentation-kingdom.png") 62% center / cover no-repeat;
    }

    .presentation-hero h1 {
        font-size: 48px;
    }

    .presentation-hero-copy > p:not(.eyebrow) {
        font-size: 15px;
    }

    .hero-status {
        right: 20px;
        bottom: 20px;
    }

    .facts-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 20px;
    }

    .fact {
        min-height: 120px;
        padding: 22px;
    }

    .fact:nth-child(2) {
        border-right: 0;
    }

    .fact:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .presentation-section {
        padding: 78px 20px;
    }

    .section-heading {
        margin-bottom: 36px;
    }

    .feature-grid,
    .world-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        min-height: auto;
    }

    .feature-item h3 {
        margin-top: 24px;
    }

    .world-item:last-child {
        display: block;
        grid-column: auto;
    }

    .world-item:last-child img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .item-points li {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .development-band {
        grid-template-columns: 1fr;
        padding: 68px 20px;
    }

    .development-cta {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .field-grid {
        grid-template-columns: 1fr;
    }

    .account-summary {
        grid-template-columns: 1fr;
    }

    .form-header h2,
    .success-view h2 {
        font-size: 31px;
    }

    .site-header {
        align-items: flex-start;
    }

    .site-brand {
        gap: 8px;
    }

    .brand-name {
        display: none;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-primary {
        width: 100%;
    }

    .presentation-hero h1 {
        font-size: 42px;
        overflow-wrap: break-word;
    }

    .presentation-hero-copy,
    .presentation-hero-copy > p,
    .hero-actions {
        width: 100%;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
