/* ==========================================================================
   entity-page.css
   Shared styles for the standalone entity pages: /books/, /series/,
   /folklore/, /recipes/.

   Follows the same design language as the main site — Georgia serif, blood
   red accent, dark charcoal, uppercase letter-spaced navigation — but as an
   external stylesheet rather than the 97KB inline block in index.html.
   ========================================================================== */

:root {
    --blood-red: #8B0000;
    --dark-charcoal: #1a1a1a;
    --mist-gray: #f5f5f5;
    --shadow-gray: #666;
    --text-light: #888;
    --rule: #e2ddd9;
    --measure: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; }

/* margin: index.html has a global * reset; this stylesheet does not, so it
   is set explicitly. Everything else matches index.html and blog.css. */
body {
    margin: 0;
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--dark-charcoal);
    background: white;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------------------------------------------------- skip link -- */
.skip-nav {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--blood-red);
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    clip: rect(0, 0, 0, 0);
}

.skip-nav:focus {
    top: 0;
    clip: auto;
}

/* --------------------------------------------------------------- header -- */
/* Matches index.html, blog.css and newsletter-landing.css exactly, so the
   entity pages are visually continuous with the rest of the site. */
.hero {
    /* Fallback for older browsers */
    background:
        linear-gradient(
            180deg,
            rgba(26, 26, 26, 0.25) 0%,
            rgba(26, 26, 26, 0.15) 50%,
            rgba(26, 26, 26, 0.35) 100%
        ),
        url('../images/shropshire-hills-dark.png') center/cover no-repeat;

    /* Modern browsers - serves WebP automatically */
    background:
        linear-gradient(
            180deg,
            rgba(26, 26, 26, 0.25) 0%,
            rgba(26, 26, 26, 0.15) 50%,
            rgba(26, 26, 26, 0.35) 100%
        ),
        image-set(
            url('../images/shropshire-hills-dark.webp') type('image/webp'),
            url('../images/shropshire-hills-dark.png') type('image/png')
        ) center/cover no-repeat;

    background-attachment: fixed;
    background-position: center center;
    color: white;
    padding: 120px 0 100px;
    min-height: 500px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero .site-name,
.hero .tagline {
    max-width: none;
}
.hero .site-name {
    margin: 0 0 20px;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    text-shadow:
        3px 3px 12px rgba(0, 0, 0, 1),
        1px 1px 4px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.9);
}
.hero .site-name a { color: #fff; text-decoration: none; }
.hero .site-name a:hover,
.hero .site-name a:focus { color: #e8c9c9; }
.hero .tagline {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #f0f0f0;
    font-style: italic;
    position: relative;
    z-index: 2;
    text-shadow:
        2px 2px 10px rgba(0, 0, 0, 1),
        1px 1px 4px rgba(0, 0, 0, 1),
        0 0 15px rgba(0, 0, 0, 0.9);
}

/* ------------------------------------------------------------------ nav -- */
/* Values copied verbatim from the nav on index.html so these pages are
   indistinguishable from the homepage: white sticky bar, uppercase
   letter-spaced links, blood-red on hover. */
nav[role="navigation"] {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* the footer's social and link lists are <nav> too - keep them out of this */
footer nav {
    background: transparent;
    padding: 0;
    box-shadow: none;
    position: static;
}

/* margin/padding: index.html gets these from its global * reset; this
   stylesheet has no such reset, so they are set explicitly to match. */
nav[role="navigation"] ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav[role="navigation"] a {
    text-decoration: none;
    color: var(--dark-charcoal);
    font-size: 0.9rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
}

nav[role="navigation"] a:hover,
nav[role="navigation"] a:focus {
    color: var(--blood-red);
}

/* ----------------------------------------------------------- breadcrumb -- */
.breadcrumb { margin: 1.5rem 0 0.5rem; }
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    color: var(--shadow-gray);
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--text-light); }
.breadcrumb a { color: var(--shadow-gray); }
.breadcrumb [aria-current="page"] { color: var(--text-light); }

/* ----------------------------------------------------------------- main -- */
main { padding-bottom: 4rem; }

h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1.2;
    margin: 0.25rem 0 1rem;
}
h2 {
    font-size: clamp(1.3rem, 3.2vw, 1.6rem);
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--blood-red);
}
h3 { font-size: 1.12rem; margin: 1.75rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 1.25rem 0 0.4rem; color: var(--shadow-gray); }

p, li { max-width: var(--measure); }
a { color: var(--blood-red); }

.eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blood-red);
    font-weight: bold;
}
.lead { font-size: 1.15rem; color: #333; }

img { max-width: 100%; height: auto; }

/* ------------------------------------------------------------ book page -- */
.book-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
.book-cover-col img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
.book-blurb p { margin-top: 0; }

.format-group { margin-bottom: 1.25rem; }
.format-group h3 {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--shadow-gray);
}
.buy-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--dark-charcoal);
    border-radius: 4px;
    background: #fff;
    color: var(--dark-charcoal);
    text-decoration: none;
    font-size: 0.9rem;
    min-height: 44px;
    line-height: 1.6;
}
.btn:hover, .btn:focus { background: var(--dark-charcoal); color: #fff; }
.btn-direct {
    background: var(--blood-red);
    border-color: var(--blood-red);
    color: #fff;
}
.btn-direct:hover, .btn-direct:focus { background: #6d0000; border-color: #6d0000; }

/* ------------------------------------------------------- definition list -- */
.facts { margin: 0.5rem 0 0; }
.facts > div {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
}
.facts dt {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--shadow-gray);
}
.facts dd { margin: 0; }

/* ---------------------------------------------------------- series page -- */
.series-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.series-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    max-width: none;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}
.series-item img {
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.series-item h3 { margin: 0.2rem 0 0.3rem; font-size: 1.25rem; }
.series-item h3 a { text-decoration: none; }
.series-item h3 a:hover { text-decoration: underline; }
.series-item .pubdate { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--shadow-gray); }
.series-item .more { font-size: 0.9rem; }

/* -------------------------------------------------- series prev / next --- */
.series-seq {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}
.seq {
    font-size: 0.92rem;
    text-decoration: none;
    max-width: 46%;
}
.seq:hover { text-decoration: underline; }
.seq.next { margin-left: auto; text-align: right; }

.back-link { margin-top: 2rem; font-size: 0.95rem; }

/* ------------------------------------------- folklore / recipe articles -- */
.explore-article { max-width: var(--measure); }
.explore-article img {
    display: block;
    width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 6px;
}
.explore-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.explore-article th,
.explore-article td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}
.explore-article th { background: var(--mist-gray); }

.recipe-equipment,
.recipe-ingredients { padding-left: 1.25rem; }
.recipe-ingredients .recipe-amount {
    display: inline-block;
    min-width: 7em;
    font-weight: bold;
}
.recipe-method { padding-left: 1.25rem; }
.recipe-method li { margin-bottom: 0.6rem; }

/* --------------------------------------------------------------- footer -- */
/* Verbatim from blog.css. The footer markup is identical on every page, so
   it must render identically; these pages previously stacked the footer
   links vertically and used a flex row instead of the 1fr 1fr grid. */
footer[role='contentinfo'] {
    background: #0a0a0a;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: normal;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    width: 44px;
    height: 44px;
    background: var(--shadow-gray);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-links a svg {
    width: 20px;
    height: 20px;
}

.social-links a:hover,
.social-links a:focus {
    background: var(--blood-red);
    transform: translateY(-2px);
}

/* Per-platform brand colours, matching index.html, blog.css and
   newsletter-landing.css. Selectors match on href, so they apply to
   whatever links the shared footer carries. */
.social-links a[href*='facebook'] {
    background: #1877f2;
}

.social-links a[href*='x.com'] {
    background: #000000;
}

.social-links a[href*='instagram'] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-links a[href*='tiktok'] {
    background: #000000;
}

.social-links a[href*='youtube'] {
    background: #ff0000;
}

.social-links a[href*='substack'] {
    background: #ff6719;
}

.social-links a[href*='goodreads'] {
    background: #553b08;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.footer-links a,
.footer-links .footer-link-button {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    padding: 8px 12px;
    display: inline-block;
    min-height: 44px;
    line-height: 28px;
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.footer-links a:hover,
.footer-links .footer-link-button:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

.copyright p {
    max-width: none;
}

/* ----------------------------------------------------------- responsive -- */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
    }

    nav[role="navigation"] {
        padding: 15px 0;
    }

    nav[role="navigation"] ul {
        gap: 8px;
    }

    nav[role="navigation"] a {
        font-size: 0.75rem;
        padding: 6px 8px;
        letter-spacing: 0.5px;
    }

    .hero {
        min-height: 450px;
        padding: 100px 0 90px;
    }

    .hero .site-name { font-size: 2.5rem; }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 280px;
        padding: 60px 0 40px;
    }

    .hero .site-name {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero .tagline { font-size: 1rem; }
}

@media (max-width: 780px) {
    .book-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .book-cover-col { max-width: 220px; }
    .facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
    .series-item { grid-template-columns: 90px 1fr; gap: 1rem; }
    .seq, .seq.next { max-width: 100%; text-align: left; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------- blog archive page -- */
/* /blog/ — the index of the static post copies. blog.html itself shows only
   the live Supascribe feed and links here; this page is what keeps every
   /blog/<slug>/ page internally linked rather than orphaned. */

.blog-post-list {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.blog-post-item {
    max-width: none;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}

.blog-post-item:first-child {
    padding-top: 0;
}

/* h2 here would otherwise pick up the section-heading rule with its
   blood-red underline, which is too heavy for a list of titles */
.blog-post-item h2 {
    margin: 0 0 0.25rem;
    padding: 0;
    border: 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.blog-post-item h2 a {
    color: var(--dark-charcoal);
    text-decoration: none;
}

.blog-post-item h2 a:hover,
.blog-post-item h2 a:focus {
    color: var(--blood-red);
    text-decoration: underline;
}

.blog-post-item .pubdate,
.explore-article .pubdate {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--shadow-gray);
}

.blog-post-item p {
    margin: 0;
    color: #444;
}
