
:root {
    color-scheme: dark;

    --nation-primary: #7772dc;
    --nation-bright: #c1bdff;
    --nation-deep: #100d2d;
    --nation-glow: rgba(105, 91, 225, 0.22);

    --surface: rgba(17, 15, 43, 0.82);
    --surface-strong: rgba(11, 9, 30, 0.95);

    --border: rgba(169, 163, 255, 0.17);
    --border-hover: rgba(169, 163, 255, 0.46);

    --text-main: #eeedff;
    --text-muted: #b2b0d0;

    --sealed: #aaa4f4;
    --forbidden: #a99ac8;
}


/* ================================
   RESET & BASE
================================ */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;

    background: var(--nation-deep);
    color: var(--text-main);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* ================================
   FIXED BACKGROUND
================================ */

.nation-background {
    position: fixed;
    inset: 0;
    z-index: -3;

    background-color: #100d2d;
    background-image: url("images/indigo-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: scale(1.02);
}

.background-shade {
    position: fixed;
    inset: 0;
    z-index: -2;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(8, 7, 25, 0.56) 0%,
            rgba(10, 8, 31, 0.74) 35%,
            rgba(10, 8, 30, 0.87) 72%,
            rgba(8, 7, 24, 0.96) 100%
        ),
        linear-gradient(
            90deg,
            rgba(8, 7, 26, 0.38),
            transparent 50%,
            rgba(8, 7, 26, 0.38)
        );
}


/* ================================
   HEADER
================================ */

.nation-header {
    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    min-height: 66px;
    padding: 14px clamp(18px, 5vw, 64px);

    background: rgba(11, 9, 31, 0.84);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--text-muted);
    font-size: 13px;

    transition: color 0.2s ease;
}

.back-link span {
    color: var(--nation-bright);
    font-size: 19px;
}

.back-link:hover {
    color: var(--text-main);
}

.header-label {
    color: var(--nation-bright);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-align: right;
}


/* ================================
   MAIN LAYOUT
================================ */

.nation-page {
    width: min(calc(100% - 32px), 1000px);
    margin: 0 auto;
}

.nation-section {
    margin: 0 0 82px;
    scroll-margin-top: 90px;
}


/* ================================
   HERO
================================ */

.nation-hero {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 360px;
    padding: clamp(72px, 12vw, 130px) 12px 72px;

    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;

    color: var(--nation-bright);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.6;
    text-transform: uppercase;
}

.nation-hero h1 {
    margin: 0;

    color: #f3f0ff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(43px, 8vw, 76px);
    font-weight: 500;
    letter-spacing: 1px;
    line-height: 1.15;

    text-shadow:
        0 0 30px rgba(129, 112, 255, 0.25),
        0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    max-width: 590px;
    margin: 20px auto 0;

    color: #d0cde9;
    font-size: clamp(14px, 2vw, 17px);
    line-height: 1.9;
}

.hero-divider {
    width: 100px;
    height: 1px;
    margin: 28px 0 18px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--nation-bright),
        transparent
    );
}

.hero-note {
    margin: 0;

    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.8;
}

.discovery-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-top: 27px;
    padding: 8px 13px;

    color: #c3bfff;
    background: rgba(30, 25, 74, 0.68);
    border: 1px solid rgba(169, 163, 255, 0.25);
    border-radius: 3px;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.status-dot {
    width: 6px;
    height: 6px;

    background: var(--nation-bright);
    border-radius: 50%;

    box-shadow: 0 0 10px var(--nation-primary);
}


/* ================================
   SECTION HEADINGS
================================ */

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

.section-heading h2 {
    margin: 0;

    color: #f0edff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 4vw, 37px);
    font-weight: 500;
    line-height: 1.3;
}

.section-intro {
    max-width: 680px;
    margin: 12px 0 0;

    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
}


/* ================================
   INFORMATION CARDS
================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.info-card {
    position: relative;
    min-width: 0;
    padding: 25px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.13);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.info-card:hover {
    background: rgba(24, 21, 57, 0.89);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.card-label {
    display: block;
    margin-bottom: 10px;

    color: var(--nation-bright);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.7;
}

.info-card h3,
.character-details h3,
.magic-content h3,
.unknown-card h3 {
    margin: 0;

    color: #f0edff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.4;
}

.info-card p {
    margin: 12px 0 0;

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
}

.record-status {
    display: inline-block;
    margin-top: 17px;

    color: #a8a1dc;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.35px;
    line-height: 1.8;
}


/* ================================
   MAGIC PANEL
================================ */

.magic-panel {
    display: flex;
    align-items: center;
    gap: clamp(22px, 5vw, 48px);

    padding: clamp(24px, 5vw, 42px);

    background:
        linear-gradient(
            120deg,
            rgba(32, 27, 80, 0.83),
            rgba(11, 10, 34, 0.9)
        );

    border: 1px solid var(--border);
    border-radius: 8px;

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.magic-orb {
    position: relative;
    flex: 0 0 clamp(90px, 17vw, 150px);

    width: clamp(90px, 17vw, 150px);
    aspect-ratio: 1;
    border-radius: 50%;

    background: radial-gradient(
        circle at 34% 30%,
        #d0caff 0%,
        #9388ff 15%,
        #5746c6 38%,
        #211958 65%,
        rgba(12, 9, 35, 0.2) 75%
    );

    border: 1px solid rgba(194, 186, 255, 0.48);

    box-shadow:
        0 0 35px rgba(100, 79, 222, 0.24),
        inset -12px -15px 30px rgba(5, 4, 22, 0.65),
        inset 5px 5px 20px rgba(225, 220, 255, 0.12);
}

.magic-orb::before,
.magic-orb::after {
    content: "";
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(213, 207, 255, 0.18);
    border-radius: 50%;
}

.magic-orb::after {
    inset: 25%;
    border-color: rgba(213, 207, 255, 0.12);
}

.magic-content {
    flex: 1;
    min-width: 0;
}

.magic-content h3 {
    font-size: clamp(23px, 4vw, 31px);
}

.magic-content p {
    margin: 13px 0 0;

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}


/* ================================
   CHARACTER GRID
================================ */

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

.character-card {
    min-width: 0;
    overflow: hidden;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;

    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);

    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);

    transition:
        border-color 0.25s ease,
        transform 0.25s ease;
}

.character-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.character-art {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 220px;
    overflow: hidden;
    isolation: isolate;

    border-bottom: 1px solid var(--border);
}

.sealed-art,
.design-sealed-art {
    background:
        radial-gradient(
            circle at center,
            rgba(101, 84, 220, 0.2),
            transparent 55%
        ),
        repeating-linear-gradient(
            135deg,
            rgba(173, 166, 255, 0.035) 0,
            rgba(173, 166, 255, 0.035) 2px,
            transparent 2px,
            transparent 13px
        ),
        linear-gradient(145deg, #211b50, #0b0925 75%);
}

.sealed-art::before,
.design-sealed-art::before {
    content: "";

    position: absolute;
    left: 50%;
    top: 43%;

    width: 91px;
    height: 91px;

    transform: translate(-50%, -50%);
    border: 1px solid rgba(178, 169, 255, 0.42);
    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(106, 87, 214, 0.18),
        rgba(11, 8, 33, 0.9)
    );

    box-shadow:
        0 0 27px rgba(105, 91, 225, 0.14),
        inset 0 0 18px rgba(142, 128, 255, 0.1);

    z-index: -1;
}

.seal-symbol {
    color: #b5adff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 49px;

    text-shadow: 0 0 22px rgba(136, 120, 255, 0.75);
}

.art-status {
    position: absolute;
    bottom: 16px;
    left: 50%;

    width: max-content;
    max-width: 90%;
    padding: 6px 9px;

    transform: translateX(-50%);

    color: #c4beff;
    background: rgba(9, 7, 27, 0.91);
    border: 1px solid rgba(169, 163, 255, 0.25);
    border-radius: 3px;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.35px;
    text-align: center;
    white-space: nowrap;
}

.character-details {
    padding: 22px 19px 24px;
}

.character-details .card-label {
    min-height: 16px;
    font-size: 8px;
    letter-spacing: 1.35px;
}

.character-details h3 {
    overflow-wrap: anywhere;
    font-size: 20px;
}

.character-details p {
    margin: 10px 0 0;

    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

.locked-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-top: 18px;
    padding: 6px 9px;

    color: #b9b2ff;
    background: rgba(66, 53, 145, 0.22);
    border: 1px solid rgba(169, 163, 255, 0.25);
    border-radius: 3px;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.15px;
    line-height: 1.7;
}


/* ================================
   QUEEN: FORBIDDEN RECORD
================================ */

.forbidden-art {
    background:
        repeating-linear-gradient(
            0deg,
            rgba(186, 171, 214, 0.035) 0,
            rgba(186, 171, 214, 0.035) 1px,
            transparent 1px,
            transparent 5px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(186, 171, 214, 0.025) 0,
            rgba(186, 171, 214, 0.025) 1px,
            transparent 1px,
            transparent 7px
        ),
        linear-gradient(145deg, #211a30, #090811 78%);

    border-bottom-color: rgba(167, 144, 188, 0.2);
}

.forbidden-art::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            transparent 47%,
            rgba(180, 160, 205, 0.09) 48%,
            transparent 49%
        ),
        linear-gradient(
            45deg,
            transparent 47%,
            rgba(180, 160, 205, 0.07) 48%,
            transparent 49%
        );
}

.forbidden-symbol {
    color: #9385a8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 54px;

    text-shadow: 0 0 20px rgba(128, 106, 158, 0.2);
}

.forbidden-art .art-status {
    color: #b8a6c8;
    background: rgba(14, 10, 20, 0.94);
    border-color: rgba(167, 144, 188, 0.25);
}

.forbidden-details {
    background: rgba(10, 8, 17, 0.5);
}

.redacted-name {
    color: #9589a6 !important;
    font-family: monospace !important;
    font-size: 17px !important;
    letter-spacing: 1px;
    overflow: hidden;
}

.redacted-text {
    color: #92879d !important;
    font-style: italic;
}

.forbidden-label {
    color: #c0adc9;
    background: rgba(74, 48, 82, 0.23);
    border-color: rgba(167, 144, 188, 0.25);
}


/* ================================
   UNDISCOVERED RECORDS
================================ */

.unknown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.unknown-card {
    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
    padding: 20px;

    background: rgba(13, 11, 34, 0.8);
    border: 1px solid rgba(169, 163, 255, 0.13);
    border-radius: 6px;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.unknown-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 43px;
    width: 43px;
    height: 43px;

    color: #aaa3e4;
    background: rgba(94, 78, 175, 0.13);
    border: 1px solid rgba(169, 163, 255, 0.17);
    border-radius: 4px;

    font-size: 23px;
}

.unknown-card > div {
    flex: 1;
    min-width: 0;
}

.unknown-card .card-label {
    margin-bottom: 4px;
    font-size: 8px;
}

.unknown-card h3 {
    font-size: 16px;
    overflow-wrap: anywhere;
}

.unknown-card p {
    margin: 6px 0 0;

    color: #a5a0c3;
    font-size: 11px;
    line-height: 1.7;
}

.unknown-lock {
    flex: 0 0 auto;

    color: #8981c4;
    font-size: 15px;
    opacity: 0.75;
}


/* ================================
   FOOTER
================================ */

.nation-footer {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 20px;
    padding: 42px 15px 50px;

    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-mark {
    margin-bottom: 13px;

    color: var(--nation-bright);
    font-size: 26px;

    text-shadow: 0 0 20px var(--nation-glow);
}

.nation-footer p {
    margin: 0;

    color: #c3bdff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    line-height: 1.8;
}

.nation-footer > span {
    margin-top: 10px;

    color: var(--text-muted);
    font-size: 11px;
}

.footer-link {
    margin-top: 22px;

    color: #d2ceff;
    font-size: 12px;

    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
}


/* ================================
   TABLET
================================ */

@media (max-width: 800px) {

    .nation-page {
        width: min(calc(100% - 30px), 680px);
    }

    .nation-hero {
        min-height: 320px;
    }

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

    .character-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: calc(50% - 8px);
        justify-self: center;
    }

    .character-art {
        min-height: 205px;
    }

    .info-card {
        padding: 21px;
    }
}


/* ================================
   MOBILE
================================ */

@media (max-width: 560px) {

    .nation-header {
        min-height: 58px;
        padding: 12px 15px;
        gap: 10px;
    }

    .back-link {
        gap: 6px;
        font-size: 11px;
    }

    .header-label {
        max-width: 110px;
        font-size: 8px;
        letter-spacing: 1.4px;
    }

    .nation-page {
        width: calc(100% - 26px);
    }

    .nation-hero {
        min-height: 290px;
        padding: 78px 5px 58px;
    }

    .nation-hero h1 {
        font-size: clamp(39px, 10vw, 55px);
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-note {
        font-size: 9px;
        letter-spacing: 1.3px;
    }

    .nation-section {
        margin-bottom: 62px;
    }

    .section-heading h2 {
        font-size: 29px;
    }

    .section-intro {
        font-size: 12px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-card {
        padding: 21px;
    }

    .magic-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        padding: 24px;
    }

    .magic-orb {
        flex-basis: 100px;
        width: 100px;
    }

    .character-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .character-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: auto;
        justify-self: stretch;
    }

    .character-art {
        min-height: 160px;
    }

    .seal-symbol {
        font-size: 39px;
    }

    .sealed-art::before,
    .design-sealed-art::before {
        width: 70px;
        height: 70px;
    }

    .art-status {
        bottom: 10px;
        padding: 5px 6px;
        font-size: 7px;
        letter-spacing: 0.8px;
    }

    .character-details {
        padding: 17px 13px 19px;
    }

    .character-details .card-label {
        font-size: 7px;
        letter-spacing: 0.8px;
    }

    .character-details h3 {
        font-size: 17px;
    }

    .character-details p {
        font-size: 11px;
    }

    .locked-label {
        gap: 5px;
        padding: 5px 7px;
        font-size: 7px;
        letter-spacing: 0.6px;
    }

    .unknown-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .unknown-card {
        padding: 16px;
        gap: 12px;
    }

    .unknown-card h3 {
        font-size: 15px;
    }
}


/* ================================
   SMALL MOBILE
================================ */

@media (max-width: 360px) {

    .character-grid {
        grid-template-columns: 1fr;
    }

    .character-art {
        min-height: 190px;
    }

    .character-details h3 {
        font-size: 19px;
    }

    .header-label {
        max-width: 90px;
        font-size: 7px;
    }

    .nation-page {
        width: calc(100% - 22px);
    }
}


/* ================================
   ACCESSIBILITY
================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.character-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.character-card-link article {
    height: 100%;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.character-card-link:hover article {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.28);
}

.character-card-link:focus-visible {
    outline: 2px solid rgba(220, 220, 255, 0.85);
    outline-offset: 4px;
    border-radius: 8px;
}
