/*
   Eddie Bones Website Stylesheet

   Theme:
   - desert noir
   - motorcycle garage
   - casino shadow
   - warm rust / bone / black palette
   */

/* ==================================================
   01. Theme tokens
   ================================================== */

:root {
    --bg: #0d0d0d;
    --bg-soft: #171717;
    --panel: #202020;
    --panel-light: #282828;
    --text: #f2eadf;
    --muted: #b8aa99;
    --line: #38322d;
    --rust: #c45b2d;
    --rust-dark: #8d3c20;
    --bone: #e8dcc8;
    --danger: #ff6b6b;
    --success: #8df0aa;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

/* ==================================================
   02. Base elements and typography
   ================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

a:hover {
    color: var(--rust);
}

/* ==================================================
   03. Shared containers and navigation
   ================================================== */

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 13, 13, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--rust);
    color: #111;
    border-radius: 50%;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: var(--bone);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 12px;
}

/* ==================================================
   04. Heroes and primary actions
   ================================================== */

.hero {
    padding: 96px 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(196, 91, 45, 0.22), transparent 32%),
        linear-gradient(135deg, #0d0d0d 0%, #1b120f 55%, #0d0d0d 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.eyebrow {
    color: var(--rust);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.8px;
    font-size: 0.8rem;
}

h1,
h2,
h3,
h4 {
    line-height: 1.12;
    margin-top: 0;
}

h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-text {
    max-width: 640px;
    font-size: 1.25rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    border: 1px solid var(--line);
    cursor: pointer;
    background: transparent;
    color: var(--bone);
    text-decoration: none;
}

.btn.primary {
    background: var(--rust);
    color: #111;
    border-color: var(--rust);
}

.btn.primary:hover {
    background: var(--bone);
    color: #111;
}

.btn.ghost {
    background: transparent;
    color: var(--bone);
}

/* ==================================================
   05. Shared panels and content grids
   ================================================== */

.hero-card,
.feature-box,
.card,
.post-card,
.form-card,
.admin-panel,
.stat-card,
.message-card,
.lore-side {
    background: linear-gradient(180deg, var(--panel), #171717);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.stat-list {
    padding-left: 0;
    list-style: none;
}

.stat-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.stat-list li:last-child {
    border-bottom: 0;
}

.section {
    padding: 72px 0;
}

.section.dark {
    background: #121212;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.section-heading {
    margin-bottom: 28px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card p,
.post-body,
.lore-main p {
    color: var(--muted);
}

/* ==================================================
   06. Gallery
   ================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-item {
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #090909;
}

.gallery-item figcaption {
    padding: 14px;
    color: var(--muted);
}

.gallery-item figcaption strong,
.gallery-item figcaption span {
    display: block;
}

/* ==================================================
   07. Page heroes and reading layouts
   ================================================== */

.page-hero {
    padding: 72px 0;
    background:
        linear-gradient(135deg, rgba(196, 91, 45, 0.18), transparent),
        #111;
    border-bottom: 1px solid var(--line);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
}

.lore-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.lore-main {
    font-size: 1.05rem;
}

.post-list {
    display: grid;
    gap: 24px;
}

.post-date {
    color: var(--rust);
    font-weight: 800;
}

.narrow {
    max-width: 760px;
}

/* ==================================================
   08. Forms and feedback
   ================================================== */

.form-card,
.stack-form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--bone);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: #111;
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.alert.success {
    color: var(--success);
    background: rgba(141, 240, 170, 0.08);
}

.alert.error {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.08);
}

.empty-state {
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 28px;
    color: var(--muted);
}

/* ==================================================
   09. Public footer
   ================================================== */

.site-footer {
    background: #090909;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
    color: var(--muted);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 18px;
    color: var(--muted);
}

/* ==================================================
   10. Administration
   ================================================== */


.admin-body {
    background: #101010;
}

.admin-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(440px, 100%);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    background: #090909;
    border-bottom: 1px solid var(--line);
}

.admin-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-main {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card strong {
    display: block;
    font-size: 2.4rem;
    color: var(--rust);
}

.stat-card span {
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 24px;
}

.admin-panel {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label input {
    width: auto;
}

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

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
}

.danger-link {
    color: var(--danger);
}

.admin-image-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.admin-image-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.admin-image-item img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.message-list {
    display: grid;
    gap: 16px;
}

.message-card h3 span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ==================================================
   11. Responsive layouts
   ================================================== */


@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        padding: 18px;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav.open {
        display: flex;
    }

    .hero-grid,
        .split,
        .lore-layout,
        .footer-grid,
        .admin-grid {
        grid-template-columns: 1fr;
    }

    .card-grid,
        .gallery-grid,
        .admin-stats,
        .admin-image-list {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 64px 0;
    }

    .section {
        padding: 52px 0;
    }

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

/* ==================================================
   12. Project support panels
   ================================================== */

.donation-card {
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    width: min(1100px, 100%);
    margin: 40px auto;
    padding: clamp(24px, 5vw, 48px);
    overflow: hidden;
    text-align: center;
    color: #d6c2a2;
    background: #171717;
    border: 1px solid #725037;
    border-top: 3px solid #d78d34;
    border-radius: 12px;
}

.donation-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(
        circle at top,
        rgba(215, 141, 52, .14),
        transparent 65%
        );
    pointer-events: none;
}

.donation-card .eyebrow {
    margin: 0 0 12px;
    color: #d78d34;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .8rem;
}

.donation-card h2 {
    margin: 0 0 18px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
}

.donation-description {
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
}

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

.donation-panel {
    box-sizing: border-box;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 26px 20px;
    background: linear-gradient(145deg, #16120e, #090909);
    border: 1px solid #574534;
    border-radius: 10px;
}

.donation-panel h3 {
    margin: 0 0 12px;
    color: #ead7ba;
    font-size: 1.2rem;
}

.donation-panel p {
    margin: 0 0 22px;
    color: #baab98;
    line-height: 1.6;
}

.donation-card .donation-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding: 12px 16px;
    border: 1px solid #d78d34;
    border-radius: 6px;
    background: #d78d34;
    color: #090909;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease;
}

.donation-card .donation-button:hover {
    background: #edaa57;
}

.donation-card .donation-button:focus-visible {
    outline: 3px solid #ead7ba;
    outline-offset: 4px;
}

.donation-card .donation-note {
    margin: 26px 0 0;
    color: #baab98;
    font-style: italic;
    line-height: 1.6;
}

.donation-card .donation-disclosure {
    margin: 12px 0 0;
    color: #baab98;
    font-size: .85rem;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .donation-options {
        grid-template-columns: 1fr;
    }
}

/* ==================================================
   13. Published books and managed support
   ================================================== */

.support-card {
    padding: 28px;
    border: 1px solid #772818;
    border-radius: 12px;
    background: #171717;
}
.support-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 24px;
}
.book-cover {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: contain;
    margin-bottom: 16px;
}

/* ==================================================
   14. Accessibility and shared safeguards
   ================================================== */

[hidden] {
    display: none !important;
}
:focus-visible {
    outline: 3px solid var(--rust);
    outline-offset: 3px;
}
input[type="checkbox"], input[type="radio"] {
    width: auto;
    padding: 0;
    accent-color: var(--rust);
}
button {
    font: inherit;
}
button:disabled {
    cursor: not-allowed;
    opacity: .55;
}
.muted {
    color: var(--muted);
}
.post-card, .card, .lore-main, .message-card {
    overflow-wrap: anywhere;
    min-width: 0;
}
.site-footer {
    margin-top: auto;
}
body:not(.admin-body) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body:not(.admin-body) > main {
    flex: 1;
}
@media (max-width: 820px) { .brand {
    font-size: .9rem;
    letter-spacing: .5px;
} .nav-wrap {
    gap: 10px;
} .site-nav {
    z-index: 60;
} }

/* ==================================================
   15. Roadmap and reading helpers
   ================================================== */

.book-roadmap {
    margin-top: 24px;
}
.book-roadmap summary {
    cursor: pointer;
    color: var(--bone);
    font-weight: bold;
    padding: 14px 0;
}
.book-roadmap .post-card {
    margin: 20px 0;
}
.image-placeholder {
    padding: 18px;
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}
.lore-main img {
    height: auto;
    margin: 20px 0;
    border-radius: 10px;
}
.chapter-reader h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

/* ==================================================
   16. Homepage section boundaries
   Scoped classes preserve other pages and editors.
   ================================================== */
.home-hero {
    padding: clamp(56px, 8vw, 96px) 0;
}

.home-section {
    padding: clamp(40px, 6vw, 72px) 0;
    border-bottom: 1px solid var(--line);
}

.home-section-alt {
    background: #121212;
}

.home-section h2 {
    margin-bottom: 24px;
}

.home-section > .container > p {
    max-width: 76ch;
}

.home-section .book-roadmap {
    padding: 6px 20px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-soft);
}

.home-section .book-roadmap summary {
    padding: 16px 0;
}

.home-section .book-roadmap ol {
    padding-left: 28px;
    margin-bottom: 0;
}

.home-section .book-roadmap li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.home-section .book-roadmap li:last-child {
    border-bottom: 0;
}

.home-section .post-card > :last-child {
    margin-bottom: 0;
}

.home-support-wrap {
    padding: 40px 16px;
    background: #121212;
    border-bottom: 1px solid var(--line);
}

.home-support-wrap .donation-card {
    margin: 0 auto;
}
