:root {
    --bg: #f3f1ea;
    --paper: #ffffff;
    --paper-soft: #faf8f2;
    --ink: #1c2a34;
    --muted: #61707a;
    --line: #d8dfdf;
    --brand: #1f5c74;
    --brand-dark: #153e50;
    --accent: #b5793e;
    --accent-soft: #efe0d2;
    --shadow: 0 18px 48px rgba(23, 36, 43, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --wrap: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(181, 121, 62, 0.12), transparent 28%),
        linear-gradient(180deg, #fcfbf8 0%, var(--bg) 100%);
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(28, 42, 52, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 42, 52, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 82%);
}

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: #eff6f8;
    font-size: 0.92rem;
}

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

.site-header {
    padding: 18px 0;
}

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

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e3b98f);
    box-shadow: 0 0 0 10px rgba(181, 121, 62, 0.14);
}

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

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

.nav a {
    padding: 10px 14px;
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
    background: #e8eef0;
    color: var(--brand-dark);
}

.page {
    padding-bottom: 44px;
}

.hero-home,
.page-hero,
.card,
.aside-card,
.footer-card,
.feature-card,
.quote-card,
.faq-item {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-home,
.page-hero {
    padding: 38px;
    border-radius: var(--radius-xl);
    margin: 10px 0 26px;
    position: relative;
    overflow: hidden;
}

.hero-home::after,
.page-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 92, 116, 0.14), transparent 68%);
}

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

.hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: start;
}

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

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

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

.eyebrow,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    padding: 8px 14px;
    background: #e7f1f5;
    color: var(--brand);
    margin-bottom: 18px;
}

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

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

h1,
h2,
h3,
h4 {
    font-family: "IBM Plex Serif", serif;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    max-width: 12ch;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
    font-size: 1.55rem;
}

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

.lead {
    max-width: 64ch;
    font-size: 1.06rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.aside-card,
.feature-card,
.card,
.quote-card,
.faq-item {
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.aside-card h3,
.feature-card h3,
.card h3 {
    margin-bottom: 10px;
}

.section {
    margin-top: 18px;
}

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

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

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

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

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

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

.card-link {
    margin-top: auto;
    color: var(--brand-dark);
    font-weight: 700;
}

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

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

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

.prose h2,
.prose h3 {
    color: var(--ink);
}

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

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

.prose a {
    color: var(--brand-dark);
    text-decoration: underline;
}

.quote-card {
    background: linear-gradient(180deg, #183d4d 0%, #1f5c74 100%);
}

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

.quote-card p {
    opacity: 0.88;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding-top: 12px;
}

.footer {
    padding: 16px 0 40px;
}

.footer-card {
    padding: 22px 24px;
    border-radius: var(--radius-lg);
}

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

.footer-links a {
    padding: 10px 14px;
    background: #eef3f4;
    color: var(--brand-dark);
    font-weight: 600;
    transition: 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: 980px) {
    .hero-grid,
    .content-grid,
    .feature-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-home,
    .page-hero,
    .card,
    .aside-card,
    .footer-card,
    .feature-card,
    .quote-card,
    .faq-item {
        padding: 20px;
    }

    .site-header {
        padding-bottom: 12px;
    }

    .nav {
        width: 100%;
    }

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

    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;
    }
}
