:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 252, 246, 0.86);
  --surface-strong: #fbf7ef;
  --text: #171512;
  --muted: rgba(23, 21, 18, 0.68);
  --line: rgba(79, 60, 40, 0.15);
  --accent: #8d5f3b;
  --accent-soft: #d7bf9c;
  --dark: #161412;
  --light: #faf6ef;
  --shadow: 0 26px 70px rgba(54, 36, 22, 0.12);
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(164, 119, 74, 0.14), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 30%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background:
    radial-gradient(circle at 12% 16%, rgba(154, 103, 63, 0.14) 0 6%, transparent 6.4%),
    radial-gradient(circle at 87% 14%, rgba(180, 141, 92, 0.12) 0 7%, transparent 7.4%),
    radial-gradient(circle at 10% 86%, rgba(140, 78, 48, 0.12) 0 8%, transparent 8.4%),
    radial-gradient(circle at 88% 84%, rgba(172, 131, 85, 0.12) 0 7%, transparent 7.4%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
::selection { background: var(--dark); color: var(--light); }

.container {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.section { padding: 7rem 0; }
.bordered { border-top: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: rgba(23, 21, 18, 0.5);
}
.eyebrow-light { color: rgba(250, 246, 239, 0.58); }
h1, h2, h3, .brand-title, .footer-brand { font-family: var(--serif); }
h1, h2, h3, p, ul { margin-top: 0; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 999;
  padding: 1.45rem 0;
  background: #f9f5ed;
  transition: background-color 220ms ease, box-shadow 220ms ease, padding 220ms ease, backdrop-filter 220ms ease;
}
.site-header.is-scrolled {
  padding: 0.95rem 0;
  background: #f9f5ed;
  backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.07);
}
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand-title { font-size: 2rem; line-height: 1; }
.desktop-nav { display: flex; align-items: center; gap: 1.8rem; }
.desktop-nav > a:not(.button), .mobile-nav a:not(.button) {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(23, 21, 18, 0.68);
}
body[data-page="home"] .desktop-nav a[href="./index.html"],
body[data-page="studio"] .desktop-nav a[href="./studio.html"],
body[data-page="competenze"] .desktop-nav a[href="./competenze.html"],
body[data-page="professionisti"] .desktop-nav a[href="./professionisti.html"],
body[data-page="contatti"] .desktop-nav a[href="./contatti.html"] {
  color: var(--text);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem 0;
}
.menu-label { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
  content: "";
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -7px; }
.menu-icon::after { position: absolute; top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1rem 24px 22px;
  background: rgba(249, 245, 237, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  border: 1px solid currentColor;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.button:hover, .text-link:hover { transform: translateY(-1px); }
.button-dark { background: var(--dark); color: var(--light); }
.button-dark:hover { background: #2b2723; }
.button-outline:hover { background: var(--dark); color: var(--light); }
.button-light { background: var(--light); color: var(--dark); }
.button-light:hover { background: #f1ebdf; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  border: 0;
  padding: 0 0 0 1.15rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.text-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}
.text-link::after { content: "\2192"; font-size: 1rem; }

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 11rem;
  padding-bottom: 5rem;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 6rem 0 0;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("./images/optimized/affresco3-bg.jpg");
  background-repeat: no-repeat;
  background-position: center 28%;
  background-size: cover;
  filter: saturate(0.84) contrast(0.9);
}
.hero-home::after, .page-hero::after {
  content: "";
  position: absolute;
  inset: 8rem 1.5rem 2rem;
  border: 1px solid rgba(95, 58, 39, 0.14);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.98fr);
  gap: 4.5rem;
  align-items: center;
}
.hero-copy-block {
  position: relative;
  text-align: left;
  padding: 0 0 2rem;
  max-width: 590px;
}
.hero-copy-block::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 132px;
  height: 1px;
  background: rgba(17, 17, 17, 0.18);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 0 0 1.6rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.54);
}
.hero-meta span { display: inline-flex; align-items: center; }
.hero-meta span + span::before {
  content: "/";
  margin-right: 0.85rem;
  color: rgba(17, 17, 17, 0.3);
}
.hero h1, .page-hero h1 {
  font-size: clamp(4rem, 11vw, 6.4rem);
  line-height: 0.92;
  font-weight: 300;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero h1 span, .page-hero h1 span {
  display: block;
  font-style: italic;
  color: rgba(23, 21, 18, 0.66);
}
.hero-copy, .page-hero-copy {
  max-width: 680px;
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.8;
  color: var(--muted);
  font-weight: 400;
}
.hero-actions {
  display: grid;
  grid-template-columns: auto minmax(220px, 280px);
  gap: 1.25rem;
  align-items: end;
  width: fit-content;
}
.hero-supporting {
  margin: 0;
  padding: 0.95rem 1.1rem;
  max-width: 280px;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(17, 17, 17, 0.56);
  background: rgba(255, 253, 247, 0.62);
  border: 1px solid rgba(95, 58, 39, 0.08);
  backdrop-filter: blur(6px);
}
.hero-portrait {
  position: relative;
  margin: 0;
  padding: 1rem 1rem 0.8rem;
  background: rgba(255, 252, 245, 0.42);
  box-shadow: var(--shadow);
}
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: -0.9rem 2.2rem 4.2rem -1rem;
  background: rgba(255, 250, 240, 0.42);
  border: 1px solid rgba(95, 58, 39, 0.06);
  z-index: -1;
}
.hero-portrait img,
.page-hero-visual img,
.showcase-card img,
.team-card img,
.portrait-card img,
.story-gallery img,
.contact-visual img {
  width: 100%;
  object-fit: cover;
}
.hero-portrait img { aspect-ratio: 4 / 3.25; }
.hero-portrait-caption {
  width: min(420px, 92%);
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(17, 17, 17, 0.14);
}
.hero-caption-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.46);
}
.hero-portrait-caption strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.page-hero {
  min-height: auto;
  padding-top: 10.5rem;
  padding-bottom: 4.5rem;
}
.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 3rem;
  align-items: end;
}
.page-hero-copy {
  max-width: 760px;
}
.page-hero-visual {
  padding: 0.9rem;
  background: transparent;
  border: 0;
}
.page-hero-visual img { aspect-ratio: 4 / 4.2; }
.studio-hero {
  color: var(--dark);
  background:
    radial-gradient(circle at top left, rgba(231, 214, 181, 0.34), transparent 22%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(247, 241, 231, 0.92));
}
.studio-hero::before {
  inset: 6rem 0 0;
  opacity: 0.18;
  background-image: url("./images/optimized/affresco4-bg.jpg");
  background-repeat: no-repeat;
  background-position: center 90%;
  background-size: cover;
  filter: saturate(0.84) contrast(0.9);
}
.studio-hero::after {
  inset: 8rem 1.5rem 1.5rem;
  border-color: rgba(95, 58, 39, 0.14);
}
.studio-hero .page-hero-inner {
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.08fr);
  gap: 0;
  align-items: end;
  min-height: 36rem;
  position: relative;
}
.studio-hero .page-hero-inner > .page-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  margin: 0 -2.5rem 0 0;
  padding: 2.5rem 2.35rem;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(255, 252, 246, 0.78));
  border: 1px solid rgba(95, 58, 39, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(68, 49, 31, 0.12);
  transform: translateX(-1.5rem);
}
.studio-hero .eyebrow,
.studio-hero h1,
.studio-hero .page-hero-copy {
  color: rgba(23, 21, 18, 0.78);
}
.studio-hero h1 span {
  color: rgba(66, 58, 52, 0.72);
}
.studio-hero-visual {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.7rem;
  background: #fbf7f0;
  border: 1px solid rgba(196, 178, 150, 0.55);
  box-shadow:
    0 0 0 0.35rem rgba(255, 252, 246, 0.94),
    0 28px 60px rgba(68, 49, 31, 0.12);
  overflow: hidden;
  transform: translateX(2.25rem);
}
.studio-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 6 / 4.25;
  object-fit: cover;
  object-position: 30% 30%;
  transform: scale(1.54);
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}
.contact-hero {
  color: var(--light);
}
.contact-hero::before {
  inset: 0;
  opacity: 0.94;
  background-image:
    linear-gradient(90deg, rgba(17, 17, 17, 0.84) 0%, rgba(17, 17, 17, 0.7) 42%, rgba(17, 17, 17, 0.34) 100%),
    url("./images/optimized/affresco6-bg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  filter: saturate(0.8) contrast(0.92);
}
.contact-hero::after {
  inset: 8rem 1.5rem 1.5rem;
  border-color: rgba(250, 246, 239, 0.14);
}
.contact-hero .page-hero-inner {
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 34rem;
}
.contact-hero .page-hero-inner > .page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0;
  padding: 2.5rem 2.4rem;
  background: linear-gradient(180deg, rgba(23, 21, 18, 0.64), rgba(23, 21, 18, 0.4));
  border: 1px solid rgba(250, 246, 239, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.contact-hero .eyebrow,
.contact-hero h1,
.contact-hero .page-hero-copy {
  color: var(--light);
}
.contact-hero h1 span {
  color: rgba(250, 246, 239, 0.72);
}
.competenze-hero .page-hero-inner {
  grid-template-columns: minmax(0, 0.95fr) minmax(240px, 0.75fr);
  align-items: center;
}
.competenze-hero {
  background-image: url("./images/optimized/affresco5-bg.jpg");
  background-repeat: no-repeat;
  background-size: 46%;
  background-position: calc(100% + 4.5rem) center;
}
.competenze-hero .page-hero-copy {
  position: relative;
  z-index: 1;
}
.competenze-hero-visual {
  display: none;
  margin: 0;
  background: #fbf7f0;
  border: 1px solid rgba(196, 178, 150, 0.55);
  box-shadow:
    0 0 0 0.35rem rgba(255, 252, 246, 0.94),
    0 24px 52px rgba(68, 49, 31, 0.1);
  overflow: hidden;
}
.competenze-hero-visual img {
  width: 100%;
  aspect-ratio: 5 / 3.6;
  object-fit: cover;
  object-position: center;
}
.page-hero-visual-double {
  position: relative;
  min-height: 38rem;
  padding: 0.85rem;
}
body[data-page="professionisti"] .page-hero-visual-double {
  justify-self: end;
  width: min(100%, 26rem);
  min-height: 31rem;
}
.page-hero-visual-double figure {
  margin: 0;
}
.page-hero-visual-primary img {
  aspect-ratio: 4 / 4.55;
}
body[data-page="professionisti"] .page-hero-visual-primary img {
  aspect-ratio: 3 / 4.2;
  object-position: center 18%;
}
.page-hero-visual-primary {
  width: min(82%, 420px);
  padding: 0.55rem;
  background: rgba(255, 250, 241, 0.86);
  box-shadow: 0 18px 42px rgba(56, 39, 25, 0.1);
}
body[data-page="professionisti"] .page-hero-visual-primary {
  width: min(76%, 330px);
}
.page-hero-visual-secondary {
  position: absolute;
  right: 0.85rem;
  bottom: 1.25rem;
  width: min(57%, 278px);
  padding: 0.45rem;
  background: rgba(255, 250, 241, 0.88);
  box-shadow: 0 22px 50px rgba(56, 39, 25, 0.14);
}
.page-hero-visual-secondary img {
  aspect-ratio: 4 / 3.3;
}
body[data-page="professionisti"] .page-hero-visual-secondary {
  width: min(47%, 190px);
  bottom: 1rem;
}
body[data-page="professionisti"] .page-hero-visual-secondary img {
  aspect-ratio: 3 / 4;
  object-position: center 14%;
}

.section-head h2, .section-intro h2, .contact-section h2, .contact-band h2, .page-hero h1 {
  font-size: clamp(2.9rem, 6vw, 4.4rem);
  line-height: 0.96;
  font-weight: 300;
}
.section-body,
.story-copy,
.practice-copy,
.contact-copy-block {
  max-width: 760px;
}
.section-body p,
.practice-copy p,
.story-copy p,
.contact-copy-block p,
.site-footer p,
.site-footer li,
.contact-list p,
.contact-list a {
  font-size: 1.08rem;
  line-height: 1.9;
  font-weight: 400;
  color: var(--muted);
}
.section-intro { margin-bottom: 3.5rem; }

.intro-grid,
.story-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 4rem;
}

.atmosphere-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(252, 249, 243, 0.86), rgba(247, 241, 232, 0.92)),
    linear-gradient(135deg, rgba(255, 253, 247, 0.92), rgba(246, 239, 229, 0.88));
}
.atmosphere-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 251, 243, 0.96), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(255, 248, 238, 0.76), transparent 24%),
    radial-gradient(circle at 68% 78%, rgba(255, 250, 241, 0.74), transparent 24%);
  pointer-events: none;
  z-index: 0;
}
.atmosphere-inner {
  position: relative;
  z-index: 2;
  min-height: 40rem;
  display: grid;
  align-items: center;
}
.atmosphere-copy {
  max-width: 43rem;
}
.atmosphere-copy h2 {
  margin-bottom: 1.6rem;
  font-size: clamp(3.3rem, 6.8vw, 5rem);
  line-height: 0.96;
  font-weight: 300;
}
.atmosphere-copy p:last-child {
  max-width: 34rem;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--muted);
}
.atmosphere-collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.atmosphere-piece {
  position: absolute;
  display: block;
  border: 12px solid rgba(255, 252, 246, 0.88);
  box-shadow: 0 28px 70px rgba(56, 39, 25, 0.12);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: saturate(0.94) contrast(0.96);
}
.atmosphere-piece-wide {
  left: 18%;
  top: 15rem;
  width: min(38vw, 30rem);
  aspect-ratio: 1.9 / 1;
  background-image: url("./images/optimized/affresco4-bg.jpg");
  transform: rotate(-2deg);
}
.atmosphere-piece-tall {
  left: 48%;
  top: 18rem;
  width: min(24vw, 22rem);
  aspect-ratio: 0.78 / 1;
  background-image: url("./images/optimized/affresco5-bg.jpg");
  background-position: center 42%;
  transform: rotate(1.8deg);
}
.atmosphere-piece-small {
  right: 10%;
  top: 11rem;
  width: min(22vw, 18rem);
  aspect-ratio: 1.45 / 1;
  background-image: url("./images/optimized/affresco6-bg.jpg");
  transform: rotate(-1.4deg);
}

.showcase-section {
  position: relative;
  overflow: hidden;
}
.showcase-section::before,
.team-preview-section::before,
.contact-band::before,
.timeline-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.showcase-section::before {
  opacity: 0.22;
  background-image:
    linear-gradient(180deg, rgba(250, 247, 241, 0.8), rgba(250, 247, 241, 0.92)),
    url("./images/optimized/affresco2-bg.jpg");
  background-size: cover;
  background-position: center;
}
.showcase-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.7fr;
  gap: 1.5rem;
  align-items: start;
}
.showcase-card {
  margin: 0;
  padding: 0.8rem;
  background: rgba(255, 252, 246, 0.78);
  box-shadow: 0 20px 50px rgba(56, 39, 25, 0.1);
}
.showcase-card:nth-child(2) {
  transform: translateY(3rem);
}
.showcase-card:nth-child(3) {
  transform: translateY(-1.5rem);
}
.showcase-card img,
.story-gallery img,
.mosaic-grid.affresco-mosaic img {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.practice-card,
.stat-card,
.info-card {
  padding: 1.7rem;
  background: rgba(255, 251, 243, 0.66);
  border: 1px solid rgba(95, 58, 39, 0.1);
  box-shadow: 0 12px 36px rgba(62, 42, 26, 0.05);
}
.practice-card h3,
.team-card h3,
.portrait-card h3,
.timeline-item h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 400;
}
.practice-card p,
.portrait-card p,
.info-card p {
  color: var(--muted);
  line-height: 1.8;
}
.section-cta {
  margin-top: 2.4rem;
  display: flex;
  justify-content: flex-start;
}

.team-preview-section,
.team-gallery-section {
  position: relative;
  overflow: hidden;
}
.team-preview-section .team-grid {
  grid-template-columns: repeat(2, minmax(280px, 380px));
  justify-content: center;
}
.team-preview-section .section-cta {
  justify-content: center;
}
.portfolio-section.is-visible .section-intro {
  animation: portfolio-fade-up 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.portfolio-section.is-visible .portrait-grid {
  animation: portfolio-fade-up 900ms cubic-bezier(0.16, 1, 0.3, 1) 120ms forwards;
}
.portfolio-section .section-intro,
.portfolio-section .portrait-grid {
  opacity: 0;
  transform: translateY(34px);
}
.team-preview-section::before,
.team-gallery-section::before {
  opacity: 0.16;
  background-image:
    linear-gradient(180deg, rgba(250, 247, 241, 0.7), rgba(250, 247, 241, 0.9)),
    url("./images/optimized/affresco4-bg.jpg");
  background-size: cover;
  background-position: center;
}
.team-grid,
.portrait-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}
.portrait-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}
.portrait-grid-leads {
  grid-template-columns: repeat(2, minmax(280px, 380px));
  justify-content: center;
  margin-bottom: 2.25rem;
}
.portrait-grid-team {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.portrait-grid-staff {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
  margin: 0 auto;
}
.portrait-grid-staff .portrait-card {
  cursor: pointer;
}
.team-divider {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 3.2rem 0 2.4rem;
}
.team-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 58, 39, 0.16), transparent);
}
.team-divider-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(23, 21, 18, 0.48);
  white-space: nowrap;
}
.team-card,
.portrait-card {
  padding: 0.75rem 0.75rem 1.2rem;
  background: rgba(255, 252, 246, 0.82);
  box-shadow: 0 20px 50px rgba(56, 39, 25, 0.08);
}
.portrait-card {
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
  border: 1px solid transparent;
  outline: none;
}
.portrait-card:hover,
.portrait-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(56, 39, 25, 0.12);
  border-color: rgba(141, 95, 59, 0.24);
}
.portrait-card.is-active {
  transform: translateY(-6px);
  background: rgba(255, 250, 241, 0.96);
  border-color: rgba(141, 95, 59, 0.28);
  box-shadow: 0 26px 60px rgba(56, 39, 25, 0.16);
}
.team-card img,
.portrait-card img {
  aspect-ratio: 3 / 4;
  margin-bottom: 1.2rem;
}
.portrait-card-placeholder {
  aspect-ratio: 3 / 4;
  margin-bottom: 1.2rem;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 251, 243, 0.9), transparent 32%),
    linear-gradient(145deg, rgba(191, 168, 145, 0.68), rgba(137, 109, 84, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 252, 246, 0.55);
}
.team-card p,
.portrait-card .role {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: rgba(17, 17, 17, 0.52);
}
.portrait-card .bio {
  margin-top: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}
.profile-popup {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
html.modal-open,
body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}
.profile-popup[hidden] {
  display: none !important;
}
.profile-popup-backdrop {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(23, 18, 14, 0.42);
  backdrop-filter: blur(10px);
  animation: popup-fade-in 420ms ease forwards;
}
.profile-popup-panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(90vh, 820px);
  overflow: hidden;
  padding: 2.4rem 2.2rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform-origin: center;
  animation: popup-panel-in 480ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.profile-popup.is-closing .profile-popup-backdrop {
  animation: popup-fade-out 340ms ease forwards;
}
.profile-popup.is-closing .profile-popup-panel {
  animation: popup-panel-out 340ms ease forwards;
}
.profile-popup-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 0;
  align-items: center;
  height: calc(min(90vh, 820px) - 4.8rem);
}
.profile-popup-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(95, 58, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.96);
  color: rgba(23, 21, 18, 0.52);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.profile-popup-close:hover,
.profile-popup-close:focus-visible {
  transform: scale(1.04);
  background: rgba(255, 248, 236, 1);
  color: rgba(23, 21, 18, 0.82);
  border-color: rgba(95, 58, 39, 0.2);
  outline: none;
}
.profile-popup-media {
  position: relative;
  z-index: 2;
  transform: translateX(0.9rem);
  padding: 0.9rem;
  border: 1px solid rgba(95, 58, 39, 0.12);
  box-shadow: 0 20px 42px rgba(40, 27, 17, 0.12);
}
.profile-popup-media::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  background: rgba(255, 251, 243, 0.96);
  z-index: 0;
}
.profile-popup-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  border: 0.55rem solid rgba(255, 251, 243, 0.96);
  transform: scale(1.08);
  transform-origin: center;
  box-shadow: 0 26px 60px rgba(40, 27, 17, 0.16);
}
.profile-popup-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  height: 100%;
  margin-left: -2.4rem;
  padding: 2.4rem 3.4rem 2rem 5.4rem;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.98), rgba(245, 239, 229, 0.98));
  box-shadow: 0 30px 80px rgba(40, 27, 17, 0.16);
  overflow: hidden;
}
.profile-popup-copy h3 {
  font-size: clamp(2.3rem, 3vw, 3.2rem);
  line-height: 0.98;
  font-weight: 400;
  margin-bottom: 0.9rem;
}
.profile-popup-copy .role {
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: rgba(17, 17, 17, 0.52);
}
.detail-lead,
.detail-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}
.detail-lead {
  font-size: 1.06rem;
  margin-bottom: 1rem;
}
.detail-text {
  font-size: 1rem;
}
.profile-popup-pages {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.profile-popup-pages::-webkit-scrollbar {
  display: none;
}
.profile-popup-page {
  display: flex;
  align-items: flex-start;
  scroll-snap-align: start;
  height: 100%;
  min-width: 0;
  padding-right: 0.2rem;
}
.profile-popup-page > p {
  width: 100%;
  margin: 0;
}
.profile-popup-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
  flex: 0 0 auto;
}
.profile-popup-dot {
  appearance: none;
  width: 0.65rem;
  height: 0.65rem;
  border: 0;
  border-radius: 999px;
  background: rgba(95, 58, 39, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}
.profile-popup-dot.is-active {
  background: rgba(95, 58, 39, 0.72);
  transform: scale(1.08);
}

@keyframes popup-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popup-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes popup-panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popup-panel-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.988);
  }
}

@keyframes portfolio-fade-up {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-section {
  position: relative;
  overflow: hidden;
}
.timeline-section::before {
  opacity: 0.15;
  background-image:
    linear-gradient(180deg, rgba(250, 247, 241, 0.82), rgba(250, 247, 241, 0.92)),
    url("./images/optimized/affresco5-bg.jpg");
  background-size: cover;
  background-position: center;
}
.timeline {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid rgba(79, 60, 40, 0.14);
}
.timeline-item:first-child { border-top: 0; padding-top: 0; }
.timeline-year {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(23, 21, 18, 0.5);
}
.timeline-item h3 { margin-bottom: 0.55rem; }
.timeline-item p { margin: 0; color: var(--muted); line-height: 1.8; }

.story-gallery {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.9fr;
  gap: 1rem;
  margin-top: 2rem;
  align-items: start;
}
.story-gallery img:nth-child(1) {
  margin-top: 2.5rem;
}
.story-gallery img:nth-child(3) {
  margin-top: 1rem;
}

.fresco-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}
.fresco-strip-card {
  margin: 0;
  padding: 0.65rem;
  background: rgba(255, 252, 246, 0.82);
  box-shadow: 0 18px 44px rgba(56, 39, 25, 0.08);
}
.fresco-strip-card:nth-child(1) {
  transform: translateY(1.4rem);
}
.fresco-strip-card:nth-child(2) {
  transform: translateY(-0.8rem);
}
.fresco-strip-card:nth-child(3) {
  transform: translateY(1.1rem);
}
.fresco-strip-card:nth-child(4) {
  transform: translateY(-1.2rem);
}
.fresco-strip-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.fresco-background-section {
  min-height: 28rem;
  background-image:
    linear-gradient(180deg, rgba(248, 243, 234, 0.24), rgba(248, 243, 234, 0.24)),
    url("./images/optimized/affresco4-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 20px 48px rgba(56, 39, 25, 0.1);
}
.fresco-background-section .container {
  min-height: 28rem;
}

.competenze-background-section {
  min-height: 30rem;
  background-image:
    linear-gradient(180deg, rgba(248, 243, 234, 0.34), rgba(248, 243, 234, 0.34)),
    url("./images/optimized/affresco6-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 20px 48px rgba(56, 39, 25, 0.1);
}
.competenze-background-section .container {
  min-height: 30rem;
  display: flex;
  align-items: flex-start;
}
.competenze-background-section .section-intro {
  max-width: 52rem;
}

.practice-layout {
  display: grid;
  gap: 2.2rem;
}
.practice-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  padding: 2rem;
  background: rgba(255, 252, 246, 0.78);
  border: 1px solid rgba(95, 58, 39, 0.1);
  box-shadow: 0 14px 40px rgba(62, 42, 26, 0.06);
}
.practice-panel .practice-copy h3 { font-size: 2.4rem; margin-bottom: 1rem; }
.practice-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}
.practice-highlights li {
  padding: 1rem 1.1rem;
  background: rgba(251, 246, 236, 0.88);
  border-left: 2px solid var(--accent-soft);
  color: var(--muted);
  line-height: 1.7;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 1rem;
}
.mosaic-grid figure {
  margin: 0;
  padding: 0.7rem;
  background: rgba(255, 252, 246, 0.82);
}
.mosaic-grid img { aspect-ratio: 4 / 4.6; }
.mosaic-grid .wide img { aspect-ratio: 4 / 3.1; }
.mosaic-grid.affresco-mosaic {
  grid-template-columns: 1.2fr 0.8fr 0.95fr;
  align-items: start;
}
.mosaic-grid.affresco-mosaic figure:nth-child(2) {
  transform: translateY(2.2rem);
}
.mosaic-grid.affresco-mosaic figure:nth-child(3) {
  transform: translateY(-1rem);
}

.contact-band {
  position: relative;
  overflow: hidden;
  color: var(--light);
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(17, 17, 17, 1));
}
.contact-band::before {
  opacity: 0.16;
  background-image:
    linear-gradient(180deg, rgba(17, 17, 17, 0.62), rgba(17, 17, 17, 0.82)),
    url("./images/optimized/affresco6-bg.jpg");
  background-size: cover;
  background-position: center;
}
.contact-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}
.contact-band p { color: rgba(250, 246, 239, 0.72); max-width: 520px; }

.contact-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(17, 17, 17, 1));
  color: var(--light);
}
.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.23;
  background-image:
    linear-gradient(180deg, rgba(17, 17, 17, 0.56), rgba(17, 17, 17, 0.9)),
    url("./images/optimized/affresco1-bg.jpg"),
    url("./images/optimized/affresco4-bg.jpg");
  background-size: cover, 48%, cover;
  background-position: center, left center, center;
}
.contact-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(214, 184, 133, 0.16), transparent 32%),
    radial-gradient(circle at bottom left, rgba(214, 184, 133, 0.1), transparent 28%);
}
.contact-section .container { position: relative; z-index: 1; }
.contact-section .section-intro h2,
.contact-section .contact-copy-block p,
.contact-section .contact-list p,
.contact-section .contact-list a,
.contact-section .contact-form span {
  color: rgba(250, 246, 239, 0.78);
}
.contact-section .section-intro {
  max-width: 35rem;
  margin-bottom: 2.4rem;
}
.contact-section .section-intro h2 {
  max-width: 12ch;
  margin-bottom: 0;
  font-size: clamp(3.6rem, 7vw, 5.25rem);
  line-height: 0.94;
}
.contact-copy-block {
  max-width: 34rem;
  margin-bottom: 3rem;
}
.contact-copy-block p {
  font-size: 1.12rem;
  line-height: 1.85;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.98fr);
  gap: 5rem;
  align-items: start;
}
.contact-list {
  display: grid;
  gap: 2.4rem;
  max-width: 24rem;
}
.contact-list h3, .site-footer h3 {
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--sans);
  font-weight: 700;
  color: rgba(250, 246, 239, 0.68);
}
.contact-panel {
  padding: 2.2rem 2rem;
  border: 1px solid rgba(250, 249, 246, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(31, 27, 24, 0.34);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
  min-height: 45rem;
}
.contact-form {
  display: grid;
  gap: 2.2rem;
  height: 100%;
  align-content: start;
}
.contact-form label {
  display: grid;
  gap: 1rem;
}
.contact-form span {
  font-size: 0.96rem;
  font-weight: 500;
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(250, 249, 246, 0.18);
  background: transparent;
  color: var(--light);
  border-radius: 0;
  padding: 0 0 1rem;
  outline: 0;
  font: inherit;
  transition: border-color 180ms ease, opacity 180ms ease;
}
.contact-form textarea {
  min-height: 11rem;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(250, 246, 239, 0.34);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: rgba(250, 249, 246, 0.82); }
.contact-form button {
  width: 100%;
  justify-content: center;
  margin-top: 0.2rem;
  padding: 1.15rem 1.4rem;
  background: #efe7dd;
  color: #171512;
  border: 0;
  letter-spacing: 0.16em;
}
.contact-form button:hover,
.contact-form button:focus-visible {
  background: #f7f0e7;
}
.contact-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}
.contact-form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 1.6rem;
  margin: -0.8rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(250, 246, 239, 0.8);
}
.form-status[data-state="success"] {
  color: #d7f0cf;
}
.form-status[data-state="error"] {
  color: #ffd0d0;
}
.form-status[data-state="pending"] {
  color: rgba(250, 246, 239, 0.92);
}
.map-wrap { margin-top: 4rem; }
.map-wrap {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(250, 249, 246, 0.1);
  backdrop-filter: blur(6px);
}
.map-wrap iframe {
  width: 100%;
  min-height: 400px;
  border: 1px solid rgba(250, 249, 246, 0.14);
  filter: grayscale(1);
  opacity: 0.86;
}

.site-footer {
  background: var(--dark);
  color: rgba(250, 249, 246, 0.72);
  border-top: 1px solid rgba(250, 249, 246, 0.08);
  padding: 4rem 0 2rem;
}
.site-footer p, .site-footer li, .site-footer a, .footer-bottom { color: rgba(250, 249, 246, 0.72); }
.site-footer a:hover { color: var(--light); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand { color: var(--light); font-size: 2rem; margin-bottom: 1.25rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 0.75rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(250, 249, 246, 0.08);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mobile-consultation-cta,
.scroll-top-button {
  display: none;
}
.scroll-top-button {
  position: fixed;
  right: 14px;
  bottom: 18px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(95, 58, 39, 0.16);
  background: rgba(255, 250, 241, 0.94);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(56, 39, 25, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
  backdrop-filter: blur(10px);
}
.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .hero-inner,
  .page-hero-inner,
  .intro-grid,
  .story-layout,
  .contact-layout,
  .practice-panel,
  .contact-grid,
  .profile-popup-layout { grid-template-columns: 1fr; }
  .atmosphere-inner {
    min-height: 45rem;
    align-items: start;
    padding-top: 1rem;
  }
  .atmosphere-copy {
    max-width: 38rem;
  }
  .atmosphere-piece-wide {
    left: 8%;
    top: 18rem;
    width: min(48vw, 28rem);
  }
  .atmosphere-piece-tall {
    left: 44%;
    top: 23rem;
    width: min(30vw, 18rem);
  }
  .atmosphere-piece-small {
    right: 7%;
    top: 15rem;
    width: min(27vw, 15rem);
  }
  .hero-inner { gap: 3rem; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid, .portrait-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait-grid-leads,
  .portrait-grid-team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portrait-grid-staff {
    max-width: none;
  }
  .showcase-grid, .mosaic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.1fr 0.9fr; }
  .profile-popup-panel {
    padding: 1rem;
  }
  .profile-popup-copy {
    min-height: auto;
    margin-left: 0;
    padding: 2rem 1.8rem;
  }
  .profile-popup-media {
    transform: none;
  }
}

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav[data-open="true"] { display: flex; }
  .site-header { padding: 1.1rem 0; }
  .nav-shell { gap: 1rem; }
  .brand { min-width: 0; }
  .brand-title { font-size: 1.75rem; }
  .mobile-nav .button,
  .hero-actions .button,
  .section-cta .button,
  .contact-band .button {
    width: 100%;
    max-width: 26rem;
  }
  .hero-home::after, .page-hero::after { display: none; }
  .hero, .page-hero { min-height: auto; padding-top: 8.7rem; padding-bottom: 4rem; }
  .hero::before { inset: 5rem 0 0; background-position: center top; }
  .hero-copy-block { margin: 0 auto; text-align: center; padding: 0 0 1.5rem; max-width: 680px; }
  .hero-copy-block::after { left: 50%; transform: translateX(-50%); }
  .hero-meta { justify-content: center; }
  .hero-copy, .page-hero-copy { margin-left: auto; margin-right: auto; }
  .hero-actions { grid-template-columns: 1fr; justify-items: center; width: 100%; }
  .hero-supporting { max-width: 34rem; text-align: center; }
  .atmosphere-inner {
    min-height: 47rem;
    padding-top: 0;
    align-items: start;
  }
  .atmosphere-copy {
    max-width: 32rem;
  }
  .atmosphere-copy h2 {
    font-size: clamp(3rem, 11vw, 4.5rem);
  }
  .atmosphere-piece-wide {
    left: 1.25rem;
    right: 9rem;
    top: 18.5rem;
    width: auto;
    max-width: none;
  }
  .atmosphere-piece-tall {
    left: auto;
    right: 2rem;
    top: 27rem;
    width: min(34vw, 14rem);
  }
  .atmosphere-piece-small {
    right: 1.2rem;
    top: 13rem;
    width: min(32vw, 13rem);
  }
  .section-head, .section-intro { max-width: 42rem; }
  .cards-grid, .team-grid, .portrait-grid, .showcase-grid, .mosaic-grid, .story-gallery, .fresco-strip { grid-template-columns: 1fr; }
  .competenze-hero .page-hero-inner {
    grid-template-columns: 1fr;
  }
  .competenze-hero {
    background-image: none;
  }
  .competenze-hero-visual {
    display: block;
    order: 2;
    width: 100%;
    padding: 0.65rem;
  }
  .portrait-grid-leads,
  .portrait-grid-team,
  .portrait-grid-staff {
    grid-template-columns: 1fr;
  }
  .team-divider {
    gap: 0.75rem;
    margin: 2.4rem 0 1.9rem;
  }
  .team-divider-label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }
  .page-hero-visual-double {
    min-height: 33rem;
  }
  body[data-page="professionisti"] .page-hero-visual-double {
    width: min(100%, 23rem);
    min-height: 28rem;
  }
  body[data-page="professionisti"] .page-hero-visual-double {
    display: none;
  }
  .page-hero-visual-secondary {
    width: min(48%, 220px);
  }
  body[data-page="professionisti"] .page-hero-visual-primary {
    width: min(74%, 300px);
  }
  body[data-page="professionisti"] .page-hero-visual-secondary {
    width: min(46%, 176px);
  }
  .studio-hero .page-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: auto;
    align-items: start;
  }
  .studio-hero .page-hero-inner > .page-hero-copy {
    margin: 0;
    max-width: none;
    transform: none;
    width: 100%;
    padding: 2rem 1.8rem;
  }
  .studio-hero .page-hero-inner > .page-hero-copy > .page-hero-copy {
    max-width: none;
    margin-bottom: 0;
  }
  .studio-hero-visual {
    order: 2;
    width: 100%;
    align-self: stretch;
    margin-inline: -14px;
    width: calc(100% + 28px);
    transform: none;
  }
  .studio-hero-visual img {
    transform: scale(1.22);
    object-position: center 28%;
  }
  .showcase-card:nth-child(2),
  .showcase-card:nth-child(3),
  .mosaic-grid.affresco-mosaic figure:nth-child(2),
  .mosaic-grid.affresco-mosaic figure:nth-child(3),
  .story-gallery img:nth-child(1),
  .story-gallery img:nth-child(3),
  .fresco-strip-card:nth-child(1),
  .fresco-strip-card:nth-child(2),
  .fresco-strip-card:nth-child(3),
  .fresco-strip-card:nth-child(4) {
    transform: none;
    margin-top: 0;
  }
  .contact-band-inner, .footer-grid, .form-row, .timeline-item { grid-template-columns: 1fr; }
  .timeline-item { gap: 0.75rem; }
  body[data-page="studio"] .story-layout {
    gap: 2.25rem;
  }
  body[data-page="studio"] .section-intro {
    margin-bottom: 2.4rem;
  }
  .portrait-card.is-active,
  .portrait-card:hover,
  .portrait-card:focus-visible {
    transform: none;
  }
}

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .container { width: min(100% - 28px, 1180px); }
  .section { padding: 5.25rem 0; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; }
  .site-header { padding: 1rem 0; }
  .nav-shell { gap: 0.75rem; }
  .brand-title { font-size: clamp(1.28rem, 6.4vw, 1.55rem); }
  .menu-toggle { gap: 0.55rem; }
  .menu-label { font-size: 0.68rem; letter-spacing: 0.12em; }
  .mobile-nav {
    gap: 1.2rem;
    padding: 1rem 14px 18px;
  }
  .mobile-nav a:not(.button) { padding: 0.4rem 0; }
  body[data-page="studio"] .section {
    padding: 4.1rem 0;
  }
  .competenze-hero .page-hero-inner {
    gap: 1rem;
  }
  .competenze-hero-visual {
    margin-inline: -22px;
    width: calc(100% + 44px);
    padding: 0.55rem;
    box-shadow:
      0 0 0 0.22rem rgba(255, 252, 246, 0.94),
      0 20px 42px rgba(68, 49, 31, 0.1);
  }
  .competenze-hero-visual img {
    aspect-ratio: 5 / 4;
  }
  body[data-page="studio"] .section.bordered {
    padding-bottom: 3rem;
  }
  body[data-page="studio"] .timeline-section {
    padding-top: 3rem;
  }
  body[data-page="studio"] .story-layout {
    gap: 1.65rem;
  }
  body[data-page="studio"] .section-head h2,
  body[data-page="studio"] .section-intro h2 {
    margin-bottom: 0;
  }
  body[data-page="studio"] .story-copy p,
  body[data-page="studio"] .timeline-item {
    margin-bottom: 0;
  }
  body[data-page="studio"] .timeline {
    gap: 1rem;
  }
  body[data-page="studio"] .timeline-item {
    padding: 1.2rem 0;
  }
  .atmosphere-inner {
    min-height: 38rem;
    padding-bottom: 15rem;
  }
  .atmosphere-copy h2 {
    margin-bottom: 1.2rem;
  }
  .atmosphere-copy p:last-child {
    font-size: 1rem;
    line-height: 1.75;
  }
  .atmosphere-piece {
    border-width: 8px;
  }
  .atmosphere-piece-wide {
    left: 0.9rem;
    right: 5.8rem;
    top: auto;
    bottom: 5.2rem;
    width: auto;
  }
  .atmosphere-piece-tall {
    right: 0.9rem;
    top: auto;
    bottom: 2.1rem;
    width: 34vw;
    min-width: 6rem;
  }
  .atmosphere-piece-small {
    right: 0.9rem;
    top: auto;
    bottom: 15rem;
    width: 31vw;
    min-width: 5.5rem;
  }
  .hero, .page-hero { padding-top: 8rem; padding-bottom: 3.4rem; }
  .hero h1, .page-hero h1 { font-size: clamp(3rem, 17vw, 4.75rem); line-height: 0.94; }
  .hero-copy, .page-hero-copy { font-size: 1rem; line-height: 1.7; }
  .hero-meta { gap: 0.35rem 0.5rem; margin-bottom: 1.2rem; font-size: 0.68rem; letter-spacing: 0.14em; }
  .hero-meta span + span::before { margin-right: 0.5rem; }
  .hero-actions { gap: 0.9rem; }
  .hero-supporting { padding: 0.85rem 0.95rem; font-size: 0.92rem; line-height: 1.6; }
  .hero-portrait, .page-hero-visual, .showcase-card, .team-card, .portrait-card, .practice-panel, .contact-panel { padding: 0.6rem; }
  .hero-portrait-caption {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    width: auto;
  }
  .page-hero-visual-double {
    min-height: auto;
    display: grid;
    gap: 0.75rem;
    padding: 0.6rem;
  }
  .page-hero-visual-primary {
    width: 100%;
  }
  .page-hero-visual-secondary {
    position: static;
    width: 100%;
  }
  body[data-page="professionisti"] .page-hero-visual-double {
    width: 100%;
    min-height: auto;
  }
  .studio-hero .page-hero-inner > .page-hero-copy,
  .contact-hero .page-hero-inner > .page-hero-copy {
    padding: 1.6rem 1.25rem;
  }
  .studio-hero .page-hero-inner > .page-hero-copy {
    margin: 0;
  }
  .studio-hero h1 {
    font-size: clamp(2.9rem, 13.5vw, 4.2rem);
    line-height: 0.97;
    margin-bottom: 1rem;
  }
  .studio-hero .page-hero-inner {
    gap: 1rem;
  }
  .studio-hero .page-hero-inner > .page-hero-copy {
    padding: 1.35rem 1.1rem;
  }
  .studio-hero .page-hero-inner > .page-hero-copy > .page-hero-copy {
    font-size: 0.98rem;
    line-height: 1.75;
  }
  .studio-hero-visual {
    margin-inline: -14px;
    padding: 0.55rem;
    box-shadow:
      0 0 0 0.22rem rgba(255, 252, 246, 0.94),
      0 20px 42px rgba(68, 49, 31, 0.12);
  }
  .studio-hero-visual img {
    aspect-ratio: 5 / 4.2;
    transform: scale(1.14);
  }
  .studio-hero-media {
    transform: translateX(7%);
  }
  .contact-section .section-intro h2 {
    font-size: clamp(2.8rem, 13vw, 4.3rem);
  }
  .contact-panel {
    min-height: auto;
    padding: 1.35rem;
  }
  .contact-form {
    gap: 1.7rem;
  }
  .section-head h2, .section-intro h2, .contact-section h2, .contact-band h2 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .section-body p,
  .practice-copy p,
  .story-copy p,
  .contact-copy-block p,
  .site-footer p,
  .site-footer li,
  .contact-list p,
  .contact-list a { font-size: 1rem; line-height: 1.8; }
  .practice-card h3, .team-card h3, .portrait-card h3, .timeline-item h3, .practice-panel .practice-copy h3 { font-size: 1.7rem; }
  .map-wrap iframe { min-height: 320px; }
  .fresco-background-section,
  .fresco-background-section .container { min-height: 18rem; }
  .competenze-background-section,
  .competenze-background-section .container { min-height: 18rem; }
  .profile-popup {
    align-items: flex-start;
    min-height: 100dvh;
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .profile-popup-panel {
    max-height: none;
    margin-top: 0.75rem;
    overflow: visible;
    padding: 0.35rem;
  }
  .profile-popup-layout {
    height: auto;
  }
  .profile-popup-close {
    top: 0.7rem;
    right: 0.7rem;
  }
  .profile-popup-copy {
    padding: 1.35rem 1.1rem 1.2rem;
    height: auto;
    overflow: visible;
  }
  .profile-popup-pages {
    height: clamp(16rem, 34vh, 24rem);
    touch-action: pan-x;
    flex: initial;
  }
  .profile-popup-copy h3 {
    font-size: clamp(2.1rem, 11vw, 3rem);
  }
  body[data-page="professionisti"] .portrait-grid {
    gap: 1rem;
  }
  body[data-page="professionisti"] .portrait-card {
    padding: 0.45rem 0.45rem 0.8rem;
  }
  body[data-page="professionisti"] .portrait-card img {
    aspect-ratio: 4 / 4.9;
    margin-bottom: 0.8rem;
  }
  body[data-page="professionisti"] .portrait-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.3rem;
  }
  body[data-page="professionisti"] .portrait-card .role {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }
  body[data-page="professionisti"] .portrait-card .bio {
    display: none;
  }
  body[data-page="professionisti"] .mobile-consultation-cta {
    display: flex;
    justify-content: center;
    margin-top: 1.35rem;
    margin-bottom: -2.1rem;
  }
  body[data-page="professionisti"] .mobile-consultation-cta .button {
    width: 100%;
    max-width: 22rem;
  }
  .scroll-top-button {
    position: fixed;
    right: 14px;
    bottom: 18px;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(95, 58, 39, 0.16);
    background: rgba(255, 250, 241, 0.94);
    color: var(--text);
    box-shadow: 0 18px 36px rgba(56, 39, 25, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
    backdrop-filter: blur(10px);
  }
  .scroll-top-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container { width: min(100% - 24px, 1180px); }
  .brand-title { font-size: clamp(1.18rem, 6vw, 1.35rem); }
  .hero-home::after, .page-hero::after { inset: 6.2rem 0.6rem 0.9rem; }
  .hero h1, .page-hero h1 { font-size: clamp(2.7rem, 15vw, 4rem); }
  .button { padding-inline: 1.1rem; }
  .competenze-hero-visual {
    margin-inline: -18px;
    width: calc(100% + 36px);
  }
  .studio-hero-visual {
    margin-inline: -12px;
    width: calc(100% + 24px);
  }
}
