/* =========================================================
   Michele Avanzi — Stili del sito
   Approccio mobile-first.
   ========================================================= */

/* -- Font self-hosted (GDPR friendly) -- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* -- Design tokens -- */
:root {
  --navy: #1a2d4a;
  --navy-dark: #0f1e35;
  --azure: #3b7cc2;
  --azure-dark: #2a63a3;
  --azure-light: #8ab4e8;
  --ice: #eef3f8;
  --ice-soft: #f5f8fb;
  --border: #d4dde8;
  --text: #333333;
  --text-soft: #4a4a4a;
  --text-muted: #6a6a6a;
  --white: #ffffff;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Cormorant", "Lora", Georgia, "Times New Roman", serif;

  --container: 1200px;
  --container-narrow: 820px;
  --gutter: 24px;
  --radius: 0px;
}

/* -- Reset base -- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azure); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--azure-dark); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--azure); outline-offset: 3px; }

/* -- Layout -- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

/* -- Typography -- */
h1, h2, h3 { font-family: var(--font-sans); color: var(--navy); margin: 0 0 .5em; }
h1 {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-weight: 500;
  font-style: normal;
  font-size: clamp(44px, 10vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h3 {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--azure);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.eyebrow-light { color: var(--azure-light); }
.h2-light { color: var(--white); }
.h2-big { font-size: clamp(44px, 10vw, 68px); line-height: 1.05; letter-spacing: -0.03em; }

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 30px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  min-height: 44px;
}
.btn-primary { background: var(--azure); color: var(--white); }
.btn-primary:hover { background: var(--azure-dark); color: var(--white); }
.btn-outline { color: var(--navy); border-color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { color: var(--white); border-color: rgba(255,255,255,.45); background: transparent; }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-center { justify-content: center; }

/* -- Header & nav -- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.06em;
}
.mark-m, .mark-dot { color: var(--navy); }
.mark-a { color: var(--azure); }
.brand-name {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.main-nav { display: none; }
.main-nav a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
}
.main-nav a:hover { color: var(--navy); }
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  padding: 0 6px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 8px var(--gutter) 24px;
  border-bottom: 1px solid var(--border);
}
.main-nav.is-open a {
  padding: 16px 0;
  border-bottom: 1px solid var(--ice);
  font-size: 16px;
}

/* -- Sezioni comuni -- */
section { padding: 72px 0; }

/* -- Hero -- */
.hero { background: var(--ice); padding: 72px 0 80px; }
.hero-grid { display: flex; flex-direction: column; gap: 40px; align-items: stretch; }
.hero-text h1 { color: var(--navy); margin-bottom: 24px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--text-soft); margin-bottom: 36px; max-width: 540px; }
.hero-photo { max-width: 320px; margin: 0 auto; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 0 2px 32px rgba(26, 45, 74, 0.15);
}

/* -- Chi sono -- */
.chi-sono { background: var(--white); }
.chi-sono p { font-size: 17px; line-height: 1.65; color: var(--text); margin-bottom: 20px; }

/* -- Ambiti -- */
.ambiti { background: var(--ice-soft); }
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.card { background: var(--white); padding: 32px 28px; border: 1px solid var(--border); }
.card-icon {
  width: 44px; height: 44px;
  background: #dde8f3;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.card h3 { color: var(--navy); margin-bottom: 12px; font-size: 22px; }
.card p { font-size: 15px; line-height: 1.6; color: var(--text-soft); margin: 0; }

/* -- Settori -- */
.settori { background: var(--navy); color: var(--white); padding: 60px 0 72px; }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

/* -- Esperienza -- */
.esperienza { background: var(--white); }
.exp-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.exp-group h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  color: var(--azure);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.exp-group p { font-size: 16px; line-height: 1.9; color: var(--text); margin: 0; }

/* -- Metodo -- */
.metodo { background: var(--ice); }
.method-lede { font-size: 17px; line-height: 1.6; color: var(--text-soft); margin: 0 0 48px; max-width: 680px; }
.method-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.method-step .step-num {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-weight: 500;
  font-size: 42px;
  color: var(--azure);
  line-height: 1;
  display: block;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.method-step h3 { color: var(--navy); font-size: 22px; margin-bottom: 10px; }
.method-step p { font-size: 15px; line-height: 1.6; color: var(--text-soft); margin: 0; }

/* -- Contatti -- */
.contatti { background: var(--navy); color: var(--white); padding: 90px 0 110px; }
.contatti-inner { text-align: center; }
.contatti h2 { color: var(--white); margin-bottom: 24px; }
.contatti-lede {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,.8);
  margin: 0 auto 40px;
  max-width: 560px;
}
.contatti-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 15px;
  color: rgba(255,255,255,.9);
}
.info-label {
  color: rgba(255,255,255,.5);
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

/* -- Pagine legali (Privacy, Cookie, Note legali) -- */
.legal-page { padding: 72px 0 96px; background: var(--white); }
.legal-page h1 {
  font-family: "Cormorant", "Lora", Georgia, serif;
  font-size: clamp(36px, 7vw, 56px);
  line-height: 1.08;
  color: var(--navy);
  margin: 0 0 12px;
}
.legal-page h2 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 40px 0 12px;
  letter-spacing: 0;
}
.legal-page p, .legal-page li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}
.legal-page ul { padding-left: 20px; margin: 0 0 1em; }
.legal-page li { margin-bottom: 6px; }
.legal-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 48px;
  font-style: italic;
}
.legal-back {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* -- Footer -- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.6);
  font-size: 13px;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: var(--white); }

/* =============================================
   TABLET: ≥ 640px
   ============================================= */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  section { padding: 96px 0; }
  .hero { padding: 96px 0 110px; }
  .contatti { padding: 110px 0 130px; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .exp-grid { grid-template-columns: 1fr 1fr; gap: 48px 56px; }
  .method-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .hero-photo { max-width: 380px; }
  .btn { padding: 18px 36px; }
}

/* =============================================
   DESKTOP: ≥ 1024px
   ============================================= */
@media (min-width: 1024px) {
  :root { --gutter: 48px; }
  section { padding: 120px 0; }
  .hero { padding: 120px 0 110px; }
  .contatti { padding: 140px 0 150px; }
  .menu-toggle { display: none; }
  .main-nav {
    display: flex;
    gap: 36px;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
  }
  .main-nav a {
    padding: 0;
    border: 0;
    font-size: 14px;
  }
  .brand-mark { font-size: 32px; }
  .brand-name { font-size: 19px; }
  .hero-grid { flex-direction: row; align-items: center; gap: 64px; }
  .hero-text { flex: 1 1 60%; }
  .hero-photo { flex: 0 1 380px; max-width: 380px; margin: 0; }
  .lede { font-size: 20px; }
  .chi-sono p { font-size: 19px; }
  .cards-grid { gap: 24px; }
  .card { padding: 48px; }
  .card h3 { font-size: 26px; }
  .card p { font-size: 16px; }
  .method-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .method-step .step-num { font-size: 48px; }
  .method-step h3 { font-size: 24px; }
  .contatti-lede { font-size: 19px; }
  .exp-group p { font-size: 17px; }
}

/* =============================================
   Riduci animazioni per preferenza utente
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* =============================================
   Stampa pulita
   ============================================= */
@media print {
  .site-header, .site-footer, .btn-row, .menu-toggle { display: none; }
  body { color: #000; background: #fff; }
  section { padding: 24pt 0; page-break-inside: avoid; }
  a { color: #000; }
}
