/* Visit Pistoia prototype
   Tokens: forest ink, mist paper, serpentine green (the striped marble), chestnut, foliage gold.
   Motifs: zebra stripes (San Giovanni Fuorcivitas), mountain ridge (Montagna Pistoiese mark),
   notched corner (cut stone), paper grain. See /design-system/ for the full language. */

:root {
  --ink: #1b2a24;
  --ink-2: #2b3b34;
  --paper: #edefe9;
  --paper-2: #e2e5dd;
  --white: #f8f8f4;
  --green: #2f5d4a;
  --green-2: #3f7a62;
  --chestnut: #8c4a2b;
  --gold: #d9a441;
  --gold-2: #8a6114;
  --mist: #b7c3bb;
  --line: rgba(27, 42, 36, .14);
  --line-paper: rgba(237, 239, 233, .15);

  --notch: 12px;
  --stripes: repeating-linear-gradient(180deg, var(--green) 0 3px, transparent 3px 6px);
  --stripes-paper: repeating-linear-gradient(180deg, var(--paper) 0 3px, transparent 3px 6px);
  --stripes-gold: repeating-linear-gradient(180deg, var(--gold) 0 3px, transparent 3px 6px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Albert Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1440px;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: clamp(3rem, 6vw, 5rem);
  --space-5: clamp(5rem, 10vw, 9rem);

  --t-xs: .78rem;
  --t-sm: .92rem;
  --t-md: 1.05rem;
  --t-lg: clamp(1.25rem, 1.6vw, 1.5rem);
  --t-xl: clamp(2rem, 3.6vw, 3.4rem);
  --t-2xl: clamp(2.6rem, 6vw, 5.6rem);
  --t-hero: clamp(3rem, 11vw, 10.5rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 2px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.55;
  overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0; z-index: 95; pointer-events: none; background-image: var(--grain); opacity: .05; mix-blend-mode: multiply; }
::selection { background: var(--gold); color: var(--ink); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: -.02em; font-variation-settings: "opsz" 144, "SOFT" 30; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

/* Layout primitives */
main > section { padding-inline: var(--gutter); }
main > section:not(.hero):not(.mountain-band):not(.cover):not(.cta-band):not(.faces):not(.submit-band) {
  max-width: var(--max);
  margin-inline: auto;
}

.kicker,
.hero-kicker,
.band-kicker,
.cover-kicker,
.cta-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--t-lg);
  font-variation-settings: "opsz" 24, "SOFT" 60;
  color: var(--green);
  margin-bottom: var(--space-2);
}

main { counter-reset: sec; }
.section-head { padding-block: var(--space-5) var(--space-3); max-width: 60ch; }
.section-head::before { content: ""; display: block; width: 48px; height: 15px; margin-bottom: 20px; background: var(--stripes); }
.section-head .kicker { counter-increment: sec; }
.section-head .kicker::before { content: counter(sec, decimal-leading-zero); font-family: var(--font-body); font-style: normal; font-size: .72rem; font-weight: 600; letter-spacing: .16em; margin-right: 1em; vertical-align: .25em; opacity: .7; }
.section-title { font-size: var(--t-2xl); }
.section-lead { margin-top: var(--space-2); font-size: var(--t-lg); line-height: 1.4; color: var(--ink-2); max-width: 44ch; }

.page-hero { padding-top: calc(var(--space-5) + 64px); padding-bottom: var(--space-4); }
.page-title { font-size: var(--t-hero); line-height: .92; }
.page-lead { margin-top: var(--space-3); font-size: var(--t-lg); max-width: 46ch; color: var(--ink-2); }
.page-hero-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-4); align-items: end; }
.page-hero-media { aspect-ratio: 4 / 3; overflow: hidden; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .9em 1.4em;
  font-weight: 500; font-size: var(--t-sm);
  letter-spacing: .01em;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--green); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--white); }
.btn-ghost-paper { color: var(--paper); box-shadow: inset 0 0 0 1px rgba(237, 239, 233, .4); }
.btn-ghost-paper:hover { box-shadow: inset 0 0 0 1px var(--paper); }

.link-more {
  display: inline-flex; align-items: center; gap: .5em;
  margin-top: var(--space-3);
  font-weight: 500;
  padding-bottom: .25em;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: background-size .4s var(--ease);
}
.link-more:hover { background-image: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px); background-size: 100% 3px; }
.link-more svg { width: 1em; height: 1em; transition: transform .4s var(--ease); }
.link-more:hover svg { transform: translateX(5px); }

/* Stripes: the zebra marble of San Giovanni Fuorcivitas */
.stripes { display: inline-block; width: 48px; height: 15px; background: var(--stripes); }
.stripes-paper { background: var(--stripes-paper); }
.stripes-gold { background: var(--stripes-gold); }
.stripes-rule { display: block; width: 100%; height: 12px; background: repeating-linear-gradient(180deg, var(--green) 0 3px, var(--paper) 3px 6px); }

/* Header */
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--gold); color: var(--ink); padding: .6em 1em; font-weight: 600; transform: translateY(-200%); transition: transform .3s var(--ease); }
.skip-link:focus { transform: none; }
.page-veil { position: fixed; inset: 0; background: var(--ink); z-index: 90; pointer-events: none; transform-origin: top; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  padding: 18px var(--gutter);
  color: var(--paper);
  transition: color .4s, background .4s, padding .4s var(--ease), box-shadow .4s;
}
.site-header::before { content: ""; position: absolute; inset: 0 0 -64px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(27, 42, 36, .8) 0%, rgba(27, 42, 36, .45) 55%, rgba(27, 42, 36, 0) 100%); transition: opacity .4s; }
.site-header.is-solid { color: var(--paper); background: rgba(27, 42, 36, .88); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); padding-block: 10px; box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.site-header.is-solid::before { opacity: 0; }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); max-width: var(--max); margin-inline: auto; }
.brand { display: block; flex: none; }
.brand-logo { height: 46px; width: auto; transition: height .4s var(--ease); }
.brand-logo-ink { display: none; }
.site-header.is-solid .brand-logo { height: 38px; }
.nav-links { display: flex; gap: clamp(2px, .8vw, 8px); }
.nav-links a { position: relative; display: block; font-size: 1rem; font-weight: 500; letter-spacing: .01em; padding: .5em .75em; border-radius: 999px; text-shadow: 0 1px 2px rgba(27, 42, 36, .4); transition: background .3s, color .3s; }
.nav-links a::after { content: ""; position: absolute; left: .75em; right: .75em; bottom: .3em; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav-links a:hover { background: rgba(248, 248, 244, .12); }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }
.nav-links a[aria-current] { color: var(--gold); }
.site-header.is-solid .nav-links a { text-shadow: none; }
.site-header.is-solid .nav-links a:hover { background: rgba(255, 255, 255, .08); }
.nav-side { display: flex; align-items: center; gap: 18px; }
.nav-cta { display: inline-flex; align-items: center; gap: 9px; font-size: var(--t-sm); font-weight: 600; letter-spacing: .02em; padding: .6em 1.1em; box-shadow: inset 0 0 0 1px rgba(248, 248, 244, .55); clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); transition: background .3s, color .3s, box-shadow .3s; }
.nav-cta-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 164, 65, .7); } 70% { box-shadow: 0 0 0 9px rgba(217, 164, 65, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 164, 65, 0); } }
.nav-cta:hover { background: var(--gold); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold); }
.site-header.is-solid .nav-cta:hover .nav-cta-dot { animation: none; }
.burger { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); font-weight: 500; padding: .5em 0; }
.burger-lines { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.burger-lines span { height: 2px; background: currentColor; transition: transform .4s var(--ease), width .4s var(--ease); }
.burger-lines span:last-child { width: 70%; align-self: flex-end; }
.burger:hover .burger-lines span:last-child { width: 100%; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  background: var(--ink); color: var(--paper);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease);
  padding: 0 var(--gutter) var(--space-4);
  overflow: auto;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.m-bar { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; max-width: var(--max); margin-inline: auto; }
.m-logo { height: 46px; width: auto; }
.mobile-menu .close { display: inline-flex; align-items: center; gap: 10px; font-size: 2rem; line-height: 1; color: var(--paper); }
.mobile-menu .close span { font-size: var(--t-sm); font-weight: 500; }
.m-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-4); max-width: var(--max); margin-inline: auto; align-items: end; min-height: calc(100vh - 140px); }
.m-list a { display: flex; align-items: baseline; gap: .5em; font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 6rem); line-height: 1.05; letter-spacing: -.02em; padding-block: .08em; transition: color .3s, padding-left .4s var(--ease); font-variation-settings: "opsz" 144, "SOFT" 40; }
.m-index { font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .16em; color: var(--gold); opacity: .8; flex: none; width: 2.4em; }
.m-list a:hover, .m-list a[aria-current] { color: var(--gold); padding-left: .2em; }
.m-mps { height: 44px; width: auto; margin-top: var(--space-3); }
.m-item { transform: translateY(40px); opacity: 0; transition: transform .7s var(--ease), opacity .7s; }
.mobile-menu.is-open .m-item { transform: none; opacity: 1; }
.mobile-menu.is-open .m-item:nth-child(2) { transition-delay: .06s; }
.mobile-menu.is-open .m-item:nth-child(3) { transition-delay: .12s; }
.mobile-menu.is-open .m-item:nth-child(4) { transition-delay: .18s; }
.mobile-menu.is-open .m-item:nth-child(5) { transition-delay: .24s; }
.mobile-menu.is-open .m-item:nth-child(6) { transition-delay: .3s; }
.m-claim { font-family: var(--font-display); font-style: italic; font-size: var(--t-lg); color: var(--mist); margin-bottom: var(--space-3); }
.m-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.m-social, .footer-social { display: flex; gap: 14px; }
.m-social svg, .footer-social svg { width: 22px; height: 22px; }

/* HERO: four pinned chapters */
.hero { padding: 0 !important; background: var(--ink); color: var(--paper); }
.hero-pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 42, 36, .25) 0%, rgba(27, 42, 36, 0) 35%, rgba(27, 42, 36, .55) 100%); }

.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(80px, 14vh, 150px); max-width: var(--max); margin-inline: auto; }
.hero-kicker { color: var(--paper); opacity: .85; }
.hero-titles { position: relative; height: calc(var(--t-hero) * .92 * 2); }
.hero-title {
  position: absolute; left: 0; bottom: 0;
  font-size: var(--t-hero); line-height: .92;
  max-width: 10ch;
  opacity: 0; pointer-events: none;
  font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 350;
}
.hero-title.is-active { opacity: 1; }
.hero-texts { position: relative; height: 3.4em; margin-top: var(--space-2); max-width: 44ch; }
.hero-text { position: absolute; inset: 0 auto auto 0; font-size: var(--t-lg); line-height: 1.4; opacity: 0; }
.hero-text.is-active { opacity: 1; }

.hero-stripes {
  position: absolute; right: var(--gutter); bottom: clamp(80px, 14vh, 150px);
  display: flex; flex-direction: column; gap: 10px; width: clamp(120px, 14vw, 220px);
}
.hero-stripe { position: relative; height: 10px; background: rgba(248, 248, 244, .35); overflow: visible; }
.hero-stripe-fill { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }
.hero-stripe.is-active .hero-stripe-fill, .hero-stripe.is-done .hero-stripe-fill { transform: scaleX(1); }
.hero-stripe.is-active .hero-stripe-fill { background: var(--gold); }
.hero-stripe-label { position: absolute; right: calc(100% + 14px); top: 50%; transform: translate(6px, -50%); font-size: var(--t-xs); opacity: 0; transition: opacity .4s, transform .4s var(--ease); white-space: nowrap; }
.hero-stripe.is-active .hero-stripe-label { opacity: .9; transform: translate(0, -50%); }

.hero-scroll { position: absolute; left: var(--gutter); bottom: 24px; display: flex; align-items: center; gap: 12px; font-size: var(--t-xs); opacity: .8; }
.hero-scroll i { display: block; width: 48px; height: 1px; background: currentColor; transform-origin: left; animation: scrollhint 1.8s var(--ease) infinite; }
@keyframes scrollhint { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }

/* Manifesto */
.manifesto { padding-block: var(--space-5); }
.manifesto-text { font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.18; letter-spacing: -.015em; max-width: 26ch; font-variation-settings: "opsz" 72, "SOFT" 20; }
.manifesto-text em { font-style: italic; color: var(--green); font-variation-settings: "opsz" 72, "SOFT" 80; }
.manifesto-text .w { display: inline-block; opacity: .15; transition: opacity .3s; }
.manifesto-text .w.is-on { opacity: 1; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-top: var(--space-5); border-top: 1px solid var(--line); padding-top: var(--space-3); }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact-n { font-family: var(--font-display); font-size: var(--t-2xl); line-height: 1; font-variation-settings: "opsz" 144, "SOFT" 0, "wght" 300; }
.fact-label { font-size: var(--t-sm); color: var(--ink-2); }

/* Agenda */
.events-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-4); align-items: start; padding-bottom: var(--space-5); }
.agenda { border-top: 1px solid var(--line); }
.agenda-row { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--space-3); align-items: center; padding-block: 22px; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--ease); cursor: pointer; }
.agenda-row:hover { padding-left: 12px; }
.agenda-date { display: flex; flex-direction: column; line-height: 1; }
.agenda-date b { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; letter-spacing: -.02em; }
.agenda-date span { font-size: var(--t-xs); color: var(--green); margin-top: 4px; }
.agenda-title { font-family: var(--font-body); font-weight: 500; font-size: var(--t-md); letter-spacing: 0; line-height: 1.3; }
.agenda-meta { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px; }
.agenda-type { font-size: var(--t-xs); color: var(--green); border: 1px solid currentColor; border-radius: 999px; padding: .25em .7em; }
.agenda-arrow svg { width: 20px; height: 20px; transition: transform .4s var(--ease); }
.agenda-row:hover .agenda-arrow svg { transform: translateX(6px); }
.agenda-wide .agenda-row { grid-template-columns: 72px 1fr auto auto; }

.ongoing { background: var(--ink); color: var(--paper); padding: var(--space-3); position: sticky; top: 96px; }
.ongoing-title { font-size: var(--t-xl); margin-bottom: var(--space-3); }
.ongoing-item { padding-block: 16px; border-top: 1px solid rgba(237, 239, 233, .15); }
.ongoing-item h4 { font-family: var(--font-body); font-weight: 500; font-size: var(--t-md); letter-spacing: 0; line-height: 1.3; }
.ongoing-item p { font-size: var(--t-sm); color: var(--mist); margin-top: 6px; }
.ongoing .link-more { border-color: var(--paper); }

/* Full-bleed band with parallax */
.mountain-band, .cover { position: relative; min-height: 80vh; display: grid; align-items: end; overflow: hidden; color: var(--paper); padding-block: var(--space-4); }
/* Ridge: the mountain silhouette of the Montagna Pistoiese mark */
.mountain-band { padding-top: calc(var(--space-4) + 56px); clip-path: polygon(0 52px, 8% 14px, 17% 46px, 28% 0, 40% 42px, 51% 16px, 62% 50px, 74% 6px, 85% 44px, 94% 20px, 100% 38px, 100% 100%, 0 100%); }
.cover { min-height: 92vh; }
.band-badge { height: 52px; width: auto; margin-bottom: var(--space-3); filter: drop-shadow(0 2px 8px rgba(27, 42, 36, .35)); }
.band-img, .cover-img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; }
.mountain-band::after, .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 42, 36, .1), rgba(27, 42, 36, .7)); }
.band-copy, .cover-copy { position: relative; z-index: 1; max-width: var(--max); margin-inline: auto; width: 100%; }
.band-kicker, .cover-kicker { color: var(--gold); }
.band-title, .cover-title { font-size: var(--t-2xl); max-width: 12ch; }
.cover-title { font-size: var(--t-hero); line-height: .92; }
.band-text, .cover-lead { margin-block: var(--space-2) var(--space-3); font-size: var(--t-lg); max-width: 40ch; }

/* Experiences: pinned horizontal scroll */
.experiences { padding-bottom: var(--space-5); }
.hscroll-pin { position: relative; overflow: hidden; }
.hscroll-track { display: flex; gap: clamp(16px, 2vw, 32px); width: max-content; }
.exp-card { width: clamp(260px, 26vw, 380px); flex: none; }
.exp-media { aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: 14px; }
.exp-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.exp-link:hover .exp-media img { transform: scale(1.05); }
.exp-cat { font-size: var(--t-xs); color: var(--green); }
.exp-title { font-size: var(--t-lg); margin-top: 4px; line-height: 1.15; }
.exp-town { font-size: var(--t-sm); color: var(--ink-2); margin-top: 6px; }
.exp-card-end { display: grid; place-items: center; background: var(--ink); color: var(--paper); aspect-ratio: 3 / 4; align-self: start; }
.exp-end-link { display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--font-display); font-size: var(--t-xl); text-align: center; padding: var(--space-3); }
.exp-end-link svg { width: 32px; height: 32px; }
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.exp-grid .exp-card { width: auto; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-3); }
.filter { padding: .55em 1.1em; border-radius: 999px; border: 1px solid var(--line); font-size: var(--t-sm); transition: background .3s, color .3s, border-color .3s; }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.is-hidden { display: none !important; }

/* Ideas */
.ideas { padding-bottom: var(--space-5); }
.ideas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3) clamp(16px, 2vw, 32px); }
.ideas-grid > li:nth-child(3n + 2) { margin-top: var(--space-4); }
.idea-media { aspect-ratio: 4 / 5; overflow: hidden; }
.idea-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.idea-link:hover .idea-media img { transform: scale(1.04); }
.idea-meta { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--green); margin-top: 12px; }
.idea-title { font-size: var(--t-lg); line-height: 1.15; margin-top: 6px; }

/* Routes: rows with floating image */
.routes { position: relative; padding-bottom: var(--space-5); }
.route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
.route-card-link { display: flex; flex-direction: column; height: 100%; }
.route-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%); }
.route-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.route-card-link:hover .route-media img { transform: scale(1.05); }
.route-level { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: rgba(27, 42, 36, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--paper); font-size: var(--t-xs); }
.route-level i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.route-level.level-facile i { background: #7fbf8e; }
.route-level.level-impegnativo i { background: #e07a5f; }
.route-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding-top: 18px; }
.route-cat { font-size: var(--t-xs); color: var(--green); }
.route-title { font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.1; letter-spacing: -.015em; transition: color .3s; }
.route-card-link:hover .route-title { color: var(--green); }
.route-text { font-size: var(--t-sm); color: var(--ink-2); }
.route-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }
.route-town { display: inline-flex; align-items: center; gap: 6px; }
.route-town svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.route-go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s, transform .4s var(--ease); }
.route-go svg { width: 16px; height: 16px; }
.route-card-link:hover .route-go { background: var(--green); color: var(--paper); transform: translateX(4px); box-shadow: none; }
.routes .link-more { margin-top: var(--space-4); }
.level-facile { color: var(--green-2); }
.level-medio { color: var(--gold); }
.level-impegnativo { color: var(--chestnut); }

/* Gems */
.gems { padding-bottom: var(--space-5); }
.gem-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: auto; gap: var(--space-3) clamp(16px, 2vw, 32px); }
.gem-grid .gem-1 { grid-column: span 3; }
.gem-grid .gem-2 { grid-column: span 3; }
.gem-grid .gem-3, .gem-grid .gem-4, .gem-grid .gem-5 { grid-column: span 2; }
.gem-grid .gem-6 { grid-column: span 6; }
.gem-grid .gem-6 .gem-media { aspect-ratio: 21 / 9; }
.gem-media { aspect-ratio: 4 / 3; overflow: hidden; }
.gem-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gem-link:hover .gem-media img { transform: scale(1.04); }
.gem-cat { font-size: var(--t-xs); color: var(--green); margin-top: 12px; }
.gem-title { font-size: var(--t-lg); line-height: 1.15; margin-top: 4px; }
.gem-town { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px; }
.gem-text { font-size: var(--t-sm); color: var(--ink-2); margin-top: 10px; max-width: 40ch; }

/* Catalog page */
.catalog { padding-bottom: var(--space-5); }
.catalog-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--space-3); }
.catalog-count { font-family: var(--font-display); font-style: italic; color: var(--green); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4) clamp(16px, 2vw, 32px); }

/* Faces marquee */
.faces { background: var(--ink); color: var(--paper); padding-block: var(--space-4); overflow: hidden; }
.faces .kicker { color: var(--gold); padding-inline: var(--gutter); }
.faces-title { font-size: var(--t-xl); padding-inline: var(--gutter); margin-bottom: var(--space-3); }
.marquee { overflow: hidden; }
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; will-change: transform; }
.marquee-item { font-family: var(--font-display); font-size: var(--t-2xl); white-space: nowrap; font-variation-settings: "opsz" 144, "SOFT" 60, "wght" 300; }
.marquee-dot { width: 12px; height: 12px; background: var(--gold); border-radius: 50%; flex: none; }

/* Newsletter */
.newsletter { padding-block: var(--space-5); }
.newsletter-inner { max-width: 60ch; }
.newsletter-title { font-size: var(--t-xl); }
.newsletter-text { margin-top: var(--space-2); color: var(--ink-2); }
.nl-row { display: flex; gap: 10px; margin-top: var(--space-3); }
input, select, textarea { font: inherit; color: inherit; background: var(--white); border: 1px solid var(--line); padding: .9em 1em; width: 100%; border-radius: var(--radius); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: var(--t-sm); color: var(--ink-2); }
.check input { width: auto; accent-color: var(--green); }

/* Feature town */
.feature-town { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); padding-bottom: var(--space-5); align-items: start; }
.feature-media { position: relative; }
.feature-img-main { aspect-ratio: 4 / 5; overflow: hidden; }
.feature-img-main img { width: 100%; height: 120%; object-fit: cover; }
.feature-img-small { position: absolute; right: -8%; bottom: -10%; width: 46%; aspect-ratio: 1; overflow: hidden; border: 10px solid var(--paper); }
.feature-img-small img { width: 100%; height: 100%; object-fit: cover; }
.feature-copy { padding-top: var(--space-3); }
.feature-title { font-size: var(--t-hero); line-height: .9; }
.feature-text { margin-top: var(--space-3); font-size: var(--t-lg); line-height: 1.45; color: var(--ink-2); max-width: 46ch; }
.feature-text + .feature-text { margin-top: var(--space-2); font-size: var(--t-md); }
.feature-info { margin-top: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-2); }
.feature-info dt { font-family: var(--font-display); font-style: italic; color: var(--green); margin-bottom: 6px; }
.feature-info dd { margin: 0; }
.feature-info a { border-bottom: 1px solid var(--line); }

.towns { padding-bottom: var(--space-5); }
.towns .section-title { margin-bottom: var(--space-3); }
.town-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3) clamp(16px, 2vw, 32px); }
.town-media { aspect-ratio: 3 / 4; overflow: hidden; }
.town-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.town-link:hover .town-media img { transform: scale(1.05); }
.town-alt { font-size: var(--t-xs); color: var(--green); margin-top: 12px; }
.town-title { font-size: var(--t-lg); margin-top: 4px; }
.town-text { font-size: var(--t-sm); color: var(--ink-2); margin-top: 8px; }

/* Seasons: pinned with image swap */
.seasons { padding-block: var(--space-5) 0; }
.seasons-pin { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-3); align-items: start; }
.seasons-media { position: sticky; top: 100px; aspect-ratio: 4 / 5; overflow: hidden; }
.season-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); }
.season-img.is-active { opacity: 1; }
.seasons-list { display: flex; flex-direction: column; }
.season { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: .3; transition: opacity .5s; }
.season.is-active { opacity: 1; }
.season-name { font-family: var(--font-display); font-style: italic; font-size: var(--t-xl); color: var(--green); }
.season-title { font-size: var(--t-xl); margin-top: var(--space-2); max-width: 16ch; }
.season-text { margin-top: var(--space-2); font-size: var(--t-lg); color: var(--ink-2); max-width: 40ch; line-height: 1.45; }

.rail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: center; padding-block: var(--space-5); }
.rail-media { aspect-ratio: 4 / 3; overflow: hidden; }
.rail-media img { width: 100%; height: 100%; object-fit: cover; }

/* Events page */
.ongoing-strip { padding-bottom: var(--space-5); }
.ongoing-strip .section-title { margin-bottom: var(--space-3); }
.ongoing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.show-media { aspect-ratio: 3 / 4; overflow: hidden; }
.show-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.show-link:hover .show-media img { transform: scale(1.05); }
.show-dates { font-size: var(--t-xs); color: var(--green); margin-top: 12px; }
.show-title { font-size: var(--t-lg); line-height: 1.15; margin-top: 4px; }
.show-place { font-size: var(--t-sm); color: var(--ink-2); margin-top: 6px; }
.agenda-page { padding-bottom: var(--space-5); }
.month { margin-top: var(--space-4); display: grid; grid-template-columns: 200px 1fr; gap: var(--space-3); align-items: start; }
.month-name { font-size: var(--t-xl); position: sticky; top: 100px; }
.submit-band { background: var(--green); color: var(--paper); padding-block: var(--space-5); text-align: left; }
.submit-band > * { max-width: var(--max); margin-inline: auto; }
.submit-title { font-size: var(--t-2xl); }
.submit-text { margin-block: var(--space-2) var(--space-3); font-size: var(--t-lg); }

/* Contacts */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); padding-bottom: var(--space-5); }
.contacts-h { font-size: var(--t-xl); margin-bottom: var(--space-2); }
.contacts-h + .contacts-h, .mail-list + .contacts-h, .portal-list + .contacts-h { margin-top: var(--space-4); }
.mail-list li { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 14px; border-top: 1px solid var(--line); }
.mail-list li span { color: var(--ink-2); }
.mail-list a { border-bottom: 1px solid var(--ink); }
.portal-list li { border-top: 1px solid var(--line); }
.portal-list a { display: flex; justify-content: space-between; padding-block: 14px; font-weight: 500; }
.portal-list svg { width: 1.1em; height: 1.1em; transition: transform .4s var(--ease); }
.portal-list a:hover svg { transform: translateX(5px); }
.office-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.office { border-top: 1px solid var(--line); padding-top: 14px; }
.office-town { font-size: var(--t-lg); }
.office-name { font-weight: 500; margin-top: 6px; }
.office-address { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: 8px; }
.office-line { display: block; font-size: var(--t-sm); padding-block: 2px; }
.office-line:hover { color: var(--green); }
.contact-form-section { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-4); padding-bottom: var(--space-5); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.field label { display: block; font-size: var(--t-xs); margin-bottom: 6px; color: var(--ink-2); }
.field-full { grid-column: 1 / -1; }

/* CTA band */
.cta-band { background: var(--ink); color: var(--paper); padding-block: var(--space-5); }
.cta-inner { max-width: var(--max); margin-inline: auto; }
.cta-eyebrow { color: var(--gold); }
.cta-title { font-size: var(--t-2xl); }
.cta-text { margin-block: var(--space-2) var(--space-3); font-size: var(--t-lg); max-width: 44ch; color: var(--mist); }
.cta-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* Eyebrow labels: small caps-like tracking against the serif */
.exp-cat, .gem-cat, .idea-meta, .town-alt, .show-dates, .route-cat, .agenda-date span, .agenda-type, .route-level, .hero-stripe-label { text-transform: uppercase; letter-spacing: .12em; font-weight: 500; }
.agenda-type { letter-spacing: .08em; }

/* Footer */
.site-footer { position: relative; background: var(--ink); color: var(--paper); padding: calc(var(--space-5) + 12px) var(--gutter) var(--space-3); overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: repeating-linear-gradient(180deg, var(--paper) 0 3px, var(--green) 3px 6px); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-4); max-width: var(--max); margin-inline: auto; }
.footer-logo-link { display: inline-block; }
.footer-logo { height: 58px; width: auto; }
.footer-blurb { margin-top: var(--space-3); max-width: 38ch; color: var(--mist); }
.footer-partner { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--line-paper); }
.footer-mps { height: 46px; width: auto; }
.footer-nav ul { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { display: inline-block; font-family: var(--font-display); font-size: var(--t-lg); transition: color .3s, padding-left .4s var(--ease); }
.footer-nav a:hover { color: var(--gold); padding-left: .3em; }
.footer-label { font-family: var(--font-display); font-style: italic; color: var(--gold); margin-bottom: 10px; }
.footer-contacts a { display: block; padding-block: 2px; }
.footer-contacts .footer-social { margin-top: var(--space-2); }
.footer-top-link { display: inline-flex !important; align-items: center; gap: 8px; margin-top: var(--space-3); font-size: var(--t-sm); font-weight: 500; color: var(--mist); }
.footer-top-link:hover { color: var(--gold); }
.footer-top-link svg { width: 1em; height: 1em; transform: rotate(-90deg); }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; max-width: var(--max); margin-inline: auto; margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--line-paper); font-size: var(--t-xs); color: var(--mist); }
.footer-comuni { max-width: 60ch; }

/* Not found */
.not-found { padding-top: calc(var(--space-5) + 64px); padding-bottom: var(--space-5); min-height: 80vh; }
.nf-code { font-family: var(--font-display); font-size: var(--t-hero); line-height: 1; color: var(--green); }
.nf-title { font-size: var(--t-2xl); margin-top: var(--space-2); }
.nf-sub, .nf-lead { margin-top: var(--space-2); color: var(--ink-2); }
.not-found .btn { margin-top: var(--space-3); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: rgba(27, 42, 36, .96); color: var(--paper); width: 100vw; height: 100vh; max-width: none; max-height: none; display: none; place-items: center; }
.lightbox[open] { display: grid; }
.lb-figure { max-width: min(90vw, 1200px); }
.lb-img { max-height: 80vh; width: auto; margin-inline: auto; }
.lb-caption { text-align: center; margin-top: 12px; font-family: var(--font-display); font-style: italic; }
.lb-close, .lb-prev, .lb-next { position: absolute; color: var(--paper); font-size: 2rem; padding: 12px; }
.lb-close { top: 16px; right: 24px; font-size: 2.6rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Reveal: set by JS; without JS everything stays visible */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-split .ch { display: inline-block; }

/* Responsive */
@media (max-width: 1100px) {
  .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .gem-grid .gem-1, .gem-grid .gem-2, .gem-grid .gem-3, .gem-grid .gem-4, .gem-grid .gem-5 { grid-column: span 3; }
  .ongoing-grid { grid-template-columns: repeat(3, 1fr); }
  .exp-grid, .town-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .route-grid { grid-template-columns: 1fr; }
  :root { --t-hero: clamp(2.6rem, 13vw, 5.4rem); }
  .brand-logo, .site-header.is-solid .brand-logo, .m-logo { height: 36px; }
  .nav-cta { display: none; }
  .band-badge { height: 40px; }
  .mountain-band { clip-path: polygon(0 28px, 12% 6px, 24% 26px, 38% 0, 52% 24px, 66% 8px, 80% 28px, 92% 10px, 100% 22px, 100% 100%, 0 100%); padding-top: calc(var(--space-4) + 28px); }
  .m-mps { height: 36px; }
  .m-inner { grid-template-columns: 1fr; align-items: start; min-height: 0; }
  .hero-stripes { left: var(--gutter); right: var(--gutter); bottom: 60px; width: auto; flex-direction: row; gap: 6px; }
  .hero-stripe { flex: 1; height: 6px; }
  .hero-stripe-label { display: none; }
  .hero-copy { bottom: 90px; }
  .hero-texts { height: 4.6em; }
  .hero-scroll { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .events-grid, .seasons-pin, .rail, .feature-town, .contacts, .contact-form-section, .page-hero-split, .footer-top { grid-template-columns: 1fr; }
  .ongoing { position: static; }
  .seasons-media { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .season { min-height: 0; padding-block: var(--space-3); opacity: 1; }
  .ideas-grid, .catalog-grid { grid-template-columns: 1fr 1fr; }
  .ideas-grid > li:nth-child(3n + 2) { margin-top: 0; }
  .gem-grid .gem-1, .gem-grid .gem-2, .gem-grid .gem-3, .gem-grid .gem-4, .gem-grid .gem-5, .gem-grid .gem-6 { grid-column: span 6; }
  .gem-grid .gem-6 .gem-media { aspect-ratio: 4 / 3; }
  .ongoing-grid { grid-template-columns: 1fr 1fr; }
  .exp-grid, .town-list { grid-template-columns: 1fr; }
  .office-list { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .month { grid-template-columns: 1fr; }
  .month-name { position: static; }
  .agenda-row, .agenda-wide .agenda-row { grid-template-columns: 56px 1fr; }
  .agenda-arrow, .agenda-type { display: none; }
  .feature-img-small { right: 0; }
  .nl-row { flex-direction: column; }
  .hscroll-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .exp-card { scroll-snap-align: start; width: 72vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Design system page (/design-system/) */
.ds-hero { padding-bottom: var(--space-3); }
.ds-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-4) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--line); }
.ds-meta div { display: flex; flex-direction: column; gap: 4px; }
.ds-meta dt { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-weight: 500; }
.ds-meta dd { margin: 0; font-family: var(--font-display); font-size: var(--t-lg); }

.ds { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-4); padding-bottom: var(--space-5); align-items: start; }
.ds-toc { position: sticky; top: 90px; }
.ds-toc-label { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-weight: 500; margin-bottom: 10px; }
.ds-toc ol { counter-reset: toc; border-top: 1px solid var(--line); }
.ds-toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.ds-toc a { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; font-size: var(--t-sm); transition: padding-left .3s var(--ease), color .3s; }
.ds-toc a::before { content: counter(toc, decimal-leading-zero); font-size: .68rem; letter-spacing: .12em; color: var(--green); opacity: .7; }
.ds-toc a:hover { padding-left: 6px; color: var(--green); }

.ds-section { padding-top: var(--space-4); margin-bottom: var(--space-5); scroll-margin-top: 90px; border-top: 1px solid var(--line); }
.ds-section:first-child { border-top: 0; padding-top: 0; }
.ds-head { max-width: 64ch; margin-bottom: var(--space-4); }
.ds-head::before { content: ""; display: block; width: 48px; height: 15px; margin-bottom: 20px; background: var(--stripes); }
.ds-title { font-size: var(--t-xl); }
.ds-title code { font-family: inherit; font-style: italic; color: var(--green); }
.ds-lead { margin-top: var(--space-2); font-size: var(--t-lg); line-height: 1.4; color: var(--ink-2); max-width: 48ch; }
.ds-h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-md); letter-spacing: 0; margin: var(--space-4) 0 var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.ds-h3:first-of-type { margin-top: 0; }
.ds-note { font-size: var(--t-sm); color: var(--ink-2); max-width: 70ch; margin-bottom: var(--space-2); }
.ds code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82em; background: var(--paper-2); padding: .15em .45em; border-radius: var(--radius); }
.ds-code { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--t-sm); margin-top: 8px; }
.ds-on-ink { background: var(--ink); color: var(--paper); }
.ds-on-ink code { background: rgba(237, 239, 233, .12); }
.ds-on-paper { background: var(--paper-2); color: var(--ink); }
.ds-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.ds-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-3); }
.ds-card-text { border-top: 1px solid var(--line); padding-top: var(--space-2); }
.ds-card-text .ds-h3 { border-top: 0; padding-top: 0; margin-top: 0; }
.ds-card-text p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.6; }
.ds-list li { position: relative; padding-left: 1.6em; padding-block: 6px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); line-height: 1.5; }
.ds-list li::before { content: ""; position: absolute; left: 0; top: .95em; width: 8px; height: 8px; background: var(--green); }
.ds-list-ok li::before { background: var(--green-2); border-radius: 50%; }
.ds-list-no li::before { background: var(--chestnut); transform: rotate(45deg); }
.ds-list strong { font-weight: 600; }

.ds-principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.ds-principles li { padding: var(--space-3); background: var(--paper-2); }
.ds-principles .stripes { margin-bottom: var(--space-2); }
.ds-principles h3 { font-size: var(--t-xl); margin-bottom: var(--space-2); }
.ds-principles p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.6; max-width: 40ch; }

.ds-logos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-3); }
.ds-logo { display: grid; place-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-3) var(--space-2); min-height: 220px; }
.ds-logo img { height: 64px; width: auto; }
.ds-logo figcaption { font-size: var(--t-xs); opacity: .8; text-align: center; }
.ds-on-ink.ds-logo figcaption { color: var(--mist); }
.ds-clearspace { display: grid; gap: 12px; }
.ds-clearspace-box { display: grid; place-items: center; padding: 42px; border: 1px dashed var(--green); background: var(--white); position: relative; }
.ds-clearspace-box::before, .ds-clearspace-box::after { content: ""; position: absolute; border: 1px dashed rgba(47, 93, 74, .5); }
.ds-clearspace-box::before { inset: 42px 0; }
.ds-clearspace-box::after { inset: 0 42px; }
.ds-clearspace-box img { height: 42px; width: auto; position: relative; z-index: 1; }
.ds-clearspace figcaption { font-size: var(--t-sm); color: var(--ink-2); }

.ds-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin-bottom: var(--space-4); }
.ds-swatch-chip { aspect-ratio: 3 / 2; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; }
.ds-swatch h3 { font-size: var(--t-lg); }
.ds-swatch-role { font-size: var(--t-xs); color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.ds-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); margin-bottom: var(--space-3); }
.ds-table th { text-align: left; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-weight: 500; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--ink); }
.ds-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ds-pair { display: inline-block; padding: .4em .9em; font-family: var(--font-display); font-size: 1.1rem; }
.ds-grade { display: inline-block; padding: .25em .7em; font-size: var(--t-xs); border-radius: 999px; border: 1px solid currentColor; }
.ds-grade-ok { color: var(--green); }
.ds-grade-mid { color: var(--gold-2); }
.ds-grade-no { color: var(--chestnut); }

.ds-specimen { background: var(--paper-2); padding: var(--space-3); }
.ds-specimen-big { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5.5rem); line-height: .95; letter-spacing: -.02em; font-variation-settings: "opsz" 144, "SOFT" 30; }
.ds-specimen-body { font-size: var(--t-lg); line-height: 1.45; }
.ds-specimen figcaption { margin-top: var(--space-3); font-size: var(--t-sm); color: var(--ink-2); line-height: 1.6; }
.ds-scale td:last-child { width: 46%; }
.ds-sample { font-family: var(--font-display); line-height: 1; display: block; }
.ds-sample-xs, .ds-sample-sm, .ds-sample-md { font-family: var(--font-body); }
.ds-sample-xs { font-size: var(--t-xs); }
.ds-sample-sm { font-size: var(--t-sm); }
.ds-sample-md { font-size: var(--t-md); }
.ds-sample-lg { font-size: var(--t-lg); }
.ds-sample-xl { font-size: var(--t-xl); }
.ds-sample-2xl { font-size: var(--t-2xl); }
.ds-sample-hero { font-size: clamp(3rem, 7vw, 6rem); }
.ds-styles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ds-style { display: grid; grid-template-columns: 1fr 260px; gap: var(--space-3); align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); }
.ds-style .kicker, .ds-style .section-lead { margin: 0; }
.ds-style-name { font-size: var(--t-xs); color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; }

.ds-spaces { display: grid; gap: 10px; margin-bottom: var(--space-3); }
.ds-spaces li { display: grid; grid-template-columns: 110px auto 1fr; gap: 14px; align-items: center; font-size: var(--t-sm); }
.ds-space-bar { display: block; height: 14px; background: var(--green); }
.ds-space-val { color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; font-size: var(--t-xs); }
.ds-grids { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.ds-grid-demo { display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); gap: 8px; }
.ds-grid-demo span { display: block; height: 56px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.ds-grid-demo em { grid-column: 1 / -1; font-style: normal; font-size: var(--t-xs); color: var(--ink-2); margin-top: 4px; }
.ds-grid-demo-gems { grid-template-columns: repeat(6, 1fr); }
.ds-grid-demo-gems .g3 { grid-column: span 3; }
.ds-grid-demo-gems .g2 { grid-column: span 2; }
.ds-grid-demo-gems .g6 { grid-column: span 6; }
.ds-grid-demo-split { grid-template-columns: 1.5fr 1fr; }

.ds-motifs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.ds-motif-demo { display: flex; align-items: center; gap: 14px; min-height: 120px; padding: var(--space-2) var(--space-3); background: var(--paper-2); margin-bottom: var(--space-2); overflow: hidden; }
.ds-motif h3 { font-size: var(--t-lg); margin-bottom: 8px; }
.ds-motif p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }
.ds-on-ink-inline { background: var(--stripes); }
.ds-motif-ridge { padding: 0; align-items: end; background: var(--paper-2); }
.ds-ridge { width: 100%; height: 90px; background: var(--ink); clip-path: polygon(0 32px, 8% 10px, 17% 28px, 28% 0, 40% 26px, 51% 10px, 62% 30px, 74% 4px, 85% 27px, 94% 12px, 100% 24px, 100% 100%, 0 100%); }
.ds-motif-grain { background: var(--paper); background-image: var(--grain); background-blend-mode: multiply; }
.ds-counter-demo { margin: 0; }
.ds-counter-demo::before { content: "03"; font-family: var(--font-body); font-style: normal; font-size: .72rem; font-weight: 600; letter-spacing: .16em; margin-right: 1em; vertical-align: .25em; opacity: .7; }
.ds-dot-demo { display: block; width: 12px; height: 12px; }

.ds-headers { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.ds-headbar { position: relative; overflow: hidden; color: var(--paper); }
.ds-headbar > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ds-headbar-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 42, 36, .8), rgba(27, 42, 36, .45) 55%, rgba(27, 42, 36, 0)); }
.ds-headbar-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 18px 28px; }
.ds-headbar-photo .ds-headbar-inner { padding-bottom: 70px; }
.ds-headbar-logo { height: 40px; width: auto; }
.ds-headbar ul { display: flex; gap: 6px; font-size: .95rem; font-weight: 500; }
.ds-headbar li { padding: .5em .75em; position: relative; text-shadow: 0 1px 2px rgba(27, 42, 36, .4); }
.ds-headbar li.is-current { color: var(--gold); }
.ds-headbar li.is-current::after { content: ""; position: absolute; left: .75em; right: .75em; bottom: .3em; height: 2px; background: var(--gold); }
.ds-headbar-cta { display: inline-flex; align-items: center; gap: 9px; font-size: var(--t-sm); font-weight: 600; padding: .6em 1.1em; box-shadow: inset 0 0 0 1px rgba(248, 248, 244, .55); clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); }
.ds-headbar-cta i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.ds-headbar > em { position: absolute; left: 28px; bottom: 14px; font-style: normal; font-size: var(--t-xs); opacity: .85; }
.ds-headbar-solid { background: rgba(27, 42, 36, .94); color: var(--paper); padding-bottom: 34px; }
.ds-headbar-solid li { text-shadow: none; }

.ds-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3); margin-bottom: var(--space-2); }
.ds-row .link-more { margin-top: 0; }
.ds-frame { border: 1px dashed var(--line); padding: 0 var(--space-3); margin-bottom: var(--space-2); }
.ds-section-head-demo { padding-block: var(--space-3); }
.ds-section-head-demo .kicker::before { content: "02"; font-family: var(--font-body); font-style: normal; font-size: .72rem; font-weight: 600; letter-spacing: .16em; margin-right: 1em; vertical-align: .25em; opacity: .7; }
.ds-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); align-items: start; }
.ds-cards .exp-card { width: auto; }
.ds-cards h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; }
.ds-cap { display: block; margin-top: 12px; font-size: var(--t-xs); color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; }
.ds-events-demo { padding-bottom: 0; }
.ds-ongoing-demo { position: static; }
.ds-ongoing-demo h4 { font-family: var(--font-display); font-weight: 400; }
.ds-ongoing-demo h5 { font-family: var(--font-body); font-weight: 500; font-size: var(--t-md); margin: 0; }
.ds-facts-demo { margin-top: 0; }
.ds-form-demo { max-width: 720px; }
.ds-bands { display: grid; gap: var(--space-2); }
.ds-band-demo { position: relative; padding: var(--space-4) var(--space-3) var(--space-3) !important; min-height: 0; }
.ds-band-demo .cta-inner, .ds-band-demo > * { max-width: none; }
.ds-band-demo h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: 1; }
.ds-band-demo .cta-title { font-size: var(--t-xl); }
.ds-band-demo .submit-title { font-size: var(--t-xl); }
.ds-band-demo .ds-cap { color: inherit; opacity: .7; position: relative; z-index: 1; }
.ds-band-mountain { min-height: 420px; display: grid; align-items: end; padding-top: calc(var(--space-4) + 56px) !important; }
.ds-band-mountain .band-title { font-size: var(--t-xl); }
.ds-motion td:nth-child(3) { font-family: ui-monospace, Menlo, monospace; font-size: var(--t-xs); }
.ds-icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2); }
.ds-icons li { display: grid; gap: 10px; padding: var(--space-3) var(--space-2); background: var(--paper-2); text-align: center; justify-items: center; }
.ds-icon { display: grid; place-items: center; width: 56px; height: 56px; background: var(--white); }
.ds-icon svg { width: 28px; height: 28px; }
.ds-burger-demo span { height: 2px; background: var(--ink); }
.ds-icons em { font-style: normal; font-size: var(--t-xs); color: var(--ink-2); }
.ds-pre { background: var(--ink); color: var(--paper); padding: var(--space-3); overflow: auto; font-size: var(--t-sm); line-height: 1.6; }
.ds-pre code { background: none; padding: 0; font-size: inherit; }

@media (max-width: 1100px) {
  .ds { grid-template-columns: 1fr; }
  .ds-toc { position: static; }
  .ds-toc ol { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 0; }
  .ds-toc li { border-bottom: 0; }
  .ds-swatches, .ds-cards { grid-template-columns: repeat(2, 1fr); }
  .ds-motifs, .ds-grid-3, .ds-icons { grid-template-columns: repeat(2, 1fr); }
  .ds-headbar ul { display: none; }
}
@media (max-width: 820px) {
  .ds-grid-2, .ds-logos, .ds-principles, .ds-grids, .ds-grid-3, .ds-motifs, .ds-swatches, .ds-cards, .ds-icons { grid-template-columns: 1fr; }
  .ds-style { grid-template-columns: 1fr; gap: 8px; }
  .ds-table { display: block; overflow-x: auto; }
  .ds-headbar-cta { display: none; }
}
