/*
 * rivista · funghiallucinogeni.com
 * 1. Concept: an Italian modernist magazine issue (the Domus/Abitare tradition): white pages, black rules, one
 *    signal red, one ochre. Home = cover-story spread; articles = magazine features.
 * 2. Type: Playfair Display (high-contrast Didone-style headlines, italic standfirsts and pull quotes) +
 *    Albert Sans (modernist grotesk for body, kickers, folios). Self-hosted woff2, latin + latin-ext.
 * 3. Palette: white #ffffff, ink #141414, grey #5c5a55, rule #d9d6cf, signal red #c8231b (kickers, numbers,
 *    5.7:1 on white), ochre #d39b2a (fills, and text only on ink at 7.4:1), ochre tint #f6ecd6.
 * 4. Layout signature: full-bleed photo spread with headline and sommario on the cover; asymmetric 12-column
 *    "In questo numero" grid mixing an image lead, big red numbers, pull quotes, an ochre box and a black band;
 *    features with kicker/folio rule, standfirst, side byline, two-column body with spanning pull quotes.
 * 5. Finishing detail: page folios (p. 01, p. 02) everywhere, red drop cap, products as "Nel negozio" boxes.
 */
@font-face { font-family: 'Albert Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/albert-sans-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Albert Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/albert-sans-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/playfair-display-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/playfair-display-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/playfair-display-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/playfair-display-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --paper: #ffffff;
  --ink: #141414;
  --grey: #5c5a55;
  --rule: #d9d6cf;
  --red: #c8231b;
  --ochre: #d39b2a;
  --tint: #f6ecd6;
  --serif: 'Playfair Display', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Albert Sans', 'Helvetica Neue', Arial, sans-serif;
  --gut: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); font-feature-settings: "kern", "liga"; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: 0; }
.n { font: 600 .72rem/1 var(--sans); letter-spacing: .08em; color: var(--red); margin-right: .55em; font-variant-numeric: tabular-nums; }

/* masthead */
.mast { border-bottom: 1px solid var(--ink); }
.mast-strip { display: flex; justify-content: space-between; gap: 1rem; font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding-top: .7rem; padding-bottom: .7rem; border-bottom: 1px solid var(--rule); }
.mast-adults { color: var(--red); }
.mast-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.nameplate { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.nameplate img { width: 40px; height: 40px; }
.nameplate span { font: 800 1.45rem/1 var(--serif); letter-spacing: -.01em; }
.sections { display: none; }
.sections ol, .menu ol { list-style: none; margin: 0; padding: 0; }
.sections a { text-decoration: none; font: 600 .82rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .4rem 0; border-bottom: 2px solid transparent; }
.sections a[aria-current="page"] { border-bottom-color: var(--red); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 700 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--ink); padding: .6rem .8rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: #fff; }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); width: min(19rem, calc(100vw - 2 * var(--gut))); background: var(--paper); border: 1px solid var(--ink); z-index: 5; padding: .4rem 1rem; }
.menu li + li { border-top: 1px solid var(--rule); }
.menu a { display: block; padding: .7rem 0; text-decoration: none; font: 600 1rem/1.2 var(--sans); }
.menu a[aria-current="page"] { color: var(--red); }

/* shared bits */
.kicker, .tz-kicker { font: 700 .76rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 0; }
.standfirst { font: italic 400 1.3rem/1.45 var(--serif); margin: 0; }
.issue-title { margin: 0 0 1.5rem; border-top: 4px solid var(--ink); padding-top: .55rem; font: 700 .8rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }

/* cover spread */
.cover { display: grid; border-bottom: 1px solid var(--ink); }
.cover-fig { margin: 0; position: relative; background: var(--tint); }
.cover-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; }
.cover-fig figcaption { position: absolute; left: var(--gut); bottom: .7rem; right: var(--gut); font: 500 .7rem/1.3 var(--sans); color: #fff; letter-spacing: .04em; }
.cover-text { padding: 1.6rem var(--gut) 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.cover-text h1 { font: 800 clamp(2.6rem, 10.5vw, 5.8rem)/.98 var(--serif); letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.cover-text .standfirst { font-size: clamp(1.2rem, 3.6vw, 1.5rem); max-width: 34rem; }
.cover-index { list-style: none; margin: .4rem 0 0; padding: 0; columns: 2; column-gap: 1.5rem; border-top: 1px solid var(--ink); padding-top: .8rem; }
.cover-index li { break-inside: avoid; }
.cover-index a { display: block; padding: .3rem 0; text-decoration: none; font: 600 .95rem/1.3 var(--sans); }
.cover-folio { margin: 0; font: 500 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }

/* editorial */
.editorial { display: grid; gap: 2rem; padding-top: 2.6rem; padding-bottom: 3rem; }
.editorial-body > p:first-child { font-size: 1.15rem; }
.bignum { border-top: 4px solid var(--red); padding-top: .8rem; align-self: start; display: grid; gap: .6rem; }
.bignum-n { font: 800 clamp(5rem, 22vw, 9rem)/.85 var(--serif); color: var(--red); letter-spacing: -.04em; }
.bignum-label { font: italic 400 1.2rem/1.4 var(--serif); }
.bignum-link { font: 700 .78rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }

/* issue grid */
.issue { padding-bottom: 3.5rem; }
.issue-grid, .more-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem 2rem; }
.tz-link { display: flex; flex-direction: column; gap: .55rem; text-decoration: none; height: 100%; }
.tz-link:hover .tz-title { color: var(--red); }
.tz-fig { display: block; margin-bottom: .4rem; background: var(--tint); }
.tz-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tz-top { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--ink); padding-top: .55rem; }
.tz-folio { font: 600 .72rem/1.2 var(--sans); letter-spacing: .1em; color: var(--grey); }
.tz-title { font: 700 1.6rem/1.12 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.tz-text { color: var(--grey); font-size: .98rem; }
.tz-quote { font: italic 400 1.2rem/1.4 var(--serif); padding-left: .9rem; border-left: 3px solid var(--red); }
.tz-number { font: 800 clamp(3.4rem, 13vw, 5rem)/.9 var(--serif); color: var(--red); letter-spacing: -.03em; margin-top: .3rem; }
.tz-number-label { font: italic 400 1rem/1.35 var(--serif); }
.tz-more { margin-top: auto; padding-top: .3rem; font: 700 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.tz-more::after { content: " \2192"; color: var(--red); }
.tz-1 .tz-title { font-size: clamp(1.9rem, 6vw, 2.7rem); }
.tz-4 { background: var(--tint); padding: 0 1.1rem 1.2rem; }
.tz-4 .tz-top { border-top: 0; padding-top: 1rem; }
.v-band { background: var(--ink); color: #fff; padding: 0 1.2rem 1.4rem; }
.v-band .tz-top { border-top-color: #fff; border-top: 0; padding-top: 1.2rem; }
.v-band .tz-kicker, .v-band .tz-number { color: var(--ochre); }
.v-band .tz-text, .v-band .tz-folio { color: #d9d6cf; }
.v-band .tz-link:hover .tz-title { color: var(--ochre); }

/* feature (article) */
.feature-head { padding-top: 2.2rem; padding-bottom: 1.8rem; display: grid; gap: 1rem; }
.feature-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0; border-top: 4px solid var(--ink); padding-top: .6rem; }
.folio { font: 600 .74rem/1 var(--sans); letter-spacing: .1em; color: var(--grey); }
.feature-head h1 { font: 800 clamp(2.4rem, 9.5vw, 5.2rem)/1 var(--serif); letter-spacing: -.025em; margin: .2rem 0 0; max-width: 16ch; text-wrap: balance; }
.feature-head .standfirst { max-width: 40rem; font-size: clamp(1.2rem, 3.4vw, 1.55rem); }
.byline { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .3rem 0 0; font: 600 .74rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.byline span + span::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); margin-right: .9rem; vertical-align: .1em; }
.opener { margin: 0 0 2.4rem; }
.opener img { width: 100%; max-height: 78vh; object-fit: cover; }
.opener figcaption { font: 500 .78rem/1.4 var(--sans); color: var(--grey); padding-top: .5rem; }
.body { padding-bottom: 3rem; }
.more { padding-bottom: 3.5rem; }

/* prose */
.prose { max-width: 1240px; }
.prose p { margin: 0 0 1em; }
.prose h2 { font: 700 clamp(1.6rem, 5vw, 2.15rem)/1.12 var(--serif); letter-spacing: -.01em; margin: 2.2rem 0 .9rem; padding-top: .7rem; border-top: 1px solid var(--ink); text-wrap: balance; }
.prose h3 { font: 700 1.05rem/1.3 var(--sans); margin: 1.6rem 0 .5rem; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.2rem; }
.prose li { margin-bottom: .45em; break-inside: avoid; }
.prose ul li::marker { color: var(--red); }
.prose strong { font-weight: 700; }
.prose a:not(.shop) { text-decoration-color: var(--red); }
.feature:not(.is-error) .body > p:first-child::first-letter { float: left; font: 800 4.6rem/.8 var(--serif); color: var(--red); margin: .3rem .5rem 0 0; }
.prose blockquote { margin: 2rem 0; padding: 1.2rem 0; border-top: 3px solid var(--red); border-bottom: 1px solid var(--ink); }
.prose blockquote p { font: italic 400 clamp(1.5rem, 5vw, 2.25rem)/1.25 var(--serif); margin: 0; text-wrap: balance; }
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; max-height: 70vh; object-fit: cover; }
.prose .table { overflow-x: auto; margin: 1.6rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.prose th { text-align: left; font: 700 .74rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding: .5rem .8rem .5rem 0; }
.prose td { border-bottom: 1px solid var(--rule); padding: .65rem .8rem .65rem 0; font-variant-numeric: tabular-nums; }
.prose td:first-child { font: 700 1.15rem/1.2 var(--serif); }
.is-about .body figure { max-width: 220px; }
.is-about .body figure img { object-fit: contain; }

/* product cards */
.products, .product-feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 1.2rem; margin: 1.8rem 0 2rem; padding: 1.2rem; background: var(--tint); }
.shop { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; background: var(--paper); padding: .8rem .8rem 1rem; border-top: 3px solid var(--ink); }
.shop:hover { border-top-color: var(--red); }
.shop-img { display: block; background: var(--paper); }
.shop-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.shop-label { font: 700 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-top: .4rem; }
.shop-name { font: 700 1.05rem/1.25 var(--serif); }
.shop-row { display: flex; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .4rem; font: 600 .82rem/1.2 var(--sans); }
.shop-shop { color: var(--grey); text-align: right; }

/* footer */
.foot { background: var(--ink); color: #fff; padding: 2.6rem 0 1.4rem; }
.foot a:hover { color: var(--ochre); }
.foot-grid { display: grid; gap: 2rem; }
.nameplate-foot span { color: #fff; }
.foot-note, .foot p { font-size: .92rem; color: #e6e3dc; margin: 0 0 .7rem; }
.foot-h { font: 700 .74rem/1 var(--sans) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre) !important; margin-bottom: 1rem !important; }
.foot strong { font: 800 1.35rem/1 var(--serif); color: #fff; display: block; margin-bottom: .2rem; }
.mascot { width: 96px; margin-bottom: .8rem; }
.foot-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #4a4843; font: 500 .74rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #bdb9b0; }

/* tablet */
@media (min-width: 720px) {
  :root { --gut: 32px; }
  .issue-grid { grid-template-columns: repeat(6, 1fr); }
  .tz-1 { grid-column: span 6; }
  .tz-2, .tz-3 { grid-column: span 3; }
  .tz-4, .tz-5 { grid-column: span 3; }
  .tz-6 { grid-column: span 6; }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
  .editorial { grid-template-columns: minmax(0, 1fr) 15rem; column-gap: 3rem; }
}

/* desktop: the spread */
@media (min-width: 1080px) {
  .sections { display: block; }
  .sections ol { display: flex; gap: 1.6rem; }
  .menu { display: none; }
  .cover { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: min(92vh, 940px); }
  .cover-fig img { height: 100%; aspect-ratio: auto; }
  .cover-text { padding: 3.2rem max(var(--gut), calc((100vw - 1240px) / 2 + var(--gut))) 2.4rem 3.6rem; justify-content: space-between; border-left: 1px solid var(--ink); }
  .cover-text h1 { font-size: clamp(4.2rem, 6.4vw, 6.4rem); }
  .editorial { grid-template-columns: minmax(0, 1fr) 20rem; column-gap: 4.5rem; padding-top: 4rem; padding-bottom: 4.5rem; }
  .editorial-body { columns: 2; column-gap: 3rem; column-rule: 1px solid var(--rule); }
  .editorial-body h2 { break-after: avoid; margin-top: 0; font-size: 1.5rem; }
  .issue-grid { grid-template-columns: repeat(12, 1fr); gap: 3rem 2.5rem; }
  .tz-1 { grid-column: 1 / span 7; grid-row: span 2; }
  .tz-1 .tz-title { font-size: 3rem; }
  .tz-2 { grid-column: 8 / span 5; }
  .tz-3 { grid-column: 8 / span 5; }
  .tz-4 { grid-column: 1 / span 4; }
  .tz-5 { grid-column: 5 / span 4; }
  .tz-6 { grid-column: 9 / span 4; }
  .tz-6 .tz-number { font-size: 4.2rem; }
  .feature-head { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 4rem; padding-top: 3.2rem; padding-bottom: 2.6rem; }
  .feature-top, .feature-head h1 { grid-column: 1 / -1; }
  .feature-head .standfirst { grid-column: 1; }
  .byline { grid-column: 2; grid-row: 3; align-self: end; flex-direction: column; border-left: 1px solid var(--ink); padding-left: 1.2rem; }
  .byline span + span::before { display: none; }
  .body { columns: 2; column-gap: 3.5rem; column-rule: 1px solid var(--rule); }
  .body h2, .body blockquote, .body figure, .body .table, .body .products, .body .product-feature { column-span: all; }
  .body h2 { margin-top: 2.8rem; }
  .body blockquote { margin: 2.6rem 0; padding: 1.8rem 12% 1.8rem 0; }
  .body blockquote p { font-size: 2.6rem; }
  .body p { break-inside: avoid; }
  .body p, .body ul, .body ol { orphans: 3; widows: 3; }
  .is-about .body { columns: 1; }
  .is-about .body > * { max-width: 46rem; }
  .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .mast, .foot, .more { display: none; } }
