/* Onda Piana — foglio di stile comune */

:root {
  --sea-dark: #0f3b4c;
  --sea: #14566b;
  --sand: #f4efe6;
  --sand-deep: #e9e1d3;
  --ink: #1f3a44;
  --ink-soft: #4b6570;
  --accent: #f2b880;
  --accent-ink: #b8692a;
  --wave-1: rgba(255, 255, 255, 0.10);
  --wave-2: rgba(255, 255, 255, 0.16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
}

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--sea); }

/* ---------- Testata ---------- */

.site-header {
  background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea) 100%);
  color: var(--sand);
  position: relative;
}

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sand);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
}
.brand:hover { color: var(--sand); }
.brand svg { width: 34px; height: 34px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
}
.nav a {
  color: rgba(244, 239, 230, 0.82);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--sand);
  border-bottom-color: var(--accent);
}

.page-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 10px;
}
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
}
.page-hero p.lead {
  margin-top: 14px;
  max-width: 40rem;
  color: rgba(244, 239, 230, 0.8);
  font-size: 1.1rem;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Onde animate */
.waves {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
}
.waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}
.w1 { fill: var(--wave-1); animation: drift 22s linear infinite; }
.w2 { fill: var(--wave-2); animation: drift 16s linear infinite reverse; }
.w3 { fill: var(--sand); animation: drift 28s linear infinite; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Contenuto ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

main h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 44px 0 14px;
  color: var(--sea-dark);
}
main h2:first-child { margin-top: 8px; }

main h3 {
  font-size: 1.08rem;
  margin: 28px 0 8px;
  color: var(--sea-dark);
}

main p + p { margin-top: 14px; }
main ul, main ol { margin: 12px 0 12px 1.3rem; }
main li + li { margin-top: 6px; }

.note {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--sand-deep);
  border-radius: 0 8px 8px 0;
  font-size: 0.97rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--sand-deep);
  border-radius: 12px;
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card p { font-size: 0.96rem; color: var(--ink-soft); }
.card .meta {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

dl.facts {
  display: grid;
  grid-template-columns: minmax(140px, max-content) 1fr;
  gap: 10px 22px;
  margin-top: 14px;
}
dl.facts dt { font-weight: 600; color: var(--sea-dark); }
dl.facts dd { color: var(--ink); }

.button {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--sea-dark);
  color: var(--sand);
  text-decoration: none;
  font-weight: 600;
}
.button:hover { background: var(--sea); color: var(--sand); }

.updated {
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Piè di pagina ---------- */

.site-footer {
  background: var(--sea-dark);
  color: rgba(244, 239, 230, 0.8);
  font-size: 0.9rem;
}
.site-footer .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer a { color: rgba(244, 239, 230, 0.9); }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 560px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .w1, .w2, .w3 { animation: none; }
  html { scroll-behavior: auto; }
}
