:root {
    --soil-980: #110d09;
    --soil-940: #19120d;
    --soil-900: #24170f;
    --soil-840: #392517;
    --rust-600: #b65a2b;
    --rust-500: #cc703a;
    --amber-400: #d7a24b;
    --amber-300: #e2bc71;
    --wheat-100: #f2e3cb;
    --wheat-200: #e8d8be;
    --muted-300: #b5a490;
    --muted-400: #8f7f6a;
    --danger-500: #ce4b35;
    --success-500: #5f8b4a;

    --font-heading: "Cinzel", "Georgia", serif;
    --font-body: "Source Sans 3", "Trebuchet MS", sans-serif;
    --font-scripture: "IM Fell English", "EB Garamond", "Garamond", "Palatino Linotype", "Book Antiqua", "Palatino", "Georgia", serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --space-xs: 0.35rem;
    --space-sm: 0.6rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.25rem;
    --space-2xl: 3.2rem;
    --space-3xl: 4.5rem;

    --header-height: 72px;
    --max-content: 1120px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--wheat-100);
    background:
        radial-gradient(circle at 10% 15%, rgba(204, 112, 58, 0.12), transparent 35%),
        radial-gradient(circle at 90% 0%, rgba(215, 162, 75, 0.1), transparent 30%),
        linear-gradient(160deg, var(--soil-980), var(--soil-940) 45%, var(--soil-900));
    min-height: 100vh;
    line-height: 1.62;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--wheat-100);
    line-height: 1.2;
    margin: 0 0 var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: 0.02em;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

p {
    margin: 0 0 var(--space-md);
    color: var(--wheat-200);
}

a {
    color: var(--amber-300);
    text-decoration: none;
}

a:hover {
    color: #f1cc89;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid rgba(242, 227, 203, 0.12);
    padding: 0.75rem;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding-top: calc(var(--header-height) + var(--space-md));
}

.site-main:has(.page-hero-home) {
    padding-top: calc(var(--header-height) + 0.45rem);
}

@media (min-width: 1025px) {
    .site-main:has(.page-hero-home) {
        padding-top: calc(var(--header-height) + 0.25rem);
    }

    .site-main:has(.page-hero-profile) {
        padding-top: calc(var(--header-height) + 0.35rem);
    }
}

.container,
.container-wide {
    width: min(100% - 2rem, var(--max-content));
    margin-inline: auto;
}

.container-wide {
    width: min(100% - 2rem, 1280px);
}

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

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

.page-hero {
    padding: 1.5rem 0 1.2rem;
    border-bottom: 1px solid rgba(242, 227, 203, 0.12);
    background:
        linear-gradient(180deg, rgba(182, 90, 43, 0.22), rgba(36, 23, 15, 0.05) 70%),
        radial-gradient(circle at 50% -30%, rgba(215, 162, 75, 0.22), transparent 60%);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--amber-300);
    font-size: 0.78rem;
    margin-bottom: var(--space-sm);
}

.hero-title {
    margin-bottom: var(--space-sm);
}

.hero-subtitle {
    color: var(--muted-300);
    max-width: 740px;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.page-hero-home {
    padding: 1.5rem 0 1.2rem;
}

.page-hero-home .hero-eyebrow {
    margin-bottom: 0.38rem;
}

.page-hero-home .hero-title {
    font-size: clamp(1.85rem, 3.4vw, 2.5rem);
    line-height: 1.08;
    margin-bottom: 0.4rem;
    max-width: 24ch;
}

.page-hero-home .hero-subtitle {
    font-size: 1rem;
    line-height: 1.45;
    max-width: 760px;
    margin-bottom: 0.55rem;
}

.page-hero-home .hero-actions {
    margin-top: 0.6rem;
}

.card {
    background: linear-gradient(180deg, rgba(36, 23, 15, 0.92), rgba(24, 17, 13, 0.96));
    border: 1px solid rgba(242, 227, 203, 0.12);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

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

.card-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.58rem 1.2rem;
    text-transform: uppercase;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--rust-600), var(--rust-500));
    color: #1b130d;
    border-color: rgba(17, 13, 9, 0.3);
}

.btn-primary:hover {
    color: #1b130d;
}

.btn-secondary {
    background: rgba(215, 162, 75, 0.1);
    color: var(--amber-300);
    border-color: rgba(215, 162, 75, 0.35);
}

.btn-secondary:hover {
    color: #f0cf95;
    border-color: rgba(240, 207, 149, 0.6);
}

.btn-sm {
    font-size: 0.74rem;
    padding: 0.46rem 0.95rem;
}

.callout {
    border-left: 4px solid var(--amber-400);
    padding: var(--space-md) var(--space-lg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(215, 162, 75, 0.08);
}

.callout-success {
    border-left-color: var(--success-500);
    background: rgba(95, 139, 74, 0.18);
    color: var(--wheat-100);
}

.callout-success p {
    color: inherit;
}

.callout-danger {
    border-left-color: var(--danger-500);
    background: rgba(206, 75, 53, 0.12);
    color: var(--wheat-100);
}

.callout-danger p {
    color: inherit;
}

.callout-warning {
    border-left-color: var(--amber-400);
    background: rgba(215, 162, 75, 0.15);
    color: var(--wheat-100);
}

.callout-warning p {
    color: inherit;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.28rem 0.7rem;
}

.badge-deity {
    color: #23170f;
    background: var(--amber-300);
}

.badge-contested {
    color: #1c120c;
    background: linear-gradient(135deg, #d6b26f, #bf8f54);
}

.badge-enemy {
    color: #ffe9df;
    background: rgba(206, 75, 53, 0.6);
}

.badge-neutral {
    color: #16110c;
    background: rgba(181, 164, 144, 0.9);
}

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

.list-clean {
    padding-left: 1.15rem;
}

.list-clean li {
    margin-bottom: 0.35rem;
}

.quote-block {
    border-left: 4px solid rgba(215, 162, 75, 0.65);
    padding: var(--space-sm) var(--space-md);
    font-style: italic;
    color: var(--wheat-200);
    background: rgba(215, 162, 75, 0.08);
}

.doctrine-table {
    margin-top: var(--space-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(242, 227, 203, 0.14);
}

.doctrine-table th {
    background: rgba(215, 162, 75, 0.16);
    color: var(--wheat-100);
}

.admin-table-wrap {
    width: 100%;
    min-width: 0;
}

.admin-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: var(--space-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(242, 227, 203, 0.14);
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(242, 227, 203, 0.1);
    overflow-wrap: break-word;
    word-break: break-word;
}

.admin-table th {
    background: rgba(215, 162, 75, 0.16);
    color: var(--wheat-100);
}

.admin-table tbody tr:hover {
    background: rgba(215, 162, 75, 0.06);
}

.admin-avatar-cell {
    width: 52px;
}

.admin-table .admin-select {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(242, 227, 203, 0.26);
    background: linear-gradient(135deg, rgba(215, 162, 75, 0.34), rgba(94, 52, 26, 0.58));
    color: var(--wheat-100);
    font-family: var(--font-body);
    font-weight: 700;
}

img.member-avatar {
    display: block;
}

.member-avatar-fallback {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.member-avatar-sm {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
}

.member-avatar-md {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
}

.member-avatar-lg {
    width: 82px;
    height: 82px;
    font-size: 1.55rem;
}

.profile-image-panel {
    margin-bottom: 1.2rem;
    padding: 0.9rem;
    border: 1px solid rgba(242, 227, 203, 0.12);
    border-radius: var(--radius-md);
    background: rgba(17, 13, 9, 0.44);
}

.profile-image-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.profile-image-controls {
    flex: 1;
    min-width: 0;
}

.profile-image-help {
    margin: 0.45rem 0 0;
    font-size: 0.86rem;
}

.profile-image-actions {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.member-roster-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.member-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--wheat-100);
    text-decoration: none;
}

.member-profile-link:hover {
    color: var(--amber-300);
}

.member-profile-link::after {
    display: none !important;
}

.member-profile-link-inline {
    gap: 0;
}

.public-profile-card {
    display: grid;
    gap: 1.1rem;
}

.public-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-profile-meta h2 {
    margin-bottom: 0.35rem;
}

.public-profile-rank,
.public-profile-joined {
    margin-bottom: 0.25rem;
}

.public-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.public-profile-field {
    border: 1px solid rgba(242, 227, 203, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    background: rgba(17, 13, 9, 0.4);
}

.public-profile-field h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.public-profile-field p {
    margin-bottom: 0;
}

.public-profile-limited {
    margin-top: 0.35rem;
}

@media (max-width: 720px) {
    .profile-image-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-avatar-lg {
        width: 72px;
        height: 72px;
        font-size: 1.35rem;
    }

    .public-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.timeline {
    border-left: 2px solid rgba(215, 162, 75, 0.35);
    margin-left: 0.4rem;
    padding-left: var(--space-lg);
}

.timeline-item {
    margin-bottom: var(--space-lg);
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--space-lg) - 0.45rem);
    top: 0.45rem;
    width: 0.72rem;
    height: 0.72rem;
    background: var(--amber-400);
    border-radius: 50%;
}

.timeline-date {
    color: var(--amber-300);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--wheat-100);
    font-weight: 700;
}

.form-control,
textarea,
select,
input[type="text"],
input[type="email"] {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(242, 227, 203, 0.2);
    padding: 0.7rem 0.8rem;
    background: rgba(17, 13, 9, 0.58);
    color: var(--wheat-100);
    font-family: var(--font-body);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.form-control:focus,
textarea:focus,
select:focus,
input:focus {
    outline: 2px solid rgba(226, 188, 113, 0.5);
    outline-offset: 1px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.validation-message {
    color: #ffb8aa;
    font-size: 0.9rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-500);
}

.invalid {
    outline: 1px solid var(--danger-500);
}

.success-panel {
    border: 1px solid rgba(95, 139, 74, 0.55);
    background: rgba(95, 139, 74, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.metric {
    border: 1px solid rgba(242, 227, 203, 0.16);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    min-width: 160px;
    background: rgba(242, 227, 203, 0.04);
}

.metric-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted-300);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--wheat-100);
}

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

.oracle-label {
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.75rem;
    color: var(--amber-300);
}

.oracle-response {
    margin: var(--space-sm) 0 var(--space-lg);
    font-size: 1.1rem;
    color: var(--wheat-100);
}

.feed-list {
    display: grid;
    gap: var(--space-md);
}

.feed-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.feed-title {
    margin-bottom: 0.35rem;
}

.deity-position {
    margin-bottom: 0.9rem;
}

.deity-subtitle {
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--amber-300);
}

.deity-domain-list {
    margin-bottom: 0;
}

.codex-section {
    padding: 1rem;
    border: 1px solid rgba(242, 227, 203, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(14, 10, 7, 0.38), rgba(14, 10, 7, 0.18));
}

.codex-heading {
    margin-bottom: 0.9rem;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
}

.codex-card {
    border-width: 1px;
}

.codex-card-revered {
    border-color: rgba(226, 188, 113, 0.33);
}

.codex-card-enemy {
    border-color: rgba(206, 75, 53, 0.45);
    background: linear-gradient(180deg, rgba(57, 27, 23, 0.74), rgba(25, 12, 10, 0.85));
}

.codex-field {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.codex-summary {
    margin-top: 0.55rem;
    margin-bottom: 0;
}

.deity-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    border: 1px solid rgba(242, 227, 203, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card:hover .deity-img {
    transform: scale(1.02);
}

.deity-img-clickable {
    cursor: pointer;
}

.profile-not-found-title {
    margin-bottom: 0.4rem;
}

.page-hero-profile {
    padding: clamp(1.2rem, 1.9vw, 1.7rem) 0 clamp(0.75rem, 1.3vw, 1.05rem);
}

.page-hero-profile .hero-eyebrow {
    margin-bottom: 0.42rem;
}

.profile-hero-copy {
    max-width: 820px;
}

.profile-hero-meta {
    margin-bottom: 0.3rem;
}

.page-hero-profile .hero-title {
    font-size: clamp(1.95rem, 4vw, 2.95rem);
    margin-bottom: 0.45rem;
    line-height: 1.14;
}

.page-hero-profile .hero-subtitle {
    max-width: 680px;
    font-size: 1.02rem;
    line-height: 1.52;
    margin-bottom: 0.6rem;
}

.page-hero-profile .hero-actions {
    margin-top: 0.65rem;
}

.deity-profile-section {
    padding-top: clamp(0.8rem, 1.35vw, 1.05rem);
    padding-bottom: clamp(1rem, 1.7vw, 1.5rem);
    overflow-x: clip;
}

.profile-stack {
    display: grid;
    gap: 1.15rem;
    min-width: 0;
}

.profile-frame {
    display: grid;
    gap: 1.1rem;
    align-items: start;
    min-width: 0;
}

.profile-frame-with-image {
    grid-template-columns: minmax(220px, 285px) minmax(0, 1fr);
}

.profile-frame-no-image {
    grid-template-columns: minmax(0, 1fr);
}

.profile-right-column {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.profile-frame-with-image .profile-right-column {
    padding-top: 0.9rem;
}

.profile-right-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    min-width: 0;
}

.profile-right-grid>.card {
    min-width: 0;
}

.profile-intro-media {
    width: 100%;
    margin-top: 0;
    padding: 0.34rem;
    height: auto;
    align-self: start;
    justify-self: start;
    min-width: 0;
}

.profile-intro-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(60vh, 620px);
    object-fit: contain;
    border-radius: calc(var(--radius-md) - 3px);
    border: 1px solid rgba(242, 227, 203, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.deity-profile-section .card {
    padding: clamp(1rem, 1.35vw, 1.2rem);
}

.deity-profile-section h2 {
    font-size: clamp(1.18rem, 1.9vw, 1.58rem);
    margin-bottom: 0.62rem;
    line-height: 1.16;
}

.deity-profile-section h3 {
    margin-bottom: 0.4rem;
    line-height: 1.18;
}

.deity-profile-section p {
    margin-bottom: 0.76rem;
    line-height: 1.56;
}

.deity-profile-section li {
    line-height: 1.52;
}

.profile-card {
    height: 100%;
}

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

.profile-subheading {
    margin-top: 0.82rem;
    margin-bottom: 0.38rem;
}

.profile-list {
    margin-bottom: 0;
}

.profile-list li {
    margin-bottom: 0.28rem;
}

.profile-list li:last-child {
    margin-bottom: 0;
}

.cross-path-list {
    display: grid;
    gap: 0.62rem;
}

.cross-path-item {
    border: 1px solid rgba(242, 227, 203, 0.16);
    border-radius: var(--radius-sm);
    padding: 0.66rem;
    background: rgba(242, 227, 203, 0.03);
    min-width: 0;
}

.cross-path-title {
    margin-bottom: 0.35rem;
}

.cross-path-link {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.74rem;
}

.cross-path-notes {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.profile-severed {
    margin-top: 0.75rem;
    border-top: 1px solid rgba(242, 227, 203, 0.12);
    padding-top: 0.62rem;
}

.profile-quote {
    margin-top: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .profile-frame-with-image {
        grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .page-hero {
        padding: 1.25rem 0 1rem;
    }

    .page-hero-home {
        padding: 1.25rem 0 1rem;
    }

    .page-hero-home .hero-title {
        font-size: clamp(1.6rem, 6vw, 2.1rem);
    }

    .page-hero-home .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .page-hero-home .hero-actions {
        margin-top: 0.5rem;
    }

    .page-hero-profile {
        padding: 1.5rem 0 1rem;
    }

    .profile-hero-copy {
        max-width: 100%;
    }

    .page-hero-profile .hero-title {
        font-size: clamp(1.85rem, 5.8vw, 2.55rem);
    }

    .page-hero-profile .hero-subtitle {
        font-size: 1rem;
        line-height: 1.55;
    }

    .deity-profile-section {
        padding-top: var(--space-md);
    }

    .profile-frame-with-image {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .profile-right-column {
        gap: var(--space-md);
    }

    .profile-frame-with-image .profile-right-column {
        padding-top: 0;
    }

    .profile-intro-media {
        max-width: none;
        margin-top: 0;
        justify-self: stretch;
    }

    .profile-intro-img {
        max-height: min(58vh, 560px);
    }

    .profile-right-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .profile-stack {
        gap: var(--space-md);
    }

    .deity-profile-section .card {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .page-hero-profile {
        padding: 1.2rem 0 0.8rem;
    }

    .page-hero-profile .hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 0.14em;
    }

    .page-hero-profile .hero-title {
        font-size: clamp(1.55rem, 8.6vw, 2.05rem);
        margin-bottom: 0.45rem;
    }

    .page-hero-profile .hero-subtitle {
        font-size: 0.95rem;
    }

    .page-hero-profile .hero-actions {
        margin-top: 0.75rem;
    }

    .page-hero-profile .hero-actions .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .deity-profile-section .card {
        padding: 0.9rem;
    }

    .profile-frame h2 {
        font-size: clamp(1.08rem, 5.6vw, 1.28rem);
        margin-bottom: 0.55rem;
    }

    .profile-frame h3 {
        font-size: clamp(0.92rem, 4.7vw, 1.05rem);
    }

    .profile-frame p,
    .profile-frame li {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .deity-subtitle {
        font-size: 0.74rem;
    }
}

@media (max-width: 520px) {
    .deity-profile-section {
        padding-top: 0.85rem;
    }

    .deity-profile-section .card {
        padding: 0.82rem;
    }

    .profile-stack,
    .profile-frame,
    .profile-right-column,
    .profile-right-grid,
    .cross-path-list {
        gap: 0.75rem;
    }

    .profile-intro-media {
        padding: 0.28rem;
    }

    .profile-intro-img {
        max-height: min(54vh, 420px);
    }

    .page-hero-profile .hero-subtitle {
        font-size: 0.9rem;
    }

    .page-hero-profile .btn {
        font-size: 0.74rem;
        padding: 0.46rem 0.84rem;
    }
}

@media (min-width: 1025px) {
    .page-hero-profile {
        padding: clamp(0.95rem, 1.4vw, 1.3rem) 0 clamp(0.6rem, 0.95vw, 0.85rem);
    }

    .page-hero-profile .hero-eyebrow {
        margin-bottom: 0.3rem;
    }

    .profile-hero-copy {
        max-width: 760px;
    }

    .profile-hero-meta {
        gap: 0.45rem;
        margin-bottom: 0.22rem;
    }

    .page-hero-profile .hero-title {
        font-size: clamp(1.78rem, 3.2vw, 2.4rem);
        margin-bottom: 0.35rem;
        line-height: 1.08;
    }

    .page-hero-profile .hero-subtitle {
        max-width: 620px;
        font-size: 0.96rem;
        line-height: 1.45;
        margin-bottom: 0.5rem;
    }

    .page-hero-profile .hero-actions {
        margin-top: 0.5rem;
    }

    .deity-profile-section {
        padding-top: 0.65rem;
        padding-bottom: 1rem;
    }

    .profile-stack {
        gap: 0.95rem;
    }

    .profile-frame {
        gap: 0.95rem;
    }

    .profile-frame-with-image {
        grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
    }

    .profile-right-column {
        gap: 0.85rem;
    }

    .profile-right-grid {
        gap: 0.75rem;
    }

    .profile-intro-media {
        padding: 0.24rem;
    }

    .profile-intro-img {
        max-height: min(52vh, 540px);
    }

    .deity-profile-section .card {
        padding: 0.95rem 1rem;
    }

    .deity-profile-section h2 {
        font-size: clamp(1.08rem, 1.45vw, 1.36rem);
        margin-bottom: 0.5rem;
    }

    .deity-profile-section h3 {
        font-size: clamp(0.92rem, 1vw, 1.02rem);
        margin-bottom: 0.32rem;
    }

    .deity-profile-section p {
        margin-bottom: 0.62rem;
        line-height: 1.5;
    }

    .deity-profile-section li {
        font-size: 0.95rem;
        line-height: 1.46;
    }

    .deity-profile-section .deity-subtitle {
        margin-bottom: 0.24rem;
        font-size: 0.8rem;
    }

    .profile-subheading {
        margin-top: 0.62rem;
        margin-bottom: 0.3rem;
    }

    .profile-list li {
        margin-bottom: 0.2rem;
    }

    .cross-path-list {
        gap: 0.5rem;
    }

    .cross-path-item {
        padding: 0.56rem;
    }

    .cross-path-title {
        margin-bottom: 0.28rem;
    }

    .profile-severed {
        margin-top: 0.6rem;
        padding-top: 0.5rem;
    }

    .profile-quote {
        padding: 0.7rem 0.9rem;
    }
}

/* Modal for expanded images */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

.image-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: modalFadeIn 0.3s ease-out both;
}

.image-modal-content {
    position: relative;
    max-width: 95vw;
    display: inline-block;
    text-align: center;
    animation: modalScaleUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.image-modal-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(215, 162, 75, 0.3);
}

.image-modal-caption {
    margin-top: 1rem;
    text-align: center;
    color: var(--wheat-100);
}

.image-modal-close {
    position: absolute;
    top: -3rem;
    right: -1rem;
    background: transparent;
    border: none;
    color: var(--amber-300);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0.5rem;
}

.image-modal-close:hover {
    color: var(--amber-400);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .image-modal-backdrop {
        padding: 1rem;
    }

    .image-modal-img {
        max-height: calc(100vh - 120px);
    }

    .image-modal-close {
        top: -3.5rem;
        right: 0;
    }
}

.scripture-archive {
    display: grid;
    gap: 1.2rem;
}

.scripture-section {
    border: 1px solid rgba(242, 227, 203, 0.14);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: linear-gradient(180deg, rgba(18, 12, 8, 0.45), rgba(18, 12, 8, 0.2));
}

.scripture-section-head {
    margin-bottom: 0.9rem;
}

.scripture-section-label {
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--amber-300);
}

.scripture-section-title {
    margin-bottom: 0.35rem;
    font-size: clamp(1.2rem, 2.3vw, 1.7rem);
}

.scripture-section-subtitle {
    margin-bottom: 0;
    color: var(--muted-300);
}

.scripture-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* ═══════════════════════════════════════════════
   SCRIPTURE BOOK — LOOKS LIKE A BOOK
   ═══════════════════════════════════════════════ */

.scripture-book {
    display: flex;
    min-height: 140px;
    cursor: pointer;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(242, 227, 203, 0.06);
    border: 1px solid rgba(242, 227, 203, 0.12);
    border-left: none;
    background: linear-gradient(135deg, rgba(57, 37, 23, 0.9), rgba(36, 23, 15, 0.95));
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        min-height 0.35s ease;
}

.scripture-book:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(215, 162, 75, 0.08),
        inset 0 1px 0 rgba(242, 227, 203, 0.08);
}

.scripture-book-open {
    min-height: auto;
    flex-direction: column;
    border-radius: var(--radius-md);
    border-left: none;
}

.scripture-book-open .scripture-book-cover {
    border-radius: 0;
    flex: 0 0 auto;
}

.scripture-book-open .scripture-book-pages {
    display: block;
}

/* Spine — left edge of the book */
.scripture-book-spine {
    width: 14px;
    flex-shrink: 0;
    background: linear-gradient(180deg,
            rgba(25, 18, 13, 0.98),
            rgba(36, 23, 15, 0.95) 20%,
            rgba(57, 37, 23, 0.9) 50%,
            rgba(36, 23, 15, 0.95) 80%,
            rgba(25, 18, 13, 0.98));
    border-right: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: inset -2px 0 8px rgba(0, 0, 0, 0.3);
}

.scripture-book-open .scripture-book-spine {
    width: 100%;
    min-height: 8px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: none;
    background: linear-gradient(90deg,
            rgba(25, 18, 13, 0.98),
            rgba(36, 23, 15, 0.95) 30%,
            rgba(57, 37, 23, 0.9) 50%,
            rgba(36, 23, 15, 0.95) 70%,
            rgba(25, 18, 13, 0.98));
}

/* Cover — main clickable face */
.scripture-book-cover {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(145deg, rgba(72, 48, 28, 0.6), rgba(36, 23, 15, 0.85)),
        radial-gradient(ellipse 80% 50% at 20% 50%, rgba(215, 162, 75, 0.06), transparent 60%);
    border-left: 1px solid rgba(215, 162, 75, 0.15);
}

.scripture-book-title {
    margin-bottom: 0.28rem;
    font-size: 1.16rem;
    color: var(--wheat-100);
    font-family: var(--font-heading);
}

.scripture-book-purpose {
    margin-bottom: 0.35rem;
    color: var(--muted-300);
    font-style: italic;
    font-size: 0.88rem;
}

.scripture-book-meta {
    color: var(--muted-400);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0;
}

.scripture-book-hint {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(215, 162, 75, 0.6);
    transition: color 0.25s ease;
}

.scripture-book:hover .scripture-book-hint {
    color: rgba(215, 162, 75, 0.9);
}

/* Opened book — "pages" content */
.scripture-book-pages {
    display: none;
    padding: var(--space-lg);
    background:
        linear-gradient(180deg, rgba(18, 12, 8, 0.4), rgba(24, 16, 10, 0.6));
    border-top: 1px solid rgba(0, 0, 0, 0.25);
    cursor: default;
}

.scripture-book-open .scripture-book-cover {
    border-left: none;
}

.scripture-book .scripture-verse {
    margin: 0 0 0.75rem;
}

.scripture-book .scripture-verse:last-child {
    margin-bottom: 0;
}

/* Legacy class kept for any other refs */
.scripture-book-card {
    border-color: rgba(226, 188, 113, 0.25);
}

.scripture-verse {
    margin: 0 0 0.58rem;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid rgba(215, 162, 75, 0.62);
    background: rgba(215, 162, 75, 0.06);
}

.scripture-verse p {
    margin-bottom: 0.42rem;
    white-space: pre-line;
}

.scripture-verse-ref {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber-300);
}

.scripture-closing {
    margin-top: 0.35rem;
}

.scripture-control-card {
    display: grid;
    gap: 0.9rem;
    border-color: rgba(226, 188, 113, 0.28);
}

.scripture-control-label {
    display: block;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.74rem;
    color: var(--amber-300);
}

.scripture-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.scripture-chip {
    border: 1px solid rgba(242, 227, 203, 0.24);
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    background: rgba(242, 227, 203, 0.03);
    color: var(--wheat-200);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scripture-chip:hover {
    border-color: rgba(226, 188, 113, 0.5);
    color: #f0cf95;
}

.scripture-chip-active {
    color: #24170f;
    background: var(--amber-300);
    border-color: rgba(17, 13, 9, 0.3);
}

.scripture-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scripture-drawn-card {
    margin-top: 0.8rem;
    border-color: rgba(215, 162, 75, 0.5);
    background:
        radial-gradient(circle at 86% -30%, rgba(215, 162, 75, 0.18), transparent 50%),
        linear-gradient(180deg, rgba(57, 37, 23, 0.65), rgba(25, 18, 13, 0.8));
}

.scripture-book-cover .scripture-book-meta {
    margin-bottom: 0;
}

.scripture-verse-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.scripture-copy-btn {
    padding-inline: 0.65rem;
}

/* Foundational books: cover image from Books folder */
.scripture-book-with-cover .scripture-book-cover-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.scripture-book-with-cover .scripture-book-cover-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(to top, rgba(10, 7, 5, 0.92) 0%, rgba(10, 7, 5, 0.5) 45%, transparent 70%);
}

.scripture-book-with-cover .scripture-book-cover-overlay .scripture-book-title,
.scripture-book-with-cover .scripture-book-cover-overlay .scripture-book-purpose,
.scripture-book-with-cover .scripture-book-cover-overlay .scripture-book-meta,
.scripture-book-with-cover .scripture-book-cover-overlay .scripture-book-hint {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Scripture reader modal — text over parchment image */
.scripture-book-reader-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.85);
    animation: scripture-reader-fade 0.25s ease;
}

@keyframes scripture-reader-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.scripture-book-reader-wrap {
    position: relative;
    max-width: min(760px, 96vw);
    max-height: 90vh;
}

/* Let the page image set the size so overlay aligns with the decorative frame */
.scripture-book-reader-book {
    position: relative;
    line-height: 0;
}

.scripture-book-reader-bg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    object-position: center;
    vertical-align: top;
}

/* Single-page text overlay: keep text inside the inner frame margins */
.scripture-book-reader-pages {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    padding: 12% 12% 11% 12%;
    pointer-events: none;
    box-sizing: border-box;
}

.scripture-book-reader-page {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    pointer-events: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 60, 35, 0.6) rgba(60, 45, 28, 0.25);
}

.scripture-book-reader-page-inner {
    text-align: left;
    margin: 0 auto;
    padding-top: 0.35rem;
}

/* Subtle scrollbar so it doesn't clash with the antique book */
.scripture-book-reader-page::-webkit-scrollbar {
    width: 6px;
}

.scripture-book-reader-page::-webkit-scrollbar-track {
    background: rgba(60, 45, 28, 0.25);
    border-radius: 3px;
}

.scripture-book-reader-page::-webkit-scrollbar-thumb {
    background: rgba(80, 60, 35, 0.6);
    border-radius: 3px;
}

.scripture-book-reader-page::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 75, 45, 0.75);
}

/* Scripture typography: antique printed ink, embedded in parchment */
.scripture-book-reader-title,
.scripture-book-reader-purpose,
.scripture-book-reader-text,
.scripture-book-reader-ref {
    font-family: var(--font-scripture);
}

/* Aged ink: subtle dark shadow suggests print pressed into page, not digital overlay */
.scripture-book-reader-title,
.scripture-book-reader-purpose,
.scripture-book-reader-text,
.scripture-book-reader-ref {
    text-shadow:
        0 0.2px 0.4px rgba(15, 8, 3, 0.5),
        0 0.6px 1px rgba(20, 12, 5, 0.25),
        0 0.3px 0 rgba(255, 248, 238, 0.15);
}

.scripture-book-reader-title {
    margin: 0 0 0.35rem;
    font-size: clamp(0.92rem, 1.95vw, 1.1rem);
    font-weight: 600;
    color: #140d07;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

/* Subheading: old-book style, not overly elegant italic */
.scripture-book-reader-purpose {
    margin: 0 0 0.5rem;
    font-size: clamp(0.74rem, 1.5vw, 0.86rem);
    font-style: normal;
    font-weight: 400;
    color: #160f09;
    line-height: 1.48;
}

.scripture-book-reader-verse {
    margin-bottom: 0.72rem;
}

/* Body: darker for stronger printed contrast on parchment; unified with subheading */
.scripture-book-reader-text {
    margin: 0 0 0.16rem;
    font-size: clamp(0.82rem, 1.65vw, 0.96rem);
    font-weight: 400;
    line-height: 1.6;
    color: #0f0a05;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-line;
}

.scripture-book-reader-ref {
    font-size: clamp(0.7rem, 1.45vw, 0.82rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #1a1209;
}

/* Compact mode used for dense long-form books like Book of Eggs */
.scripture-book-reader-wrap-compact .scripture-book-reader-purpose {
    margin-bottom: 0.32rem;
    line-height: 1.38;
}

.scripture-book-reader-wrap-compact .scripture-book-reader-verse {
    margin-bottom: 0.45rem;
}

.scripture-book-reader-wrap-compact .scripture-book-reader-text {
    margin: 0 0 0.08rem;
    line-height: 1.35;
}

.scripture-book-reader-wrap-compact .scripture-book-reader-ref {
    font-size: clamp(0.66rem, 1.32vw, 0.76rem);
}

.scripture-book-reader-close {
    position: absolute;
    top: -2rem;
    right: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(242, 227, 203, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(20, 14, 10, 0.9);
    color: var(--wheat-200);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.scripture-book-reader-close:hover {
    background: rgba(215, 162, 75, 0.2);
    color: var(--wheat-100);
}

.notice {
    border: 1px dashed rgba(242, 227, 203, 0.25);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    background: rgba(242, 227, 203, 0.03);
}

.site-footer {
    margin-top: var(--space-3xl);
    border-top: 1px solid rgba(242, 227, 203, 0.14);
    background: rgba(10, 7, 5, 0.5);
}

@media (min-width: 1025px) {
    .site-main:has(.deity-profile-section)+.site-footer {
        margin-top: clamp(1.4rem, 2.2vw, 2rem);
    }

    .site-main:has(.deity-profile-section)+.site-footer .footer-grid {
        padding: clamp(1.35rem, 2vw, 1.85rem) 0;
    }

    .site-main:has(.deity-profile-section)+.site-footer .footer-bottom {
        padding: 0.75rem 0 1.2rem;
    }
}

.footer-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    padding: var(--space-2xl) 0;
}

.footer-grid>div {
    min-width: 0;
}

.site-footer h4 {
    margin-bottom: var(--space-sm);
    color: var(--amber-300);
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}

.site-footer a {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--wheat-200);
    overflow-wrap: anywhere;
}

.site-footer p {
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.footer-bottom {
    border-top: 1px solid rgba(242, 227, 203, 0.1);
    padding: var(--space-md) 0 var(--space-xl);
    color: var(--muted-300);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: rgba(17, 13, 9, 0.84);
    border-bottom: 1px solid rgba(242, 227, 203, 0.14);
    backdrop-filter: blur(8px);
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-width: 0;
}

.brand-link {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    color: var(--wheat-100);
    min-width: 0;
    margin-right: 2.5rem;
}

.hero-home-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.hero-home-layout .hero-actions {
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-home-layout {
        flex-direction: row;
        text-align: left;
        gap: 2.5rem;
    }

    .hero-home-logo-col {
        flex: 0 0 200px;
    }

    .hero-home-text-col {
        flex: 1;
        min-width: 0;
    }

    .hero-home-layout .hero-actions {
        justify-content: flex-start;
    }
}

.hero-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.brand-mark {
    display: inline-block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow-wrap: normal;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 0.2rem;
    background: rgba(242, 227, 203, 0.04);
    border: 1px solid rgba(242, 227, 203, 0.13);
    border-radius: 999px;
    padding: 0.22rem;
}

.desktop-nav a {
    color: var(--muted-300);
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.desktop-nav a.active {
    color: #1f150f;
    background: var(--amber-300);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.header-actions .nav-user-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wheat-200);
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.12rem;
    transition: background 0.2s ease;
}

.header-actions .nav-user-link:hover {
    color: var(--wheat-100);
    background: rgba(242, 227, 203, 0.08);
}

.nav-toggle {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(242, 227, 203, 0.2);
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    background: rgba(242, 227, 203, 0.05);
}

.nav-toggle-btn span {
    width: 16px;
    height: 2px;
    background: var(--wheat-100);
    display: block;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
    z-index: 1050;
}

.mobile-drawer {
    position: fixed;
    right: 0;
    top: 0;
    width: min(84vw, 320px);
    height: 100vh;
    transform: translateX(100%);
    transition: transform 180ms ease;
    z-index: 1060;
    background: linear-gradient(180deg, #1e140d, #120c08);
    border-left: 1px solid rgba(242, 227, 203, 0.15);
    padding: calc(var(--header-height) + var(--space-md)) var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.drawer-head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.drawer-title {
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
}

.drawer-nav {
    display: grid;
    gap: 0.2rem;
}

.drawer-nav a {
    color: var(--wheat-200);
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-sm);
}

.drawer-nav a:hover {
    background: rgba(242, 227, 203, 0.08);
}

.drawer-user {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--wheat-200);
    text-decoration: none;
    font-weight: 600;
}

.drawer-user:hover {
    color: var(--wheat-100);
}

.drawer-join {
    margin-top: auto;
}

.nav-toggle:checked~.drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.nav-toggle:checked~.mobile-drawer {
    transform: translateX(0);
}

@media (min-width: 1120px) {
    .desktop-nav {
        display: inline-flex;
    }

    .nav-toggle-btn,
    .mobile-drawer,
    .drawer-overlay {
        display: none;
    }
}

@media (max-width: 840px) {
    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1 1 180px;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-lg);
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 600px) {
    .page-hero {
        padding: 1.9rem 0 1.35rem;
    }

    .page-hero-home {
        padding: 0.95rem 0 0.7rem;
    }

    .page-hero-home .hero-title {
        font-size: clamp(1.45rem, 8.8vw, 1.9rem);
        line-height: 1.1;
    }

    .page-hero-home .hero-subtitle {
        font-size: 0.9rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-lg) 0;
    }

    .footer-bottom {
        padding: var(--space-sm) 0 var(--space-lg);
    }

    .brand-text {
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }

    .header-actions .btn-sm {
        padding: 0.42rem 0.72rem;
        font-size: 0.68rem;
    }

    .mobile-drawer {
        width: min(90vw, 320px);
        padding: calc(var(--header-height) + var(--space-sm)) var(--space-md) var(--space-md);
    }
}

h1:focus {
    outline: none;
}

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

/* ═══════════════════════════════════════════════
   KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════ */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(215, 162, 75, 0.3);
    }

    50% {
        box-shadow: 0 0 14px rgba(215, 162, 75, 0.7), 0 0 28px rgba(215, 162, 75, 0.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(-5vh) translateX(2vw) scale(1);
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-80vh) translateX(-3vw) scale(0.3);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(4px);
    }

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

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(242, 227, 203, 0.14);
    }

    50% {
        border-color: rgba(215, 162, 75, 0.35);
    }
}

@keyframes pulseScale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* ═══════════════════════════════════════════════
   SCROLL-REVEAL SYSTEM
   ═══════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   ENHANCED CARD HOVER EFFECTS
   ═══════════════════════════════════════════════ */

.card {
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.card:hover {
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.32),
        0 0 20px rgba(215, 162, 75, 0.08);
    border-color: rgba(215, 162, 75, 0.3);
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(215, 162, 75, 0.06), transparent 60%);
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card.card-no-hover:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    border-color: rgba(242, 227, 203, 0.14);
}

.card.card-no-hover:hover::after {
    opacity: 0;
}


.card {
    position: relative;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   HERO SECTION ANIMATED ENTRANCE
   ═══════════════════════════════════════════════ */

.page-hero {
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(215, 162, 75, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    animation: floatParticle 30s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

.page-hero .hero-eyebrow {
    animation: fadeIn 0.8s ease both;
    animation-delay: 0.1s;
}

.page-hero .hero-title {
    animation: textFadeIn 0.9s ease both;
    animation-delay: 0.25s;
}

.page-hero .hero-subtitle {
    animation: textFadeIn 0.9s ease both;
    animation-delay: 0.45s;
}

.page-hero .hero-actions {
    animation: fadeInUp 0.8s ease both;
    animation-delay: 0.6s;
}

/* ═══════════════════════════════════════════════
   NAV LINK TRANSITIONS
   ═══════════════════════════════════════════════ */

.desktop-nav a {
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.2s ease;
    position: relative;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--amber-300);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.desktop-nav a:hover::after {
    width: 60%;
    left: 20%;
}

.desktop-nav a:hover {
    color: var(--wheat-100);
    background: rgba(242, 227, 203, 0.08);
}

.desktop-nav a.active::after {
    display: none;
}

/* Brand hover */
.brand-link {
    transition: opacity 0.25s ease;
}

.brand-link:hover {
    opacity: 0.85;
}

.brand-mark {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.brand-link:hover .brand-mark {
    transform: rotate(-8deg) scale(1.08);
    box-shadow: 0 0 14px rgba(215, 162, 75, 0.35);
}

/* ═══════════════════════════════════════════════
   BUTTON MICRO-INTERACTIONS
   ═══════════════════════════════════════════════ */

.btn {
    position: relative;
    overflow: hidden;
    transition:
        transform 140ms ease,
        background-color 140ms ease,
        border-color 140ms ease,
        box-shadow 0.3s ease;
}

.btn:active {
    transform: scale(0.97) translateY(0) !important;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.18),
            transparent);
    transition: none;
    animation: none;
}

.btn-primary:hover::before {
    animation: shimmer 0.8s ease forwards;
}

.btn-primary:hover {
    box-shadow: 0 4px 18px rgba(182, 90, 43, 0.35);
}

.btn-secondary:hover {
    box-shadow: 0 4px 18px rgba(215, 162, 75, 0.12);
}

/* ═══════════════════════════════════════════════
   TIMELINE PULSE ANIMATIONS
   ═══════════════════════════════════════════════ */

.timeline-item::before {
    animation: glowPulse 2.5s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.timeline-item:hover::before {
    transform: scale(1.4);
}

.timeline-item {
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(6px);
}

.timeline {
    background: linear-gradient(180deg, rgba(215, 162, 75, 0.35), rgba(215, 162, 75, 0.08));
    background-size: 2px 100%;
    background-repeat: no-repeat;
}

/* ═══════════════════════════════════════════════
   ORACLE PANEL TRANSITIONS
   ═══════════════════════════════════════════════ */

.oracle-panel {
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.oracle-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(215, 162, 75, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════
   FORM FOCUS TRANSITIONS
   ═══════════════════════════════════════════════ */

.form-control,
textarea,
select,
input[type="text"],
input[type="email"] {
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        outline-color 0.3s ease;
}

.form-control:focus,
textarea:focus,
select:focus,
input:focus {
    border-color: rgba(226, 188, 113, 0.5);
    box-shadow: 0 0 16px rgba(226, 188, 113, 0.12);
}

/* ═══════════════════════════════════════════════
   FOOTER LINK HOVER EFFECTS
   ═══════════════════════════════════════════════ */

.site-footer a {
    transition: color 0.25s ease, padding-left 0.25s ease, border-color 0.25s ease;
    border-left: 2px solid transparent;
}

.site-footer a:hover {
    color: var(--amber-300);
    padding-left: 0.5rem;
    border-left-color: var(--amber-400);
}

/* ═══════════════════════════════════════════════
   BADGE HOVER SCALE
   ═══════════════════════════════════════════════ */

.badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════
   CALLOUT & QUOTE-BLOCK HOVER
   ═══════════════════════════════════════════════ */

.callout {
    transition: border-color 0.3s ease, background 0.3s ease;
}

.callout:hover {
    border-left-color: var(--amber-300);
    background: rgba(215, 162, 75, 0.12);
}

.quote-block {
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.quote-block:hover {
    border-left-color: var(--amber-300);
    background: rgba(215, 162, 75, 0.12);
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════
   NOTICE HOVER
   ═══════════════════════════════════════════════ */

.notice {
    transition: border-color 0.3s ease, background 0.3s ease;
}

.notice:hover {
    border-color: rgba(242, 227, 203, 0.4);
    background: rgba(242, 227, 203, 0.06);
}

/* ═══════════════════════════════════════════════
   METRIC HOVER
   ═══════════════════════════════════════════════ */

.metric {
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.metric:hover {
    transform: translateY(-2px);
    border-color: rgba(215, 162, 75, 0.35);
    background: rgba(242, 227, 203, 0.08);
}

/* ═══════════════════════════════════════════════
   SCRIPTURE CHIP TRANSITIONS
   ═══════════════════════════════════════════════ */

.scripture-chip {
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.scripture-chip:hover {
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   CODEX SECTION HOVER
   ═══════════════════════════════════════════════ */

.codex-section {
    transition: border-color 0.35s ease;
}

.codex-section:hover {
    border-color: rgba(242, 227, 203, 0.25);
}

/* ═══════════════════════════════════════════════
   AMBIENT FLOATING PARTICLES
   ═══════════════════════════════════════════════ */

.site-shell::before,
.site-shell::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.site-shell::before {
    width: 3px;
    height: 3px;
    top: 70%;
    left: 15%;
    background: rgba(215, 162, 75, 0.35);
    box-shadow:
        78vw 10vh 0 rgba(215, 162, 75, 0.2),
        25vw 40vh 0 rgba(226, 188, 113, 0.15),
        60vw 65vh 0 rgba(182, 90, 43, 0.2),
        40vw 20vh 0 rgba(215, 162, 75, 0.12),
        85vw 50vh 0 rgba(226, 188, 113, 0.18),
        10vw 80vh 0 rgba(182, 90, 43, 0.15);
    animation: floatParticle 22s ease-in-out infinite;
}

.site-shell::after {
    width: 2px;
    height: 2px;
    top: 50%;
    left: 60%;
    background: rgba(226, 188, 113, 0.25);
    box-shadow:
        -30vw 20vh 0 rgba(215, 162, 75, 0.18),
        -50vw -10vh 0 rgba(226, 188, 113, 0.12),
        20vw -30vh 0 rgba(182, 90, 43, 0.22),
        -15vw 45vh 0 rgba(215, 162, 75, 0.15),
        35vw -20vh 0 rgba(226, 188, 113, 0.2);
    animation: floatParticle 28s ease-in-out infinite reverse;
    animation-delay: 4s;
}

/* ═══════════════════════════════════════════════
   MOBILE DRAWER ENHANCED TRANSITIONS
   ═══════════════════════════════════════════════ */

.mobile-drawer {
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-nav a {
    transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}

.drawer-nav a:hover {
    padding-left: 0.85rem;
    color: var(--amber-300);
}

/* ═══════════════════════════════════════════════
   HEADER SCROLL SHADOW (enhanced)
   ═══════════════════════════════════════════════ */

.site-header {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* ═══════════════════════════════════════════════
   SUCCESS PANEL ENTRANCE
   ═══════════════════════════════════════════════ */

.success-panel {
    animation: fadeInUp 0.6s ease both;
}

/* ═══════════════════════════════════════════════
   SMOOTH PAGE LOAD — prevents FOUC for reveal
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   SMOOTH SCROLL & SELECTION
   ═══════════════════════════════════════════════ */

html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(215, 162, 75, 0.35);
    color: var(--wheat-100);
}

/* ═══════════════════════════════════════════════
   FILM GRAIN / NOISE TEXTURE OVERLAY
   ═══════════════════════════════════════════════ */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ═══════════════════════════════════════════════
   SCROLL PROGRESS INDICATOR
   ═══════════════════════════════════════════════ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 1200;
    background: linear-gradient(90deg, var(--rust-600), var(--amber-400), var(--amber-300));
    transition: width 60ms linear;
    box-shadow: 0 0 8px rgba(215, 162, 75, 0.5);
}

/* ═══════════════════════════════════════════════
   PAGE TRANSITION SYSTEM
   ═══════════════════════════════════════════════ */

.page-transition {
    animation: pageEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(3px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ═══════════════════════════════════════════════
   GRADIENT TEXT UTILITY
   ═══════════════════════════════════════════════ */

.text-gradient {
    background: linear-gradient(135deg, var(--amber-300) 0%, var(--rust-500) 50%, var(--amber-400) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 6s ease infinite;
}

@keyframes gradientText {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }

    100% {
        background-position: 0% center;
    }
}

.text-glow {
    text-shadow:
        0 0 20px rgba(215, 162, 75, 0.25),
        0 0 40px rgba(215, 162, 75, 0.1);
}

/* ═══════════════════════════════════════════════
   ENHANCED HERO — FLOATING ORBS
   ═══════════════════════════════════════════════ */

.page-hero::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(215, 162, 75, 0.1), transparent 70%);
    animation: heroOrb 14s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroOrb {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-60px, 40px) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(30px, -20px) scale(0.9);
        opacity: 0.4;
    }
}

/* ═══════════════════════════════════════════════
   SECTION DIVIDER ORNAMENTS
   ═══════════════════════════════════════════════ */

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: var(--space-lg) 0;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(215, 162, 75, 0.35), transparent);
}

.section-divider-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber-400);
    box-shadow: 0 0 10px rgba(215, 162, 75, 0.5);
    animation: pulseScale 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   GLASS MORPHISM CARD VARIANT
   ═══════════════════════════════════════════════ */

.card-glass {
    background: rgba(57, 37, 23, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(242, 227, 203, 0.12) !important;
}

/* ═══════════════════════════════════════════════
   3D TILT CARD EFFECT
   ═══════════════════════════════════════════════ */

.card-tilt {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-tilt .card-tilt-inner {
    transition: transform 0.4s ease;
}

/* ═══════════════════════════════════════════════
   ANIMATED GRADIENT BORDER
   ═══════════════════════════════════════════════ */

.card-glow-border {
    position: relative;
}

.card-glow-border::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(215, 162, 75, 0.5),
            rgba(182, 90, 43, 0.3),
            rgba(215, 162, 75, 0.1),
            rgba(226, 188, 113, 0.4));
    background-size: 300% 300%;
    animation: borderShift 5s ease infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

@keyframes borderShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ═══════════════════════════════════════════════
   PULSING CTA BUTTON
   ═══════════════════════════════════════════════ */

.btn-pulse {
    animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(182, 90, 43, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(182, 90, 43, 0);
    }
}

.btn-pulse:hover {
    animation: none;
}

/* ═══════════════════════════════════════════════
   REVEAL VARIANTS
   ═══════════════════════════════════════════════ */

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-blur {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    transition:
        opacity 0.7s ease,
        filter 0.7s ease,
        transform 0.7s ease;
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-blur.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   ANIMATED COUNTER FLASH
   ═══════════════════════════════════════════════ */

.metric-value[data-count] {
    transition: color 0.3s ease;
}

.metric-value.counting {
    color: var(--amber-300);
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATION (for copy actions)
   ═══════════════════════════════════════════════ */

.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, var(--soil-840), var(--soil-900));
    border: 1px solid rgba(215, 162, 75, 0.35);
    color: var(--amber-300);
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════
   HAMBURGER → X ANIMATION
   ═══════════════════════════════════════════════ */

.nav-toggle-btn span {
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.nav-toggle:checked~.site-header .nav-toggle-btn span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle:checked~.site-header .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle:checked~.site-header .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════
   ENHANCED TABLE ROW HOVER
   ═══════════════════════════════════════════════ */

.doctrine-table tbody tr {
    transition: background 0.25s ease;
}

.doctrine-table tbody tr:hover {
    background: rgba(215, 162, 75, 0.08);
}

/* ═══════════════════════════════════════════════
   LIST ITEM HOVER EFFECT
   ═══════════════════════════════════════════════ */

.list-clean li {
    transition: transform 0.2s ease, color 0.2s ease;
    padding-left: 0;
}

.list-clean li:hover {
    transform: translateX(4px);
    color: var(--amber-300);
}

/* ═══════════════════════════════════════════════
   LINK UNDERLINE ANIMATION
   ═══════════════════════════════════════════════ */

a:not(.btn):not(.brand-link):not(.desktop-nav a):not(.drawer-nav a):not(.site-footer a) {
    position: relative;
}

.card a:not(.btn) {
    transition: color 0.25s ease;
}

.card a:not(.btn)::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--amber-300);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.card a:not(.btn):hover::after {
    width: 100%;
}

/* ═══════════════════════════════════════════════
   ORACLE DRAMATIC REVEAL
   ═══════════════════════════════════════════════ */

@keyframes oracleFlash {
    0% {
        box-shadow: 0 0 0 rgba(215, 162, 75, 0);
        border-color: rgba(242, 227, 203, 0.14);
    }

    30% {
        box-shadow:
            0 0 30px rgba(215, 162, 75, 0.25),
            inset 0 0 20px rgba(215, 162, 75, 0.05);
        border-color: rgba(215, 162, 75, 0.5);
    }

    100% {
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
        border-color: rgba(242, 227, 203, 0.14);
    }
}

.oracle-flash {
    animation: oracleFlash 1s ease both;
}

@keyframes oraclePanelReveal {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }

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

.oracle-panel-animate {
    animation: oraclePanelReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ═══════════════════════════════════════════════
   CONFESSION CARD STAGGER
   ═══════════════════════════════════════════════ */

.feed-list .card {
    animation: feedItemIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes feedItemIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.feed-list .card:nth-child(1) {
    animation-delay: 0s;
}

.feed-list .card:nth-child(2) {
    animation-delay: 0.08s;
}

.feed-list .card:nth-child(3) {
    animation-delay: 0.16s;
}

.feed-list .card:nth-child(4) {
    animation-delay: 0.24s;
}

.feed-list .card:nth-child(5) {
    animation-delay: 0.32s;
}

.feed-list .card:nth-child(6) {
    animation-delay: 0.4s;
}

/* ═══════════════════════════════════════════════
   ENHANCED FORM INPUTS
   ═══════════════════════════════════════════════ */

.form-group label {
    transition: color 0.25s ease;
}

.form-group:focus-within label {
    color: var(--amber-300);
}

.form-control:focus,
textarea:focus,
select:focus,
input:focus {
    background: rgba(17, 13, 9, 0.72);
}

/* ═══════════════════════════════════════════════
   FOOTER DECORATIVE TOP BORDER
   ═══════════════════════════════════════════════ */

.site-footer {
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(215, 162, 75, 0.4), var(--amber-400), rgba(215, 162, 75, 0.4), transparent);
}

/* ═══════════════════════════════════════════════
   STAGGER UTILITY
   ═══════════════════════════════════════════════ */

.stagger-1 {
    --reveal-delay: 0s;
}

.stagger-2 {
    --reveal-delay: 0.08s;
}

.stagger-3 {
    --reveal-delay: 0.16s;
}

.stagger-4 {
    --reveal-delay: 0.24s;
}

.stagger-5 {
    --reveal-delay: 0.32s;
}

.stagger-6 {
    --reveal-delay: 0.4s;
}

/* ═══════════════════════════════════════════════
   HEADER SCROLL STATE
   ═══════════════════════════════════════════════ */

.site-header.scrolled {
    background: rgba(17, 13, 9, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════
   ACTIVE NAV PILL GLOW
   ═══════════════════════════════════════════════ */

.desktop-nav a.active {
    box-shadow: 0 0 10px rgba(226, 188, 113, 0.3);
}

/* ═══════════════════════════════════════════════
   SCRIPTURE DRAWN CARD ENTRANCE
   ═══════════════════════════════════════════════ */

.scripture-drawn-card {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ═══════════════════════════════════════════════
   EMPTY STATE STYLING
   ═══════════════════════════════════════════════ */

.notice {
    position: relative;
    overflow: hidden;
}

.notice::before {
    content: "";
    position: absolute;
    top: 0;
    left: -200%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(242, 227, 203, 0.04), transparent);
    animation: shimmer 8s ease infinite;
}

/* ═══════════════════════════════════════════════
   FOCUS VISIBLE FOR ACCESSIBILITY
   ═══════════════════════════════════════════════ */

:focus-visible {
    outline: 2px solid var(--amber-300);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════
   IMAGE / ICON HOVER FLOAT
   ═══════════════════════════════════════════════ */

.hover-float {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-float:hover {
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION OVERRIDE
   ═══════════════════════════════════════════════ */

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

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

    .reveal,
    .reveal-scale,
    .reveal-left,
    .reveal-right,
    .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .scroll-progress {
        display: none;
    }

    html {
        scroll-behavior: auto;
    }
}
