:root {
    --bg: #f8f7f3;
    --surface: #ffffff;
    --text: #181818;
    --muted: #747474;
    --line: #deddd7;
    --accent: #d86b45;
    --dark: #151515;
    --radius: 18px;
    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
}

body.dark {
    --bg: #111111;
    --surface: #1b1b1b;
    --text: #f4f1e9;
    --muted: #a8a8a8;
    --line: #333333;
    --dark: #f4f1e9;
}

img {
    width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: auto;
}


/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248,247,243,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.dark .site-header {
    background: rgba(17,17,17,.92);
}

.nav-wrapper {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.logo span {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 23px;
}

.main-nav a {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: -8px;
    left: 0;
    transition: .3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.icon-btn,
.theme-btn,
.menu-btn {
    border: 1px solid var(--line);
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.menu-btn {
    display: none;
}


/* HERO */

.hero {
    padding: 30px 0 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.65fr .85fr;
    gap: 20px;
}

.hero-main {
    min-height: 620px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.hero-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(0,0,0,.8),
        rgba(0,0,0,.05) 70%
    );
}

.hero-main img {
    height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}

.hero-main:hover img {
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    z-index: 2;
    left: 55px;
    bottom: 50px;
    max-width: 680px;
    color: white;
}

.category-tag,
.card-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 7px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 30px;
}

.hero-overlay h1 {
    font-family: var(--serif);
    font-size: clamp(40px, 5vw, 70px);
    line-height: 1.04;
    margin: 20px 0;
    letter-spacing: -2px;
}

.hero-overlay h1 em,
.editorial-text h2 em,
.newsletter h2 em {
    font-weight: 400;
}

.hero-overlay p {
    max-width: 550px;
    font-size: 16px;
    color: rgba(255,255,255,.82);
}

.read-more {
    display: inline-block;
    margin-top: 25px;
    font-weight: 700;
    border-bottom: 1px solid white;
    padding-bottom: 4px;
}


/* SIDE STORIES */

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-story {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    grid-template-columns: 42% 58%;
}

.side-story img {
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.side-story > div {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.small-category {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent);
}

.side-story h3 {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.2;
    margin: 9px 0 15px;
}

.side-story a {
    font-size: 12px;
    font-weight: 700;
}


/* SECTIONS */

.section {
    padding: 80px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 35px;
}

.eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-heading h2 {
    font-family: var(--serif);
    font-size: 43px;
    line-height: 1;
    margin-top: 8px;
}

.view-all {
    font-size: 13px;
    font-weight: 700;
}


/* ARTICLE CARDS */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: .3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,.08);
}

.image-wrap {
    height: 270px;
    position: relative;
    overflow: hidden;
}

.image-wrap img {
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.article-card:hover .image-wrap img {
    transform: scale(1.06);
}

.card-tag {
    position: absolute;
    left: 15px;
    top: 15px;
}

.card-content {
    padding: 25px;
}

.article-date {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-content h3 {
    font-family: var(--serif);
    font-size: 25px;
    line-height: 1.15;
    margin: 12px 0;
}

.card-content p {
    color: var(--muted);
    font-size: 14px;
}

.card-content a {
    display: inline-block;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
}


/* EDITORIAL */

.editorial {
    background: var(--dark);
    color: var(--bg);
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 80px;
    align-items: center;
}

.editorial-image {
    height: 560px;
    overflow: hidden;
    border-radius: var(--radius);
}

.editorial-image img {
    height: 100%;
    object-fit: cover;
}

.editorial-text {
    max-width: 500px;
}

.editorial-text h2 {
    font-family: var(--serif);
    font-size: clamp(42px, 5vw, 65px);
    line-height: 1;
    margin: 20px 0;
}

.editorial-text p {
    color: #aaa;
    margin-bottom: 30px;
}

.primary-btn {
    display: inline-block;
    padding: 14px 22px;
    background: var(--accent);
    color: white;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
}


/* CATEGORIES */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-box {
    min-height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    color: white;
}

.category-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
}

.category-box img {
    height: 100%;
    object-fit: cover;
    transition: .6s;
}

.category-box:hover img {
    transform: scale(1.06);
}

.category-box > div {
    position: absolute;
    z-index: 2;
    left: 25px;
    bottom: 25px;
}

.category-box span {
    font-size: 10px;
    opacity: .7;
}

.category-box h3 {
    font-family: var(--serif);
    font-size: 30px;
}

.category-box p {
    font-size: 12px;
    opacity: .8;
}


/* NEWSLETTER */

.newsletter {
    background: #e9e2d4;
    padding: 80px 0;
}

.dark .newsletter {
    background: #1d1b18;
}

.newsletter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.newsletter h2 {
    font-family: var(--serif);
    font-size: 50px;
    line-height: 1;
    margin-top: 12px;
}

.newsletter form {
    display: flex;
    width: min(500px, 100%);
    border-bottom: 1px solid var(--text);
}

.newsletter input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    padding: 15px 0;
    color: var(--text);
}

.newsletter button {
    background: transparent;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}


/* FOOTER */

.site-footer {
    background: var(--dark);
    color: var(--bg);
    padding: 70px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
}

.footer-brand p {
    max-width: 330px;
    color: #999;
    margin-top: 20px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h4 {
    margin-bottom: 10px;
}

.footer-column a {
    color: #999;
    font-size: 13px;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 60px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 11px;
}


/* SEARCH */

.search-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(10,10,10,.96);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-box {
    width: min(700px, 90%);
}

.search-box span {
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #666;
    background: transparent;
    color: white;
    font-family: var(--serif);
    font-size: 55px;
    outline: none;
    padding: 20px 0;
}

.search-box p {
    color: #888;
    margin-top: 15px;
}

.close-search {
    position: absolute;
    right: 40px;
    top: 30px;
    background: transparent;
    border: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
}


/* MOBILE */

@media(max-width: 1000px) {

    .main-nav {
        position: fixed;
        top: 82px;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 25px;
        display: none;
        flex-direction: column;
        border-bottom: 1px solid var(--line);
    }

    .main-nav.open {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main {
        min-height: 600px;
    }

    .hero-side {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .side-story {
        display: block;
    }

    .side-story img {
        height: 180px;
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .editorial-grid {
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}


@media(max-width: 650px) {

    .container {
        width: min(100% - 28px, 1200px);
    }

    .nav-wrapper {
        min-height: 70px;
    }

    .logo {
        font-size: 25px;
    }

    .theme-btn {
        display: none;
    }

    .main-nav {
        top: 70px;
    }

    .hero {
        padding-top: 15px;
    }

    .hero-main {
        min-height: 540px;
    }

    .hero-overlay {
        left: 25px;
        right: 25px;
        bottom: 30px;
    }

    .hero-overlay h1 {
        font-size: 42px;
    }

    .hero-side {
        display: flex;
    }

    .side-story {
        display: grid;
        grid-template-columns: 38% 62%;
    }

    .side-story img {
        height: 100%;
    }

    .section {
        padding: 55px 0;
    }

    .section-heading {
        align-items: start;
        gap: 15px;
    }

    .section-heading h2 {
        font-size: 34px;
    }

    .article-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .editorial-image {
        height: 400px;
    }

    .newsletter-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter h2 {
        font-size: 42px;
    }

    .newsletter form {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .search-box input {
        font-size: 35px;
    }
}