:root {
    --bg: #f8f5f0;
    --surface: #ffffff;
    --surface-soft: #f1ece5;
    --text: #25231f;
    --muted: #706b63;
    --line: rgba(37, 35, 31, 0.10);
    --accent: #7d6551;
    --accent-dark: #5e4938;
    --accent-soft: #e9ddd0;
    --shadow: 0 22px 60px rgba(48, 38, 28, 0.10);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
    line-height: 1.6;
    transition:
        background-color .25s ease,
        color .25s ease;
}

body.dark-mode {
    --bg: #171614;
    --surface: #211f1c;
    --surface-soft: #292620;
    --text: #f5f0e9;
    --muted: #b7afa5;
    --line: rgba(255,255,255,.10);
    --accent: #c7a889;
    --accent-dark: #e1c4a4;
    --accent-soft: #3b3026;
    --shadow: 0 22px 60px rgba(0,0,0,.28);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    width: 100%;
}

.content-width {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

/* HEADER */

.journal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(1240px, calc(100% - 48px));
    min-height: 78px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.brand-mark {
    font-size: 27px;
    line-height: 1;
    color: var(--accent);
}

.brand-text {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.03em;
}

.brand-text span {
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    position: relative;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-link {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.header-cta,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 14px;
    font-weight: 700;
    transition:
        transform .2s ease,
        opacity .2s ease;
}

.header-cta:hover,
.primary-button:hover {
    transform: translateY(-2px);
    opacity: .90;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
}

/* HERO */

.journal-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0 90px;
}

.hero-glow {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    pointer-events: none;
}

.hero-glow-one {
    top: -250px;
    right: -120px;
    background: #e8d4bf;
}

.hero-glow-two {
    bottom: -320px;
    left: -160px;
    background: #ded4c8;
}

.hero-inner {
    position: relative;
    z-index: 2;

    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;

    display: grid;
    grid-template-columns: .90fr 1.10fr;
    align-items: center;
    gap: 70px;
}

.hero-copy {
    max-width: 590px;
}

.eyebrow,
.section-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .20em;
}

.hero-copy h1 {
    margin: 18px 0 22px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(44px, 5.2vw, 72px);
    line-height: 1.02;
    letter-spacing: -.045em;
    font-weight: 600;
}

.hero-copy h1 span,
.section-heading-row h2 span,
.featured-content h2 em,
.event-journal-copy h2 span,
.cta-inner h2 span {
    color: var(--accent);
    font-style: normal;
}

.hero-copy p {
    max-width: 530px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 34px;
}

.text-button {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.text-button span {
    margin-left: 5px;
    color: var(--accent);
}

.hero-image {
    position: relative;
    height: 580px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 50%,
        rgba(20,16,12,.42)
    );
}

.hero-image img {
    height: 100%;
    object-fit: cover;
}

.image-caption {
    position: absolute;
    z-index: 2;
    left: 28px;
    bottom: 25px;
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}

/* CATEGORIES */

.categories-section {
    padding: 20px 0 65px;
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.section-heading-row h2 {
    max-width: 650px;
    margin: 10px 0 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.10;
    letter-spacing: -.035em;
}

.search-box {
    width: min(330px, 100%);
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 25px rgba(40,30,20,.05);
}

.search-icon {
    color: var(--accent);
    font-size: 22px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 34px;
}

.category-button {
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}

.category-button:hover,
.category-button.active {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}

/* FEATURED */

.featured-section {
    padding: 20px 0 100px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    min-height: 520px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-image {
    min-height: 520px;
    overflow: hidden;
}

.featured-image img {
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.04);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
}

.article-meta {
    display: flex;
    gap: 15px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.article-meta span + span {
    padding-left: 15px;
    border-left: 1px solid var(--line);
    color: var(--muted);
    letter-spacing: .05em;
}

.featured-content h2 {
    margin: 22px 0 20px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(35px, 4vw, 56px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.featured-content p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.read-more,
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.read-more span,
.card-link {
    color: var(--accent);
}

/* ARTICLES */

.articles-section {
    padding: 0 0 100px;
}

.section-heading-row.compact {
    align-items: end;
    margin-bottom: 35px;
}

.results-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.article-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.article-card[hidden],
.featured-card[hidden] {
    display: none;
}

.card-image {
    position: relative;
    height: 245px;
    overflow: hidden;
}

.card-image img {
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-category {
    position: absolute;
    left: 15px;
    bottom: 15px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #3e352d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .10em;
}

.card-content {
    padding: 25px 24px 27px;
}

.card-time {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.card-content h3 {
    margin: 10px 0 12px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    line-height: 1.20;
    letter-spacing: -.025em;
}

.card-content p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.card-link {
    margin-top: 21px;
}

.empty-state {
    display: none;
    padding: 70px 20px;
    text-align: center;
}

.empty-state.visible {
    display: block;
}

.empty-icon {
    color: var(--accent);
    font-size: 40px;
}

.empty-state h3 {
    margin: 12px 0 5px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 28px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

/* EVENTS */

.events-journal {
    padding: 0 0 100px;
}

.event-journal-card {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.event-journal-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
}

.event-journal-copy h2 {
    margin: 14px 0 17px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.event-journal-copy p {
    max-width: 500px;
    margin: 0 0 28px;
    color: var(--muted);
}

.event-journal-copy .primary-button {
    align-self: flex-start;
}

.event-journal-image {
    min-height: 430px;
}

.event-journal-image img {
    height: 100%;
    object-fit: cover;
}

/* CTA */

.journal-cta {
    padding: 20px 0 90px;
}

.cta-inner {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
    padding: 42px 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.cta-heart {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 34px;
}

.cta-inner h2 {
    margin: 8px 0 8px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    line-height: 1.1;
}

.cta-inner p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* FOOTER */

.journal-footer {
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 110px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    font-weight: 600;
}

.footer-brand span {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 22px;
}

.footer-links a,
.footer-copy {
    color: var(--muted);
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--text);
}

/* MOBILE */

@media (max-width: 1000px) {

    .main-nav {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .hero-copy {
        max-width: 760px;
    }

    .hero-image {
        height: 500px;
    }

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

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 430px;
    }

    .featured-content {
        padding: 45px;
    }

    .event-journal-card {
        grid-template-columns: 1fr;
    }

    .event-journal-image {
        min-height: 350px;
    }
}

@media (max-width: 700px) {

    .content-width,
    .header-inner,
    .hero-inner,
    .footer-inner {
        width: min(100% - 30px, 1180px);
    }

    .journal-header {
        position: relative;
    }

    .header-inner {
        min-height: 70px;
    }

    .brand-text {
        font-size: 20px;
    }

    .login-link {
        display: none;
    }

    .header-cta {
        min-height: 42px;
        padding: 0 16px;
        font-size: 12px;
    }

    .journal-hero {
        padding: 55px 0 60px;
    }

    .hero-copy h1 {
        font-size: clamp(40px, 12vw, 58px);
    }

    .hero-copy p {
        font-size: 15px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .hero-image {
        height: 390px;
        border-radius: 24px;
    }

    .section-heading-row,
    .section-heading-row.compact {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .category-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .category-list::-webkit-scrollbar {
        display: none;
    }

    .category-button {
        flex: 0 0 auto;
    }

    .featured-section {
        padding-bottom: 70px;
    }

    .featured-image {
        min-height: 330px;
    }

    .featured-content {
        padding: 32px 25px 38px;
    }

    .featured-content h2 {
        font-size: 36px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card-image {
        height: 240px;
    }

    .event-journal-copy {
        padding: 36px 28px;
    }

    .event-journal-image {
        min-height: 280px;
    }

    .cta-inner {
        width: calc(100% - 30px);
        grid-template-columns: 1fr;
        padding: 34px 26px;
    }

    .cta-inner .primary-button {
        justify-self: start;
    }

    .footer-inner {
        padding: 30px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
