:root {
    --bg: #f5efe6;
    --bg-deep: #efe5d7;
    --paper: rgba(255, 253, 248, 0.92);
    --paper-strong: #fffdf9;
    --line: rgba(25, 42, 51, 0.12);
    --line-strong: rgba(25, 42, 51, 0.2);
    --text: #1b2c35;
    --muted: #61727b;
    --brand: #0f5568;
    --brand-dark: #0a3542;
    --accent: #b66b37;
    --accent-soft: rgba(182, 107, 55, 0.14);
    --mint: #c7e2dd;
    --shadow-lg: 0 30px 80px rgba(20, 34, 41, 0.1);
    --shadow-md: 0 16px 40px rgba(20, 34, 41, 0.08);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --wrap: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Sora", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(182, 107, 55, 0.16), transparent 24%),
        radial-gradient(circle at 100% 10%, rgba(15, 85, 104, 0.12), transparent 30%),
        linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
    line-height: 1.68;
    letter-spacing: -0.01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(27, 44, 53, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 44, 53, 0.028) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 84%);
}

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

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

.wrap {
    width: min(var(--wrap), calc(100% - 28px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.topbar {
    padding: 12px 0;
    background:
        linear-gradient(90deg, var(--brand-dark), var(--brand));
    color: #eef7f6;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.topbar .wrap,
.site-header,
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
}

.page {
    padding-bottom: 42px;
}

.site-header {
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 6px -14px;
    border-radius: 999px;
    background: rgba(251, 247, 241, 0.76);
    border: 1px solid rgba(15, 85, 104, 0.08);
    box-shadow: 0 12px 30px rgba(18, 34, 41, 0.05);
    z-index: -1;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-mark {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--accent), #f1c08f);
    box-shadow: 0 0 0 10px rgba(182, 107, 55, 0.14);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a,
.footer-links a,
.tag {
    border-radius: 999px;
}

.nav a {
    padding: 10px 14px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
    background: rgba(15, 85, 104, 0.1);
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.hero,
.page-hero,
.card,
.side-card,
.feature-card,
.quote-card,
.footer-card,
.cover-panel,
.story-card {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.hero,
.page-hero {
    padding: 34px;
    border-radius: var(--radius-xl);
    margin: 14px 0 28px;
    position: relative;
    overflow: hidden;
}

.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 42%),
        radial-gradient(circle at 88% 16%, rgba(15, 85, 104, 0.12), transparent 28%);
    pointer-events: none;
}

.hero-grid,
.content-grid,
.feature-grid,
.card-grid,
.editorial-grid {
    display: grid;
    gap: 20px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: stretch;
}

.content-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.78fr);
    align-items: start;
}

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

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

.editorial-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
}

.editorial-grid > * {
    grid-column: span 4;
}

.editorial-grid > .story-card--lead {
    grid-column: span 7;
    grid-row: span 2;
}

.editorial-grid > .story-card--tall {
    grid-column: span 5;
}

.editorial-grid > .quote-card {
    grid-column: span 12;
}

.eyebrow,
.tag,
.cover-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.eyebrow {
    padding: 8px 14px;
    background: rgba(15, 85, 104, 0.08);
    color: var(--brand);
    margin-bottom: 18px;
}

.eyebrow::before,
.cover-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.tag {
    padding: 7px 12px;
    background: var(--accent-soft);
    color: #7c5230;
}

.cover-label {
    color: var(--brand);
}

h1,
h2,
h3,
h4 {
    font-family: "Newsreader", serif;
    line-height: 0.97;
    letter-spacing: -0.04em;
    color: var(--text);
}

h1 {
    font-size: clamp(3.2rem, 7vw, 6.1rem);
    max-width: 10ch;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
}

h3 {
    font-size: 1.75rem;
}

p,
li {
    color: var(--muted);
}

.lead {
    max-width: 62ch;
    font-size: 1.04rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.section {
    margin-top: 20px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-head h2 {
    max-width: 11ch;
}

.section-head p {
    max-width: 58ch;
}

.card,
.side-card,
.feature-card,
.quote-card,
.cover-panel,
.story-card {
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card,
.feature-card,
.story-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.story-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.story-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 85, 104, 0.12), transparent 72%);
}

.story-card--lead {
    min-height: 420px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 248, 243, 0.92)),
        linear-gradient(135deg, rgba(199, 226, 221, 0.48), transparent);
}

.story-card--tall {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 238, 0.94)),
        linear-gradient(135deg, rgba(182, 107, 55, 0.08), transparent);
}

.story-card .meta,
.card .meta,
.breadcrumbs,
.article-meta,
.footer-copy {
    font-size: 0.9rem;
}

.meta,
.breadcrumbs,
.article-meta {
    color: var(--muted);
}

.card-link,
.prose a,
.side-card a,
.story-card a {
    color: var(--brand-dark);
    font-weight: 800;
}

.story-card .card-link {
    margin-top: auto;
}

.cover-panel {
    background:
        linear-gradient(180deg, rgba(18, 48, 59, 0.98), rgba(10, 33, 42, 0.98));
    color: #eef7f6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.cover-panel::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199, 226, 221, 0.22), transparent 70%);
}

.cover-panel h2,
.cover-panel h3,
.cover-panel p,
.quote-card h3,
.quote-card p {
    color: #eef7f6;
}

.cover-panel p,
.quote-card p {
    opacity: 0.88;
}

.stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.side-card {
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(250, 246, 239, 0.94));
}

.side-card h3,
.feature-card h3,
.card h3 {
    margin-bottom: 8px;
}

.side-card p + p,
.prose > * + *,
.stack > * + * {
    margin-top: 16px;
}

.feature-card {
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 247, 242, 0.95));
}

.quote-card {
    background:
        linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.quote-card h3,
.quote-card p {
    color: #f1f8f7;
}

.quote-card p {
    max-width: 62ch;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.breadcrumbs a {
    color: var(--brand);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 22px;
}

.prose > * + * {
    margin-top: 16px;
}

.prose h2,
.prose h3 {
    margin-top: 26px;
}

.prose ul,
.prose ol {
    padding-left: 22px;
}

.prose blockquote {
    padding: 20px 22px;
    border-left: 4px solid var(--accent);
    background: var(--paper-strong);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text);
}

.footer {
    padding: 18px 0 42px;
}

.footer-card {
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(248, 244, 237, 0.94));
}

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

.footer-links a {
    padding: 10px 14px;
    background: rgba(15, 85, 104, 0.08);
    color: var(--brand-dark);
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fade {
    opacity: 0;
    transform: translateY(20px);
    animation: rise 0.7s ease forwards;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1040px) {
    .hero-grid,
    .content-grid,
    .feature-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

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

    .editorial-grid > *,
    .editorial-grid > .story-card--lead,
    .editorial-grid > .story-card--tall,
    .editorial-grid > .quote-card {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    .wrap {
        width: min(var(--wrap), calc(100% - 18px));
    }

    .site-header {
        padding-top: 14px;
    }

    .site-header::before {
        inset: 4px -6px;
        border-radius: 28px;
    }

    .hero,
    .page-hero,
    .card,
    .side-card,
    .feature-card,
    .quote-card,
    .footer-card,
    .cover-panel,
    .story-card {
        padding: 20px;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }

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

    h1,
    .section-head h2 {
        max-width: none;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .fade {
        opacity: 1;
        transform: none;
    }
}
