:root {
    --bg-top: #14081f;
    --bg-bottom: #040106;
    --panel: rgba(27, 14, 45, 0.9);
    --panel-strong: rgba(22, 10, 36, 0.96);
    --gold: #d4af37;
    --gold-soft: #f0dc95;
    --violet: #9d5bd0;
    --violet-soft: #caa1e7;
    --text: rgba(255, 248, 238, 0.94);
    --text-muted: rgba(255, 244, 232, 0.72);
    --border: rgba(212, 175, 55, 0.24);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Philosopher', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(128, 72, 168, 0.22), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.12), transparent 18%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

.ambient-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 155, 66, 0.12), transparent 16%),
        radial-gradient(circle at 88% 24%, rgba(160, 90, 214, 0.18), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(212, 175, 55, 0.08), transparent 28%);
    z-index: 0;
}

.portal-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(9, 4, 16, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.portal-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.portal-logo {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--gold);
    text-decoration: none;
    font-size: 28px;
    white-space: nowrap;
}

.portal-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-menu a {
    color: var(--text);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 15px;
}

.portal-menu a:hover,
.portal-menu a.active {
    color: #fff9e7;
    border-color: var(--border);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(157, 91, 208, 0.22));
}

.page-shell {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px 88px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 34px;
    align-items: start;
    margin-bottom: 28px;
}

.hero-copy,
.hero-visual,
.reading-card,
.content-card,
.related-card {
    background: linear-gradient(145deg, var(--panel), var(--panel-strong));
    border: 1px solid var(--border);
    border-radius: 34px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-copy {
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.hero-copy::before,
.reading-card::before,
.content-card::before,
.related-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.1), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%);
    pointer-events: none;
}

.hero-copy > *,
.reading-card > *,
.content-card > *,
.related-card > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--gold-soft);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 24px;
    letter-spacing: 0.6px;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(40px, 5vw, 62px);
    line-height: 1.08;
    color: var(--gold-soft);
    margin-bottom: 20px;
    text-shadow: 0 0 28px rgba(212, 175, 55, 0.18);
}

.hero-lead {
    font-size: 21px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 26px;
}

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

.hero-point {
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.16);
    color: var(--text-muted);
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-point strong {
    display: block;
    color: var(--gold-soft);
    margin-bottom: 4px;
}

.hero-visual {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
    position: relative;
}

.hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 4.8;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    background: #12081b;
    transform: scale(1.022);
    transform-origin: center top;
    will-change: transform;
    outline: 1px solid rgba(212, 175, 55, 0.18);
    outline-offset: -1px;
    clip-path: inset(1px 1px 2px 1px round 26px);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    height: 28px;
    border-radius: 26px 26px 0 0;
    background: linear-gradient(180deg, rgba(18, 8, 27, 0.9), rgba(18, 8, 27, 0));
    pointer-events: none;
    z-index: 1;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 18px 18px auto 18px;
    height: 100px;
    border-radius: 26px 26px 40px 40px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 58%);
    pointer-events: none;
    z-index: 1;
}

.hero-image,
.hero-visual-note {
    position: relative;
    z-index: 2;
}

.hero-visual-note {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.16);
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-companion-card {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(19, 11, 36, 0.88), rgba(10, 6, 19, 0.94));
    border: 1px solid rgba(212, 175, 55, 0.14);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.hero-companion-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(212, 175, 55, 0.14), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%);
    pointer-events: none;
}

.hero-companion-media,
.hero-companion-copy {
    position: relative;
    z-index: 1;
}

.hero-companion-media {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.12;
    object-fit: cover;
    object-position: center 14%;
    border-radius: 18px;
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(212, 175, 55, 0.12);
}

.hero-companion-copy strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gold-soft);
    font-family: 'Cinzel', serif;
    font-size: 18px;
    line-height: 1.35;
}

.hero-companion-copy span {
    display: block;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.reading-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.reading-copy {
    max-width: 860px;
}

.reading-copy h2,
.content-card h2,
.related-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 34px;
    color: var(--gold-soft);
    margin-bottom: 16px;
}

.reading-copy p,
.content-card p {
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 16px;
}

.context-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.context-pills span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.18);
    color: var(--gold-soft);
    font-size: 14px;
}

.reading-form {
    max-width: 760px;
    width: 100%;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reading-form h3 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: var(--gold-soft);
    margin-bottom: 18px;
}

.reading-form textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(7, 3, 13, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 22px;
    color: var(--text);
    font: inherit;
    font-size: 18px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.reading-form textarea:focus {
    border-color: rgba(212, 175, 55, 0.52);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.reading-button {
    width: 100%;
    border: none;
    border-radius: 22px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #d4af37 0%, #c88c8f 42%, #9d5bd0 100%);
    color: #fffdf7;
    font-family: 'Cinzel', serif;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 18px 38px rgba(212, 175, 55, 0.2);
}

.reading-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 46px rgba(212, 175, 55, 0.28);
}

.question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.question-chip {
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
    transition: all 0.3s ease;
}

.question-chip:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.34);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.content-card,
.related-card {
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.content-card p:last-child {
    margin-bottom: 0;
}

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

.related-link {
    display: block;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.14);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.related-link:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.related-link h3 {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--gold-soft);
    margin-bottom: 10px;
}

.related-link p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}

.related-link span {
    color: var(--violet-soft);
    font-weight: 700;
}

.portal-footer {
    position: relative;
    z-index: 1;
    padding: 40px 20px 60px;
    border-top: 1px solid rgba(212, 175, 55, 0.14);
    text-align: center;
    color: rgba(255, 248, 238, 0.55);
}

.portal-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.portal-footer-links a {
    color: rgba(255, 248, 238, 0.74);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.portal-footer-links a:hover {
    color: #fff6d7;
    border-color: rgba(212, 175, 55, 0.34);
    transform: translateY(-2px);
}

@media (max-width: 980px) {
    .hero,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .portal-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

@media (max-width: 760px) {
    .page-shell {
        padding: 26px 14px 64px;
    }

    .portal-logo {
        text-align: center;
        font-size: 24px;
    }

    .portal-menu {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .portal-menu::-webkit-scrollbar {
        display: none;
    }

    .portal-menu a {
        white-space: nowrap;
        font-size: 14px;
        padding: 9px 14px;
    }

    .hero-copy,
    .reading-card,
    .content-card,
    .related-card {
        padding: 24px;
    }

    .hero-points {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 38px;
    }

    .reading-form {
        max-width: none;
    }

    .reading-form h3,
    .reading-copy h2,
    .content-card h2,
    .related-card h2 {
        font-size: 26px;
    }

    .reading-form textarea {
        min-height: 130px;
        padding: 18px;
        font-size: 16px;
    }

    .hero-companion-card {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
    }

    .hero-companion-copy strong {
        font-size: 17px;
    }

    .reading-button {
        padding: 18px;
        font-size: 16px;
    }

    .question-chip,
    .context-pills span,
    .portal-footer-links a {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-shell {
        padding: 18px 10px 52px;
    }

    .hero-copy,
    .reading-card,
    .content-card,
    .related-card,
    .hero-visual {
        border-radius: 24px;
    }

    .hero-companion-card {
        grid-template-columns: 1fr;
        padding: 12px;
        border-radius: 20px;
    }

    .hero-copy,
    .reading-card,
    .content-card,
    .related-card {
        padding: 18px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero-lead,
    .reading-copy p,
    .content-card p,
    .hero-visual-note,
    .hero-companion-copy span,
    .related-link p {
        font-size: 15px;
        line-height: 1.65;
    }

    .hero-companion-media {
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

    .hero-companion-copy strong {
        font-size: 16px;
    }

    .related-link {
        padding: 18px;
        border-radius: 18px;
    }

    .related-link h3 {
        font-size: 20px;
    }
}
