/* MLR – foglio di stile
   Palette: navy #12283F, beige chiaro #F4EFE7, beige sabbia #E2D5C3, tortora #A98F73, testo #1A1A1A.
   Il tortora è usato solo per filetti e sottolineature (contrasto basso sul beige), mai per il testo. */

:root {
  --navy: #12283F;
  --navy-hover: #1D3B5C;
  --beige: #F4EFE7;
  --sand: #E2D5C3;
  --taupe: #A98F73;
  --ink: #1A1A1A;
  --muted: #4F463D;
  --field: #FBF9F5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

[hidden] { display: none !important; }

img { display: block; max-width: 100%; height: auto; }

/* ---------- Tipografia ---------- */

h1, h2, h3 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }

p { margin: 0 0 1.1em; }

a {
  color: var(--navy);
  text-decoration-color: var(--taupe);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--beige);
}
.skip-link:focus { top: 1rem; }

/* ---------- Pulsanti e azioni ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
  background: var(--navy);
  color: var(--beige);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--navy-hover); }

.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--beige); }

.link-more { font-weight: 600; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

/* ---------- Header e navigazione ---------- */

.site-header {
  background: var(--beige);
  border-bottom: 1px solid var(--sand);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 2.5rem; width: auto; }
.logo-text {
  font-family: var(--serif);
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.nav-toggle {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
  background: transparent;
  color: var(--navy);
  font: 600 0.95rem var(--sans);
  cursor: pointer;
}

.site-nav { display: none; flex-basis: 100%; }
.site-nav.is-open { display: block; }

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--taupe); }

@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; flex-basis: auto; }
  .site-nav ul { flex-direction: row; gap: 2rem; padding: 0; }
}

/* ---------- Immagini ---------- */

.media {
  margin: 0;
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 4 / 5;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--landscape { aspect-ratio: 4 / 3; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 6rem); }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }

.hero h1 {
  font-size: clamp(3.25rem, 9vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero-lead {
  max-width: 34ch;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.hero-place { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (min-width: 56em) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
}

/* ---------- Sezioni ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--sand { background: var(--sand); }
.section--sand a { text-decoration-color: var(--navy); }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 2.5rem 2rem; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }

.item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 1.25rem;
  border-top: 2px solid var(--taupe);
}
.item p { max-width: 38ch; }
.item .btn { margin-top: auto; }

.detail {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--taupe);
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Pagine interne ---------- */

.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head p { max-width: 46ch; color: var(--muted); font-size: 1.2rem; }

.strip { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.strip .media { aspect-ratio: 1 / 1; }
@media (min-width: 40em) {
  .strip { grid-template-columns: repeat(3, 1fr); }
}

.qualita-grid { display: grid; gap: 1rem; }
.qualita-grid .media { aspect-ratio: 4 / 3; }
@media (min-width: 48em) {
  .qualita-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 2 / 1;
  }
  .qualita-grid .media { aspect-ratio: auto; height: 100%; }
  .qualita-grid .media:first-child { grid-row: 1 / span 2; }
}

.split { display: grid; gap: 3rem; }
@media (min-width: 56em) {
  .split { grid-template-columns: 1fr 24rem; gap: 5rem; align-items: start; }
  .split .media { position: sticky; top: 2rem; }
}

.prose { max-width: 40rem; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.prose .lead {
  margin-bottom: 1em;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.35;
  color: var(--navy);
}

/* ---------- Contatti e form ---------- */

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 56em) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: start; }
}

.info { margin: 0; }
.info dt {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
}
.info dt:first-child { margin-top: 0; }
.info dd { margin: 0.25rem 0 0; }

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--navy);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 9rem; resize: vertical; }

.check { display: flex; align-items: flex-start; gap: 0.75rem; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; accent-color: var(--navy); }
.check label { margin: 0; font-weight: 400; color: var(--ink); }

.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--navy);
  background: var(--sand);
}
.form-status p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3rem;
  background: var(--navy);
  color: var(--beige);
  font-size: 0.98rem;
}
.site-footer a { color: var(--beige); text-decoration-color: var(--taupe); }
.site-footer a:hover { text-decoration-color: var(--beige); }
.site-footer :focus-visible { outline-color: var(--beige); }

.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48em) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

.footer-brand { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 1.75rem; letter-spacing: 0.02em; }
.footer-title { margin: 0 0 0.5rem; font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--beige); }
.site-footer p { margin-bottom: 0.75rem; }

.footer-copy {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 239, 231, 0.25);
  font-size: 0.9rem;
}

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