/* ===== Church of Skunk — Design System ===== */

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --skunk-black: #1a1a1a;
    --skunk-dark: #232323;
    --skunk-charcoal: #2d2d2d;
    --musk-purple: #9b59b6;
    --musk-purple-hover: #8e44ad;
    --musk-purple-glow: rgba(155, 89, 182, 0.25);
    --holy-gold: #d4a843;
    --holy-gold-dim: rgba(212, 168, 67, 0.15);
    --off-white: #f5f3ef;
    --text-primary: #e8e4de;
    --text-secondary: #a8a29e;
    --text-muted: #78716c;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(155, 89, 182, 0.3);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.07);
    --glass-bg: rgba(26, 26, 26, 0.85);
    --enemy-red: #e74c3c;
    --neutral-blue: #3498db;
    --deity-purple: #9b59b6;
    --success-green: #2ecc71;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--musk-purple-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --header-height: 64px;
    --max-content: 1100px;
    --max-wide: 1300px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--skunk-black);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(155, 89, 182, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 168, 67, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
textarea,
select,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--off-white);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

a {
    color: var(--musk-purple);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--holy-gold);
}

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

/* --- Utility --- */
.container {
    width: 100%;
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-2xl) 0;
}

.section+.section {
    padding-top: 0;
}

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

.text-muted {
    color: var(--text-secondary);
}

.text-gold {
    color: var(--holy-gold);
}

.text-purple {
    color: var(--musk-purple);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.7rem 1.6rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--musk-purple), var(--musk-purple-hover));
    color: #fff;
    box-shadow: var(--shadow-sm), 0 0 15px var(--musk-purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-accent);
    color: var(--off-white);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: var(--musk-purple);
    border-color: var(--musk-purple);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover {
    color: inherit;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-deity {
    background: rgba(155, 89, 182, 0.15);
    color: var(--deity-purple);
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.badge-enemy {
    background: rgba(231, 76, 60, 0.15);
    color: var(--enemy-red);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.badge-neutral {
    background: rgba(52, 152, 219, 0.15);
    color: var(--neutral-blue);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* --- Page Hero --- */
.page-hero {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, var(--musk-purple-glow), transparent 70%);
    pointer-events: none;
}

.page-hero h1 {
    position: relative;
    margin-bottom: var(--space-sm);
}

.page-hero .hero-subtitle {
    position: relative;
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- Callout Box --- */
.callout-box {
    background: var(--card-bg);
    border-left: 4px solid var(--musk-purple);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
}

.callout-box.callout-gold {
    border-left-color: var(--holy-gold);
}

.callout-box h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.05rem;
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(to bottom, transparent, rgba(155, 89, 182, 0.05), transparent);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-lg);
}

.cta-section h2 {
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Forms --- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
    color: var(--off-white);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--skunk-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--musk-purple);
    box-shadow: 0 0 0 3px var(--musk-purple-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a8a29e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--musk-purple);
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* --- Random Skunk Fact --- */
.fact-container {
    text-align: center;
    padding: var(--space-xl) 0;
}

.fact-response {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--off-white);
    min-height: 6rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 0 0.35rem;
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.fact-response:empty {
    min-height: 4rem;
}

.fact-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.fact-copy-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--musk-purple);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.fact-copy-link:hover {
    color: var(--holy-gold);
}

/* --- Photo Grid --- */
.photo-grid {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.photo-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-base);
}

.photo-grid img:hover {
    transform: scale(1.03);
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--musk-purple), var(--holy-gold), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background: var(--musk-purple);
    border-radius: 50%;
    border: 2px solid var(--skunk-black);
    transform: translateX(calc(-50% + 1px));
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--holy-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.timeline-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--off-white);
    margin-bottom: var(--space-xs);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Lore Timeline (interactive, scroll + parallax) --- */

/* ── Progress bar ── */
.lore-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--musk-purple), var(--holy-gold));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1100;
    pointer-events: none;
    transition: transform 80ms linear;
}

/* ── Particles canvas ── */
.lore-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ── Cinematic hero ── */
.lore-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.lore-hero-bg {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(155, 89, 182, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(212, 168, 67, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 0;
    will-change: transform;
}

.lore-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-xl);
}

.lore-hero-eyebrow {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--musk-purple);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: loreFadeUp 0.8s 0.2s ease forwards;
}

.lore-hero-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.05;
}

.lore-hero-line {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    letter-spacing: -0.04em;
    color: var(--off-white);
    opacity: 0;
    animation: loreFadeUp 0.8s ease forwards;
}

.lore-hero-line:nth-child(1) { animation-delay: 0.35s; }
.lore-hero-line:nth-child(2) { animation-delay: 0.55s; }
.lore-hero-line:nth-child(3) { animation-delay: 0.75s; }

.lore-hero-line--accent {
    background: linear-gradient(135deg, var(--musk-purple), var(--holy-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lore-hero-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: var(--space-lg);
    line-height: 1.7;
    opacity: 0;
    animation: loreFadeUp 0.8s 0.95s ease forwards;
}

/* Scroll hint */
.lore-hero-scroll-hint {
    margin-top: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    animation: loreFadeUp 0.8s 1.3s ease forwards;
    transition: opacity 200ms ease;
}

.lore-scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.lore-scroll-mouse {
    width: 22px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    position: relative;
}

.lore-scroll-wheel {
    width: 3px;
    height: 7px;
    background: var(--musk-purple);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: loreScrollBounce 1.8s ease-in-out infinite;
}

@keyframes loreScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

@keyframes loreFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Timeline section ── */
.lore-timeline-section {
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
}

.lore-timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ── Loading ── */
.lore-loading {
    text-align: center;
    padding: 6rem 0;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.lore-loading-pulse {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--musk-purple);
    animation: lorePulse 1.4s ease-in-out infinite;
}

@keyframes lorePulse {
    0%, 100% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* ── Timeline layout ── */
.lore-timeline {
    position: relative;
    padding: var(--space-2xl) 0;
}

/* ── Spine ── */
.lore-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.06);
    z-index: 0;
}

.lore-spine-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--musk-purple), var(--holy-gold));
    border-radius: 0 0 2px 2px;
    transition: height 100ms linear;
    box-shadow: 0 0 12px var(--musk-purple-glow);
}

/* ── Event row ── */
.lore-event {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 0;
    align-items: start;
    margin-bottom: var(--space-3xl);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.lore-event.is-visible {
    opacity: 1;
}

.lore-event--left {
    transform: translateX(-30px);
}

.lore-event--right {
    transform: translateX(30px);
}

.lore-event--left.is-visible,
.lore-event--right.is-visible {
    transform: translateX(0);
}

/* Card placement */
.lore-event--left .lore-timeline-card {
    grid-column: 1;
    grid-row: 1;
}

.lore-event--left .lore-node {
    grid-column: 2;
    grid-row: 1;
}

.lore-event--right .lore-timeline-card {
    grid-column: 3;
    grid-row: 1;
}

.lore-event--right .lore-node {
    grid-column: 2;
    grid-row: 1;
}

/* ── Node ── */
.lore-node {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--space-xl);
    position: relative;
    z-index: 2;
}

.lore-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--skunk-charcoal);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    z-index: 2;
}

.lore-node-ring {
    position: absolute;
    top: calc(var(--space-xl) - 4px);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    z-index: 1;
}

.lore-node.is-active .lore-node-dot {
    background: var(--musk-purple);
    border-color: var(--musk-purple);
    box-shadow: 0 0 12px var(--musk-purple-glow);
}

.lore-node.is-active .lore-node-ring {
    border-color: var(--musk-purple);
    animation: loreRingPulse 2s ease-out infinite;
}

@keyframes loreRingPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ── Card ── */
.lore-timeline-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.15s ease;
    will-change: transform;
    overflow: hidden;
}

.lore-timeline-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0), rgba(155, 89, 182, 0.15), rgba(212, 168, 67, 0.1), rgba(212, 168, 67, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.is-visible .lore-timeline-card::before {
    opacity: 1;
}

.lore-timeline-card:hover {
    border-color: var(--border-accent);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(155, 89, 182, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Card counter */
.lore-card-number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

.lore-timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--holy-gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-sm);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--holy-gold-dim);
}

.lore-timeline-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    color: var(--off-white);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.lore-timeline-body {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.lore-timeline-lore {
    position: relative;
    margin: var(--space-md) 0;
    padding: var(--space-md) var(--space-lg);
    padding-left: calc(var(--space-lg) + 8px);
    border-left: 3px solid var(--musk-purple);
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(155, 89, 182, 0.03));
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.65;
}

.lore-quote-mark {
    position: absolute;
    top: -2px;
    left: 8px;
    font-family: Georgia, serif;
    font-size: 2.2rem;
    color: var(--musk-purple);
    opacity: 0.3;
    line-height: 1;
}

/* ── Sources (collapsible) ── */
.lore-timeline-sources {
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--space-sm);
}

.lore-timeline-sources-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: var(--space-xs) 0;
    list-style: none;
    user-select: none;
}

.lore-timeline-sources-toggle::-webkit-details-marker { display: none; }

.lore-timeline-sources-toggle .lore-chevron {
    transition: transform 0.25s ease;
}

.lore-timeline-sources[open] .lore-chevron {
    transform: rotate(180deg);
}

.lore-timeline-sources-list {
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
}

.lore-timeline-sources-list li {
    margin-bottom: var(--space-xs);
    font-size: 0.82rem;
}

.lore-timeline-sources-list a {
    color: var(--musk-purple);
    transition: color var(--transition-fast);
}

.lore-timeline-sources-list a:hover {
    color: var(--holy-gold);
}

/* ── End cap ── */
.lore-endcap {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
}

.lore-endcap-inner {
    max-width: 500px;
    margin: 0 auto;
}

.lore-endcap-glyph {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 20px var(--musk-purple-glow));
    animation: loreEndcapFloat 3s ease-in-out infinite;
}

@keyframes loreEndcapFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.lore-endcap-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    background: linear-gradient(135deg, var(--off-white), var(--holy-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.lore-endcap-sub {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ── Mobile layout (single column) ── */
@media (max-width: 768px) {
    .lore-event {
        grid-template-columns: 24px 1fr;
        gap: 0 var(--space-sm);
    }

    .lore-spine {
        left: 12px;
        transform: none;
    }

    .lore-event--left .lore-timeline-card,
    .lore-event--right .lore-timeline-card {
        grid-column: 2;
        grid-row: 1;
    }

    .lore-event--left .lore-node,
    .lore-event--right .lore-node {
        grid-column: 1;
        grid-row: 1;
    }

    .lore-event--left,
    .lore-event--right {
        transform: translateY(20px);
    }

    .lore-event--left.is-visible,
    .lore-event--right.is-visible {
        transform: translateY(0);
    }

    .lore-hero-line {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .lore-event {
        opacity: 1;
        transform: none !important;
        transition: none;
    }
    .lore-hero-line,
    .lore-hero-eyebrow,
    .lore-hero-sub,
    .lore-hero-scroll-hint {
        animation: none;
        opacity: 1;
    }
    .lore-scroll-wheel { animation: none; }
    .lore-endcap-glyph { animation: none; }
    .lore-node-ring { animation: none; }
    .lore-timeline-card { transition: none; }
}

/* --- Filter Chips --- */
.filter-chips {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: var(--space-2xl);
}

.chip {
    padding: 0.45rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip:hover {
    border-color: var(--musk-purple);
    color: var(--musk-purple);
}

.chip.active {
    background: var(--musk-purple);
    border-color: var(--musk-purple);
    color: #fff;
}

/* --- Expandable Section --- */
.expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.expandable-header h3 {
    margin: 0;
}

.expand-icon {
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: transform var(--transition-base);
}

.expand-icon.open {
    transform: rotate(180deg);
}

.expandable-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-slow);
}

.expandable-content.open {
    max-height: 5000px;
}

/* --- Success State --- */
.success-message {
    text-align: center;
    padding: var(--space-2xl);
    animation: fadeInUp 0.5s ease;
}

.success-message .success-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Prayer Oracle --- */
.oracle-container {
    text-align: center;
    padding: var(--space-xl) 0;
}

.oracle-trigger {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0 auto;
    display: block;
    cursor: pointer;
}

.oracle-trigger:focus-visible {
    outline: 2px solid var(--holy-gold);
    outline-offset: 6px;
    border-radius: var(--radius-lg);
}
.oracle-image {
    cursor: pointer;
    max-width: 320px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    filter: drop-shadow(0 0 15px rgba(155, 89, 182, 0.2));
}

.oracle-image:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 25px rgba(155, 89, 182, 0.4));
}

.oracle-response {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--holy-gold);
    height: 6.5rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 0 0.35rem;
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
    animation: fadeInUp 0.3s ease;
}

.oracle-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Poem/Art section --- */
.poem-block {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.poem-block h3 {
    color: var(--holy-gold);
    margin-bottom: var(--space-md);
}

.poem-block p {
    line-height: 2;
    color: var(--text-primary);
    font-style: italic;
}

/* --- Deity Detail (expandable) --- */
.deity-detail {
    padding: var(--space-lg);
}

.deity-detail p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .page-hero {
        padding: var(--space-xl) var(--space-md) var(--space-lg);
        border-bottom: none;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .card {
        padding: var(--space-md);
    }

    .container,
    .container-wide {
        padding: 0 var(--space-md);
    }

    .oracle-image {
        max-width: 200px;
    }

    .oracle-response {
        font-size: 1.1rem;
        height: auto;
        min-height: 3rem;
    }

    .fact-response {
        font-size: 1rem;
        min-height: 3rem;
    }

    .btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .cta-section {
        padding: var(--space-xl) var(--space-md);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .callout-box {
        padding: var(--space-md);
    }

    .filter-chips {
        gap: var(--space-xs);
    }

    .chip {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }

    h1 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    h2 {
        font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--skunk-black);
}

::-webkit-scrollbar-thumb {
    background: var(--skunk-charcoal);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Blazor-specific overrides --- */
#blazor-error-ui {
    display: none;
}

.blazor-error-boundary {
    background: var(--card-bg);
    padding: var(--space-xl);
    border: 1px solid var(--enemy-red);
    border-radius: var(--radius-md);
}


