/* ==========================================================================
   GOLDEN YEARS BLISS — design layer
   Loads after main.css. Restyles the core claude-theme classes to the
   approved Stitch look: cream page bands, mint accents, rounded cards,
   Source Serif 4 display over Atkinson Hyperlegible body.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base typography & page surface
   -------------------------------------------------------------------------- */

body {
    font-family: var(--font-body);
    background-color: var(--gyb-cream-page);
    color: var(--color-text-dark);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.hero-title,
.archive-title,
.category-section-title,
.widget-title,
.related-posts-title,
.comments-title,
.comment-reply-title {
    font-family: var(--font-display);
    color: var(--gyb-ink);
    letter-spacing: -0.01em;
}

.site-main {
    background-color: var(--gyb-cream-page);
}

/* --------------------------------------------------------------------------
   Header — mint band, gold underline on the active item
   -------------------------------------------------------------------------- */

.site-header {
    background-color: var(--gyb-mint);
    border-bottom: 1px solid var(--gyb-mint-deep);
}

.site-logo {
    max-height: 52px;
    width: auto;
}

.site-title a {
    font-family: var(--font-display);
    color: var(--gyb-ink);
}

/* Brand lockup: sunrise mark + live wordmark.
   Wordmark is real text (not the uploaded logo image) so it stays legible on
   the light header and can be scaled here — 1.875rem is main.css's 1.5rem +25%. */
.site-brand-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.site-logo-mark {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
}

.site-brand-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.site-brand-title a {
    color: var(--gyb-ink);
    text-decoration: none;
}

.site-brand-title a:hover {
    color: var(--gyb-gold-deep);
}

@media (max-width: 600px) {
    .site-brand-title {
        font-size: 1.4rem;
    }

    .site-logo-mark {
        width: 38px;
        height: 38px;
    }
}

.primary-menu a {
    font-weight: 700;
    color: var(--color-text-dark);
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    color: var(--gyb-gold-deep);
}

/* The mock underlines the active section rather than filling it. */
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current_page_item > a {
    box-shadow: inset 0 -3px 0 var(--gyb-gold);
}

/* --------------------------------------------------------------------------
   Shared pieces: chips, cards, buttons, section bands
   -------------------------------------------------------------------------- */

.gyb-chip {
    display: inline-block;
    padding: 0.3em 0.9em;
    border-radius: 999px;
    background-color: var(--gyb-mint-deep);
    color: var(--color-text-medium);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.4;
}

.gyb-chip:hover {
    background-color: var(--gyb-gold-soft);
    color: var(--gyb-ink);
}

/* Card surfaces — every post card in the design shares this treatment. */
.home-grid-item,
.category-grid-item,
.category-grid-item-small,
.category-hero-post,
.archive-post-item,
.search-result-item,
.related-post-item {
    background-color: var(--gyb-cream-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--gyb-radius-card);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-grid-item:hover,
.category-grid-item:hover,
.category-grid-item-small:hover,
.category-hero-post:hover,
.archive-post-item:hover,
.search-result-item:hover,
.related-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(93, 78, 55, 0.12);
}

/* Thumbnails sit flush to the card's top edge. */
.home-grid-thumbnail img,
.category-grid-thumbnail img,
.category-grid-thumbnail-small img,
.category-hero-thumbnail img,
.archive-post-thumbnail img,
.related-post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* Card inner padding — main.css leaves these flush against the border. */
.home-grid-content,
.category-grid-content,
.category-grid-content-small,
.category-hero-content,
.archive-post-content,
.related-post-content {
    padding: 1.25rem 1.4rem 1.5rem;
}

/* "Read More" style links */
.home-grid-link,
.category-grid-link,
.category-hero-link,
.archive-post-link,
.category-view-all {
    color: var(--gyb-gold-deep);
    font-weight: 700;
    text-decoration: none;
}

.home-grid-link:hover,
.category-grid-link:hover,
.category-hero-link:hover,
.archive-post-link:hover,
.category-view-all:hover {
    text-decoration: underline;
}

/* Section bands alternate cream / mint down the page.
   header.php opens a .site-container around all page content, so a band's
   background would otherwise stop at the content width. These negative
   margins pull the band out to the viewport edge; the inner .site-container
   keeps the content itself aligned. Margins only (no width:100vw) so the
   vertical scrollbar doesn't cause horizontal overflow. */
.gyb-band-mint,
.gyb-band-cream,
.gyb-masthead {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 1rem;
    padding-right: 1rem;
}

.gyb-band-mint {
    background-color: var(--gyb-mint);
}

.gyb-band-cream {
    background-color: var(--gyb-cream-page);
}

.gyb-band-card {
    background-color: var(--gyb-cream-card);
}

.gyb-button {
    display: inline-block;
    padding: 0.85em 1.9em;
    border: none;
    border-radius: var(--gyb-radius-button);
    background-color: var(--gyb-gold);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.gyb-button:hover {
    background-color: var(--gyb-gold-deep);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Homepage — brand hero
   -------------------------------------------------------------------------- */

.gyb-hero {
    background-color: var(--gyb-cream-page);
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.gyb-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.gyb-hero-title {
    font-size: var(--font-size-h1-fluid);
    line-height: 1.15;
    margin-bottom: 1rem;
}

/* The mock sets "Golden Years" in gold inside the headline. */
.gyb-hero-title .gyb-accent {
    color: var(--gyb-gold);
}

.gyb-hero-text p {
    font-size: 1.15rem;
    line-height: var(--line-height-body);
    color: var(--color-text-medium);
    margin-bottom: 1.75rem;
}

.gyb-hero-media {
    position: relative;
}

.gyb-hero-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--gyb-radius-card);
}

/* Floating "Daily Bliss" quote card overlapping the hero image. */
.gyb-hero-quote {
    position: absolute;
    left: -1.5rem;
    bottom: -1.5rem;
    max-width: 17rem;
    padding: 1rem 1.15rem;
    background-color: var(--gyb-cream-card);
    border: 1px solid var(--color-border-light);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(93, 78, 55, 0.14);
}

.gyb-hero-quote-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--gyb-gold-deep);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gyb-hero-quote p {
    margin: 0;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--color-text-medium);
}

@media (max-width: 782px) {
    .gyb-hero-inner {
        grid-template-columns: 1fr;
    }

    /* Stacked, the negative offset would hang off-screen. */
    .gyb-hero-quote {
        position: static;
        max-width: none;
        margin-top: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Homepage — section headers & latest strip
   -------------------------------------------------------------------------- */

.gyb-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.gyb-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gyb-section-title {
    font-size: var(--font-size-h2-fluid);
    margin: 0;
}

/* Section titles wrap a category link — without this they inherit the gold
   link colour and read as a button rather than a heading. */
.gyb-section-title a {
    color: var(--gyb-ink);
    text-decoration: none;
}

.gyb-section-title a:hover {
    color: var(--gyb-gold-deep);
}

.gyb-section-intro {
    max-width: 40rem;
    margin: -1rem auto 2rem;
    text-align: center;
    color: var(--color-text-medium);
}

.gyb-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gyb-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .gyb-grid-3,
    .gyb-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gyb-grid-3,
    .gyb-grid-4 {
        grid-template-columns: 1fr;
    }

    .gyb-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

.gyb-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: var(--color-text-light);
    font-size: 0.88rem;
}

.gyb-card-title {
    font-size: 1.3rem;
    line-height: 1.3;
    margin: 0 0 0.6rem;
}

.gyb-card-title a {
    color: var(--gyb-ink);
    text-decoration: none;
}

.gyb-card-title a:hover {
    color: var(--gyb-gold-deep);
}

.gyb-card-excerpt {
    margin: 0 0 1rem;
    color: var(--color-text-medium);
    font-size: 1rem;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Newsletter band
   -------------------------------------------------------------------------- */

.gyb-newsletter {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.gyb-newsletter-inner {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3rem);
    background-color: var(--gyb-cream-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--gyb-radius-card);
    text-align: center;
}

.gyb-newsletter-title {
    font-size: var(--font-size-h2-fluid);
    margin: 0 0 0.75rem;
}

.gyb-newsletter-inner p {
    max-width: 32rem;
    margin: 0 auto 1.75rem;
    color: var(--color-text-medium);
}

/* main.css stacks .newsletter-form vertically for the sidebar widget; the band
   variant needs an explicit row so the field and button sit side by side. */
.gyb-newsletter .newsletter-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gyb-newsletter .newsletter-form input[type="email"] {
    flex: 1 1 18rem;
    width: auto;
    max-width: 22rem;
    padding: 0.85em 1.1em;
    border: 1px solid var(--color-border);
    border-radius: var(--gyb-radius-button);
    background-color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}

.gyb-newsletter .newsletter-form button {
    flex: 0 0 auto;
    width: auto;
    border-radius: var(--gyb-radius-button);
}

.gyb-newsletter .newsletter-form input[type="email"]:focus {
    outline: 2px solid var(--gyb-gold);
    outline-offset: 1px;
}

.gyb-newsletter-fineprint {
    margin-top: 1rem !important;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Archive — masthead + grid + sidebar
   -------------------------------------------------------------------------- */

.archive-header,
.gyb-masthead {
    background-color: var(--gyb-mint);
    padding: clamp(2rem, 4vw, 3.25rem) 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--gyb-mint-deep);
}

.gyb-masthead-inner {
    max-width: var(--gyb-container);
    margin: 0 auto;
}

.archive-title,
.gyb-masthead-title {
    font-size: var(--font-size-h1-fluid);
    margin: 0 0 0.6rem;
}

.archive-description,
.gyb-masthead-description {
    max-width: 44rem;
    margin: 0;
    color: var(--color-text-medium);
    font-size: 1.1rem;
    line-height: 1.7;
}

.gyb-masthead-count {
    margin-top: 0.9rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Two-column archive: cards + sticky sidebar, per the mock. */
.gyb-archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: clamp(2rem, 4vw, 3rem) 0;
}

@media (max-width: 1024px) {
    .gyb-archive-layout {
        grid-template-columns: 1fr;
    }
}

.gyb-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-content: start;
}

@media (max-width: 600px) {
    .gyb-archive-grid {
        grid-template-columns: 1fr;
    }
}

.gyb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.gyb-card-footer .gyb-arrow {
    color: var(--gyb-gold-deep);
    font-style: normal;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Sidebar widgets
   -------------------------------------------------------------------------- */

.gyb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: start;
    position: sticky;
    top: 1.5rem;
}

.gyb-widget {
    padding: 1.5rem;
    border-radius: var(--gyb-radius-card);
    background-color: var(--gyb-mint);
    border: 1px solid var(--gyb-mint-deep);
}

.gyb-widget-title {
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gyb-mint-deep);
    font-size: 1.25rem;
}

.gyb-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gyb-widget-list a {
    color: var(--gyb-ink);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
}

.gyb-widget-list a:hover {
    color: var(--gyb-gold-deep);
}

.gyb-widget-meta {
    display: block;
    margin-top: 0.2rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Gold newsletter widget — the one filled block in the sidebar. */
.gyb-widget-newsletter {
    background-color: var(--gyb-gold);
    border-color: var(--gyb-gold-deep);
}

.gyb-widget-newsletter .gyb-widget-title,
.gyb-widget-newsletter p,
.gyb-widget-newsletter label {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.gyb-widget-newsletter p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.gyb-widget-newsletter input[type="email"] {
    width: 100%;
    padding: 0.75em 0.9em;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--gyb-radius-button);
    background-color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.gyb-widget-newsletter button {
    width: 100%;
    padding: 0.8em 1em;
    border: none;
    border-radius: var(--gyb-radius-button);
    background-color: var(--gyb-ink);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.gyb-widget-newsletter button:hover {
    background-color: #2a1d13;
}

.gyb-widget-newsletter .gyb-fineprint {
    margin: 0.75rem 0 0;
    font-size: 0.78rem;
    opacity: 0.9;
}

.gyb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Single article
   -------------------------------------------------------------------------- */

.gyb-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(1.75rem, 4vw, 3rem) 0;
}

@media (max-width: 1024px) {
    .gyb-single-layout {
        grid-template-columns: 1fr;
    }
}

.gyb-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.gyb-article-byline {
    color: var(--color-text-medium);
}

.entry-title {
    font-size: var(--font-size-h1-fluid);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.entry-featured-image img {
    border-radius: var(--gyb-radius-card);
}

/* Body copy runs wider and looser here than the master theme default —
   the audience skews 50+ and the mock leaned on generous measure. */
.entry-content {
    font-size: var(--font-size-body-fluid);
    line-height: var(--line-height-body);
    color: var(--color-text-dark);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

.entry-content a {
    color: var(--gyb-gold-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: var(--gyb-ink);
}

/* Pull quote — cream slab with a gold rule, matching the mock. */
.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    border-left: 5px solid var(--gyb-gold);
    border-radius: 0 14px 14px 0;
    background-color: var(--gyb-cream-card);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--gyb-ink);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content img {
    border-radius: 18px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.4rem;
}

.entry-content li {
    margin-bottom: 0.6rem;
}

/* Related posts */
.related-posts {
    padding: clamp(2rem, 4vw, 3rem) 0;
    border-top: 1px solid var(--color-border-light);
}

.related-posts-title {
    margin-bottom: 1.75rem;
    font-size: var(--font-size-h2-fluid);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination .page-numbers,
.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--gyb-radius-button);
    background-color: var(--gyb-cream-card);
    color: var(--color-text-dark);
    font-weight: 700;
    text-decoration: none;
}

.pagination .page-numbers.current,
.archive-pagination .page-numbers.current {
    background-color: var(--gyb-gold-deep);
    border-color: var(--gyb-gold-deep);
    color: #fff;
}

.pagination .page-numbers:hover,
.archive-pagination .page-numbers:hover {
    background-color: var(--gyb-gold-soft);
    border-color: var(--gyb-gold);
    color: var(--gyb-ink);
}

/* --------------------------------------------------------------------------
   Tail spacing before the footer
   The run-out was 176px on the homepage (64 newsletter + 48 .site-main +
   64 footer margin) and 160px on archives (48 + 48 + 64). Each contributor is
   halved so the total closes to ~88px / ~80px. Scoped to these two page types
   so single posts keep their existing breathing room.
   -------------------------------------------------------------------------- */

.home .gyb-newsletter {
    padding-bottom: 2rem;
}

.home .site-main,
.archive .site-main,
.category .site-main {
    padding-bottom: 1.5rem;
}

.archive .gyb-archive-layout,
.category .gyb-archive-layout {
    padding-bottom: 1.5rem;
}

.home .site-footer,
.archive .site-footer,
.category .site-footer {
    margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Footer — mint band with dark text (the palette has no dark-footer variant;
   the wordmark is brown and would go illegible on a dark fill).
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--gyb-mint-deep);
    border-top: 1px solid #b3dcc0;
    color: var(--color-footer-text);
}

.site-footer a,
.footer-menu a,
.footer-category-list a {
    color: var(--color-text-dark);
}

.site-footer a:hover {
    color: var(--gyb-gold-deep);
}

.footer-site-title,
.footer-brand-title {
    font-family: var(--font-display);
    color: var(--gyb-ink);
}

/* 1.5rem + 25%, matching the header wordmark treatment. */
.footer-brand-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.footer-logo-mark {
    max-height: 44px;
    width: auto;
}

/* Categories as plain links in both the footer and the sidebar — the pill
   treatment read as buttons rather than navigation. */
.footer-category-list {
    display: block;
}

.footer-category-list a {
    display: inline;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    white-space: normal;
}

.footer-category-list a:hover {
    background: none;
    border: none;
    color: var(--gyb-gold-deep);
}

.footer-category-list li {
    margin-bottom: 0.75rem;
}

.gyb-category-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.gyb-category-links a {
    color: var(--gyb-ink);
    font-weight: 700;
    text-decoration: none;
}

.gyb-category-links a:hover {
    color: var(--gyb-gold-deep);
}

.footer-description {
    color: var(--color-text-medium);
}

/* main.css colours these for a dark footer (--color-accent is mint,
   --color-border-light is cream) — both vanish on this light mint band. */
.footer-nav-title {
    color: var(--color-text-medium);
}

.footer-company {
    color: var(--color-text-medium);
}

.footer-email a {
    color: var(--gyb-gold-deep);
}

.copyright {
    color: var(--color-copyright);
}

/* --------------------------------------------------------------------------
   Accessibility — visible focus for keyboard users.
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--gyb-gold-deep);
    outline-offset: 2px;
}
