:root {
  color-scheme: light;
  --ink: #282724;
  --muted: #5d5a54;
  --line: rgba(74, 69, 60, .23);
  --paper: rgba(247, 244, 237, .89);
  --serif: 'EB Garamond', Georgia, serif;
  --display: 'Cormorant Garamond', Georgia, serif;
  --gutter: clamp(20px, 3vw, 52px);
  --header-height: 112px;
  --compact-header-height: 72px;
  --hero-height: 0px;
  --motion-duration: 680ms;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 20px); }
html:has(site-header.is-scrolled) { scroll-padding-top: calc(var(--compact-header-height) + 20px); }
body { margin: 0; color: var(--ink); background: #373633; font: 19px/1.65 var(--serif); }
body[data-page='index'] { --hero-height: clamp(350px, 26vw, 390px); }
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before { background: url('../images/piazza-navona.png') no-repeat center / cover; filter: grayscale(1) brightness(.66) contrast(1.08); }
body::after { background: linear-gradient(90deg, rgba(0,0,0,.3), transparent 70%); }
a { color: inherit; text-underline-offset: .24em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }
video, audio { width: 100%; max-width: 680px; display: block; margin: 24px 0; }
video { background: #222; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.4vw, 62px); margin: 0; }
h2 { font-size: 32px; margin: 1.4em 0 .7em; }
h3 { font-size: 26px; margin: 1.3em 0 .6em; }
h4 { font-size: 23px; }
p { margin: 0 0 1.2em; }
small, .muted, .caption { color: var(--muted); font-size: 15px; }
site-header, site-footer { display: block; }
/* Keep the flow height stable so shrinking the bar cannot shift the page or retrigger scrolling. */
site-header { --nav-height: var(--header-height); position: sticky; top: 0; z-index: 20; height: var(--header-height); pointer-events: none; }
site-header.is-scrolled { --nav-height: var(--compact-header-height); }
site-header.is-scrolled .site-header { background: rgba(34, 33, 30, .95); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.12); }
.site-header { height: var(--nav-height); color: #f6f3ed; pointer-events: auto; transition: height .22s ease, background-color .2s, box-shadow .2s; }
.header-inner { height: var(--nav-height); transition: height .22s ease, padding-block .22s ease; display: flex; align-items: center; gap: clamp(28px, 4vw, 64px); padding: 20px calc(var(--gutter) + 20px); }
.brand { display: block; text-decoration: none; white-space: nowrap; font: 500 24px/1.25 var(--display); letter-spacing: .28em; text-transform: uppercase; }
.brand-tagline { display: block; max-height: 20px; overflow: hidden; opacity: 1; transition: max-height .22s ease, margin-top .22s ease, opacity .15s ease; font: 400 10px/1.5 var(--serif); letter-spacing: .24em; margin-top: 7px; }
site-header.is-scrolled .header-inner { padding-block: 8px; }
site-header.is-scrolled .brand-tagline { max-height: 0; margin-top: 0; opacity: 0; }
#site-nav { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2.3vw, 40px); margin-left: auto; }
.nav-link { position: relative; padding: 10px 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 18px; text-decoration: none; white-space: nowrap; color: inherit; }
#site-nav { color: #eeebe5; }
.nav-link::after { content: ''; position: absolute; height: 1px; background: currentColor; left: 0; right: 0; bottom: 6px; opacity: 0; transform: scaleX(.5); transition: .2s; }
.nav-link.active::after, .nav-link[aria-selected="true"]::after, .nav-link:hover::after { opacity: .85; transform: scaleX(1); }
.menu-toggle { display: none; }
.menu-toggle[hidden], #site-nav[hidden] { display: none; }
.hero-slot { height: var(--hero-height); overflow: hidden; transition: height var(--motion-duration) cubic-bezier(.65,0,.25,1); }
.paper-panel { margin: 0 var(--gutter); min-height: calc(100svh - var(--header-height) - var(--hero-height) - 76px); background: var(--paper); backdrop-filter: blur(.7px); padding: 40px clamp(24px, 4vw, 64px) 56px; transition: min-height var(--motion-duration) cubic-bezier(.65,0,.25,1); }
.paper-panel:focus { outline: none; }
.page-content { opacity: 1; transition: opacity 220ms ease; }
.is-navigating .page-content { opacity: 0; transition: none; }
.is-navigating .home-hero { opacity: 0; }
.page-heading h1 { font-size: clamp(26.6px, 3.08vw, 43.4px); }
.page-heading { margin-bottom: 40px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.eyebrow, .section-label { font: 500 12px/1.5 var(--serif); text-transform: uppercase; letter-spacing: .17em; }
.eyebrow { margin: 0 0 14px; }
.intro { color: var(--muted); max-width: 660px; margin: 20px 0 0; }
.section-label { margin: 0 0 22px; }
.section-label::after { content: ''; display: block; width: 25px; height: 1px; background: currentColor; opacity: .6; margin-top: 8px; }
.editorial-link { display: inline-flex; align-items: baseline; gap: 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 10px 0; min-height: 44px; }
/* Empty arrow boxes share the label baseline and follow its capital height. */
.editorial-link span, .ui-arrow { position: relative; display: inline-block; flex: none; width: 24px; height: .66em; height: 1cap; line-height: 0; transition: transform .2s; }
.editorial-link span::before, .ui-arrow::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; border-top: 1px solid currentColor; transform: translateY(-50%); }
.editorial-link span::after, .ui-arrow::after { content: ''; position: absolute; right: 0; top: 50%; width: 5px; height: 5px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.editorial-link:hover span { transform: translateX(4px); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px calc(var(--gutter) + 12px); color: #efebe5; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.site-footer a { text-decoration: none; }
.footer-name { font-size: 14px; letter-spacing: .3em; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 30; padding: 12px; background: #f5f2eb; }
.skip-link:focus { top: 10px; }
.fallback { background: var(--paper); padding: 20px; }
@media (max-width: 1100px) {
  .header-inner { gap: 24px; padding-inline: var(--gutter); }
  .brand { font-size: 20px; letter-spacing: .2em; }
  #site-nav { gap: 20px; }
  #site-nav a { font-size: 16px; }
}
@media (max-width: 850px) {
  :root { --header-height: 92px; --compact-header-height: 64px; }
  .header-inner { position: relative; justify-content: space-between; }
  .menu-toggle { display: flex; align-items: center; gap: 14px; min-height: 44px; border: 1px solid #b8b5b0; color: inherit; background: transparent; padding: 6px 12px; font-size: 15px; }
  #site-nav { position: absolute; display: none; z-index: 10; top: calc(100% - 4px); right: var(--gutter); left: var(--gutter); padding: 14px 22px; background: rgba(29,29,27,.97); grid-template-columns: 1fr 1fr; max-height: calc(100dvh - var(--nav-height) - 12px); overflow-y: auto; }
  #site-nav.is-open { display: grid; }
  #site-nav a { font-size: 18px; }
  .paper-panel { padding: 30px 26px 40px; }
}
@media (max-width: 540px) {
  :root { --gutter: 14px; --header-height: 96px; }
  body { font-size: 18px; }
  body[data-page='index'] { --hero-height: clamp(240px, 65vw, 330px); }
  .header-inner { padding: 20px; }
  .brand { font-size: 19px; letter-spacing: .13em; }
  .brand-tagline { font-size: 8px; letter-spacing: .15em; }
  .menu-toggle { font-size: 14px; padding-inline: 10px; }
  .paper-panel { padding: 26px 20px 36px; }
  .page-heading { margin-bottom: 28px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 10px; font-size: 10px; }
  body::before { background-position: 56% center; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --motion-duration: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  site-header, site-footer, .hero-slot, .skip-link, body::before, body::after { display: none; }
  body { background: #fff; color: #000; }
  .paper-panel { background: #fff; margin: 0; padding: 0; backdrop-filter: none; }
}
