/* ============================================================
   Valente's Cucina — Stories From an Italian Kitchen
   Editorial journal style. Warm neutrals + terracotta + olive.
   ============================================================ */

:root {
    --bg:          #f6f1e8;
    --bg-elev:     #fbf7ef;
    --paper:      #ffffff;
    --ink:         #241f1b;
    --ink-soft:    #4a403a;
    --ink-muted:   #7a6e65;
    --rule:        #e3d9c8;
    --terracotta:  #b94e2f;
    --terracotta-d:#8f3a21;
    --olive:       #6b7049;
    --olive-d:     #4f5434;
    --ink-inv:     #f6f1e8;

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --maxw: 1200px;
    --maxw-read: 68ch;

    --radius: 4px;
    --shadow-sm: 0 1px 2px rgba(36, 31, 27, 0.05);
    --shadow-md: 0 8px 24px rgba(36, 31, 27, 0.08);

    --step: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--terracotta-d);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color .15s ease;
}
a:hover { color: var(--terracotta); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 .6em;
}

h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; color: var(--ink-soft); }

p { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

::selection { background: var(--terracotta); color: var(--bg); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
    position: absolute; top: -40px; left: 1rem;
    background: var(--ink); color: var(--bg); padding: .5rem 1rem;
    text-decoration: none; z-index: 100; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 720px) { .wrap { padding: 0 2rem; } }

.muted { color: var(--ink-muted); }
.small { font-size: .875rem; }

/* ------------------- Header ------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 241, 232, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--bg);
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.brand-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: .8rem;
    color: var(--ink-muted);
}

.site-nav ul {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    margin: 0; padding: 0;
}
.site-nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    padding: .25rem 0;
    position: relative;
}
.site-nav a:hover { color: var(--terracotta-d); }
.site-nav a.is-current::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--terracotta);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: .5rem;
    cursor: pointer;
    width: 42px; height: 42px;
}
.nav-toggle span {
    display: block; height: 2px; width: 20px;
    background: var(--ink);
    margin: 3px auto;
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .brand-tagline { display: none; }
    .site-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--rule);
        display: none;
    }
    .site-nav.is-open { display: block; }
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: .5rem 1.25rem 1rem;
    }
    .site-nav li { border-top: 1px solid var(--rule); }
    .site-nav li:first-child { border-top: 0; }
    .site-nav a { display: block; padding: .9rem 0; }
}

/* ------------------- Hero (home) ------------------- */

.hero {
    padding: clamp(3rem, 5vw, 6rem) 0 clamp(2.5rem, 4vw, 4rem);
    border-bottom: 1px solid var(--rule);
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--terracotta-d);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 2rem + 3.6vw, 5rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 18ch;
    margin-bottom: 1.25rem;
}
.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--terracotta);
}

.hero-lede {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 55ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1.4rem;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary {
    background: var(--ink);
    color: var(--bg);
}
.btn-primary:hover { background: var(--terracotta-d); color: var(--bg); transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ------------------- Featured section ------------------- */

.section {
    padding: clamp(3rem, 5vw, 5.5rem) 0;
}
.section + .section { padding-top: 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--rule);
}
.section-head h2 { margin: 0; }
.section-head .link { font-family: var(--sans); font-size: .9rem; font-weight: 500; }

.featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
}
@media (max-width: 860px) {
    .featured { grid-template-columns: 1fr; }
}
.featured .featured-image {
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--rule);
}
.featured img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s ease;
}
.featured a:hover img { transform: scale(1.03); }

.featured h3 {
    font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
    font-weight: 400;
    margin-top: .6rem;
    margin-bottom: .75rem;
}
.featured h3 a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease; }
.featured h3 a:hover { background-size: 100% 1px; }
.featured .excerpt { font-size: 1.05rem; color: var(--ink-soft); }

/* ------------------- Post cards grid ------------------- */

.grid-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.5rem, 2.5vw, 2.5rem);
}

.card {
    display: flex;
    flex-direction: column;
}
.card-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--rule);
    margin-bottom: 1rem;
}
.card-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s ease;
}
.card:hover .card-media img { transform: scale(1.04); }

.card-meta {
    display: flex;
    gap: .75rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    margin-bottom: .6rem;
    align-items: center;
}
.card-meta .cat {
    color: var(--terracotta-d);
    font-weight: 600;
    text-decoration: none;
}
.card-meta .dot { width: 3px; height: 3px; background: var(--ink-muted); border-radius: 50%; display: inline-block; }

.card h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 .5rem;
}
.card h3 a {
    color: var(--ink);
    text-decoration: none;
    background-image: linear-gradient(var(--ink), var(--ink));
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .3s ease;
}
.card h3 a:hover { background-size: 100% 1px; }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ------------------- Teaser / About strip ------------------- */

.about-strip {
    background: var(--ink);
    color: var(--ink-inv);
    padding: clamp(3.5rem, 6vw, 6rem) 0;
    border-radius: 0;
    margin: clamp(2rem, 4vw, 4rem) 0;
    position: relative;
    overflow: hidden;
}
.about-strip::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(1200px 400px at 20% 0%, rgba(185, 78, 47, 0.25), transparent 60%);
    pointer-events: none;
}
.about-strip h2 {
    color: var(--ink-inv);
    font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.8rem);
    max-width: 22ch;
}
.about-strip p {
    color: rgba(246, 241, 232, 0.75);
    font-size: 1.1rem;
    max-width: 55ch;
}
.about-strip .btn-ghost {
    color: var(--ink-inv);
    border-color: var(--ink-inv);
}
.about-strip .btn-ghost:hover { background: var(--ink-inv); color: var(--ink); }

/* ------------------- Category chips / filter ------------------- */

.filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2.5rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
    background: transparent;
    font-size: .9rem;
    font-weight: 500;
    transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active {
    background: var(--ink);
    color: var(--ink-inv);
    border-color: var(--ink);
}

.category-intro {
    max-width: 55ch;
    margin-bottom: 2rem;
}
.category-intro p { color: var(--ink-soft); font-size: 1.1rem; }

/* ------------------- Article (single) ------------------- */

.article-head {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 2rem;
    border-bottom: 1px solid var(--rule);
}
.article-head .wrap { max-width: var(--maxw-read); }
.article-head .kicker {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--terracotta-d);
    margin-bottom: 1rem;
}
.article-head .kicker a { color: var(--terracotta-d); text-decoration: none; }
.article-head .kicker a:hover { text-decoration: underline; }
.article-head h1 {
    font-weight: 400;
    margin-bottom: 1rem;
}
.article-meta {
    font-size: .9rem;
    color: var(--ink-muted);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
}
.article-meta .dot { width: 3px; height: 3px; background: var(--ink-muted); border-radius: 50%; display: inline-block; }

.article-cover {
    margin: 2rem auto 0;
    max-width: var(--maxw);
    padding: 0 1.25rem;
}
@media (min-width: 720px) { .article-cover { padding: 0 2rem; } }
.article-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
}

.article-body {
    max-width: var(--maxw-read);
    margin: clamp(2rem, 4vw, 3.5rem) auto;
    padding: 0 1.25rem;
    font-size: 1.1rem;
    line-height: 1.75;
}
@media (min-width: 720px) { .article-body { padding: 0 2rem; } }
.article-body p { margin: 0 0 1.4rem; }
.article-body .lede {
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--ink);
    font-weight: 400;
    margin-bottom: 1.8rem;
}
.article-body h2 {
    margin-top: 2.6rem;
    margin-bottom: 1rem;
    font-size: 1.55rem;
    font-weight: 500;
}
.article-body h2::before {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    background: var(--terracotta);
    margin-bottom: .8rem;
}
.article-body ul {
    padding-left: 1.25rem;
    margin: 0 0 1.4rem;
}
.article-body li { margin-bottom: .6rem; }
.article-body em { font-style: italic; color: var(--terracotta-d); }
.article-body strong { color: var(--ink); }

.article-foot {
    max-width: var(--maxw-read);
    margin: 3rem auto;
    padding: 1.8rem 1.25rem;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    text-align: center;
}
.article-foot p { font-family: var(--serif); font-style: italic; color: var(--ink-soft); margin: 0; }

/* ------------------- Related ------------------- */

.related {
    padding: clamp(2.5rem, 4vw, 4rem) 0 clamp(3rem, 5vw, 5rem);
    background: var(--bg-elev);
    border-top: 1px solid var(--rule);
}

/* ------------------- Static pages (about / contact) ------------------- */

.page-head {
    padding: clamp(3rem, 5vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--rule);
}
.page-head .wrap { max-width: var(--maxw-read); }
.page-head h1 { font-weight: 400; margin-bottom: 1rem; }
.page-head p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 55ch; }

.prose {
    max-width: var(--maxw-read);
    margin: clamp(2.5rem, 4vw, 4rem) auto;
    padding: 0 1.25rem;
    font-size: 1.08rem;
    line-height: 1.75;
}
@media (min-width: 720px) { .prose { padding: 0 2rem; } }
.prose h2 {
    margin-top: 2.5rem;
    font-size: 1.55rem;
    font-weight: 500;
}
.prose p { margin-bottom: 1.3rem; }

/* contact form */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.contact-info p { color: var(--ink-soft); }
.contact-info a { color: var(--ink); font-weight: 500; }

form.contact-form {
    background: var(--paper);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; margin-bottom: 1.2rem; }
.field label {
    font-size: .82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: .4rem;
}
.field input,
.field textarea {
    font-family: var(--sans);
    font-size: 1rem;
    padding: .75rem .9rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-elev);
    color: var(--ink);
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--terracotta);
    background: var(--paper);
}
.field textarea { resize: vertical; min-height: 140px; }

/* ------------------- Footer ------------------- */

.site-footer {
    background: var(--ink);
    color: var(--ink-inv);
    padding: clamp(3rem, 5vw, 5rem) 0 2rem;
    margin-top: clamp(3rem, 5vw, 5rem);
}
.site-footer a {
    color: rgba(246, 241, 232, 0.85);
    text-decoration: none;
}
.site-footer a:hover { color: var(--bg); text-decoration: underline; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .9fr .9fr 1.6fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(246, 241, 232, 0.1);
}
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h3, .footer-grid h4 { color: var(--ink-inv); }
.footer-grid h4 {
    font-family: var(--sans);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(246, 241, 232, 0.6);
    margin-bottom: 1rem;
}
.footer-brand h3 { font-family: var(--serif); font-size: 1.4rem; margin: .8rem 0 .25rem; }
.footer-brand .muted { color: rgba(246, 241, 232, 0.65); }
.footer-brand .brand-mark { background: var(--terracotta); color: var(--bg); }

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; font-size: .95rem; }

.footer-newsletter .muted { color: rgba(246, 241, 232, 0.65); }
.newsletter-row {
    display: flex;
    gap: .5rem;
    margin-top: .8rem;
}
.newsletter-row input {
    flex: 1 1 auto;
    padding: .7rem .9rem;
    border: 1px solid rgba(246, 241, 232, 0.2);
    background: rgba(246, 241, 232, 0.05);
    color: var(--ink-inv);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: .95rem;
}
.newsletter-row input::placeholder { color: rgba(246, 241, 232, 0.4); }
.newsletter-row input:focus { outline: none; border-color: var(--terracotta); background: rgba(246, 241, 232, 0.1); }
.newsletter-row button {
    padding: .7rem 1.1rem;
    background: var(--terracotta);
    color: var(--bg);
    border: 0;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease;
}
.newsletter-row button:hover { background: var(--terracotta-d); }
.newsletter-ok { margin-top: .7rem; color: var(--terracotta); font-size: .9rem; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-bottom p { margin: 0; color: rgba(246, 241, 232, 0.55); }

/* ------------------- 404 ------------------- */

.notfound {
    text-align: center;
    padding: clamp(4rem, 8vw, 8rem) 1.25rem;
}
.notfound .number {
    font-family: var(--serif);
    font-size: clamp(5rem, 12vw, 10rem);
    font-weight: 400;
    color: var(--terracotta);
    line-height: 1;
    font-style: italic;
}
.notfound h1 { margin: 1rem 0 .5rem; font-weight: 400; }
.notfound p { color: var(--ink-soft); margin: 1rem auto 2rem; max-width: 40ch; }
