/* Reset, tipografia, griglie e accessibilità visiva. */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body:has(dialog[open]) { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}

h1 { font-size: clamp(42px, 6.4vw, 96px); line-height: 1.02; letter-spacing: -.05em; }
h2 { font-size: clamp(32px, 4.2vw, 60px); }
h3 { font-size: clamp(22px, 1.9vw, 28px); letter-spacing: -.02em; line-height: 1.2; }

p { max-width: 68ch; text-wrap: pretty; }
p + p { margin-top: 1em; }
ul, ol { padding-left: 1.2em; }

::selection { background: var(--honey); color: var(--ink); }

:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.dark-section :focus-visible,
.hero :focus-visible,
.site-menu :focus-visible,
.lightbox :focus-visible,
.site-footer :focus-visible,
.site-header:not(.is-scrolled):not(.header-solid) :focus-visible { outline-color: var(--honey); }

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px; left: 12px;
  padding: 12px 20px;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Griglia e sezioni */
.container { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--flush-top { padding-top: 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.section-head h2 { max-width: 16ch; }
.section-head > p { max-width: 40ch; color: var(--muted); }
.dark-section .section-head > p { color: var(--on-dark); }

.eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--rust);
}
.dark-section .eyebrow,
.hero .eyebrow,
.contact-section .eyebrow,
.callout .eyebrow { color: var(--honey); }

.lead { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.5; max-width: 50ch; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 7vw, 112px);
  align-items: center;
}

.split--top { align-items: start; }
.split--top h2 { max-width: 13ch; }

.copy p { color: var(--muted); }
.copy h2, .copy h3 { margin-bottom: 26px; }
.copy .button, .copy .inline-link { margin-top: 26px; }

.dark-section { background: var(--ink); color: var(--cream); }
.dark-section .copy p, .dark-section .muted { color: var(--on-dark); }
.muted { color: var(--muted); }

.image-frame { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; }

.caption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.concept-tag {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: .78em;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .section-head { flex-direction: column; align-items: start; gap: 20px; }
  .section-head > p { max-width: 60ch; }
  .split { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 540px) {
  body { font-size: 17px; }
  .eyebrow { font-size: 15px; margin-bottom: 14px; }
  .caption { font-size: 13px; }
}
