/* ==========================================================
   Tortora & Partners — foglio di stile
   Palette e caratteri ripresi dalla brochure dello Studio.
   ========================================================== */

/* ---------- Font (ospitati in locale, nessuna chiamata a Google) ---------- */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/playfair-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }

/* ---------- Variabili ---------- */
:root {
  --navy: #0d385b;
  --navy-deep: #0a2c48;
  --gold: #d2af73;
  --gold-dark: #a8854a;      /* oro scurito per testi/link su fondo chiaro (contrasto) */
  --cream: #f0ede4;
  --paper: #f7f5ef;
  --ink: #2e2e2e;
  --text: #555350;
  --on-navy: #f3efe6;
  --on-navy-soft: #c9d3dd;

  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Roboto", "Helvetica Neue", Arial, system-ui, sans-serif;

  --frame: 5px;              /* spessore della cornice dorata */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 500; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* La breve linea dorata sotto i titoli, come nella brochure */
.rule {
  display: block; width: 46px; height: 4px; background: var(--gold);
  margin: 1rem 0 1.75rem; border: 0;
}
.rule--center { margin-inline: auto; }
.rule--long { width: 200px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--cream);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(13, 56, 91, .08);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 1rem;
}
.brand img { width: 200px; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--navy); color: var(--navy);
  font: 500 .9rem var(--sans); padding: .5rem .9rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2.25rem; }
.site-nav a {
  font-family: var(--serif); font-size: 1.05rem; color: var(--navy);
  text-decoration: none; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

@media (max-width: 760px) {
  .brand img { width: 160px; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid rgba(13, 56, 91, .12);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .site-nav a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(13, 56, 91, .1); }
  .site-nav a[aria-current="page"] { color: var(--gold-dark); border-bottom-color: rgba(13, 56, 91, .1); }
}

/* ==========================================================
   Cornice dorata: l'elemento distintivo della brochure.
   Un rettangolo sovrapposto che attraversa immagine e fasce colore.
   ========================================================== */
.framed { position: relative; }
.framed > .frame {
  position: absolute; pointer-events: none; z-index: 3;
  inset: var(--frame-top, 2.5rem) 0 var(--frame-bottom, 2.5rem) 0;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  border: var(--frame) solid var(--gold);
}

/* ---------- Home: copertina ---------- */
.cover { background: var(--cream); --frame-top: 2rem; --frame-bottom: 2.5rem; }
.cover__image {
  height: clamp(320px, 62vh, 640px);
  background: var(--navy) url("../img/galleria-prospettica.jpg") center 55% / cover no-repeat;
}
.cover__band {
  background: var(--navy); color: var(--on-navy);
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) calc(var(--gutter) + 1.75rem) clamp(4rem, 8vw, 6rem);
}
.cover__band h1 {
  color: var(--on-navy); font-style: italic;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}
.cover__band .tagline {
  margin: 0 auto; max-width: 34em; color: var(--on-navy-soft);
  font-size: 1.05rem;
}
.cover__band .rule { margin: 1.5rem auto; }
.cover__top { height: 2rem; }

@media (prefers-reduced-motion: no-preference) {
  .cover__band h1, .cover__band .rule, .cover__band .tagline {
    animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .cover__band .rule { animation-delay: .25s; }
  .cover__band .tagline { animation-delay: .4s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Split: immagine a sinistra, pannello blu a destra ---------- */
.split {
  display: grid; grid-template-columns: 38% 1fr;
  background: var(--navy);
  --frame-top: 3rem; --frame-bottom: 3rem;
}
.split__media { background-size: cover; background-position: center; min-height: 520px; }
.split__body {
  color: var(--on-navy);
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(2rem, 7vw, 6.5rem);
  max-width: 44rem;
}
.split__body h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.split__body p { color: var(--on-navy-soft); }
.split__body .rule { margin-bottom: 2rem; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 360px; background-position: center 40%; }
  .split > .frame { display: none; }
  .split__body { border-top: var(--frame) solid var(--gold); }
}

/* ---------- Testata delle pagine interne ---------- */
.page-head { background: var(--cream); --frame-top: 2rem; --frame-bottom: 0; }
.page-head > .frame { border-bottom: 0; }
.page-head__image { height: clamp(240px, 42vh, 440px); background-size: cover; background-position: center; }
.page-head__title {
  padding: clamp(3rem, 6vw, 4.5rem) 0 0;
}
.page-head__title .inner { width: min(100% - 2 * var(--gutter) - 4rem, 760px); margin-inline: auto; }
.page-head__title h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-head__title .lead { font-size: 1.15rem; max-width: 38em; }

/* Il corpo pagina continua dentro la cornice */
.page-body {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  border: var(--frame) solid var(--gold);
  border-top: 0;
  padding: 0 0 clamp(3rem, 6vw, 4.5rem);
  display: flow-root;
}
.page-body--flush { padding-bottom: 0; }
.page-head + .page-body { margin-top: 0; }
.page-body .inner { width: min(100% - 4rem, 760px); margin-inline: auto; }
@media (max-width: 600px) {
  .page-body .inner { width: calc(100% - 2.5rem); }
  .page-head__title .inner { width: calc(100% - 2 * var(--gutter) - 2.5rem); }
}

.section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }

/* Ambiti del diritto amministrativo */
.areas {
  list-style: none; margin: 1.75rem 0 2.25rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(13, 56, 91, .15);
}
.areas li {
  font-family: var(--serif); font-size: 1.12rem; color: var(--navy);
  line-height: 1.4;
  padding: 1rem 1.25rem 1rem 1.4rem;
  border-bottom: 1px solid rgba(13, 56, 91, .15);
  position: relative;
}
.areas li::before {
  content: ""; position: absolute; left: 0; top: 1.55rem;
  width: 8px; height: 2px; background: var(--gold);
}
.areas li:nth-child(odd) { border-right: 1px solid rgba(13, 56, 91, .15); }
.areas li:nth-child(even) { padding-left: 2.6rem; }
.areas li:nth-child(even)::before { left: 1.25rem; }
@media (max-width: 600px) {
  .areas { grid-template-columns: 1fr; }
  .areas li:nth-child(odd) { border-right: 0; }
  .areas li:nth-child(even) { padding-left: 1.4rem; }
  .areas li:nth-child(even)::before { left: 0; }
}

.emphasis {
  border-left: 3px solid var(--gold); padding: .25rem 0 .25rem 1.5rem;
  margin: 2rem 0; color: var(--ink);
}

.section-image { margin-top: clamp(3rem, 6vw, 4rem); }
.section-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Home: due aree in evidenza ---------- */
.practice {
  background: var(--cream);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.practice__head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.practice__head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.practice__head p { max-width: 36em; margin-inline: auto; }
.practice__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
}
.practice__item { padding: 2.5rem clamp(1.5rem, 4vw, 3rem); }
.practice__item + .practice__item { border-left: 1px solid var(--gold); }
.practice__item h3 { font-size: 1.6rem; margin-bottom: .9rem; }
.practice__item p { margin-bottom: 1.5rem; }
@media (max-width: 760px) {
  .practice__grid { grid-template-columns: 1fr; }
  .practice__item + .practice__item { border-left: 0; border-top: 1px solid var(--gold); }
}

.link-more {
  font-family: var(--serif); color: var(--navy); text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
}
.link-more:hover { color: var(--gold-dark); }

/* ---------- Professionisti ---------- */
.team {
  list-style: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0;
  display: grid; gap: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.person { text-align: center; }
.person img {
  width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: cover; object-position: center 25%;
  margin: 0 auto 1.25rem; background: #ddd8cc;
}
.person h3 { font-size: 1.3rem; margin-bottom: .2rem; }
.person .role {
  font-size: .88rem; color: var(--gold-dark); font-weight: 400; margin: 0 0 .15rem;
}
.person .ordine { font-size: .82rem; color: #7a766e; margin: 0 0 .6rem; }
.person h3 + .ordine, .person h3 + .role { margin-top: .1rem; }
.person .bio { font-size: .95rem; line-height: 1.7; margin: 0 auto; max-width: 24em; }
@media (max-width: 900px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }

/* ---------- Contatti ---------- */
.place {
  background: linear-gradient(var(--cream) 0 55%, var(--navy) 55% 100%);
  padding: clamp(2rem, 4vw, 2.5rem) 0;
}
.place__box {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  border: var(--frame) solid var(--gold);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2rem) clamp(2.5rem, 5vw, 4rem);
}
.place__text { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); padding-inline: clamp(0rem, 2vw, 1rem); }
.place__text h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.place__text .address { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); margin-top: 1.5rem; }
.place__photo { max-width: 960px; margin-inline: auto; }
.place__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.contact {
  background: var(--navy); color: var(--on-navy);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.contact .wrap { text-align: center; }
.contact h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.contact__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem; border-top: 1px solid rgba(210, 175, 115, .45);
}
.contact__grid > div { padding: 2rem 1.25rem; }
.contact__grid > div + div { border-left: 1px solid rgba(210, 175, 115, .45); }
.contact__grid h3 { color: var(--gold); font-size: 1.15rem; margin-bottom: .8rem; }
.contact__grid p { color: var(--on-navy-soft); margin: 0; line-height: 1.9; }
.contact a:not(.button) { color: var(--on-navy); text-decoration: none; border-bottom: 1px solid rgba(210, 175, 115, .5); }
.contact a:not(.button):hover { border-bottom-color: var(--gold); }
.button {
  display: inline-block; margin-top: 1rem;
  font: 400 1rem var(--serif);
  padding: .75rem 1.5rem;
  border: 1px solid var(--gold); color: var(--on-navy);
  text-decoration: none;
}
.button:hover { background: var(--gold); color: var(--navy); }
@media (max-width: 760px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__grid > div + div { border-left: 0; border-top: 1px solid rgba(210, 175, 115, .45); }
}

/* ---------- Banda contatti nella home ---------- */
.cta {
  background: var(--navy); color: var(--on-navy-soft); text-align: center;
  padding: clamp(3.5rem, 7vw, 5rem) var(--gutter);
}
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .75rem; }
.cta p { max-width: 36em; margin-inline: auto; }
.cta .button { margin-top: 1.5rem; }

/* ---------- Testo legale ---------- */
.legal h2 { font-size: 1.4rem; margin: 2.25rem 0 .75rem; }
.legal ul { padding-left: 1.2rem; }
.facts { margin: 2rem 0 0; border-top: 1px solid rgba(13, 56, 91, .15); }
.facts > div {
  display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: .25rem 1.5rem;
  padding: .85rem 0; border-bottom: 1px solid rgba(13, 56, 91, .15);
}
.facts dt { font-family: var(--serif); color: var(--navy); }
.facts dd { margin: 0; color: var(--ink); word-break: break-word; }
.facts a { color: var(--navy); text-decoration-color: var(--gold); }
@media (max-width: 600px) { .facts > div { grid-template-columns: 1fr; } }
.placeholder { background: #f6e7c6; color: #6b4e17; padding: 0 .25em; font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: var(--on-navy-soft);
  font-size: .92rem; line-height: 1.8;
  padding: clamp(3rem, 6vw, 4rem) 0 2rem;
}
.site-footer .cols {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(210, 175, 115, .35);
}
.footer-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand span { font-family: var(--serif); color: var(--on-navy); font-size: 1.25rem; line-height: 1.2; }
.site-footer h2 { font-family: var(--serif); color: var(--gold); font-size: 1rem; margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .legal-line { padding-top: 1.5rem; font-size: .82rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
