/* Avv. Rocco De Carlo — mobile-first, formal palette */
:root {
  --ink: #1a1f2e;
  --ink-muted: #3d4556;
  --paper: #f7f5f0;
  --cream: #ebe6dc;
  --accent: #8b6914;
  --accent-hover: #6d5210;
  --line: rgba(26, 31, 46, 0.12);
  --shadow: rgba(26, 31, 46, 0.08);
  --header-h: 3.75rem;
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-muted);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
/* No backdrop-filter here: it creates a containing block for fixed children and
   collapses the mobile nav panel to the header’s height. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(247, 245, 240, 0.97);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

/* Studio identity (sezione contatti) */
.studio-identity {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 2px;
}

@media (min-width: 640px) {
  .studio-identity {
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 1.75rem 1.75rem;
  }
}

.studio-identity__photo {
  margin: 0;
  max-width: 12rem;
  justify-self: center;
}

@media (min-width: 640px) {
  .studio-identity__photo {
    justify-self: start;
  }
}

.studio-identity__photo img {
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px var(--shadow);
}

.studio-identity__denomination {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.studio-identity__role {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.studio-identity__channels {
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.studio-identity__channels li + li {
  margin-top: 0.65rem;
}

.studio-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}

.studio-channel:hover,
.studio-channel:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.studio-channel:hover span,
.studio-channel:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.studio-channel .icon-channel {
  flex-shrink: 0;
  color: var(--ink-muted);
}

.studio-channel:hover .icon-channel,
.studio-channel:focus-visible .icon-channel {
  color: var(--accent);
}

.studio-channel--wa .icon-wa {
  color: #25d366;
}

.studio-channel--wa:hover .icon-wa,
.studio-channel--wa:focus-visible .icon-wa {
  color: #128c4a;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover {
  background: var(--cream);
  border-color: var(--ink-muted);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.25rem;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* Nav panel */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 95;
  max-width: min(20rem, 88vw);
  margin-left: auto;
  background: var(--paper);
  padding: 1.5rem 1.25rem 2rem;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px var(--shadow);
}

.site-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  border-bottom: 1px solid var(--line);
}

.site-nav a {
  display: block;
  padding: 1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.nav-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(26, 31, 46, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  z-index: 94;
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Desktop nav */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-backdrop {
    display: none;
  }

  .site-nav {
    position: static;
    inset: auto;
    max-width: none;
    margin-left: 0;
    transform: none;
    visibility: visible;
    padding: 0;
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .site-nav ul {
    display: flex;
    gap: 0.25rem;
    align-items: center;
  }

  .site-nav li {
    border: none;
  }

  .site-nav a {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  min-height: 72dvh;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem 1.25rem 3rem;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg picture {
  width: 100%;
  height: 100%;
}

.hero-bg img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 31, 46, 0.88) 0%,
    rgba(26, 31, 46, 0.45) 45%,
    rgba(26, 31, 46, 0.25) 100%
  );
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 42rem;
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.hero-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.92;
  margin: 0 0 1.75rem;
  max-width: 36ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

@media (min-width: 600px) {
  .hero {
    padding: 3rem 2rem 4rem;
    min-height: 78vh;
  }
}

/* Sections */
main {
  padding-bottom: 3rem;
}

.section {
  padding: 3rem 1.25rem;
}

.section--alt {
  background: var(--cream);
}

.section-inner {
  max-width: 68rem;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1.25rem;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.05rem;
  max-width: 42rem;
  margin: 0 0 2rem;
}

/* Two-column layouts */
.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .split--align-top {
    align-items: start;
  }

  .split--reverse .split-text {
    order: 2;
  }

  .split--reverse .split-visual {
    order: 1;
  }
}

.figure {
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 12px 40px var(--shadow);
}

.figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.figure--cover-top img {
  object-position: center top;
}

.figure figcaption {
  padding: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Cards / lists */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.5rem 1.35rem;
  border-radius: 2px;
  transition: box-shadow 0.2s var(--ease);
}

.card:hover {
  box-shadow: 0 8px 28px var(--shadow);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.65rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Contact */
.contact-block {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-block {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.contact-list strong {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.contact-list a {
  font-weight: 600;
  color: var(--ink);
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.contact-wa:hover,
.contact-wa:focus-visible {
  text-decoration: none;
}

.contact-wa:hover span,
.contact-wa:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.icon-wa {
  flex-shrink: 0;
  color: #25d366;
}

.icon-wa--sm {
  width: 1.1rem;
  height: 1.1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.links-row .social-link {
  text-decoration: none;
}

.links-row .social-link:hover,
.links-row .social-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  vertical-align: middle;
}

.footer-wa:hover,
.footer-wa:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.icon-wa--footer {
  width: 1rem;
  height: 1rem;
  color: #7ddba8;
}

.map-wrap {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 220px;
  background: var(--cream);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

@media (min-width: 768px) {
  .map-wrap iframe {
    height: 320px;
  }
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.links-row a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 2rem 1.25rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  line-height: 1.6;
}

.site-footer-inner {
  max-width: 68rem;
  margin: 0 auto;
}

.site-footer p {
  margin: 0 0 0.75rem;
}

.site-footer strong {
  color: #fff;
}

.legal-line {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Full-bleed atmosphere band */
.atmosphere {
  position: relative;
  min-height: 12rem;
  max-height: 22rem;
}

.atmosphere img {
  width: 100%;
  height: min(22rem, 40vh);
  object-fit: cover;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(26, 31, 46, 0.55) 0%,
    rgba(26, 31, 46, 0.2) 100%
  );
  pointer-events: none;
}

/* Photo grid (servizi) */
.photo-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 600px) {
  .photo-mosaic {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.photo-mosaic .figure {
  margin: 0;
  box-shadow: 0 6px 24px var(--shadow);
}

.photo-mosaic .figure img {
  aspect-ratio: 1;
  object-fit: cover;
}

.map-note {
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
  color: var(--ink-muted);
}
