/* =====================================================================
   DIP — Design Infrastructure Partners
   ---------------------------------------------------------------------
   Minimalismo scandinavo: bianco, aria, hairline, una sola famiglia.
   TUTTI I COLORI DEL SITO SONO QUI SOTTO (formato OKLCH).
   ===================================================================== */
/* — Font self-hosted (niente Google Fonts: nessun dato verso terzi) — */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:     oklch(1 0 0);            /* bianco puro */
  --ink:    oklch(0.21 0.012 260);   /* quasi nero, appena freddo */
  --muted:  oklch(0.46 0.012 260);   /* testo secondario */
  --line:   oklch(0.91 0.003 260);   /* hairline */

  --font: "Schibsted Grotesk", system-ui, sans-serif;

  --z-nav: 10;

  /* misura unica della pagina */
  --misura: 1080px;
  --margine: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; }

p { text-wrap: pretty; }

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

a { color: inherit; }

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

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

/* ================= Nav ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  /* barra a tutta larghezza, contenuti allineati alla colonna di pagina */
  padding: 1.3rem max(var(--margine), calc((100% - var(--misura)) / 2)) 1.1rem;
  background: color-mix(in oklch, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
}

/* fallback senza backdrop-filter: torna piena */
@supports not (backdrop-filter: blur(1px)) {
  .nav { background: var(--bg); }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.nav-full {
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

/* ================= Hero ================= */
.hero {
  /* sezione full-width: il testo è nella colonna, la foto va da bordo a bordo */
  width: 100%;
  padding-top: clamp(5rem, 12vh, 9rem);
}

.hero-text {
  width: min(var(--misura), 100% - 2 * var(--margine));
  margin-inline: auto;
}

.hero h1 {
  font-weight: 500;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 20ch;
}

.hero-lead {
  margin-top: 1.6rem;
  max-width: 52ch;
  font-size: 1.08rem;
  color: var(--muted);
}

/* foto a tutta larghezza: l'unico gesto "pieno" della pagina */
.hero-figure {
  margin-top: clamp(3.5rem, 8vh, 6rem);
  width: 100%;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 62%;
}

/* ================= Sezioni ================= */
.section {
  width: min(var(--misura), 100% - 2 * var(--margine));
  margin-inline: auto;
  padding-block: clamp(5rem, 11vw, 8.5rem) 0;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 2.8fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.section h2 {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding-top: 0.3rem;
}

.statement {
  font-weight: 500;
  font-size: clamp(1.6rem, 3.1vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
  max-width: 28ch;
}

.prose {
  margin-top: 1.8rem;
  max-width: 62ch;
  color: var(--muted);
}

/* pagina note legali: testo giustificato con sillabazione italiana */
.legale .prose p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.legale .prose p + p { margin-top: 0.9rem; }

/* ---- Liste (servizi, settori) ---- */
.list { list-style: none; }

.list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 0.3rem clamp(1.5rem, 4vw, 3rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.list li:last-child { border-bottom: 1px solid var(--line); }

.list h3 {
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.4;
}

.list p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 52ch;
}

/* ---- Mercati: griglia 2×2, titoli grandi, solo aria ---- */
.mercati {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem);
}

.mercati h3 {
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.mercati p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 38ch;
}

/* ================= Contatti ================= */
.mail {
  display: inline-block;
  margin-top: 1.6rem;
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s;
}

.mail:hover { text-decoration-color: var(--ink); }

/* ================= Footer ================= */
.footer {
  width: min(var(--misura), 100% - 2 * var(--margine));
  margin: clamp(5rem, 11vw, 8.5rem) auto 0;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: 2.8rem 3.2rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.footer-mark { color: var(--ink); margin-top: 0.15rem; }

.footer-brand p {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.55;
}

.footer-brand p span {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.footer-nav a,
.footer-contact a {
  text-decoration: none;
  color: var(--muted);
  width: fit-content;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover { color: var(--ink); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-block: 1.3rem 1.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-base a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-base a:hover { color: var(--ink); }

/* ================= Motion ================= */
body.js .hero h1,
body.js .hero-lead,
body.js .hero-figure {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.js .hero-lead { animation-delay: 0.1s; }
body.js .hero-figure { animation-delay: 0.2s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

body.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.js .reveal.on {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js .hero h1,
  body.js .hero-lead,
  body.js .hero-figure { opacity: 1; transform: none; animation: none; }
  body.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================= Responsive ================= */
@media (max-width: 820px) {
  .section { grid-template-columns: 1fr; gap: 1.2rem; }
  .list li { grid-template-columns: 1fr; }
  .mercati { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 560px) {
  .nav-full { display: none; }
  .nav-links { gap: 1rem; font-size: 0.88rem; }
  .hero-figure img { aspect-ratio: 4 / 3; }
}