/* ========================================
   HOPELUST — GLOBAL STYLES
======================================== */

:root {
    --background: #FFFCFA;
    --blush: #F4EFEC;
    --sea-glass: #E3F0ED;
    --turquoise: #438F89;
    --dark-teal: #367B74;
    --text: #354C49;
    --muted: #526B64;
    --link: #286D65;
    --border: #C8DCD5;
    --divider: #E3E5DF;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 16px/1.65 Arial, sans-serif;
}

header,
main,
footer {
    max-width: 1040px;
    margin: auto;
    padding: 24px 5%;
}

h1,
h2,
h3 {
    font-family: Georgia, serif;
    font-weight: normal;
    line-height: 1.3;
}

h1 {
    font-size: clamp(30px, 5vw, 46px);
    margin: 0 0 16px;
}

h2 {
    font-size: 29px;
    margin: 0 0 20px;
}

a {
    color: var(--link);
    text-underline-offset: 4px;
}


/* ========================================
   HEADER & LOGO
======================================== */

header {
    text-align: center;
    border-bottom: 1px solid var(--divider);
    padding-top: 38px;
}

.logo {
    display: block;
    font: normal 60px/1.1 Georgia, serif;
    letter-spacing: -3px;
    color: var(--turquoise);
    text-decoration: none;
}

.logo span {
    color: var(--turquoise);
}

.tag {
    display: block;
    font: normal 18px/1.5 Georgia, serif;
    margin-top: 14px;
    color: var(--muted);
}


/* ========================================
   MAIN NAVIGATION
======================================== */

.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 30px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px 5% 0;
}

.main-nav a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--dark-teal);
    text-decoration: underline;
}


/* ========================================
   HERO SECTION
======================================== */

.hero {
    text-align: center;
    padding: 16px 0 50px;
}

.hero-photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: 0 auto 34px;
}

.hero-photo[hidden] {
    display: none;
}

.hero p {
    max-width: 420px;
    margin: 0 auto 18px;
    color: var(--muted);
}

.eyebrow:empty {
    display: none;
}

.cta {
    color: var(--link);
    text-underline-offset: 5px;
    font-size: 14px;
}


/* ========================================
   SHARED SECTION STYLES
======================================== */

.sectionhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.sectionhead h2 {
    margin-bottom: 8px;
}

.section-intro {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 28px;
}

section[id] {
    scroll-margin-top: 25px;
}

#updated,
.meta,
#status,
#evergreen-status {
    font-size: 12px;
    color: var(--muted);
}


/* ========================================
   TIMELESS INSPIRATION
======================================== */

.timeless-section {
    border-top: 1px solid var(--divider);
    padding: 42px 0 50px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.collection-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 140px;
    padding: 24px;
    background: var(--sea-glass);
    border: 1px solid transparent;
    border-radius: 3px;
    text-align: left;
    transition: background 0.2s ease,
                border-color 0.2s ease;
}

.collection-card h3 {
    font-size: 23px;
    margin: 0 0 8px;
    color: var(--text);
}

.collection-card p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    color: var(--muted);
}

.collection-card:hover {
    background: #D6E8E3;
    border-color: var(--border);
}

.collection-card[aria-pressed="true"],
.collection-card.active {
    background: var(--dark-teal);
    border-color: var(--dark-teal);
}

.collection-card[aria-pressed="true"] h3,
.collection-card[aria-pressed="true"] p,
.collection-card.active h3,
.collection-card.active p {
    color: white;
}

.evergreen-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 15px;
}

.evergreen-heading h3 {
    font-size: 23px;
    margin: 0;
}

.text-button {
    border: none;
    padding: 5px 0;
    background: transparent;
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 4px;
}

#evergreen-status {
    padding: 8px 0;
}

#evergreen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

#evergreen-grid .story {
    background: var(--blush);
    grid-column: auto;
    padding: 28px;
}

#evergreen-grid .story h3 {
    font-size: 25px;
}


/* ========================================
   DAILY STORIES
======================================== */

#stories {
    border-top: 1px solid var(--divider);
    padding-top: 42px;
}

#filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

button {
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 8px 13px;
    color: var(--text);
}

#filters button:hover {
    background: var(--sea-glass);
}

#filters button[aria-pressed="true"] {
    background: var(--dark-teal);
    color: white;
    border-color: var(--dark-teal);
}

.search {
    display: block;
    font-size: 13px;
    margin-bottom: 15px;
}

input {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 3px;
    font: inherit;
}

#status {
    padding: 8px 0;
}

#grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


/* ========================================
   STORY CARDS
======================================== */

.story {
    background: var(--blush);
    padding: 28px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

#grid .story:first-child {
    grid-column: 1 / -1;
    background: var(--sea-glass);
    padding: 36px;
}

#grid .story:first-child h3 {
    font-size: clamp(27px, 4vw, 36px);
}

.category {
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--link);
}

.story h3 {
    font-size: 25px;
    margin: 12px 0;
}

.story p {
    color: var(--muted);
}

.story a {
    color: var(--link);
    margin-top: auto;
    padding-top: 15px;
    text-underline-offset: 4px;
    font-size: 14px;
}


/* ========================================
   READER SUBMISSIONS
======================================== */

.share-section {
    background: var(--sea-glass);
    margin-top: 60px;
    padding: 45px 30px;
    text-align: center;
}

.share-section h2 {
    margin-bottom: 15px;
    font-size: 32px;
}

.share-section p {
    max-width: 540px;
    margin: 0 auto 15px;
    color: var(--muted);
}

.share-section .cta {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 24px;
    background: var(--dark-teal);
    border: 1px solid var(--dark-teal);
    border-radius: 3px;
    color: white;
    text-decoration: none;
}

.share-section button:disabled {
    opacity: 0.65;
    cursor: default;
}


/* ========================================
   FOOTER
======================================== */

footer {
    text-align: center;
    margin-top: 45px;
    border-top: 1px solid var(--divider);
    font-size: 13px;
    color: var(--muted);
}

footer strong {
    font: 24px Georgia, serif;
    color: var(--turquoise);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 24px;
}

.footer-nav a {
    font-size: 12px;
    text-decoration: none;
    color: var(--muted);
}

.footer-nav a:hover {
    text-decoration: underline;
}


/* ========================================
   ACCESSIBILITY
======================================== */

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .collection-card {
        transition: none;
    }
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 800px) {

    .collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

    .logo {
        font-size: 48px;
    }

    .tag {
        font-size: 16px;
    }

    .main-nav {
        gap: 10px 18px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .hero {
        padding: 12px 0 35px;
    }

    .hero-photo {
        margin-bottom: 25px;
    }

    .sectionhead {
        display: block;
    }

    .collection-grid {
        gap: 10px;
    }

    .collection-card {
        min-height: 130px;
        padding: 16px;
    }

    .collection-card h3 {
        font-size: 19px;
    }

    .collection-card p {
        font-size: 12px;
    }

    #grid,
    #evergreen-grid {
        grid-template-columns: 1fr;
    }

    #grid .story:first-child {
        padding: 26px;
    }

    .timeless-section {
        padding: 30px 0;
    }

    .share-section {
        margin-top: 40px;
        padding: 35px 20px;
    }

}

@media (max-width: 360px) {

    .collection-grid {
        grid-template-columns: 1fr;
    }

}

/* ========================================
   INDIVIDUAL ARTICLE PAGES
======================================== */

.article-main {
    max-width: 820px;
    padding-top: 35px;
}

.back-link {
    display: inline-block;
    margin-bottom: 35px;
    font-size: 13px;
    text-decoration: none;
}

.feature-article h1 {
    font-size: clamp(34px, 5vw, 52px);
    margin: 16px 0 20px;
    line-height: 1.2;
}

.article-intro {
    font-family: Georgia, serif;
    font-size: 21px;
    line-height: 1.65;
    color: var(--muted);
}

.article-byline {
    font-size: 12px;
    color: var(--muted);
    border-bottom: 1px solid var(--divider);
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.article-image {
    margin: 30px 0;
}

.article-image img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.article-image figcaption {
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
}

.article-body {
    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1.9;
}

.article-body p {
    margin: 0 0 24px;
}

.article-body h2 {
    font-size: 29px;
    margin: 40px 0 18px;
}

.article-reflection {
    background: var(--sea-glass);
    padding: 30px;
    margin: 40px 0;
}

.article-reflection h2 {
    font-size: 25px;
    margin-bottom: 12px;
}

.article-reflection p {
    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1.7;
    margin: 0;
}

.article-sources {
    border-top: 1px solid var(--divider);
    margin-top: 40px;
    padding-top: 25px;
    font-size: 13px;
}

.article-sources h2 {
    font-size: 22px;
}

.article-sources ul {
    padding-left: 20px;
}

.article-sources li {
    margin-bottom: 10px;
}

.article-end {
    background: var(--blush);
    padding: 35px;
    text-align: center;
    margin-top: 45px;
}

.article-end h2 {
    font-size: 27px;
}

.article-end p {
    color: var(--muted);
}

@media (max-width: 600px) {

    .article-body {
        font-size: 17px;
        line-height: 1.8;
    }

    .article-intro {
        font-size: 19px;
    }

    .article-reflection,
    .article-end {
        padding: 24px;
    }
.ai-rejected {
    display: inline-block;
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}
}

/* ========================================
   HOPELUST — EDITORIAL LAYOUT
======================================== */

/* Collection navigation */

.collection-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    background: var(--sea-glass);
    padding: 20px 24px;
    margin-bottom: 40px;
}

.collection-card {
    display: inline-flex;
    min-height: 0;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: left;
}

.collection-card h3 {
    font-family: Georgia, serif;
    font-size: 17px;
    margin: 0;
    color: var(--link);
}

.collection-card p {
    display: none;
}

.collection-card:hover {
    background: transparent;
    border-color: transparent;
}

.collection-card:hover h3 {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.collection-card[aria-pressed="true"],
.collection-card.active {
    background: transparent;
    border: none;
}

.collection-card[aria-pressed="true"] h3,
.collection-card.active h3 {
    color: var(--dark-teal);
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* Vertical story listings */

#grid,
#evergreen-grid {
    display: block;
    width: 100%;
}

#grid .story,
#evergreen-grid .story,
#grid .story:first-child {
    display: block;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--divider);
    border-radius: 0;
    min-height: 0;
    padding: 32px 0;
    margin: 0;
}

/* Editorial headlines */

#grid .story h3,
#evergreen-grid .story h3,
#grid .story:first-child h3 {
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: clamp(25px, 3.5vw, 34px);
    line-height: 1.25;
    margin: 12px 0;
    max-width: 800px;
}

/* Category labels */

.story .category {
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--link);
    font-weight: 600;
}

/* Publication and date */

.story .meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

/* Story descriptions */

.story p {
    font-size: 16px;
    line-height: 1.8;
    max-width: 760px;
    margin: 14px 0;
    color: var(--muted);
}

/* Reading links */

.story a {
    display: inline-block;
    margin-top: 4px;
    padding-top: 0;
    font-size: 14px;
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.story a:hover {
    color: var(--dark-teal);
}

/* Section headings */

.sectionhead h2 {
    font-size: clamp(29px, 4vw, 38px);
}

.evergreen-heading {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider);
}

/* Mobile editorial layout */

@media (max-width: 600px) {

    .collection-grid {
        gap: 2px 18px;
        padding: 15px 18px;
    }

    .collection-card {
        padding: 8px 0;
    }

    .collection-card h3 {
        font-size: 15px;
    }

    #grid .story,
    #evergreen-grid .story,
    #grid .story:first-child {
        padding: 25px 0;
    }

    #grid .story h3,
    #evergreen-grid .story h3,
    #grid .story:first-child h3 {
        font-size: 26px;
    }

    .story p {
        font-size: 15px;
        line-height: 1.7;
    }
}
