/* ===== Design tokens ===== */
:root {
  --ink: #0f1b30;
  --ink-2: #17273f;
  --ink-3: #223655;
  --silver: #aeb8c8;
  --silver-strong: #dde2e9;
  --steel: #55647c;
  --white: #ffffff;
  --paper: #eef1f5;
  --text: #222833;
  --muted: #626c7d;
  --border: #dde2e9;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-width: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2.3rem, 4.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--text); }

a { color: inherit; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ===== Eyebrow labels ===== */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--steel);
  margin-bottom: 14px;
  font-family: var(--font-display);
}
.cta-band .eyebrow,
.hero .eyebrow { color: var(--silver); }

/* ===== Logo ===== */
.logo-icon {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-display);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-pill { border-radius: 999px; }

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: var(--ink-2); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-on-dark {
  background: var(--silver-strong);
  color: var(--ink);
}
.btn-on-dark:hover { background: var(--white); }

.btn-outline-dark {
  background: transparent;
  color: var(--silver-strong);
  border-color: var(--silver);
}
.btn-outline-dark:hover { background: var(--silver-strong); color: var(--ink); }

.btn-small { padding: 11px 20px; font-size: 0.88rem; }
.btn-full { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--silver);
}
.brand-surname {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.01em;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--silver-strong);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.main-nav a:hover { color: var(--white); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--silver-strong);
  display: block;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  padding: 84px 0 76px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--silver);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

/* ===== Placeholder media frames ===== */
.placeholder-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(15,27,48,0.05) 0 12px, transparent 12px 24px),
    var(--paper);
  border: 1.5px dashed var(--steel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--steel);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.placeholder-frame svg {
  width: 56px;
  height: 56px;
}
.placeholder-frame span { color: var(--muted); font-weight: 500; }
.placeholder-square { aspect-ratio: 1 / 1; }

.placeholder-frame-dark {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 12px, transparent 12px 24px),
    var(--ink-2);
  border: 1.5px dashed var(--steel);
  color: var(--silver);
}
.placeholder-frame-dark span { color: rgba(255,255,255,0.5); }

/* ===== Highlights strip ===== */
.highlights {
  background: var(--ink-2);
  padding: 56px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}
.highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--silver-strong);
  margin-bottom: 16px;
}
.highlight-icon svg { width: 20px; height: 20px; }
.highlight h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.highlight p {
  color: rgba(255,255,255,0.6);
  font-size: 0.92rem;
  margin: 0;
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--paper); }

.section-heading {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-heading .eyebrow { display: block; }
.section-heading p { color: var(--muted); }

.lead {
  font-size: 1.2rem;
  color: var(--ink);
}

/* ===== Studio (two-column) ===== */
.studio-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.studio-media .placeholder-frame { max-width: 380px; margin-left: auto; }
.studio-photo {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  margin-left: auto;
}

/* ===== Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: 0 16px 32px rgba(15, 27, 48, 0.1);
  transform: translateY(-3px);
  border-color: var(--steel);
}
.card-media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--steel);
  margin-bottom: 18px;
}
.card-media svg { width: 22px; height: 22px; }
.card-index {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--steel);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.card h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--ink); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.more-competences {
  margin-top: 40px;
  text-align: center;
}
.more-competences summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
}
.more-competences summary::-webkit-details-marker { display: none; }
.more-competences-body {
  max-width: 780px;
  margin: 28px auto 0;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.competence-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
}
.competence-list li { margin-bottom: 10px; }
.competence-list strong { color: var(--ink); }

/* ===== Steps ===== */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.step {
  text-align: center;
  position: relative;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ===== Avvocato ===== */
.avvocato-inner {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
  align-items: center;
}
.placeholder-portrait { aspect-ratio: 3 / 4; max-width: 340px; }

.avvocato-photo {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.avvocato-content p { font-size: 1.05rem; color: var(--muted); max-width: 56ch; }
.credential {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 1.5px solid var(--steel);
  padding-bottom: 6px;
  margin-bottom: 18px;
}

.story-toggle { margin-top: 24px; }
.story-toggle summary { list-style: none; display: inline-flex; cursor: pointer; }
.story-toggle summary::-webkit-details-marker { display: none; }
.story-body {
  margin-top: 24px;
  max-width: 56ch;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.story-body p { color: var(--muted); }

/* ===== Novità ===== */
.novita-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.novita-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.novita p { color: var(--muted); font-size: 1.05rem; }

/* ===== CTA band ===== */
.cta-band {
  background: var(--ink);
  padding: 64px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-band h2 { color: var(--white); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.6); margin: 0; max-width: 48ch; }

/* ===== Contatti ===== */
.contatti-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.info-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.info-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  font-weight: 700;
  font-family: var(--font-display);
}
.info-list a {
  text-decoration: none;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}
.info-list a:hover { color: var(--steel); }

.contatti-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.response-note {
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--steel);
  font-weight: 600;
  font-family: var(--font-display);
}

/* ===== Form ===== */
.contatti-form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  scroll-margin-top: 100px;
}
.form-row { margin-bottom: 20px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
label, .fieldset-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  font-family: var(--font-display);
}
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--steel);
  outline-offset: 1px;
}
textarea { resize: vertical; }

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--text);
  font-family: var(--font-sans);
}
.checkbox-option { align-items: flex-start; }
.checkbox-option input { margin-top: 4px; }

.form-row-checkbox { margin-bottom: 24px; }

.form-disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.8fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin: 6px 0 0; }

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--silver);
  margin: 0 0 14px;
}
.footer-col p { margin: 0 0 8px; }
.footer-col a { text-decoration: none; color: rgba(255,255,255,0.8); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.65); text-decoration: underline; }
.footer-bottom a:hover { color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner,
  .studio-inner,
  .avvocato-inner,
  .contatti-grid {
    grid-template-columns: 1fr;
  }
  .studio-media { order: -1; }
  .studio-media .placeholder-frame,
  .studio-photo { max-width: 320px; margin: 0 auto; }
  .avvocato-media { order: -1; max-width: 260px; margin: 0 auto; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .highlights-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    inset: 70px 0 0 0;
    background: var(--ink);
    padding: 24px;
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }
  .main-nav a { font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn-small { display: none; }
  .form-row-split { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
