/*
 * MAGHEL — RUNES
 * Page-specific stylesheet
 * UA / RU / EN
 *
 * Uses existing global style.css
 * Images: /assets/images/runes/
 */

/* ==========================================
   1. PAGE BACKGROUND
   ========================================== */

body.runes-body {
    background: #04101e;
}

body.runes-body::before {
    background-image:
        linear-gradient(
            180deg,
            rgba(2, 9, 20, 0.38),
            rgba(3, 13, 28, 0.55)
        ),
        url("/assets/images/helheim-bg.webp");

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

/* ==========================================
   2. GENERAL TYPOGRAPHY
   ========================================== */

.runes-page {
    color: #e5edf6;
}

.runes-page h1,
.runes-page h2,
.runes-page h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.runes-page h2 {
    margin: 7px 0 12px;

    color: #f0d7aa;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    line-height: 1.2;
}

.runes-page p {
    line-height: 1.65;
}

.runes-kicker {
    display: block;

    color: #e6bc79;
    font: 700 11px/1.5 Georgia, serif;
    letter-spacing: 0.27em;
    text-transform: uppercase;
}


/* ==========================================
   3. HERO — SEAMLESS BACKGROUND
   ========================================== */

.runes-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    overflow: hidden;

    min-height: 540px;

    background-image:
        linear-gradient(
            90deg,
            rgba(3, 11, 25, 0.85) 0%,
            rgba(3, 11, 25, 0.65) 24%,
            rgba(3, 11, 25, 0.28) 46%,
            rgba(3, 11, 25, 0.05) 68%,
            transparent 100%
        ),
        url("/assets/images/runes/runes-hero-bg.webp");

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    border-bottom: 1px solid rgba(213, 175, 120, 0.16);
}

/* Disable previous separate background layers */

.runes-hero::before,
.runes-hero::after {
    content: none;
}

.runes-hero-inner {
    position: relative;
    z-index: 2;

    width: min(1160px, 92%);
    padding: 65px 0;
}

.runes-hero-copy {
    max-width: 480px;

    background: rgba(4, 16, 31, 0.10);

    border: none;
    box-shadow: none;
}

.runes-hero h1 {
    margin: 10px 0 15px;

    color: #f5dba8;
    font-size: clamp(4rem, 7vw, 6.2rem);
    line-height: 1.05;

    text-shadow:
        0 5px 28px rgba(2, 7, 18, 0.85);
}

.runes-hero-copy > p {
    max-width: 440px;

    color: #f4f0ec;
    font-size: 1.08rem;

    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.9);
}

.runes-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;

    margin-top: 22px;
}

.runes-actions .button {
    min-height: 45px;
    padding: 12px 22px;

    font-size: 13px;
}

/* ==========================================
   4. SHARED RUNES PANELS
   ========================================== */

.runes-panel {
    background:
        linear-gradient(
            145deg,
            rgba(4, 17, 34, 0.95),
            rgba(3, 13, 27, 0.94)
        );

    border:
        1px solid rgba(193, 206, 216, 0.5);

    border-radius: 16px;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.27);
}

/* ==========================================
   5. WHAT RUNES CAN REVEAL
   ========================================== */

.runes-insights {
    position: relative;

    margin-top: 28px;
    padding: 28px 30px 24px;
}

.runes-section-desc {
    margin: 0 0 19px;

    color: #d5dfeb;
    font-size: 1rem;
}

.runes-insight-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.runes-insight-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;

    border:
        1px solid rgba(218, 176, 110, 0.72);

    border-radius: 12px;

    background:
        linear-gradient(
            175deg,
            rgba(8, 29, 47, 0.85),
            rgba(2, 11, 24, 0.96)
        );

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.25);

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

.runes-insight-card:hover {
    transform: translateY(-4px);
    border-color: #c3ecfa;
}

.runes-insight-card img {
    display: block;

    width: 100%;
    height: 148px;

    object-fit: cover;
}

.runes-insight-copy {
    flex: 1;
    padding: 13px 14px 17px;
}

.runes-insight-copy h3 {
    margin: 0 0 9px;

    color: #f2d296;
    font-size: 1.15rem;
    line-height: 1.32;
}

.runes-insight-copy h3 > span:first-child {
    margin-right: 3px;
    color: #e6b869;
}

.runes-insight-copy p {
    margin: 0;

    color: #d9e3ec;
    font-size: 0.9rem;
}

/* ==========================================
   6. HOW RUNES WORK
   ========================================== */

.runes-essence {
    display: grid;

    grid-template-columns: 38% 1fr;
    align-items: center;

    gap: 32px;

    padding-top: 34px;
    padding-bottom: 38px;
}

.runes-wheel-visual {
    min-width: 0;
}

.runes-wheel-visual img {
    display: block;

    width: 100%;
    height: auto;
    max-height: 380px;

    object-fit: cover;
    object-position: center;

    border-radius: 12px;

    -webkit-mask-image:
        linear-gradient(
            90deg,
            #000 75%,
            transparent 100%
        );

    mask-image:
        linear-gradient(
            90deg,
            #000 75%,
            transparent 100%
        );
}

.runes-essence-copy {
    padding-right: 12px;
}

.runes-essence-copy > p {
    margin: 0;

    color: #dce6ed;
    font-size: 1rem;
}

.runes-benefits {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    margin-top: 25px;
}

.runes-benefits > div {
    padding: 0 10px 14px;

    border-bottom:
        1px solid rgba(216, 173, 106, 0.5);

    text-align: center;
}

.runes-benefits span {
    display: block;

    color: #edc180;
    font-size: 32px;
    line-height: 1.2;
}

.runes-benefits p {
    margin: 9px 0 0;

    color: #f2f1f0;
    font-size: 0.92rem;
}

/* ==========================================
   7. CHOOSE A RUNE BANNER
   ========================================== */

.runes-select {
    display: grid;

    grid-template-columns: 1fr 1fr;
    overflow: hidden;

    min-height: 275px;
    margin-top: 12px;
    margin-bottom: 0;

    background: rgba(2, 14, 28, 0.97);

    border: 1px solid #d5ae76;
    border-radius: 13px;

    box-shadow:
        0 0 0 4px rgba(11, 31, 44, 0.6),
        0 12px 35px #020a14;
}

.runes-select-image {
    min-height: 270px;

    background-image:
        url("/assets/images/runes/select-rune.webp");

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

.runes-select-copy {
    align-self: center;
    padding: 30px 35px;
}

.runes-select-copy h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
}

.runes-select-copy p {
    max-width: 530px;
    margin: 0 0 20px;
}

.runes-open-choice {
    min-height: 46px !important;
}

/* ==========================================
   8. INTERACTIVE RUNE SELECTION
   ========================================== */

.runes-interactive {
    margin-top: 22px;
    padding: 29px;

    background:
        linear-gradient(
            145deg,
            rgba(3, 15, 31, 0.97),
            rgba(7, 28, 44, 0.94)
        );

    border:
        1px solid rgba(213, 175, 120, 0.55);

    border-radius: 14px;
}

.runes-interactive[hidden],
.runes-result[hidden] {
    display: none !important;
}

.runes-interactive-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
}

.runes-interactive-header h2 {
    margin-top: 5px;
}

.runes-interactive-header p {
    margin-top: 0;
    color: #c9d9e7;
}

.runes-reset {
    padding: 10px 15px;

    color: #eac794;
    background: transparent;

    border: 1px solid #a48156;
    border-radius: 7px;

    font: 13px Arial, sans-serif;
    cursor: pointer;
}

/* ==========================================
   9. RUNE STONES GRID
   ========================================== */

.runes-stone-grid {
    display: grid;

    grid-template-columns:
        repeat(9, minmax(0, 1fr));

    gap: 11px;

    margin: 12px 0 17px;
}

.runes-stone {
    position: relative;

    aspect-ratio: 3 / 4;

    color: #8ee8ff;
    font-family: Georgia, serif;
    font-size: clamp(28px, 3.4vw, 54px);

    background:
        radial-gradient(
            ellipse at 30% 21%,
            #4f6b79 0%,
            #152d40 30%,
            #081a29 72%,
            #020913 100%
        );

    border: 1px solid #405c70;
    border-radius: 40% 40% 43% 43%;

    box-shadow:
        inset -7px -9px 12px rgba(0, 0, 0, 0.55),
        inset 4px 4px 8px rgba(149, 194, 223, 0.2),
        0 6px 10px #020915;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.runes-stone:not(:disabled):hover,
.runes-stone:focus-visible {
    transform: translateY(-8px);

    border-color: #a6eaff;

    box-shadow:
        0 0 22px rgba(64, 190, 246, 0.33),
        inset -7px -9px 12px rgba(0, 0, 0, 0.55);
}

.runes-stone:disabled {
    cursor: default;
    opacity: 0.65;
}

.runes-stone.is-picked {
    opacity: 1;

    border-color: #e4c08d;

    box-shadow:
        0 0 25px rgba(108, 214, 255, 0.47),
        inset -5px -5px 8px #071323;
}

/* ==========================================
   10. RUNE RESULT
   ========================================== */

.runes-result {
    display: flex;
    align-items: center;

    gap: 24px;
    padding: 20px;

    border-top:
        1px solid rgba(213, 175, 120, 0.3);
}

.runes-result-glyph {
    width: 110px;

    color: #89e1ff;
    font-size: 90px;
    text-align: center;

    text-shadow:
        0 0 25px rgba(64, 201, 255, 0.65);
}

.runes-result-copy h3 {
    margin: 4px 0;

    color: #f5d9aa;
    font-size: 1.65rem;
}

.runes-result-copy p {
    margin: 7px 0;
    color: #dce5f0;
}

.runes-result-note {
    color: #a5b8ca !important;
    font-size: 0.82rem;
}

/* ==========================================
   11. ENDING QUOTE
   ========================================== */

.runes-ending {
    margin-top: 28px;
    padding: 38px 0 65px;

    text-align: center;

    background-image:
        linear-gradient(
            180deg,
            rgba(2, 11, 25, 0.7),
            rgba(4, 17, 36, 0.12)
        ),
        url("/assets/images/runes/runes-ending-bg.webp");

    background-position: center 58%;
    background-size: cover;
    background-repeat: no-repeat;
}

.runes-ending-symbol {
    color: #e1b875;
    font-size: 36px;
}

.runes-ending blockquote {
    max-width: 820px;
    margin: 17px auto 20px;

    color: #f0e1cc;

    font:
        italic clamp(1.25rem, 2vw, 1.7rem)/1.55
        Georgia, serif;
}

.runes-ending-decoration {
    color: #cea46d;
    font-size: 15px;
    letter-spacing: 1em;
}

/* ==========================================
   12. TABLET
   ========================================== */

@media (max-width: 1000px) {

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

    .runes-insight-card img {
        height: 170px;
    }

    .runes-stone-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

}

/* ==========================================
   13. MOBILE
   ========================================== */

@media (max-width: 700px) {

    .runes-hero {
        min-height: 520px;
        align-items: flex-end;
    }

    /* Background fills the hero; stronger shading behind mobile text. */
    .runes-hero {
        background-image:
            linear-gradient(
                180deg,
                rgba(2, 10, 23, 0.10) 0%,
                rgba(2, 10, 23, 0.45) 38%,
                rgba(2, 10, 23, 0.92) 100%
            ),
            url("/assets/images/runes/runes-hero-bg.webp");
        background-position: center center, 65% center;
    }

    .runes-hero-inner {
        padding: 48px 0;
    }

    .runes-hero-copy {
        padding: 16px 14px;

        background: rgba(2, 11, 25, 0.25);

        border-radius: 10px;

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

    .runes-hero h1 {
        font-size: 4.2rem;
    }

    .runes-insights {
        padding: 22px 16px;
    }

    .runes-essence {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 24px;
    }

    .runes-wheel-visual img {
        max-height: 290px;

        -webkit-mask-image: none;
        mask-image: none;
    }

    .runes-essence-copy {
        padding-right: 0;
    }

    .runes-select {
        grid-template-columns: 1fr;
    }

    .runes-select-image {
        min-height: 210px;
    }

    .runes-select-copy {
        padding: 22px;
    }

    .runes-benefits {
        gap: 5px;
    }

    .runes-benefits > div {
        padding: 0 3px 9px;
    }

    .runes-benefits p {
        font-size: 0.78rem;
    }

    .runes-interactive {
        padding: 19px 15px;
    }

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

    .runes-interactive-header {
        flex-direction: column;
        gap: 0;
    }

    .runes-result {
        gap: 10px;
    }

    .runes-result-glyph {
        width: 66px;
        font-size: 65px;
    }

}

/* ==========================================
   14. SMALL MOBILE
   ========================================== */

@media (max-width: 440px) {

    .runes-insight-grid {
        grid-template-columns: 1fr;
    }

    .runes-insight-card img {
        height: 190px;
    }

    .runes-actions {
        flex-direction: column;
    }

    .runes-actions .button {
        width: 100%;
    }

}

/* ==========================================
   15. REDUCED MOTION
   ========================================== */

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

    .runes-insight-card,
    .runes-stone {
        transition: none;
    }

}
