:root {
    --bg: #f7f4eb;
    --surface: #fcfbf7;
    --surface-strong: #f0eadf;
    --text: #14251f;
    /* --muted: #5f6d66; */
    --muted: #9ab457;
    --accent: #5c7b63;
    --accent-strong: #e5e7eb;
    /* --accent-strong: #3f5d4c; */
    --accent-2: #36566b;
    --border: #dfe7df;
    --shadow: 0 50px 50px rgba(20, 37, 31, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    /* background: linear-gradient(135deg, #fbf8f2 0%, var(--bg) 100%); */
    background: #f4f1ea;
    color: var(--text);
    line-height: 1.6;
}

img, svg, video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

section {
    padding: 0px 0;
    scroll-margin-top: 110px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(36, 35, 35);
    /* background: rgba(247, 244, 235, 0.92); */
    backdrop-filter: blur(14px);
    border-bottom: 4px solid #9ab457;
    /* border-bottom: 1px solid rgba(92, 123, 99, 0.12); */
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    position: relative;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: avenir, sans-serif;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #f8f5eb;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand strong {
    display: block;
    font-size: 2rem;
    color: #e5e7eb;
    padding-left: 20px;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.topnav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
    margin-left: auto;
}

.topnav a {
    color: var(--muted);
    font-weight: 600;
}

.topnav a:hover {
    color: var(--accent-strong);
}

.topbar.open .topnav {
    display: flex;
}

.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    align-items: center;
    background-size: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
    gap: 32px;
    align-items: center;
    min-height: calc(100vh - 76px);
}

.hero-image {
    position: relative;
    min-height: 86vh;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* .hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 15%, rgba(247, 244, 235, 0.95) 0%, transparent 28%),
                radial-gradient(circle at 10% 90%, rgba(247, 244, 235, 0.95) 0%, transparent 30%),
                radial-gradient(circle at 85% 35%, rgba(247, 244, 235, 0.9) 0%, transparent 25%);
    filter: blur(28px);
    pointer-events: none;
} */

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    color: var(--text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-author-text {
    color: var(--text);
}

.books-section {
    padding: 48px 0 80px;
}

.books-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 20px;
}

.books-strip-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.book-strip {
    display: grid;
    grid-auto-flow: column;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.book-strip::-webkit-scrollbar {
    height: 8px;
}

.book-thumb {
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    width: 118px;
    height: 328px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-thumb.active {
    border-color: var(--accent-strong);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    transform: scale(1.02);
}

.selected-book-panel {
    display: grid;
    gap: 22px;
}

.selected-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.book-details {
    display: grid;
    gap: 12px;
}

.nav-arrow {
    background: transparent;
    border: 1px solid transparent;
    font-size: 28px;
    color: var(--accent-2);
    cursor: pointer;
    padding: 8px 12px;
}

.nav-phrase {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

/* .book-panel,
.author-card,
.detail-card,
.cta-box,
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
} */

.nav-arrow {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--accent-2);
    cursor: pointer;
    padding: 8px 12px;
}

.nav-phrase {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

/* Detail card straight edges */
.detail-card {
    border-radius: 0;
    border: 1px solid var(--border);
    margin-top: 20px;
    padding: 18px;
}

/* Prefer straight edges for feed cards */
/* .content-card, .blog-card {
    border-radius: 0;
    border: 1px solid var(--border);
} */

.eyebrow {
    color: var(--accent);
    font-size: 0.76rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    margin-bottom: 12px;
}

h2 {
    font-size: clamp(1.6rem, 2.3vw, 2rem);
    margin-bottom: 10px;
}

.hero-copy,
.book-copy p,
.author-card p,
.section-head p,
.detail-card p,
.card-body p,
.card-expanded p,
.cta-box p {
    color: var(--muted);
}

.hero-actions,
.cta-actions,
.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 0;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--muted);
    color: #f8f5eb;
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--accent);
    border-color: var(--border);
}

.book-switcher {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.book-switcher button {
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 0;
    padding: 8px 12px;
    color: var(--muted);
    cursor: pointer;
}

.book-switcher button.active {
    background: var(--accent);
    color: #f8f5eb;
    border-color: var(--accent);
}

.book-shell {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 18px;
    align-items: center;
}

.book-cover-wrap {
    padding: 12px;
    border-radius: 0;
    background: linear-gradient(135deg, #edf4ea, #eef3f6);
    border: 1px solid var(--border);
}

.book-cover-wrap img {
    border-radius: 0;
    width: 100%;
    height: auto;
}

.book-badge {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 0;
    background: rgba(92, 123, 99, 0.12);
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.book-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 0;
    background: var(--surface-strong);
    color: var(--muted);
    font-size: 0.9rem;
}

.detail-card {
    margin-top: 20px;
    border-radius: 0;
    padding: 20px;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-head span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-grid h4 {
    margin-bottom: 6px;
    font-size: 1rem;
}

.detail-grid ul {
    padding-left: 18px;
    color: var(--muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mini-links a {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 0;
    background: var(--accent);
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.author-card {
    border-radius: 0;
    overflow: hidden;
}

.author-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--surface-strong);
}

.author-card-body {
    padding: 22px;
}

.author-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.author-links a {
    padding: 8px 10px;
        border-radius: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.feed-section {
    padding-top: 28px;
}

.section-head {
    margin-bottom: 22px;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.content-card {
    min-height: 400px; /* ensure stacked absolute fronts/backs have space */
}

.content-card {
    border-radius: 0;
    overflow: hidden;
    /* border: 1px solid var(--border);
    background: var(--surface); */
    /* box-shadow: var(--shadow); */
    perspective: 1200px;
    position: relative;
}

.card-image {
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--surface);
}

/* Book cards: show full cover, slightly taller and transparent background */
.book-card .card-image {
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    /* background-color: transparent; */
    background-color: #f4f1ea;
}

.image-one {
    background: linear-gradient(135deg, rgba(92, 123, 99, 0.9), rgba(54, 86, 107, 0.78));
}

.image-two {
    background: linear-gradient(135deg, rgba(92, 123, 99, 0.75), rgba(225, 219, 199, 0.85));
}

.image-three {
    background: linear-gradient(135deg, rgba(54, 86, 107, 0.8), rgba(20, 37, 31, 0.85));
}

.card-body {
    padding: 18px 18px 14px;
}

.card-meta {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
}

.expand-btn {
    margin-top: 12px;
    border: none;
    background: var(--muted);
    color: var(--accent-strong);
    cursor: pointer;
    font-weight: 700;
    padding: 0;
}


/* Card slide internals */
.card-inner {
    position: relative;
    width: 100%;
    min-height: 100%;
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.45s ease, opacity 0.35s ease;
}

.card-front {
    z-index: 2;
    transform: translateX(0);
    opacity: 1;
    background: var(--surface-strong);
}

.content-card.is-open .card-front {
    transform: translateX(-110%);
    opacity: 0;
}

.card-back {
    transform: translateX(110%);
    opacity: 0;
    background: var(--surface-strong);
    padding: 18px;
    overflow: auto;
    border-left: 1px solid var(--border);
}

.content-card.is-open .card-back {
    transform: translateX(0);
    opacity: 1;
}

.back-btn,
.expand-btn {
    margin-top: 18px;
    border: 1px solid var(--border);
    padding: 10px 14px;
    background: var(--muted);
    color: white;
    cursor: pointer;
    border-radius: 0;
    font-weight: 700;
}

.back-btn {
    align-self: flex-start;
}

.proof-stars {
    display: inline-flex;
    color: #c59f1f;
    margin-right: 0.5rem;
}

.closing-cta {
    padding-top: 28px;
}

.cta-box {
        border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.site-footer {
    padding: 28px 0 36px;
    border-top: 1px solid rgba(92, 123, 99, 0.12);
    margin-top: 12px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--muted);
    color: var(--accent-strong);
}

.social-links svg {
    /* width: 18px;
    height: 18px; */
    fill: currentColor;
}

ul {
    list-style: none;
    font-style: italic;
    font-size: 0.9rem;
}

li {
    padding-top: 20px;
    padding-bottom: 20px;
}

@media (max-width: 920px) {
    .hero {
        min-height: 62vh;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: auto;
    }

    .hero-image {
        min-height: 46vh;
    }

    .feed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .topbar-inner,
    .footer-inner,
    .cta-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .topnav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        width: 100%;
        gap: 12px;
        padding: 18px 18px 20px;
        background: rgba(247, 244, 235, 0.98);
        border-top: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(20, 37, 31, 0.08);
    }

    .topbar.open .topnav {
        display: flex;
    }

    .menu-toggle {
        display: inline-flex;
        position: absolute;
        top: 18px;
        right: 0;
    }

    .topnav a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .hero {
        min-height: 52vh;
    }

    .hero-image {
        min-height: 46vh;
    }

    .book-shell,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .book-shell,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .cta-actions,
    .book-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .book-panel {
        padding: 20px;
    }

    .author-card-body {
        padding: 18px;
    }

    .topnav {
        gap: 10px;
        flex-wrap: wrap;
    }
}
