/* =========================================
   THE ASHEN COVENANT
   Lost hope • New light
========================================= */

:root {
    color-scheme: dark;

    --ash-white: #eeeef0;
    --ash-silver: #c2c5ce;
    --ash-bright: #e0e3ec;
    --ash-muted: #a1a2ac;
    --ash-dim: #777983;

    --ash-dark: #101013;
    --ash-deep: #08090c;

    --ash-border: rgba(195, 199, 212, 0.19);
    --ash-glow: rgba(210, 220, 240, 0.07);
}

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;

    background: var(--ash-deep);
    color: var(--ash-white);

    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.75;
}

/* =========================================
   BACKGROUND IMAGE
========================================= */

.ashen-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;

    background-color: #101013;

    background-image:
        linear-gradient(
            180deg,
            rgba(7, 8, 12, 0.55) 0%,
            rgba(8, 9, 13, 0.67) 45%,
            rgba(5, 6, 9, 0.91) 100%
        ),
        url("../images/ashen-covenant-background.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* EXTRA SHADING FOR TEXT READABILITY */

.background-shade {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse at 50% 20%,
            transparent 0%,
            rgba(4, 5, 8, 0.12) 55%,
            rgba(4, 5, 8, 0.53) 100%
        ),
        linear-gradient(
            90deg,
            rgba(4, 5, 8, 0.23),
            transparent 35%,
            transparent 65%,
            rgba(4, 5, 8, 0.23)
        );
}

/* SUBTLE SILVER ATMOSPHERE */

.silver-haze {
    position: absolute;
    top: 5%;
    left: 50%;

    width: min(1000px, 140vw);
    height: 650px;

    transform: translateX(-50%);
    border-radius: 50%;
    filter: blur(85px);

    background: radial-gradient(
        ellipse,
        rgba(193, 204, 226, 0.055),
        transparent 68%
    );
}

/* LIGHT ASH PARTICLES */

.ash-particles {
    position: absolute;
    inset: -20%;

    background-image:
        radial-gradient(
            circle,
            rgba(235, 238, 245, 0.42) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle,
            rgba(188, 194, 207, 0.25) 0 1px,
            transparent 1.5px
        );

    background-size: 113px 127px, 181px 167px;
    background-position: 0 0, 57px 39px;

    opacity: 0.17;
    animation: ash-fall 75s linear infinite;
}

@keyframes ash-fall {
    from {
        transform: translate3d(0, -3%, 0);
    }

    to {
        transform: translate3d(1%, 5%, 0);
    }
}

/* =========================================
   PAGE LAYOUT
========================================= */

.page-container {
    position: relative;
    width: min(1060px, calc(100% - 36px));
    margin: 0 auto;
    padding-bottom: 30px;
}

/* =========================================
   NAVIGATION
========================================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 23px 0;

    border-bottom: 1px solid rgba(210, 214, 226, 0.12);
}

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

    color: #d0d1d8;
    text-decoration: none;

    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.12em;

    transition: color 0.25s ease;
}

.back-link span:first-child {
    font-size: 1.1rem;
}

.back-link:hover {
    color: white;
}

.archive-label {
    color: #a3a4ae;

    font-family: Arial, sans-serif;
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    text-align: right;
}

/* =========================================
   FLOATING PANELS
========================================= */

.floating-panel {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(25, 27, 34, 0.88),
            rgba(8, 9, 13, 0.91)
        );

    border: 1px solid var(--ash-border);

    box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.29),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

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

.floating-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;

    width: 80%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(230, 233, 242, 0.22),
        transparent
    );

    pointer-events: none;
}

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

.hero-panel {
    margin-top: 35px;
    padding: clamp(32px, 6vw, 68px) 22px;

    text-align: center;

    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(195, 204, 222, 0.095),
            transparent 55%
        ),
        linear-gradient(
            145deg,
            rgba(23, 25, 32, 0.87),
            rgba(7, 8, 12, 0.94)
        );

    border-color: rgba(207, 211, 224, 0.24);
}

.record-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 8px 13px;

    border: 1px solid rgba(205, 211, 226, 0.22);

    color: #d2d5df;

    font-family: Arial, sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.15em;
}

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

    border-radius: 50%;
    background: #d8dce7;

    box-shadow: 0 0 12px rgba(220, 227, 243, 0.5);
}

.hero-pretitle {
    margin-top: 33px;

    color: #bfc2ce;

    font-family: Arial, sans-serif;
    font-size: 0.61rem;
    letter-spacing: 0.25em;
}

/* BROKEN CROWN */

.covenant-emblem {
    width: 90px;
    height: 82px;

    margin: 23px auto 13px;

    color: #d1d3de;

    filter: drop-shadow(0 0 15px rgba(216, 222, 241, 0.13));
}

.covenant-emblem svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-panel h1 {
    color: #f0f0f4;

    font-size: clamp(2.8rem, 8.7vw, 6.2rem);
    font-weight: 400;
    letter-spacing: 0.035em;
    line-height: 1.18;

    text-shadow: 0 5px 35px rgba(220, 224, 239, 0.08);
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    width: min(330px, 80%);
    margin: 23px auto 17px;
}

.title-divider > span:not(.divider-symbol) {
    flex: 1;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(206, 212, 229, 0.5)
    );
}

.title-divider > span:last-child {
    transform: rotate(180deg);
}

.divider-symbol {
    color: #d2d5df;
    font-size: 1rem;
}

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

    color: #c0c2cc;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    font-style: italic;
    line-height: 1.9;
}

/* IDEOLOGY QUOTE */

.hero-quote {
    position: relative;

    width: min(650px, 100%);
    margin: 35px auto 0;
    padding: 22px 26px 23px;

    border-top: 1px solid rgba(208, 214, 229, 0.2);
    border-bottom: 1px solid rgba(208, 214, 229, 0.2);

    background: rgba(0, 0, 0, 0.19);
}

.quote-mark {
    display: block;

    color: #d0d4e0;
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.7;
}

.hero-quote p {
    margin-top: 4px;

    color: #e0e0e7;
    font-size: clamp(1rem, 2.7vw, 1.25rem);
    font-style: italic;
    line-height: 1.9;
}

/* CURRENT ALLEGIANCE */

.hero-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    width: min(470px, 100%);
    margin: 29px auto 0;
    padding: 17px;

    border: 1px solid rgba(199, 205, 221, 0.17);
    background: rgba(0, 0, 0, 0.2);
}

.status-label {
    color: #a9acba;

    font-family: Arial, sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
}

.hero-status strong {
    color: #e3e6ef;
    font-size: 1.05rem;
    font-weight: 400;
}

.status-note {
    color: #a5a6b0;
    font-size: 0.78rem;
    font-style: italic;
}

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

.meaning-section,
.history-section {
    margin-top: 58px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin-bottom: 25px;
    text-align: center;
}

.heading-line {
    flex: 1;
    max-width: 120px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(202, 207, 222, 0.33)
    );
}

.heading-line:last-child {
    transform: rotate(180deg);
}

.section-kicker {
    color: #b4b8c7;

    font-family: Arial, sans-serif;
    font-size: 0.57rem;
    letter-spacing: 0.2em;
}

.section-heading h2 {
    margin-top: 5px;

    color: #e7e7ed;
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 400;
}

/* =========================================
   MEANING CARDS
========================================= */

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

.meaning-card {
    min-height: 220px;
    padding: 26px;

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

.meaning-card:hover {
    transform: translateY(-3px);
    border-color: rgba(214, 219, 233, 0.34);
}

.card-index {
    color: #b9bdca;
    font-size: 0.9rem;
    font-style: italic;
}

.meaning-card h3 {
    margin-top: 17px;

    color: #e6e7ee;
    font-size: 1.55rem;
    font-weight: 400;
}

.meaning-card p {
    margin-top: 10px;

    color: #b6b7c2;
    font-size: 0.88rem;
    line-height: 1.9;
}

.meaning-note {
    margin-top: 19px;

    color: #b9bac4;
    font-size: 0.84rem;
    font-style: italic;
    text-align: center;
}

/* =========================================
   IDEOLOGY PANEL
========================================= */

.ideology-panel {
    margin-top: 26px;
    padding: clamp(27px, 5vw, 45px);
}

.ideology-panel > .section-kicker {
    text-align: center;
}

.ideology-panel h2 {
    max-width: 650px;
    margin: 8px auto 0;

    color: #ececf1;
    font-size: clamp(1.65rem, 4.5vw, 2.55rem);
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

.ideology-intro {
    max-width: 650px;
    margin: 15px auto 29px;

    color: #b8b9c5;
    font-size: 0.91rem;
    line-height: 1.9;
    text-align: center;
}

.ideology-list {
    max-width: 730px;
    margin: 0 auto;
}

.ideology-item {
    display: flex;
    align-items: flex-start;
    gap: 17px;

    padding: 19px 0;

    border-top: 1px solid rgba(203, 208, 222, 0.12);
}

.ideology-symbol {
    flex-shrink: 0;
    padding-top: 1px;

    color: #d0d4e0;
    font-size: 1.2rem;
}

.ideology-item h3 {
    color: #e2e3eb;
    font-size: 1.08rem;
    font-weight: 400;
}

.ideology-item p {
    margin-top: 6px;

    color: #b0b1bd;
    font-size: 0.87rem;
    line-height: 1.9;
}

/* =========================================
   HISTORY
========================================= */

.history-panel {
    display: flex;
    align-items: flex-start;
    gap: 22px;

    padding: clamp(25px, 5vw, 38px);
}

.history-marker {
    flex-shrink: 0;

    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(206, 212, 228, 0.36);
    border-radius: 50%;
}

.marker-ring {
    width: 9px;
    height: 9px;

    border-radius: 50%;
    background: #d6d9e4;

    box-shadow: 0 0 15px rgba(216, 223, 241, 0.28);
}

.history-label {
    color: #b9bdcc;

    font-family: Arial, sans-serif;
    font-size: 0.57rem;
    letter-spacing: 0.16em;
}

.history-content h3 {
    margin-top: 7px;

    color: #e7e7ed;
    font-size: 1.5rem;
    font-weight: 400;
}

.history-content p {
    margin-top: 13px;

    color: #b6b7c2;
    font-size: 0.9rem;
    line-height: 1.95;
}

/* =========================================
   ALLEGIANCE
========================================= */

.allegiance-panel {
    margin-top: 26px;
    padding: clamp(28px, 5vw, 46px);

    text-align: center;

    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(190, 199, 221, 0.075),
            transparent 65%
        ),
        linear-gradient(
            145deg,
            rgba(26, 28, 36, 0.91),
            rgba(8, 9, 13, 0.94)
        );
}

.allegiance-icon {
    display: grid;
    place-items: center;

    width: 57px;
    height: 57px;
    margin: 0 auto 20px;

    border: 1px solid rgba(202, 210, 230, 0.3);
    border-radius: 50%;

    color: #d2d7e6;
    font-size: 1.55rem;
}

.allegiance-panel > .section-kicker {
    text-align: center;
}

.allegiance-panel h2 {
    margin-top: 9px;

    color: #ededf2;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    font-weight: 400;
    line-height: 1.4;
}

.allegiance-panel > p:not(.section-kicker) {
    max-width: 680px;
    margin: 17px auto 0;

    color: #bec0cb;
    font-size: 0.91rem;
    line-height: 1.95;
}

.allegiance-record {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    margin-top: 30px;
    padding-top: 22px;

    border-top: 1px solid rgba(207, 212, 227, 0.15);
}

.allegiance-record > div {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 12px 8px;
}

.allegiance-record span {
    color: #9fa4b4;

    font-family: Arial, sans-serif;
    font-size: 0.51rem;
    letter-spacing: 0.1em;
}

.allegiance-record strong {
    color: #e0e2eb;

    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* =========================================
   SEALED INFORMATION
========================================= */

.sealed-panel {
    margin-top: 26px;
    padding: clamp(30px, 6vw, 50px) 22px;

    text-align: center;
}

.sealed-symbol {
    display: grid;
    place-items: center;

    width: 56px;
    height: 56px;
    margin: 0 auto 20px;

    border: 1px solid rgba(203, 210, 227, 0.27);
    border-radius: 50%;

    color: #d1d5e2;
    font-size: 1.5rem;
}

.sealed-panel h2 {
    max-width: 600px;
    margin: 9px auto 0;

    color: #e8e8ef;
    font-size: clamp(1.55rem, 4.5vw, 2.3rem);
    font-weight: 400;
    line-height: 1.45;
}

.sealed-panel > p:not(.section-kicker) {
    max-width: 600px;
    margin: 14px auto 0;

    color: #b0b1bd;
    font-size: 0.88rem;
    line-height: 1.95;
}

.sealed-stamp {
    display: inline-block;
    margin-top: 24px;
    padding: 9px 13px;

    border: 1px solid rgba(201, 207, 223, 0.21);
    color: #c1c5d2;

    font-family: Arial, sans-serif;
    font-size: 0.53rem;
    letter-spacing: 0.14em;
}

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

.page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;

    padding: 34px 10px 10px;

    color: #9b9da8;
    font-family: Arial, sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-align: center;
}

.footer-diamond {
    color: #c8ccd8;
}

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

@media (max-width: 650px) {
    .page-container {
        width: calc(100% - 24px);
    }

    .top-bar {
        padding: 19px 0;
    }

    .back-link {
        font-size: 0.55rem;
        letter-spacing: 0.08em;
    }

    .archive-label {
        font-size: 0.48rem;
        letter-spacing: 0.06em;
    }

    .ashen-background {
        background-attachment: scroll;
        background-position: center center;
    }

    .hero-panel {
        margin-top: 22px;
        padding: 34px 15px;
    }

    .hero-pretitle {
        margin-top: 26px;
        font-size: 0.52rem;
        letter-spacing: 0.14em;
    }

    .covenant-emblem {
        width: 76px;
        height: 70px;
        margin-top: 20px;
    }

    .hero-panel h1 {
        font-size: clamp(2.35rem, 10.5vw, 4rem);
        letter-spacing: 0.005em;
    }

    .hero-quote {
        margin-top: 26px;
        padding: 18px 15px;
    }

    .hero-quote p {
        font-size: 0.98rem;
    }

    .hero-status {
        padding: 14px 10px;
    }

    .meaning-section,
    .history-section {
        margin-top: 42px;
    }

    .section-heading {
        gap: 10px;
        margin-bottom: 20px;
    }

    .section-heading h2 {
        font-size: 1.3rem;
    }

    .heading-line {
        max-width: 35px;
    }

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

    .meaning-card {
        min-height: auto;
        padding: 23px;
    }

    .ideology-panel,
    .allegiance-panel {
        margin-top: 18px;
    }

    .ideology-item {
        gap: 12px;
        padding: 17px 0;
    }

    .history-panel {
        gap: 14px;
        padding: 22px 17px;
    }

    .history-marker {
        width: 29px;
        height: 29px;
    }

    .history-content h3 {
        font-size: 1.3rem;
    }

    .allegiance-record {
        grid-template-columns: 1fr;
        gap: 0;

        margin-top: 23px;
        padding-top: 12px;
    }

    .allegiance-record > div {
        padding: 13px 5px;
        border-bottom: 1px solid rgba(207, 212, 227, 0.1);
    }

    .allegiance-record > div:last-child {
        border-bottom: none;
    }

    .allegiance-record strong {
        font-size: 0.7rem;
    }

    .sealed-panel {
        margin-top: 18px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}