
/* ==============================
   Brand colors
   ============================== */

:root {
    color-scheme: only light;
    --brand-beige: #fff8f0;
    --brand-gold: #d99aae;
    --brand-brown: #514653;
    --brand-black: #000000;
    --brand-white: #ffffff;
    --brand-shadow: rgba(20, 14, 22, 0.65);
    --brand-gold-glow: rgba(217, 154, 174, 0.30);
}


/* ==============================
   General styles
   ============================== */

body,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Raleway", sans-serif;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    line-height: 1.8;
}

.w3-bar .w3-button {
    padding: 16px;
}


/* ==============================
   Header
   ============================== */

.site-header {
    background-color: var(--brand-beige);
    padding: 20px 0 0;
    text-align: center;
    overflow: visible;
}


/* Logo */

.site-header .site-logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    line-height: 0;
    float: none;
}

.site-header .brand-logo {
    display: block;
    width: auto;
    height: 82px;
    max-width: 90%;
    margin: 10px auto 0;
    object-fit: contain;
}


/* Header decoration */

.site-header .header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    margin: 0 auto 18px;
    padding: 0;
    color: var(--brand-gold);
    font-size: 15px;
    line-height: 1.5;
    float: none;
    clear: both;
}

.site-header .header-decoration::before,
.site-header .header-decoration::after {
    content: "";
    display: block;
    width: 65px;
    height: 1.5px;
    flex: 0 1 65px;
    background-color: currentColor;
}


/* ==============================
   Navigation
   ============================== */

.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
    margin: 0 auto 24px;
    padding: 0;
    float: none;
}

.site-nav a.w3-button,
.site-nav a.w3-button:focus,
.site-nav a.w3-button:active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    background: transparent !important;
    color: var(--brand-black) !important;
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 4px 6px !important;
    margin: 0 !important;
    line-height: 1.5;
    text-transform: none;
    text-decoration: none;
    border: none;
    box-shadow: none;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
}

.site-nav a.w3-button:hover {
    color: var(--brand-brown) !important;
    background: transparent !important;
}

.site-nav a.w3-button i,
.site-nav a.w3-button:hover i,
.site-nav a.w3-button:focus i,
.site-nav a.w3-button:active i {
    display: inline-block !important;
    color: var(--brand-gold) !important;
    font-size: 15px;
    font-weight: 900;
    width: 15px;
    min-width: 15px;
    text-align: center;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.5;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
}


/* Header divider */

.site-divider {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-top: 2px solid var(--brand-black);
    position: relative;
}


/* ==============================
   Reusable star-and-lines decoration
   ============================== */

.star-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px auto 32px;
    color: var(--brand-gold);
}

.star-decoration::before,
.star-decoration::after {
    content: "";
    display: block;
    width: 45px;
    height: 1px;
    flex: 0 1 45px;
    background-color: currentColor;
}

.star-decoration--beige {
    color: var(--brand-beige);
}

.star-decoration--gold {
    color: var(--brand-gold);
}

.star-decoration--brown {
    color: var(--brand-brown);
}


/* ==============================
   Books section
   ============================== */

.books-section {
    background-color: var(--brand-brown);
    color: var(--brand-white);
    padding: 40px 24px 50px;
    box-sizing: border-box;
}

.books-heading {
    margin: 0 0 12px;
    color: var(--brand-beige);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.books-decoration {
    margin-bottom: 28px;
}


/* Book grid */

.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: stretch;
}


/* Book card */

.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--brand-beige);
    color: var(--brand-black);
    border: 2px solid var(--brand-black);
    box-sizing: border-box;
}


/* Book cover */

.book-image {
    flex: none;
    width: 100%;
    max-width: 170px;
}

.book-image a {
    display: block;
    line-height: 0;
}

.book-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--brand-gold);
    box-shadow: 0 5px 16px var(--brand-shadow);
    transition: transform 0.3s ease;
}

.book-image img:hover {
    transform: scale(1.03);
}


/* Book information */

.book-info {
    width: 100%;
    min-width: 0;
    text-align: center;
}

.book-info h3 {
    margin: 0 0 8px;
    color: var(--brand-black);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.book-subtitle {
    color: var(--brand-brown);
    font-style: italic;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
}

.book-info p {
    font-size: 14px;
    line-height: 1.7;
}


/* More about the book link */

.book-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 8px;
    padding: 7px 10px;
    border: 1px solid var(--brand-brown);
    color: var(--brand-brown);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.book-more-link:hover {
    background-color: var(--brand-gold);
    color: var(--brand-white);
}

.book-more-link i {
    color: var(--brand-gold);
}

.book-more-link:hover i {
    color: var(--brand-white);
}


/* ==============================
   About the author
   ============================== */

.about-section {
    background-color: var(--brand-beige);
    color: var(--brand-black);
    padding: 60px 24px;
    box-sizing: border-box;
    border-top: 2px solid var(--brand-black);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}


/* Author image */

.about-image {
    flex: 0 0 38%;
    max-width: 340px;
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid var(--brand-gold);
    box-shadow: 0 8px 24px var(--brand-shadow);
}


/* Author biography */

.about-text {
    flex: 1;
    min-width: 0;
}

.about-text h2 {
    margin: 0 0 12px;
    color: var(--brand-black);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.about-text p {
    color: var(--brand-black);
    font-size: 16px;
    line-height: 1.9;
    margin: 0 0 18px;
}


/* ==============================
   Old projects
   ============================== */

.archived-section {
    background-color: var(--brand-brown);
    color: var(--brand-white);
    border-top: 2px solid var(--brand-black);
    margin-top: 0;
}

.archived-section a,
.archived-section a:visited {
    color: var(--brand-beige);
    text-decoration: none;
}

.archived-section a:hover {
    color: var(--brand-gold);
}


/* Old projects gallery page */

.old-projects-page {
    background-color: var(--brand-brown);
    color: var(--brand-beige);
    padding-bottom: 64px;
}

.old-projects-page > .w3-row {
    margin-bottom: 0 !important;
}

.old-projects-page .book-title {
    color: var(--brand-beige);
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    text-align: center;
}


/* ==============================
   Contact / Newsletter
   ============================== */

.contact-section {
    background-color: var(--brand-beige);
    border-top: 2px solid var(--brand-black);
    color: var(--brand-black);
    padding: 40px 16px;
    text-align: center;
    box-sizing: border-box;
}

.contact-section h2 {
    margin: 0 0 16px;
    color: var(--brand-black);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.5;
}

.newsletter-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Newsletter reCAPTCHA notice */

.newsletter-form p {
    color: var(--brand-gold);
    font-size: 10px;
    line-height: 1.5;
}

.newsletter-form p a {
    color: var(--brand-gold);
}


/* ==============================
   Footer and social icons
   ============================== */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;

    background-color: var(--brand-black) !important;
    color: var(--brand-beige) !important;
}

footer p {
    width: 100%;
    color: var(--brand-beige);
    text-align: center;
}

footer .footer-social-links {
    display: flex !important;
    flex-direction: row;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 15px !important;
    margin: 0 auto;
    padding: 18px 0 0;
    box-sizing: border-box;
}

footer .footer-social-links a {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--brand-beige);
    text-decoration: none !important;
    border: none !important;
}

footer .footer-social-links a:hover {
    color: var(--brand-gold);
}

footer .footer-social-links a i {
    display: block;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer > a[href*="policy"] {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    color: var(--brand-gold);
    text-align: center;
}

/* Mobile footer */

@media (max-width: 600px) {
    footer .footer-social-links {
        gap: 20px !important;
    }
}



/* ==============================
   Book detail page
   ============================== */

.book-detail-section {
    padding: 50px 24px 60px;
    background-color: var(--brand-brown);
    color: var(--brand-beige);
    box-sizing: border-box;
}

.book-detail-content {
    display: flex;
    align-items: flex-start;
    gap: 55px;
    max-width: 1100px;
    margin: 0 auto;
}

.book-detail-image {
    flex: 0 0 36%;
    max-width: 360px;
    margin: 0 auto;
}

.book-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.book-detail-text {
    flex: 1;
    min-width: 0;
}

.book-detail-text h1 {
    margin: 0;
    color: var(--brand-beige);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}


/* Series information */

.book-series {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
    color: var(--brand-beige);
    text-align: center;
}

.series-title,
.series-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    line-height: 1;
}

.series-title {
    margin-bottom: 0;
}

.series-icon,
.series-number i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    width: 16px;
    color: var(--brand-beige);
    text-align: center;
    line-height: 1;
}

.series-icon {
    font-size: 14px;
    opacity: 0.85;
}

.series-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.2;
}


/* Book number and numeral alignment */

.series-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    opacity: 0.8;
}

.series-number i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    width: 16px;
    font-size: 13px;
    line-height: 1;
    letter-spacing: normal;
}

.series-number span {
    display: inline-flex;
    align-items: center;
    position: static;
    top: auto;
    transform: none;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 3px;
}


/* Book detail decoration */

.book-detail-decoration {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--brand-beige);
}

.book-detail-decoration::before,
.book-detail-decoration::after {
    content: "";
    display: block;
    width: 65px;
    height: 1px;
    background: currentColor;
    opacity: 0.65;
}

.book-detail-decoration span {
    font-size: 20px;
    line-height: 1;
}


/* Release status and description */

.book-status {
    margin-top: 28px;
    color: var(--brand-beige);
    font-size: 15px;
    font-style: italic;
    opacity: 0.85;
    text-align: center;
}

.book-description {
    color: var(--brand-beige);
    font-size: 16px;
    line-height: 1.9;
}


/* ==============================
   Privacy Policy page
   ============================== */

.policy-page {
    --policy-text: var(--brand-beige);

    background-color: var(--brand-brown);
    color: var(--policy-text);
    padding: 32px 24px 80px;
    box-sizing: border-box;
}

.policy-content {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    color: var(--policy-text);
}


/* Policy main heading */

.policy-header {
    text-align: center;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: none;
}

.policy-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--brand-beige);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
}

.policy-header h1 {
    color: var(--brand-beige);
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
}

.policy-intro {
    display: block;
    width: 100%;
    text-align: center !important;
    margin: 0 auto 24px !important;
    color: var(--brand-beige);
    line-height: 1.7;
}

.policy-updated {
    color: var(--brand-beige);
    opacity: 0.75;
    font-size: 12px;
    letter-spacing: 1px;
    margin: 16px 0 0;
}


/* Adult content warning */

.policy-warning {
    padding: 28px 32px;
    margin-bottom: 56px;
    border: 1px solid var(--brand-gold);
    border-left: 3px solid var(--brand-gold);
    background-color: rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.policy-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border: 1px solid var(--brand-gold);
    border-radius: 50%;
    color: var(--brand-beige);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.policy-warning h2 {
    color: var(--brand-beige);
    font-size: 23px;
    font-weight: 600;
    margin: 0 0 18px;
}


/* Policy sections */

.policy-section {
    position: relative;
    margin: 0 0 48px;
    padding-bottom: 38px;
    border-bottom: 1px solid rgba(217, 154, 174, 0.45);
}

.policy-number {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.policy-section h2 {
    color: var(--brand-beige);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 22px;
}

.policy-section h3 {
    color: var(--brand-beige);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin: 30px 0 10px;
}

.policy-page p,
.policy-page li {
    color: var(--policy-text);
    font-size: 15px;
    line-height: 1.95;
}

.policy-page p {
    margin: 0 0 16px;
}

.policy-page ul {
    padding-left: 24px;
    margin: 12px 0 20px;
}

.policy-page li {
    padding-left: 5px;
    margin-bottom: 8px;
}

.policy-page li::marker {
    color: var(--brand-gold);
}


/* Policy links */

.policy-page a:not(.policy-contact-link) {
    color: var(--brand-beige);
    text-decoration-color: var(--brand-gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
}

.policy-page a:not(.policy-contact-link):hover {
    opacity: 0.75;
}


/* Copyright highlight */

.policy-highlight {
    margin: 26px 0;
    padding: 24px 26px;
    border: 1px solid var(--brand-gold);
    background-color: rgba(0, 0, 0, 0.12);
}

.policy-highlight h3 {
    margin-top: 0;
}

.policy-highlight p {
    margin-bottom: 0;
}


/* Policy contact */

.policy-contact {
    border-bottom: none;
    margin-bottom: 10px;
}

.policy-contact-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--brand-gold);
    color: var(--brand-beige);
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 0.2s ease;
}

.policy-contact-link i {
    color: var(--brand-gold);
}

.policy-contact-link:hover {
    background-color: rgba(217, 154, 174, 0.12);
}


/* ==============================
   Mobile layout
   ============================== */

@media (max-width: 600px) {

    /* Header */

    .site-header {
        padding: 12px 10px 0;
    }

    .site-header .site-logo-link {
        margin: 0 0 14px;
    }

    .site-header .brand-logo {
        height: 65px;
        max-width: 95%;
        margin: 6px auto 0;
    }

    .site-header .header-decoration {
        gap: 10px;
        font-size: 12px;
        margin-bottom: 14px;
    }

    .site-header .header-decoration::before,
    .site-header .header-decoration::after {
        width: 45px;
        flex-basis: 45px;
    }


    /* Navigation */

    .site-nav {
        gap: 2px;
        margin-bottom: 18px;
    }


    /* Books */

    .books-section {
        padding: 30px 16px 36px;
    }

    .books-heading {
        font-size: 26px;
    }

    .books-decoration {
        margin-bottom: 22px;
    }

    .books-list {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 360px;
    }

    .book-item {
        padding: 16px;
        gap: 16px;
    }

    .book-image {
        max-width: 170px;
    }

    .book-info h3 {
        font-size: 20px;
    }

    .book-info p {
        font-size: 14px;
    }


    /* About */

    .about-section {
        padding: 36px 20px;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }

    .about-image {
        flex: none;
        width: 100%;
        max-width: 280px;
    }

    .about-text h2 {
        font-size: 26px;
        text-align: center;
    }

    .about-text p {
        font-size: 15px;
    }


    /* Reusable decoration */

    .star-decoration {
        gap: 10px;
    }

    .star-decoration::before,
    .star-decoration::after {
        width: 45px;
        flex-basis: 45px;
    }


    /* Contact */

    .contact-section {
        padding: 30px 12px;
    }

    .contact-section h2 {
        font-size: 20px;
    }


    /* Footer */

    footer .footer-social-links {
        gap: 20px !important;
    }


    /* Privacy Policy */

    .policy-page {
        padding: 38px 18px 48px;
    }

    .policy-header {
        margin-bottom: 34px;
        padding-bottom: 26px;
    }

    .policy-eyebrow {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .policy-intro {
        font-size: 14px;
    }

    .policy-warning {
        padding: 22px 18px;
        margin-bottom: 40px;
    }

    .policy-warning h2 {
        font-size: 21px;
    }

    .policy-section {
        margin-bottom: 36px;
        padding-bottom: 28px;
    }

    .policy-section h2 {
        font-size: 24px;
    }

    .policy-section h3 {
        font-size: 17px;
        margin-top: 24px;
    }

    .policy-page p,
    .policy-page li {
        font-size: 14px;
        line-height: 1.9;
    }

    .policy-highlight {
        padding: 20px 18px;
    }

    .policy-contact-link {
        font-size: 13px;
    }
}


/* ==============================
   Book detail mobile layout
   ============================== */

@media (max-width: 700px) {

    .book-detail-section {
        padding: 30px 20px 40px;
    }

    .book-detail-content {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .book-detail-image {
        flex: none;
        width: 70%;
        max-width: 280px;
    }

    .book-detail-text {
        width: 100%;
    }

    .book-detail-text h1 {
        font-size: 29px;
        text-align: center;
    }

    .series-text {
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .book-detail-decoration {
        justify-content: center;
        margin: 18px 0;
    }

    .book-description {
        font-size: 15px;
    }
}
