/* ============================================================
   STUDIO LEGALE MARCHETTA — Design System
   Registro: consulenza istituzionale (PwC / Deloitte / Cravath)
   Principio: sottrazione. Tipografia serif, molto bianco,
   una sola tinta desaturata. Zero linguaggio commerciale.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* ---------------------------------------------------------------
     Sistema disciplinato — 2 tinte + neutri (registro alta consulenza)
     BLU = struttura (testo, titoli, numeri, sezioni scure)
     ORO = unico accento, usato con parsimonia (filetti, cornici)
     GRIGIO-FREDDO = neutri (testo secondario, linee, fondi)
     --------------------------------------------------------------- */
  --ink:        #0e2038;   /* blu notte — testo primario, titoli, numeri */
  --navy:       #13294a;   /* blu — sezioni scure */
  --navy-deep:  #0a1a30;   /* blu profondissimo — footer */
  --slate:      #51607a;   /* grigio-blu — testo secondario */
  --mist:       #97a1b4;   /* grigio-blu chiaro — etichette, didascalie */
  --line:       #e5e8ef;   /* filetti */
  --line-soft:  #eff2f7;
  --paper:      #ffffff;   /* bianco — fondo pagina */
  --paper-warm: #f5f7fb;   /* grigio-azzurro tenue — sezioni alterne */
  --sage:       #aeb9d0;   /* azzurro tenue — testo muted su scuro */
  --green:      #8a6d3f;   /* oro scuro — link (nome storico mantenuto) */
  --gold:       #b08d57;   /* ORO — unico accento */
  --gold-soft:  #c9b083;   /* oro chiaro — accento su fondi scuri */

  --font-serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-sans:  'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.5rem, 5vw, 6rem);

  --t: 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.14;
  color: var(--ink);
  margin: 0;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);            /* etichetta grigia sobria */
  margin: 0 0 1.4rem;
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.eyebrow::before {                /* tick oro — unico accento */
  content: ''; width: 24px; height: 1.5px; background: var(--gold); display: inline-block;
}
.eyebrow--gold { color: var(--gold); }
.eyebrow--muted { color: var(--mist); }
.eyebrow--muted::before { background: var(--mist); }

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.5;
  color: var(--slate);
  font-weight: 400;
}

p { margin: 0 0 1.2rem; }
.muted { color: var(--slate); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 10vw, 9rem); }
.section--warm { background: var(--paper-warm); }
.section--ink { background: var(--navy); color: var(--sage); }
.section--ink .eyebrow { color: var(--gold-soft); }
.section--ink .eyebrow::before { background: var(--gold-soft); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 0.55rem;
}
.brand small {
  font-family: var(--font-sans);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mist);
}
.nav-links { display: flex; gap: 2.4rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 0.83rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--slate); position: relative; padding-block: 0.4rem;
  transition: color var(--t);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--navy); transition: width var(--t);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-active::after { width: 100%; }
.nav-links a.is-active { color: var(--ink); }

.nav-cta {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.65rem 1.3rem; border: 1px solid var(--navy);
  color: var(--navy); border-radius: 2px; transition: all var(--t);
}
.nav-cta:hover { background: var(--navy); color: #fff; }

/* Selettore lingua */
.nav-right { display: flex; align-items: center; gap: 1.4rem; }
.lang-switch { display: inline-flex; align-items: center; gap: 0.1rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; }
.lang-btn { background: none; border: 0; cursor: pointer; padding: 0.3rem 0.4rem; color: var(--mist); font: inherit; letter-spacing: inherit; transition: color var(--t); }
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--ink); }
.lang-sep { color: var(--line); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: var(--t); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 8vw, 7rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.hero h1 {
  font-size: clamp(2.9rem, 7vw, 5.8rem);
  line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 1.1rem;
  font-weight: 500;
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--ink); }
.hero .role {
  font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 1.8rem; display: flex; align-items: center; gap: 0.8rem;
}
.hero .role::before { content:''; width: 34px; height: 1px; background: var(--gold); }
.hero .lede { max-width: 40ch; }
.hero-portrait { position: relative; }
.hero-portrait img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center top;
  filter: grayscale(0.15) contrast(1.02); border-radius: 2px; position: relative; z-index: 1;
}
/* Cornice oro d'angolo — firma di lusso */
.hero-portrait::before {
  content: ''; position: absolute; z-index: 2; top: -14px; right: -14px;
  width: 55%; height: 55%; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold);
  pointer-events: none;
}
.hero-portrait::after {
  content: ''; position: absolute; z-index: 2; bottom: -14px; left: -14px;
  width: 55%; height: 55%; border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold);
  pointer-events: none;
}

/* ---------- Architectural band (immagine + overlay blu) ---------- */
.band { position: relative; padding-block: clamp(5rem, 11vw, 9rem); overflow: hidden; }
.band .bg { position: absolute; inset: 0; z-index: 0; }
.band .bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.4); }
.band .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,29,51,0.82), rgba(10,20,36,0.9)); }
.band .wrap { position: relative; z-index: 1; }
.band .eyebrow { color: var(--gold-soft); }
.band .eyebrow::before { background: var(--gold-soft); }
.band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; margin-bottom: 1.4rem; }
.band p { color: var(--sage); max-width: 52ch; }
.band cite { display: block; margin-top: 1.6rem; font-style: normal; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-soft); }

/* ---------- Bilingual strip ---------- */
.jurisdictions {
  display: flex; flex-wrap: wrap; gap: 0 3rem; align-items: center;
  padding-block: 1.6rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: clamp(3rem, 7vw, 6rem);
  font-size: 0.85rem; color: var(--slate);
}
.jurisdictions strong { font-weight: 600; color: var(--ink); }
.jurisdictions span { display: inline-flex; align-items: center; gap: 0.6rem; }
.jurisdictions .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ---------- Section heading ---------- */
.head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.head h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 1.2rem; }
.head .lede { font-size: clamp(1.15rem, 2vw, 1.4rem); max-width: 52ch; }

/* ---------- Practices grid ---------- */
.practices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.practice {
  background: var(--paper); padding: clamp(2rem, 4vw, 3.2rem);
  display: flex; flex-direction: column; gap: 1rem;
  transition: background var(--t);
}
.practice:hover { background: var(--paper-warm); }
.practice .num { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; color: var(--gold); }
.practice h3 { font-size: 1.5rem; }
.practice p { font-size: 0.95rem; color: var(--slate); margin: 0; }
.practice ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; }
.practice li { font-size: 0.76rem; color: var(--slate); border: 1px solid var(--line); border-radius: 2px; padding: 0.25rem 0.6rem; }

/* ---------- Approach / numbered ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
.step .n { font-family: var(--font-serif); font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 1rem; }
.step h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.step p { font-size: 0.93rem; color: var(--slate); margin: 0; }

/* ---------- Profile feature ---------- */
.profile { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.profile-photo { position: relative; }
/* Motivo firma A&O — barre smeraldo sopra e sotto il ritratto */
.profile-photo .frame { position: relative; display: block; }
.profile-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center top; filter: grayscale(1) contrast(1.03); border-radius: 2px; position: relative; z-index: 1; }
.profile-photo .frame::before, .profile-photo .frame::after {
  content: ''; position: absolute; left: 8%; right: 8%; height: 7px; background: var(--gold); z-index: 2;
}
.profile-photo .frame::before { top: -7px; }
.profile-photo .frame::after { bottom: -7px; }
.profile-photo figcaption { font-size: 0.75rem; color: var(--mist); margin-top: 1.4rem; letter-spacing: 0.02em; }
.profile blockquote { margin: 0; }
.profile blockquote p { font-family: var(--font-serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.4; color: var(--ink); }
.profile .sig { font-size: 0.85rem; color: var(--slate); margin-top: 1.5rem; }
.profile .sig strong { color: var(--ink); display: block; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 500; }

/* ---------- Stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem,3vw,3rem); }
.stat .k { font-family: var(--font-serif); font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: #fff; }
.stat .l { font-size: 0.82rem; color: #adccc7; margin-top: 0.6rem; max-width: 22ch; }

/* ---------- Insight / placeholder note ---------- */
.todo {
  display: inline-block; font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; color: #9a6b00; background: #fff6e0; border: 1px dashed #e0b64d;
  padding: 0.15rem 0.5rem; border-radius: 2px; text-transform: uppercase;
}

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1.4rem; }
.btn {
  display: inline-block; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em; padding: 1rem 2.2rem; border-radius: 2px; transition: all var(--t);
}
.btn--solid { background: #fff; color: var(--navy); }
.btn--solid:hover { background: var(--gold); color: #fff; }
.btn--outline { border: 1px solid var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #8fa39c; padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3.5rem; }
.footer-grid h4 { color: #fff; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer-grid a { display: block; color: #8fa39c; margin-bottom: 0.6rem; transition: color var(--t); }
.footer-grid a:hover { color: #fff; }
.footer-brand { font-family: var(--font-serif); font-size: 1.4rem; color: #fff; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.76rem; color: #6a7d76; }

/* ---------- Reveal animation (hidden only when JS active) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2,0.6,0.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Page hero (interne) ---------- */
.page-hero { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 1.2rem; }
.page-hero .lede { max-width: 46ch; }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose h3 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.prose p { color: var(--slate); }
.prose .dropcap::first-letter {
  font-family: var(--font-serif); float: left; font-size: 3.8rem; line-height: 0.8;
  padding: 0.3rem 0.6rem 0 0; color: var(--gold);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.5rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink);
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  transition: border-color var(--t);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy); }
.contact-detail { margin-bottom: 2rem; }
.contact-detail dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); margin-bottom: 0.35rem; }
.contact-detail dd { margin: 0; font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); }

/* Stats a 2 colonne (sezione transfrontaliera) */
.stats.cols-2 { grid-template-columns: 1fr 1fr; gap: 2rem; }

/* ============================================================
   RESPONSIVE — mobile-first
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid, .profile, .contact-grid { grid-template-columns: 1fr; }
  .hero-portrait { margin-top: 0.5rem; max-width: 380px; }
  .hero-aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 2rem; margin-top: 2.5rem; }
  .practices, .stats, .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav { height: 66px; }
  .nav-right { gap: 0.9rem; }
  .brand { font-size: 1.1rem; white-space: nowrap; }
  .brand small { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1.5rem var(--gutter) 2rem; gap: 1.3rem;
  }
  .nav-links.open a { font-size: 1rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  /* Tutte le griglie a colonna singola */
  .practices, .stats, .stats.cols-2, .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { gap: 2.2rem; }
  .practices { border: 0; }
  .practice { border: 1px solid var(--line); }
  .footer-bottom { flex-direction: column; gap: 0.6rem; }

  /* Spaziatura verticale più compatta */
  .section { padding-block: clamp(3rem, 12vw, 4rem); }
  .hero { padding-block: 2rem 3rem; }
  .band { padding-block: 4rem; }
  .practice { padding: 1.8rem 1.5rem; }
  .head { margin-bottom: 2rem; }

  /* Tipografia mobile */
  .hero h1 { font-size: clamp(2.6rem, 15vw, 3.4rem); }
  .page-hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .head h2, .cta-band h2, .band h2 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .lede, .hero .lede, .head .lede { font-size: 1.08rem; line-height: 1.55; }
  .contact-detail dd { font-size: 1.08rem; }

  /* Strisce che vanno a capo pulite */
  .jurisdictions { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .role { flex-wrap: wrap; }
}

/* Nessuno scroll orizzontale, mai */
html, body { overflow-x: hidden; }
.wrap { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
