/* Swayspalhouse — Editorial aesthetic, Framed canvas cards */
:root {
  --burgundy: #6e1f2e;
  --burgundy-dark: #4a1420;
  --burgundy-deep: #34101a;
  --ivory: #faf6ee;
  --ivory-deep: #f2e9d6;
  --paper: #efe4cc;
  --sage: #a3b18a;
  --sage-tint: #e4e9da;
  --sage-dark: #46553c;
  --gold: #b08d57;
  --gold-light: #dcc392;
  --ink: #2a2023;
  --muted: #5b4d4f;
  --rule: #dccfb6;
  --error: #9b1b30;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s3)); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--burgundy-dark);
  margin: 0 0 var(--s3);
  overflow-wrap: anywhere;
}
p { margin: 0 0 var(--s3); }
a { color: var(--burgundy); text-underline-offset: 3px; }
a:hover { color: var(--burgundy-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -100px;
  background: var(--burgundy);
  color: var(--ivory);
  padding: var(--s2) var(--s3);
  z-index: 300;
}
.skip-link:focus { top: var(--s2); color: var(--ivory); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--s4); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ivory);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(74, 20, 32, .08); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.header-inner > * { min-width: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: none;
  text-decoration: none;
  color: var(--burgundy-dark);
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand:hover { color: var(--burgundy); }
.brand-name { white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.site-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-list { list-style: none; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s4); margin: 0; padding: 0; }
.nav-list li { flex: none; }
.nav-list a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: var(--s2) 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--burgundy); border-bottom-color: var(--gold); }
.header-cta {
  flex: none;
  background: var(--burgundy);
  color: var(--ivory);
  text-decoration: none;
  font-size: .8125rem;
  letter-spacing: .06em;
  white-space: nowrap;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--burgundy);
  transition: background-color .2s ease;
}
.header-cta:hover { background: var(--burgundy-dark); color: var(--ivory); }
.nav-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--s2);
  background: transparent;
  color: var(--burgundy-dark);
  border: 1px solid var(--rule);
  cursor: pointer;
}
.nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--burgundy-dark); }
.nav-close {
  display: none;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  background: transparent;
  color: var(--burgundy-dark);
  border: 1px solid var(--rule);
  cursor: pointer;
}
/* Drawer-only CTA: hidden on desktop (higher specificity than .btn so it is not overridden) */
.site-nav .nav-cta-mobile { display: none; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .9375rem;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 12px var(--s4);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  text-align: center;
}
.btn--primary { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.btn--primary:hover { background: var(--burgundy-dark); color: var(--ivory); }
.btn--ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn--ghost:hover { background: var(--burgundy); color: var(--ivory); }
.btn--light { background: var(--ivory); color: var(--burgundy-dark); border-color: var(--ivory); }
.btn--light:hover { background: var(--gold-light); color: var(--burgundy-deep); border-color: var(--gold-light); }
.btn--outline-light { background: transparent; color: var(--ivory); border-color: var(--ivory); }
.btn--outline-light:hover { background: var(--ivory); color: var(--burgundy-dark); }

/* Paper texture (layered Renaissance paper) */
.paper-texture {
  position: relative;
  isolation: isolate;
  background-color: var(--ivory-deep);
  color: var(--ink);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(176, 141, 87, .18) 0, transparent 30%),
    radial-gradient(circle at 86% 80%, rgba(110, 31, 46, .08) 0, transparent 34%),
    radial-gradient(circle at 60% 10%, rgba(163, 177, 138, .16) 0, transparent 26%),
    linear-gradient(180deg, #f7f0e1 0%, #efe4cc 100%);
}
.paper-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='paper-grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper-grain)'/%3E%3C/svg%3E");
}
.paper-texture::after {
  content: "";
  position: absolute;
  inset: var(--s3);
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(176, 141, 87, .5);
}

/* Hero */
.hero { padding: var(--s6) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s6); align-items: center; }
.hero-grid > * { min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  font-size: .8125rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: var(--s3);
  overflow-wrap: anywhere;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.hero h1 em { color: var(--burgundy); }
.hero-lede { font-size: 1.1875rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s4) 0 var(--s5); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  border-top: 1px solid var(--rule);
  padding-top: var(--s4);
  margin: 0;
}
.stat { display: flex; flex-direction: column-reverse; gap: 12px; min-width: 0; }
.stat-value { margin: 0; font-family: var(--serif); font-size: 2.25rem; line-height: 1; color: var(--burgundy); overflow-wrap: anywhere; }
.stat-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.hero-media { position: relative; padding: 0 var(--s4) var(--s4) 0; min-width: 0; }
.hero-media::before {
  content: "";
  position: absolute;
  top: var(--s4); left: var(--s4); right: 0; bottom: 0;
  background: var(--sage-tint);
  border: 1px solid var(--gold);
}
.hero-media::after {
  content: "";
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  background: #f3ead6;
  border: 1px solid rgba(176, 141, 87, .6);
}
.hero-image-frame { position: relative; z-index: 1; margin: 0; overflow: hidden; background: var(--paper); color: var(--ink); }
.hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  animation: hero-image-reveal 1.6s cubic-bezier(.22, .61, .36, 1) .2s both;
}
.hero-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: .9375rem;
  color: var(--muted);
  background: var(--ivory);
  padding: 12px var(--s3);
  border-top: 1px solid var(--rule);
}
@keyframes hero-image-reveal {
  from { clip-path: inset(100% 0 0 0); transform: scale(1.08); }
  to { clip-path: inset(0 0 0 0); transform: scale(1); }
}

/* Sections */
.section { padding: var(--s6) 0; }
.section--tinted { background: var(--ivory-deep); color: var(--ink); }
.section-head {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: var(--s4);
  border-top: 2px solid var(--burgundy);
  padding-top: var(--s4);
  margin-bottom: var(--s5);
}
.section-head > * { min-width: 0; }
.section-number { font-family: var(--serif); font-size: 2rem; color: var(--gold); line-height: 1; margin: 0; }
.section-head h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
.section-intro { color: var(--muted); max-width: 44em; margin: 0; }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s5); }
.card-grid > * { min-width: 0; }
.card-grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-width: 900px; }

/* Framed canvas card */
.frame-card { position: relative; padding: 0 var(--s3) var(--s3) 0; min-width: 0; }
.frame-card::before {
  content: "";
  position: absolute;
  top: var(--s3); left: var(--s3); right: 0; bottom: 0;
  background: var(--sage-tint);
  border: 1px solid var(--gold);
  transition: background-color .3s ease;
}
.frame-card__body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  color: var(--ink);
  border: 1px solid var(--rule);
  transition: transform .35s ease, box-shadow .35s ease;
}
.frame-card:hover .frame-card__body, .frame-card:focus-within .frame-card__body {
  transform: translate(-6px, -6px);
  box-shadow: 0 12px 24px rgba(74, 20, 32, .12);
}
.frame-card:hover::before { background: #d7dfc8; }
.frame-card__media { overflow: hidden; border-bottom: 1px solid var(--rule); }
.card-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.frame-card__content { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); flex: 1; }
.frame-card__content > * { margin: 0; min-width: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: var(--s1) var(--s2);
  background: var(--sage-tint);
  color: var(--sage-dark);
  border: 1px solid #c7d0b6;
}
.tag--free { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.card-title { font-size: 1.5rem; }
.card-title a { color: var(--burgundy-dark); text-decoration: none; }
.card-title a:hover { color: var(--burgundy); text-decoration: underline; }
.card-text { color: var(--muted); }
.card-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); font-size: .875rem; border-top: 1px solid var(--rule); padding-top: var(--s3); }
.card-meta dt { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: var(--muted); }
.card-meta dd { margin: 0; color: var(--ink); }
.card-cta { margin-top: auto; font-weight: 600; color: var(--burgundy); text-decoration: none; letter-spacing: .02em; }
.card-cta:hover { color: var(--burgundy-dark); text-decoration: underline; }

/* City cards */
.city-card {
  width: 100%;
  font: inherit;
  text-align: left;
  padding: var(--s4);
  gap: var(--s3);
  cursor: pointer;
  align-items: flex-start;
}
.city-card__emblem { width: 64px; height: 40px; color: var(--gold); }
.city-card__title { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; color: var(--burgundy-dark); overflow-wrap: anywhere; }
.city-card__count { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-dark); }
.city-card__text { color: var(--muted); }
.city-card.is-active { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.city-card.is-active .city-card__title, .city-card.is-active .city-card__count, .city-card.is-active .city-card__text { color: var(--ivory); }
.city-card.is-active .city-card__emblem { color: var(--gold-light); }
.filter-status { margin: var(--s4) 0 0; font-size: .9375rem; color: var(--muted); font-style: italic; }
.empty-note { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); background: var(--sage-tint); color: var(--sage-dark); border-left: 2px solid var(--sage-dark); }

/* Map */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.map-layout > * { min-width: 0; }
.map-canvases { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s4); }
.map-canvas {
  position: relative;
  aspect-ratio: 3 / 4;
  min-width: 0;
  border: 1px solid var(--gold);
  color: var(--ink);
  background-color: #eef0e4;
  background-image:
    repeating-linear-gradient(0deg, rgba(176, 141, 87, .15) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(176, 141, 87, .15) 0 1px, transparent 1px 32px),
    radial-gradient(ellipse at 52% 26%, rgba(163, 177, 138, .55) 0, transparent 22%);
}
.map-canvas--rome { aspect-ratio: 4 / 3; }
.map-canvas--milan { aspect-ratio: auto; min-height: 100%; background-image:
    repeating-linear-gradient(0deg, rgba(176, 141, 87, .15) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(176, 141, 87, .15) 0 1px, transparent 1px 32px),
    radial-gradient(ellipse at 50% 42%, rgba(163, 177, 138, .6) 0, transparent 26%); }
.map-canvas__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-label { position: absolute; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.map-label--tiber { left: 18%; top: 50%; color: #3f5a70; }
.map-label--colosseum { left: 46%; top: 62%; }
.map-label--city, .map-label--city-milan { left: var(--s3); bottom: var(--s3); font-family: var(--serif); font-size: 1rem; color: var(--burgundy-dark); letter-spacing: .2em; }
.map-label--duomo { left: 40%; top: 74%; }
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  background: var(--ivory);
  color: var(--burgundy-dark);
  border: 2px solid var(--burgundy);
  font: 600 .875rem/1 var(--sans);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.map-pin:hover { background: var(--gold-light); color: var(--burgundy-deep); }
.map-pin.is-active { background: var(--burgundy); color: var(--ivory); }
.map-pin--borghese { left: 52%; top: 18%; }
.map-pin--bilotti { left: 42%; top: 30%; }
.map-pin--canonica { left: 62%; top: 34%; }
.map-pin--acquedotti { left: 80%; top: 80%; }
.map-pin--sempione { left: 50%; top: 40%; }
.map-side { display: flex; flex-direction: column; gap: var(--s4); }
.map-info { padding: var(--s4); gap: var(--s3); }
.map-info > * { margin: 0; }
.map-info__place { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-dark); }
.map-info__title { font-size: 1.625rem; }
.map-info__desc { color: var(--muted); }
.map-legend { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.map-legend li { border-bottom: 1px solid var(--rule); }
.map-legend__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 12px var(--s3);
  background: transparent;
  color: var(--ink);
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.map-legend__item:hover { background: var(--sage-tint); color: var(--ink); }
.map-legend__item.is-active { background: var(--ivory); color: var(--burgundy-dark); font-weight: 600; }
.map-legend__num {
  flex: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  background: var(--ivory);
  font-size: .8125rem;
}

/* Visitor info */
.visitor-info { margin-top: var(--s6); border-top: 2px solid var(--burgundy); padding-top: var(--s4); }
.visitor-info__title { font-size: clamp(1.625rem, 3vw, 2.25rem); margin-bottom: var(--s5); }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.info-grid > * { min-width: 0; }
.info-item { border-left: 1px solid var(--gold); padding-left: var(--s4); }
.info-item h3 { font-size: 1.25rem; }
.info-item p { color: var(--muted); font-size: .9688rem; margin: 0; }

/* Page hero (sub-pages) */
.page-hero { padding: var(--s6) 0; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.page-hero__grid > * { min-width: 0; }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.page-hero__lede { font-size: 1.1875rem; color: var(--muted); max-width: 36em; margin: 0; }
.page-hero--legal .container { position: relative; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); padding: 0; font-size: .875rem; color: var(--muted); }
.breadcrumb li { overflow-wrap: anywhere; min-width: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s2); color: var(--gold); }

/* Article layout */
.article-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s6); align-items: start; }
.article-layout > * { min-width: 0; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; }
.prose ul { padding-left: 1.25em; margin: 0 0 var(--s3); }
.prose li { margin-bottom: var(--s2); }
.prose__lead::first-letter { font-family: var(--serif); float: left; font-size: 3.75rem; line-height: .85; padding: 6px var(--s2) 0 0; color: var(--burgundy); }
.pros-cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.pros-cons__col { background: var(--ivory-deep); color: var(--ink); padding: var(--s4); border-top: 2px solid var(--sage-dark); min-width: 0; }
.pros-cons__col:last-child { border-top-color: var(--burgundy); }
.pros-cons__col ul { margin: 0; }
.article-aside { position: relative; }
.facts-card { padding: var(--s4); gap: var(--s4); }
.facts-card > * { margin: 0; }
.facts-card__title { font-size: 1.5rem; }
.facts-list { margin: 0; display: flex; flex-direction: column; gap: var(--s3); }
.facts-list > div { border-bottom: 1px solid var(--rule); padding-bottom: 12px; min-width: 0; }
.facts-list dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s1); }
.facts-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.related { padding-top: 0; }
.related__title { font-size: clamp(1.5rem, 3vw, 2rem); border-top: 2px solid var(--burgundy); padding-top: var(--s4); margin-bottom: var(--s5); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 var(--s4); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.data-table caption { text-align: left; font-family: var(--serif); font-style: italic; color: var(--muted); padding-bottom: var(--s2); }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px var(--s3); border-bottom: 1px solid var(--rule); }
.data-table thead th { background: var(--burgundy); color: var(--ivory); font-weight: 600; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; }
.data-table tbody th { font-family: var(--serif); font-weight: 400; color: var(--burgundy-dark); }

/* Legal */
.legal-layout { padding-top: var(--s6); padding-bottom: var(--s6); }
.prose--legal { max-width: 780px; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.contact-layout > * { min-width: 0; }
.contact-form { display: flex; flex-direction: column; gap: var(--s4); }
.contact-form h2 { font-size: 2rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field label { font-weight: 600; font-size: .9375rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  padding: 12px var(--s3);
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid #8c7b6e;
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--error); border-width: 2px; }
.field-error { margin: 0; color: var(--error); font-size: .875rem; }
.field--checkbox .checkbox-label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.field--checkbox input { width: 20px; height: 20px; flex: none; margin-top: 3px; padding: 0; }
.field--checkbox.is-invalid .checkbox-label { color: var(--error); }
.contact-form .btn { align-self: flex-start; }
.form-success { margin: 0; padding: var(--s3) var(--s4); background: var(--sage-tint); color: var(--sage-dark); border-left: 3px solid var(--sage-dark); }
.contact-details { display: flex; flex-direction: column; gap: var(--s5); }
.contact-address { font-style: normal; line-height: 1.7; }
.static-map {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--gold);
  background-color: #efeadc;
  color: var(--ink);
  background-image:
    repeating-linear-gradient(35deg, rgba(91, 77, 79, .08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(125deg, rgba(91, 77, 79, .08) 0 1px, transparent 1px 24px);
  overflow: hidden;
}
.static-map__street { position: absolute; background: #fffdf8; border: 1px solid #d8ccb5; }
.static-map__street--h1 { left: 0; right: 0; top: 30%; height: 14px; }
.static-map__street--h2 { left: 0; right: 0; top: 68%; height: 10px; }
.static-map__street--v1 { top: 0; bottom: 0; left: 28%; width: 18px; background: #f6e9c8; }
.static-map__street--v2 { top: 0; bottom: 0; left: 70%; width: 10px; }
.static-map__green { position: absolute; left: 38%; top: 40%; width: 22%; height: 20%; background: var(--sage); border: 1px solid var(--sage-dark); }
.static-map__label { position: absolute; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(250, 246, 238, .9); padding: 2px var(--s1); }
.static-map__label--green { left: 38%; top: 62%; color: var(--sage-dark); }
.static-map__label--road { left: 30%; top: 8%; }
.static-map__pin { position: absolute; left: 56%; top: 36%; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: translate(-50%, -100%) rotate(-45deg); background: var(--burgundy); border: 3px solid var(--ivory); box-shadow: 0 4px 12px rgba(52, 16, 26, .3); }
.static-map__tag { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); background: var(--burgundy-dark); color: var(--ivory); padding: var(--s2) var(--s3); font-size: .875rem; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--burgundy-deep); color: #f5eee0; padding: var(--s6) 0 var(--s5); margin-top: var(--s6); }
.site-footer a { color: #f5eee0; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer a:focus-visible { outline-color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.footer-grid > * { min-width: 0; }
.brand--footer { color: #f5eee0; margin-bottom: var(--s3); }
.brand--footer:hover { color: var(--gold-light); }
.footer-brand p { color: #e6dccb; }
.footer-heading { font-family: var(--sans); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: var(--s3); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.footer-links a { text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { text-decoration: underline; }
.footer-address { font-style: normal; line-height: 1.7; margin-bottom: var(--s3); color: #e6dccb; }
.footer-col p { overflow-wrap: anywhere; }
.footer-bottom { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid rgba(220, 195, 146, .35); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); font-size: .875rem; color: #e6dccb; }
.footer-bottom p { margin: 0; overflow-wrap: anywhere; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: var(--s3);
  right: var(--s3);
  bottom: var(--s3);
  z-index: 200;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s4);
  align-items: center;
  padding: var(--s4);
  background: var(--burgundy-deep);
  color: var(--ivory);
  border: 1px solid var(--gold);
  box-shadow: 0 16px 40px rgba(52, 16, 26, .35);
}
.cookie-banner > * { min-width: 0; }
.cookie-banner p { margin: 0 0 var(--s2); }
.cookie-banner__title { font-family: var(--serif); font-size: 1.25rem; color: var(--gold-light); }
.cookie-banner a { color: var(--gold-light); }
.cookie-banner a:hover { color: var(--ivory); }
.cookie-banner :focus-visible { outline-color: var(--gold-light); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cookie-banner__actions .btn { padding: 10px var(--s3); font-size: .875rem; }
.cookie-prefs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); border-top: 1px solid rgba(220, 195, 146, .35); padding-top: var(--s3); }
.cookie-option { display: flex; align-items: center; gap: var(--s2); }
.cookie-option input { width: 18px; height: 18px; }
body.nav-open .cookie-banner { visibility: hidden; }

/* Responsive */
@media (max-width: 1180px) and (min-width: 1024px) {
  .header-inner { gap: var(--s3); }
  .nav-list { gap: 20px; }
  .nav-list a { letter-spacing: .1em; }
}

@media (max-width: 1024px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Header switches to the menu drawer before the links run out of room */
@media (max-width: 1023px) {
  .header-inner { gap: var(--s3); }
  .header-cta { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    flex: none;
    flex-direction: column;
    justify-content: flex-start;
    padding: 72px var(--s4) var(--s5);
    background: var(--ivory);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: var(--s2); right: var(--s3); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; max-width: 560px; }
  .nav-list li { flex: none; }
  .nav-list a { display: block; font-size: 1.125rem; white-space: normal; padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
  .site-nav .nav-cta-mobile { display: inline-block; margin-top: var(--s4); align-self: flex-start; }
}

@media (max-width: 900px) {
  .hero-grid, .page-hero__grid, .article-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .prose { max-width: none; }
  .cookie-banner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  :root { --header-h: 56px; }
  .header-inner { gap: var(--s2); }
  .brand { font-size: 1.125rem; }
  .brand-mark { width: 28px; height: 28px; }
  .header-cta { padding: 6px 12px; font-size: .75rem; }

  .hero, .page-hero { padding: var(--s5) 0; }
  .hero-media { padding: 0; }
  .hero-media::before, .hero-media::after { top: 0; left: 0; right: 0; bottom: 0; }
  .frame-card { padding: 0; }
  .frame-card::before { top: 0; left: 0; right: 0; bottom: 0; }
  .frame-card:hover .frame-card__body, .frame-card:focus-within .frame-card__body { transform: translateY(-4px); }
  .section-head { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .map-canvases { grid-template-columns: minmax(0, 1fr); }
  .map-canvas--milan { aspect-ratio: 4 / 3; min-height: 0; }
  .pros-cons { grid-template-columns: minmax(0, 1fr); }
  .card-grid { gap: var(--s4); }
}

@media (max-width: 599px) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid var(--rule); margin-bottom: var(--s3); padding: var(--s2) var(--s3); background: var(--ivory); color: var(--ink); }
  .data-table th, .data-table td { border: 0; padding: var(--s2) 0; display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: var(--s3); }
  .data-table th::before, .data-table td::before { content: attr(data-label); font-family: var(--sans); font-weight: 600; font-size: .8125rem; color: var(--burgundy); }
  .info-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: var(--s3); }
  .stat-value { font-size: 1.75rem; }
}

@media (max-width: 399px) {
  .container { padding: 0 var(--s3); }
  .header-cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .brand { font-size: 1rem; }
  .site-nav { padding-left: var(--s3); padding-right: var(--s3); }
  .hero h1, .page-hero h1 { font-size: 2rem; }
  .hero-stats { grid-template-columns: minmax(0, 1fr); }
  .frame-card__content, .facts-card, .map-info, .city-card { padding: var(--s3); }
  .frame-card__content { gap: var(--s4); }
  .cookie-banner { left: var(--s2); right: var(--s2); bottom: var(--s2); padding: var(--s3); }
  .cookie-banner__actions .btn { width: 100%; }
  .paper-texture::after { inset: var(--s2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}