/* ══════════════════════════════════════════════
   Carolyn Podruchny — "Red Boat" Theme
   Lavender & Calm Water
   ══════════════════════════════════════════════ */

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

:root {
    --bg:            #FFFDF7;
    --text:          #2D2A32;
    --nav-bg:        #B8A9D4;
    --accent-lilac:  #9B7FC7;
    --accent-orange: #E8945A;
    --accent-rose:   #D4A9C7;
    --link:          #7B62A8;
    --link-hover:    #E8945A;
    --subtle-bg:     #F5F0FA;
    --divider:       #D4A9C7;
    --font-heading:  'Outfit', system-ui, sans-serif;
    --font-body:     'DM Sans', system-ui, sans-serif;
}

html { font-size: 19px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: #2D2A32;
    background-image: url('/images/bg-boat.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Slight dark overlay for readability */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(30, 28, 35, 0.35);
    z-index: 0;
    pointer-events: none;
}

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.6em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-top: 1.8em; }
.site-content > h2:first-child { margin-top: 0; }
h3 { font-size: 1.4rem; margin-top: 1.4em; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1em; }

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--link-hover); }

ul, ol { margin: 0 0 1em 1.5em; }
li { margin-bottom: 0.3em; }

hr {
    border: none;
    border-top: 2px solid var(--divider);
    margin: 2em 0;
}

blockquote {
    border-left: 4px solid var(--accent-rose);
    padding: 0.8em 1.2em;
    margin: 1.2em 0;
    background: var(--subtle-bg);
    font-style: italic;
}

/* ── Site Title Area (over background image) ── */
.site-title {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 1.5rem 2rem;
}

.site-title h1 {
    font-family: var(--font-heading);
    font-size: 4.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
}

.site-title p {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}
.site-title a:hover { color: rgba(255,255,255,0.85); }

/* Compact title on subpages */
.site-title.compact {
    padding: 2rem 1.5rem 1rem;
}

.site-title.compact h1 {
    font-size: 2rem;
}

.site-title.compact p {
    display: none;
}

/* ── Content Panel ─────────────────────────── */
.site-panel {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto 3rem;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2), 0 2px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ── Nav (inside panel) ────────────────────── */
.site-nav {
    background: #fff;
    border-bottom: 2px solid var(--nav-bg);
    padding: 0 1.5rem;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    display: block;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
    margin: 0.3rem 0;
}

.site-nav a:hover {
    color: var(--accent-lilac);
    background: var(--subtle-bg);
}

.site-nav a.active {
    color: var(--accent-lilac);
    background: var(--subtle-bg);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.5rem;
    height: 0;
}

/* ── Main Content ──────────────────────────── */
.site-content {
    padding: 2.5rem 2.5rem 1.5rem;
}

/* ── Cards / Sections ──────────────────────── */
.card {
    background: var(--subtle-bg);
    border-radius: 8px;
    padding: 1.8rem;
    margin-bottom: 1.8rem;
    border-left: 4px solid var(--accent-rose);
}

.book-card {
    background: var(--subtle-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.book-card img {
    width: 160px;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.book-card .book-info { flex: 1; }
.book-card .book-info h3 { margin-top: 0; }

/* ── Images ────────────────────────────────── */
img { max-width: 100%; height: auto; }

.headshot {
    border-radius: 10px;
    max-width: 340px;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border: 3px solid var(--accent-rose);
}

/* TinyMCE image positioning classes */
.imageRight {
    float: right;
    margin: 0 0 1em 1.5em;
    max-width: 45%;
}

.imageLeft {
    float: left;
    margin: 0 1.5em 1em 0;
    max-width: 45%;
}

/* ── Footer (inside panel) ─────────────────── */
.site-footer {
    background: var(--subtle-bg);
    border-top: 2px solid var(--nav-bg);
    color: var(--text);
    text-align: center;
    padding: 1.5rem;
}

.site-footer p {
    margin: 0.2em 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    html { font-size: 16px; }

    body {
        background-attachment: scroll;
    }

    .site-title {
        padding: 2.5rem 1rem 1.5rem;
    }

    .site-title h1 { font-size: 2.2rem; }
    .site-title.compact { padding: 1.5rem 1rem 0.8rem; }
    .site-title.compact h1 { font-size: 1.6rem; }

    .site-panel {
        margin: 0;
        border-radius: 0;
        min-height: calc(100vh - 160px);
    }

    .nav-header {
        height: 50px;
        display: flex;
    }

    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        padding: 0;
        border-bottom: 2px solid var(--nav-bg);
    }

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

    .site-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .site-nav a {
        padding: 0.8rem 1.5rem;
        border-bottom: none;
        margin-bottom: 0;
    }

    .site-nav a:hover {
        background: var(--subtle-bg);
        border-bottom: none;
    }

    .site-nav a.active {
        border-bottom: none;
        border-left: 3px solid var(--accent-lilac);
        padding-left: calc(1.5rem - 3px);
        background: var(--subtle-bg);
    }

    .site-content {
        padding: 1.5rem 1rem 1rem;
    }

    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-card img { width: 140px; }

    .imageRight, .imageLeft {
        float: none;
        display: block;
        margin: 1em auto;
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.7rem; }
    .site-title h1 { font-size: 1.8rem; }
    .headshot { max-width: 200px; }
}

/* ── Utility ───────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.clearfix::after { content: ''; display: table; clear: both; }
