@font-face {
  font-family: "Newsreader";
  src: url("newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f2ea;
  --ink: #1b2a24;
  --muted: #56655c;
  --river: #2f5d55;
  --line: rgba(27, 42, 36, 0.16);
  --deep: #14231e;
  --on-deep: #ede8dc;
  --on-deep-muted: #a9b4aa;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --gutter: 20px;
  --section: clamp(5.5rem, 13vw, 11rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 2rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, h2, dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Hero: la foto occupa la schermata, il titolo sta nel cielo */
.hero {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  max-height: 1200px;
  overflow: hidden;
  background: #e3cfae;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(245, 242, 234, 0.55), rgba(245, 242, 234, 0) 42%);
}

/* Intestazione */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.125rem;
}
.header-logo { display: block; width: 56px; }
.site-header nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); font-size: 0.8125rem; }
.site-header nav a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.25s ease;
}
.site-header nav a:hover { background-size: 100% 1px; }

/* Titolo */
.hero-title { padding-top: clamp(2.5rem, 7vh, 5rem); }
h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h1 em { display: block; font-weight: 300; }
.subtitle { margin-top: 1.25rem; font-size: 0.875rem; }

/* Introduzione */
.intro { padding-block: var(--section); }
.lead {
  max-width: 36rem;
  font-family: var(--serif);
  font-size: clamp(1.3125rem, 2vw, 1.625rem);
  font-weight: 300;
  line-height: 1.42;
}
.notice {
  max-width: 24rem;
  margin-top: 2.5rem;
  color: var(--muted);
}
.river {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(4rem, 9vw, 7.5rem);
  overflow: visible;
}
.river path {
  fill: none;
  stroke: var(--river);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.river circle { r: 12px; fill: var(--paper); stroke: var(--river); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Vista aerea */
.aerial {
  width: 100%;
  height: clamp(280px, 42vw, 620px);
  object-fit: cover;
  object-position: 50% 55%;
}

/* Contatti */
.contacts { padding-block: var(--section); }
h2 {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
dl { margin-top: 2.5rem; border-top: 1px solid var(--line); }
dl > div {
  display: grid;
  gap: 0.25rem;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--line);
}
dt { color: var(--muted); font-size: 0.8125rem; }
dd { color: var(--muted); overflow-wrap: anywhere; }
dd a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}
dd a:hover { color: var(--river); border-color: var(--river); }

/* Piè di pagina */
.site-footer {
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
  background: var(--deep);
  color: var(--on-deep-muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}
.site-footer strong { color: var(--on-deep); font-weight: 500; }
.site-footer a { color: var(--on-deep); }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.footer-grid { display: grid; gap: 2rem; }
.footer-logo { display: block; width: 64px; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  font-size: 0.75rem;
}
.footer-base p:first-child { color: #8b978e; }

@media (min-width: 640px) {
  :root { --gutter: 40px; }
  .river circle { r: 7px; }
}

@media (min-width: 960px) {
  :root { --gutter: 64px; }
  .intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
  .lead, .notice { grid-column: 6 / -1; }
  .river { grid-column: 1 / -1; }
  .contacts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
  h2 { grid-column: 1 / 6; }
  dl { grid-column: 6 / -1; margin-top: 0.5rem; }
  dl > div { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0 1rem; }
  dl > div dd { grid-column: 2; }
  dl > div dt { grid-row: 1 / span 3; }
  .footer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
  .footer-logo { grid-column: 1 / 3; }
  .footer-grid p:nth-of-type(1) { grid-column: 3 / 6; }
  .footer-grid p:nth-of-type(2) { grid-column: 6 / -1; }
}
