:root {
    --ss-bg: #f3efe5;
    --ss-paper: #fbf7ee;
    --ss-ink: #161512;
    --ss-muted: #70695c;
    --ss-line: #d8cdbd;
    --ss-accent: #7b3f2c;
    --ss-dark: #191713;
    --ss-dark-muted: #cfc2ae;
    --ss-max: 1180px;
    --ss-radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ss-bg);
    color: var(--ss-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image: linear-gradient(rgba(22,21,18,0.04) 1px, transparent 1px);
    background-size: 100% 42px;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
    margin: 0 0 0.45em;
}

h1 {
    font-size: clamp(4.1rem, 6.2vw, 6.7rem);
    max-width: 10.8ch;
}

h2 {
    font-size: clamp(2.1rem, 4.2vw, 4.65rem);
    max-width: 13ch;
}

h3 {
    font-size: clamp(1.55rem, 2.4vw, 2.6rem);
}

p {
    margin: 0 0 1.2rem;
    color: var(--ss-muted);
    font-size: clamp(1rem, 1.1vw, 1.13rem);
}

a {
    color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(243, 239, 229, 0.88);
    border-bottom: 1px solid rgba(216, 205, 189, 0.85);
}

.site-header__inner {
    width: min(var(--ss-max), calc(100% - 40px));
    margin: 0 auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-brand {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ss-ink);
}

.site-brand__title {
    font-family: Georgia, "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1;
}

.site-brand__tagline {
    color: var(--ss-muted);
    font-size: 0.62rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    margin-top: 0.44rem;
}

.site-nav__list,
.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
    align-items: center;
}

.site-nav a,
.footer-nav a {
    text-decoration: none;
    color: var(--ss-muted);
    font-size: 0.94rem;
}

.site-nav a:hover,
.footer-nav a:hover {
    color: var(--ss-accent);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--ss-line);
    background: var(--ss-paper);
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    color: var(--ss-ink);
}

.container {
    width: min(var(--ss-max), calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
}

.section {
    padding: clamp(76px, 9vw, 132px) 0;
    position: relative;
}

.section--paper {
    background: var(--ss-paper);
    border-top: 1px solid var(--ss-line);
    border-bottom: 1px solid var(--ss-line);
}

.section--dark {
    background: var(--ss-dark);
    color: var(--ss-bg);
}

.section--dark p,
.section--dark .section-intro {
    color: var(--ss-dark-muted);
}

.section-label,
.eyebrow {
    color: var(--ss-accent);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 1.1rem;
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: clamp(52px, 7.5vw, 104px) 0;
    position: relative;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: clamp(42px, 7vw, 92px);
    align-items: center;
}

.hero__content {
    max-width: 760px;
}

.hero__lead {
    max-width: 650px;
    font-size: clamp(1.08rem, 1.35vw, 1.28rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    background: var(--ss-ink);
    color: var(--ss-bg);
    text-decoration: none;
    font-weight: 800;
}

.button:hover {
    background: var(--ss-accent);
}

.button--ghost {
    background: transparent;
    color: var(--ss-ink);
    border: 1px solid var(--ss-line);
}

.button--ghost:hover {
    color: var(--ss-bg);
    border-color: var(--ss-accent);
}

.text-link {
    color: var(--ss-accent);
    font-weight: 800;
}

.hero__panel {
    min-height: 430px;
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    background:
        radial-gradient(circle at 68% 24%, rgba(123,63,44,0.13), transparent 26%),
        linear-gradient(135deg, rgba(255,255,255,0.42), rgba(123,63,44,0.045));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(22,21,18,0.06);
}

.hero__panel p {
    max-width: 285px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ss-ink);
    font-size: 1.24rem;
    line-height: 1.35;
    margin-bottom: 0;
}

.strata-mark {
    width: 100%;
    margin-top: 58px;
}

.strata-mark span {
    display: block;
    height: 8px;
    border-radius: 999px;
    margin-bottom: 23px;
    transform: rotate(-1.4deg);
}

.strata-mark span:nth-child(1) { width: 68%; background: var(--ss-accent); margin-left: 4%; }
.strata-mark span:nth-child(2) { width: 92%; background: var(--ss-ink); margin-left: 0; }
.strata-mark span:nth-child(3) { width: 54%; background: var(--ss-muted); margin-left: 16%; }
.strata-mark span:nth-child(4) { width: 80%; background: var(--ss-ink); margin-left: 8%; }
.strata-mark span:nth-child(5) { width: 47%; background: var(--ss-accent); margin-left: 2%; }

.editorial-block {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 52px;
}

.manifesto-lines {
    margin: 2rem 0 1.4rem;
    border-left: 3px solid var(--ss-accent);
    padding-left: 1.35rem;
}

.manifesto-lines p {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ss-ink);
    font-size: clamp(1.2rem, 1.75vw, 1.64rem);
    line-height: 1.35;
}

.split {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: clamp(32px, 6vw, 82px);
    align-items: center;
}

.magazine-card {
    min-height: 430px;
    padding: 34px;
    border-radius: var(--ss-radius);
    background: var(--ss-paper);
    border: 1px solid var(--ss-line);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 18px 60px rgba(22,21,18,0.08);
}

.magazine-card__kicker {
    color: var(--ss-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 800;
}

.section-intro {
    max-width: 760px;
    color: var(--ss-muted);
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 2.4rem;
}

.names-grid span {
    display: block;
    padding: 1rem;
    border: 1px solid rgba(243,239,229,0.18);
    border-radius: 14px;
    color: var(--ss-bg);
}

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

.project-card {
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    background: var(--ss-paper);
    padding: 28px;
    min-height: 260px;
}

.page-content h1 {
    max-width: none;
    font-size: clamp(3rem, 7vw, 7rem);
}

.entry-content {
    font-size: 1.1rem;
}

.entry-content p,
.entry-content li {
    color: var(--ss-ink);
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.post-list {
    display: grid;
    gap: 22px;
    margin-top: 36px;
}

.post-list__item {
    padding: 28px;
    border: 1px solid var(--ss-line);
    background: var(--ss-paper);
    border-radius: var(--ss-radius);
}

.post-list__item h2 {
    font-size: 2rem;
}

.site-footer {
    background: var(--ss-dark);
    color: var(--ss-bg);
    padding: 42px 0;
}

.site-footer p {
    color: var(--ss-dark-muted);
    margin: 0.25rem 0 0;
}

.site-footer__inner {
    width: min(var(--ss-max), calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.footer-nav a {
    color: var(--ss-dark-muted);
}

@media (max-width: 980px) {
    h1 {
        font-size: clamp(3.5rem, 8vw, 5.7rem);
    }

    .hero__grid {
        grid-template-columns: minmax(0, 1fr) 330px;
        gap: 36px;
    }

    .hero__panel {
        min-height: 380px;
    }
}

@media (max-width: 820px) {
    .site-header__inner {
        min-height: 76px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        left: 20px;
        right: 20px;
        top: 76px;
        background: var(--ss-paper);
        border: 1px solid var(--ss-line);
        border-radius: 18px;
        padding: 18px;
    }

    body.nav-open .site-nav {
        display: block;
    }

    .site-nav__list {
        display: grid;
        gap: 14px;
    }

    .hero__grid,
    .split,
    .cards,
    .editorial-block {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero__panel {
        min-height: 300px;
    }

    .strata-mark {
        margin-top: 10px;
    }

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

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 560px) {
    .container,
    .site-header__inner,
    .site-footer__inner {
        width: min(var(--ss-max), calc(100% - 28px));
    }

    h1 {
        font-size: clamp(3.3rem, 15vw, 4.7rem);
        max-width: 8.4ch;
    }

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

    .site-brand__title {
        font-size: 0.98rem;
    }

    .site-brand__tagline {
        font-size: 0.6rem;
        letter-spacing: 0.12em;
    }

    .button {
        width: 100%;
    }
}


/* === v0.4 refinements === */
h1 {
    font-size: clamp(3.7rem, 5.35vw, 5.95rem);
    max-width: 760px;
}

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

.hero-title span {
    display: block;
    white-space: nowrap;
}

.hero {
    padding: clamp(44px, 6.5vw, 92px) 0;
}

.hero__grid {
    grid-template-columns: minmax(0, 1fr) 365px;
    gap: clamp(38px, 6vw, 78px);
}

.hero__panel {
    min-height: 405px;
    padding: 28px;
}

.hero__panel p {
    font-size: 1.17rem;
}

.strata-mark {
    margin-top: 48px;
}

@media (max-width: 980px) {
    h1 {
        font-size: clamp(3.35rem, 7.4vw, 5.25rem);
    }

    .hero__grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 820px) {
    .hero__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: clamp(3.05rem, 13.5vw, 4.35rem);
        max-width: 100%;
    }

    .hero-title span {
        white-space: normal;
    }
}


/* === v0.5 content refinements === */
.hero-title {
    max-width: 860px;
}

.hero-title span {
    white-space: nowrap;
}

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

.names-grid span {
    min-height: 64px;
    display: flex;
    align-items: center;
}

.site-credit {
    color: var(--ss-dark-muted);
    font-size: 0.92rem;
}

.site-credit a {
    color: var(--ss-bg);
    text-decoration: none;
    border-bottom: 1px solid rgba(243,239,229,0.35);
}

.site-credit a:hover {
    color: var(--ss-dark-muted);
}

@media (max-width: 820px) {
    .names-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__inner {
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .hero-title span {
        white-space: normal;
    }

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


/* === v0.6 links and footer correction === */
.names-grid a {
    color: var(--ss-bg);
    text-decoration: none;
    border-bottom: 1px solid rgba(243,239,229,0.28);
}

.names-grid a:hover {
    color: var(--ss-dark-muted);
    border-bottom-color: rgba(243,239,229,0.6);
}


/* === v0.7 internal pages and migration structure === */
.internal-hero {
    padding: clamp(74px, 10vw, 150px) 0 clamp(42px, 7vw, 90px);
    border-bottom: 1px solid var(--ss-line);
}

.internal-hero h1 {
    max-width: 960px;
}

.readable {
    max-width: 980px;
}

.longform {
    max-width: 860px;
}

.longform h2 {
    max-width: 780px;
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    margin-top: 2.4rem;
    margin-bottom: 1.2rem;
}

.longform h2:first-child {
    margin-top: 0;
}

.longform p {
    color: var(--ss-ink);
    font-size: clamp(1.08rem, 1.25vw, 1.22rem);
    line-height: 1.78;
    margin-bottom: 1.35rem;
}

.content-credit,
.small-text {
    color: var(--ss-muted) !important;
    font-size: 0.95rem !important;
}

.magazine-card--compact {
    min-height: 330px;
}

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

.index-grid article {
    background: var(--ss-paper);
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    padding: 24px;
}

.index-grid h3 {
    font-size: clamp(1.28rem, 1.7vw, 1.8rem);
    line-height: 1.12;
}

.index-grid p {
    font-size: 0.98rem;
}

.content-columns {
    display: grid;
    grid-template-columns: 0.45fr 1fr;
    gap: clamp(32px, 6vw, 80px);
}

.simple-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--ss-ink);
    font-size: 1.1rem;
}

.project-card .text-link {
    display: inline-flex;
    margin-top: 0.75rem;
}

@media (max-width: 920px) {
    .index-grid,
    .content-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .internal-hero {
        padding-top: 58px;
    }

    .index-grid article {
        padding: 20px;
    }
}


/* === v0.8 structural refinements === */
.hero {
    min-height: auto;
    padding-top: clamp(34px, 5vw, 72px);
    padding-bottom: clamp(56px, 7vw, 96px);
}

.section {
    padding-top: clamp(64px, 7.5vw, 112px);
    padding-bottom: clamp(64px, 7.5vw, 112px);
}

.internal-hero {
    padding-top: clamp(58px, 8vw, 112px);
    padding-bottom: clamp(38px, 5vw, 70px);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 1.65rem;
}

.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: clamp(28px, 5vw, 70px);
    align-items: end;
    margin-bottom: clamp(28px, 5vw, 56px);
}

.section-heading-row h2 {
    margin-bottom: 0;
}

.section-heading-row p {
    margin-bottom: 0;
}

.rivista-browser {
    background: var(--ss-bg);
    border-top: 1px solid var(--ss-line);
    border-bottom: 1px solid var(--ss-line);
}

.spread-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.spread-grid a {
    display: block;
    overflow: hidden;
    border-radius: var(--ss-radius);
    border: 1px solid var(--ss-line);
    background: var(--ss-paper);
    box-shadow: 0 18px 60px rgba(22,21,18,0.08);
}

.spread-grid img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 350ms ease;
}

.spread-grid a:hover img {
    transform: scale(1.018);
}

#progetti .cards {
    margin-top: 1.5rem;
}

@media (max-width: 860px) {
    .section-heading-row,
    .spread-grid {
        grid-template-columns: 1fr;
    }
}
