/* k1e.css - Kie Brooks author site */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --ink:      #1c2128;
    --muted:    #6e7a8a;
    --light:    #f8f9fb;
    --surface:  #eef1f5;
    --bar:      #1c2128;
    --accent:   #3a7bd5;
    --accent2:  #2563b0;
    --border:   #d5dce6;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    color: var(--ink);
    background-color: var(--light);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

#wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header / Nav ── */
div.menu {
    background-color: var(--bar);
    color: #fff;
    text-align: center;
    padding: 15px 24px;
    letter-spacing: 0.14em;
    font-size: 0.73rem;
    font-weight: 500;
    text-transform: uppercase;
}

div.menu a:link,
div.menu a:visited {
    color: #8a9ab0;
    text-decoration: none;
    margin: 0 16px;
    transition: color 0.2s;
}

div.menu a:hover,
div.menu a:active {
    color: #fff;
}

/* ── Main content ── */
#main {
    padding: 48px 0 72px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    margin: 0 0 36px;
    letter-spacing: 0.02em;
}

h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

h4 {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--muted);
    border-left: 2px solid var(--accent);
    padding-left: 14px;
    margin-bottom: 32px;
    line-height: 1.7;
}

h5, h6 {
    font-weight: 500;
    color: var(--ink);
}

p {
    color: var(--ink);
    font-weight: 300;
    margin-bottom: 1.2em;
}

ul li {
    margin-bottom: 0.5em;
    color: var(--ink);
    font-weight: 300;
}

a:link, a:visited  { color: var(--accent); text-decoration: none; }
a:hover, a:active  { color: var(--accent2); text-decoration: underline; }

/* ── Book grid ── */
.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 36px 20px;
    margin: 36px 0;
}

@media (max-width: 860px) {
    .book-grid { grid-template-columns: repeat(3, 1fr); }
}

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

.book-item img {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: block;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(28,33,40,0.10);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-item img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(28,33,40,0.15);
}

.book-item a {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.book-title {
    display: block;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
}

.buy-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background-color: var(--accent);
    color: #fff !important;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.buy-btn:hover {
    background-color: var(--accent2);
}

.book-format {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 3px;
}

.book-item .coming-soon {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
}

/* ── Sidebar (about page) ── */
#sidebar {
    float: right;
    margin: 0 0 20px 32px;
    text-align: center;
}

#sidebar img {
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(28,33,40,0.10);
    display: block;
}

/* ── Footer ── */
div.footer {
    background-color: var(--bar);
    color: #6e7a8a;
    text-align: right;
    padding: 13px 24px;
    font-size: 0.75rem;
    font-weight: 400;
    clear: both;
}

div.footer a:link,
div.footer a:visited { color: #8a9ab0; }
div.footer a:hover   { color: #fff; }

/* ── Utilities ── */
.clearfix::after { content: ''; display: table; clear: both; }
.centered { display: block; margin-left: auto; margin-right: auto; }

/* ── Responsive ── */
@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .book-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
    #sidebar { float: none; margin: 0 auto 24px; display: block; text-align: center; }
}
