/* Studio legale: fascia blu notte per apertura e contatti, fondo carta per la lettura, oro scuro solo per etichette e dettagli. */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --line: #E3DED3;
  --fg: #1F2633;
  --muted: #4A5161;
  --ink: #14213D;
  --gold: #7A5F2B;
  --band: #14213D;
  --band-deep: #0E1830;
  --band-fg: #FFFFFF;
  --band-muted: #D0D6E1;
  --band-gold: #D9C9A3;
  --ok: #2F6B3A;
  --err: #9B2C2C;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151D; --surface: #181E29; --line: #2A3242; --fg: #E6E8EC; --muted: #A9B0BD;
    --ink: #E9EDF5; --gold: #D2B87F; --band: #0B1222; --band-deep: #070C17; --band-fg: #FFFFFF;
    --band-muted: #C3CAD7; --band-gold: #D9C9A3; --ok: #7CC48A; --err: #F08A8A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151D; --surface: #181E29; --line: #2A3242; --fg: #E6E8EC; --muted: #A9B0BD;
  --ink: #E9EDF5; --gold: #D2B87F; --band: #0B1222; --band-deep: #070C17; --band-fg: #FFFFFF;
  --band-muted: #C3CAD7; --band-gold: #D9C9A3; --ok: #7CC48A; --err: #F08A8A; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.18; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(34px, 5.2vw, 54px); }
h2 { font-size: clamp(27px, 3.4vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold); }
.lead { font-size: 19px; color: var(--muted); max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.brand span { font-size: 13px; color: var(--muted); letter-spacing: .03em; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 20px; font-size: 15px; }
.nav-list a { text-decoration: none; padding: 8px 0; display: inline-block; }
.nav-list a[aria-current="page"] { color: var(--gold); font-weight: 600; }
.nav-cta, .nav-list a.nav-cta { background: var(--band); color: var(--band-fg); padding: 10px 16px; border-radius: 4px; font-weight: 600; }
.nav-cta:hover, .nav-list a.nav-cta:hover { color: var(--band-gold); }
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--ink); flex: none; }
  .menu-toggle:focus-visible + .menu-btn { outline: 3px solid var(--gold); outline-offset: 2px; }
  .site-header .nav-list { display: none; }
  .menu-toggle:checked ~ nav .nav-list { display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter-r) 16px var(--gutter-l); gap: 0; }
  .menu-toggle:checked ~ nav .nav-list a { padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .menu-toggle:checked ~ nav .nav-list a.nav-cta { margin-top: 12px; text-align: center; border: 0; padding: 13px 16px; }
}

/* Bands */
.band { background: var(--band); color: var(--band-fg); }
.band h1, .band h2, .band h3 { color: var(--band-fg); }
.band .eyebrow { color: var(--band-gold); }
.band .lead, .band .muted { color: var(--band-muted); }
.band a { color: var(--band-fg); }
.band a:hover { color: var(--band-gold); }
.section { padding-block: 80px; }
.section-tight { padding-block: 56px; }
.section + .section.alt, .alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .section { padding-block: 56px; } }

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-block: 72px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-photo { flex: 1 1 300px; max-width: 400px; aspect-ratio: 4 / 5; border-radius: 6px; background: #24324F; border: 1px dashed #6B7A99; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #C3CAD7; font-size: 15px; }
.hero-photo { margin: 0; aspect-ratio: 4 / 3; max-width: 480px; flex-basis: 360px; }
.hero-photo.has-img { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; aspect-ratio: auto; align-items: stretch; text-align: left; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.hero-photo figcaption { font-size: 12px; color: var(--band-muted); }
.page-hero .wrap { padding-block: 56px; display: flex; flex-direction: column; gap: 16px; }
.crumbs { font-size: 14px; color: var(--band-muted); }
.crumbs a { color: var(--band-muted); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 4px; font-weight: 600; text-decoration: none; border: 1px solid transparent; font-size: 16px; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--band); color: var(--band-fg); }
.btn-primary:hover { color: var(--band-gold); }
.band .btn-primary, .btn-light { background: #FFFFFF; color: #14213D; }
.band .btn-primary:hover, .btn-light:hover { color: #7A5F2B; }
.btn-ghost { border-color: var(--band-gold); color: var(--band-fg); background: transparent; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { color: var(--gold); border-color: var(--gold); }
.contact-line { font-size: 15px; color: var(--band-muted); }
.contact-line strong { color: var(--band-fg); }

/* Grids and cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-2 { display: grid; gap: 48px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card p { font-size: 15.5px; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); border-top: 2px solid var(--ink); }
.steps li { padding: 20px 20px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.steps .n { font-family: var(--serif); font-size: 15px; color: var(--gold); font-weight: 600; }
.steps strong { color: var(--ink); }
.steps p { font-size: 15.5px; color: var(--muted); }
.list-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.list-rows > div { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.list-rows strong { color: var(--ink); }
.list-rows span { font-size: 15.5px; color: var(--muted); }
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 72ch; }
.prose h2 { margin-top: 18px; font-size: 28px; }
.prose h3 { margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 18px 20px; font-size: 15.5px; color: var(--muted); }

/* Pronunce */
.ruling { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 26px; display: grid; gap: 14px; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.ruling-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--muted); border-right: 1px solid var(--line); padding-right: 20px; }
.ruling-meta .court { font-family: var(--serif); font-size: 19px; color: var(--ink); font-weight: 600; line-height: 1.25; }
.ruling-meta .ref { font-variant-numeric: tabular-nums; }
.ruling-body { display: flex; flex-direction: column; gap: 10px; }
.tag { display: inline-flex; align-self: flex-start; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold); }
.principle { font-family: var(--serif); font-size: 18px; color: var(--fg); line-height: 1.5; border-left: 0; }
@media (max-width: 700px) { .ruling { grid-template-columns: minmax(0, 1fr); } .ruling-meta { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; } }

/* Tables */
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
caption { text-align: left; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; }
th, td { padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
thead th { border-bottom: 2px solid var(--ink); color: var(--ink); }
td.num, th.num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 16px; }

/* Form */
.form { display: grid; gap: 18px; }
.form .row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .legend { font-weight: 600; font-size: 15px; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--surface); border: 1px solid #B9B3A6; border-radius: 4px; padding: 12px 14px; min-height: 48px; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.hint { font-size: 14px; color: var(--muted); }
.choice { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.choice label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); padding: 12px 16px; border-radius: 4px; cursor: pointer; font-weight: 500; min-height: 48px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 4px; padding: 14px 16px; font-size: 15.5px; border: 1px solid; }
.alert-ok { color: var(--ok); border-color: var(--ok); }
.alert-err { color: var(--err); border-color: var(--err); }
.collega-only[hidden] { display: none !important; }

/* Contact block and footer */
.info-list { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px 18px; font-size: 16px; }
.info-list dt { color: var(--muted); }
.band .info-list dt { color: var(--band-muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.site-footer { background: var(--band-deep); color: var(--band-muted); font-size: 14px; }
.site-footer .wrap { padding-block: 40px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-footer strong { color: var(--band-fg); font-family: var(--serif); font-size: 18px; font-weight: 600; }
.site-footer a { color: var(--band-muted); }
.site-footer a:hover { color: var(--band-gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.legal-line { border-top: 1px solid #22304D; }
.legal-line .wrap { display: block; padding-block: 18px; font-size: 13px; }
.mobile-call { display: none; }
@media (max-width: 700px) {
  .mobile-call { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; gap: 10px; background: var(--surface); border-top: 1px solid var(--line); padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
  .mobile-call .btn { flex: 1; }
  body { padding-bottom: 76px; }
}
.hero-proof { font-size: 16px; color: var(--band-muted); border-left: 3px solid var(--band-gold); padding-left: 14px; }
.hero-proof strong { color: var(--band-fg); font-family: var(--serif); font-size: 22px; }
.ruling-body h3 a { text-decoration: none; }
.ruling-body h3 a:hover { text-decoration: underline; }
