:root {
  --ink: #234F50;
  --ink-strong: #143E40;
  --sage: #A2B296;
  --sage-soft: #E4EADF;
  --blue-sage: #ABB1DF;
  --ivory: #FDFCF9;
  --paper: #FFFFFF;
  --taupe: #D6D2C4;
  --text: #293B3C;
  --muted: #667271;
  --line: rgba(35, 79, 80, 0.18);
  --focus: #6C7FAE;
  --shadow-soft: 0 24px 70px rgba(35, 79, 80, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(253, 252, 249, 0.9), rgba(253, 252, 249, 0.95)),
    url("assets/trama-definitiva-vettoriale.svg") center top / 1700px auto no-repeat;
  animation: patternBreath 28s ease-in-out infinite alternate;
  pointer-events: none;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(253, 252, 249, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  transition: box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(253, 252, 249, 0.92);
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(35, 79, 80, 0.08);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-link img {
  width: 44px;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.brand-link span {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.brand-link strong,
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.brand-link strong {
  color: var(--ink-strong);
  font-size: 1.02rem;
}

.brand-link small,
.eyebrow,
.profession,
.role {
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-link small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.main-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.main-nav .nav-contact {
  background: rgba(162, 178, 150, 0.24);
}

.section {
  padding: 72px 18px;
  scroll-margin-top: 108px;
}

.hero {
  position: relative;
  display: grid;
  gap: 36px;
  min-height: calc(100vh - 118px);
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 7% -30% auto -18%;
  height: 54%;
  background: url("assets/trama-definitiva-vettoriale.svg") center / 1500px auto no-repeat;
  opacity: 0.09;
  transform: translateY(calc(var(--hero-shift, 0px) * -0.18));
  animation: heroPatternDrift 32s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-copy,
.hero-symbol-wrap,
.hero-media {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 700px;
  animation: fadeSlideLeft 680ms ease both;
}

.hero-symbol-wrap {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  top: 0;
  transform: translateY(calc(var(--hero-shift, 0px) * -0.3));
  animation: symbolIntro 760ms 120ms ease both;
}

.hero-symbol {
  width: min(340px, 70vw);
  opacity: 0.82;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 26px 46px rgba(35, 79, 80, 0.08));
}

.hero-media {
  width: min(420px, 100%);
  transform: translateY(calc(var(--hero-shift, 0px) * 0.22));
  animation: fadeSlideRight 720ms 180ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 12px;
  color: var(--ink-strong);
  font-size: clamp(3rem, 15vw, 5.7rem);
  line-height: 0.94;
}

.profession {
  margin-bottom: 24px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 5vw, 1.85rem);
  font-weight: 500;
}

.hero-text {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(1.06rem, 4vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  transition: transform 220ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(35, 79, 80, 0.12);
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button.secondary {
  background: rgba(253, 252, 249, 0.74);
  color: var(--ink);
}

.button.light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.button.ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.62);
}

.hero-portrait {
  margin: 0;
  aspect-ratio: 4 / 5.15;
  overflow: hidden;
  border: 1px solid rgba(35, 79, 80, 0.14);
  border-radius: 2px;
  background: #171512;
  box-shadow: var(--shadow-soft);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.hero-portrait:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 80px rgba(35, 79, 80, 0.18);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.section-heading,
.text-columns,
.people-grid,
.services-grid,
.final-cta,
.contact-panel {
  max-width: var(--max);
  margin-inline: auto;
}

.section-heading {
  margin-bottom: 32px;
}

h2 {
  color: var(--ink-strong);
  font-size: clamp(2rem, 9vw, 3.8rem);
  line-height: 1.06;
}

h3 {
  margin-bottom: 14px;
  color: var(--ink-strong);
  font-size: 1.18rem;
  line-height: 1.25;
}

.intro-section,
.services-section,
.site-footer {
  background: rgba(255, 255, 255, 0.76);
  border-block: 1px solid var(--line);
}

.text-columns {
  display: grid;
  gap: 22px;
  color: var(--text);
  font-size: 1.04rem;
}

.lead-copy {
  color: var(--ink-strong);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.08rem, 2.2vw, 1.26rem);
  font-weight: 680;
  line-height: 1.55;
}

.studio-numbers {
  max-width: var(--max);
  margin: 42px auto 0;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.numbers-title {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.numbers-grid {
  display: grid;
  gap: 14px;
}

.numbers-grid div {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: 6px;
  background: rgba(253, 252, 249, 0.82);
}

.numbers-grid strong {
  display: block;
  color: var(--ink-strong);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(2.1rem, 8vw, 3.4rem);
  font-weight: 760;
  line-height: 1;
}

.numbers-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.professionals-section {
  background: linear-gradient(180deg, rgba(162, 178, 150, 0.16), rgba(253, 252, 249, 0.78));
}

.people-grid {
  display: grid;
  gap: 16px;
}

.person-card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(35, 79, 80, 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.person-card:hover {
  transform: translateY(-4px);
  border-color: rgba(162, 178, 150, 0.72);
  box-shadow: 0 18px 42px rgba(35, 79, 80, 0.1);
}

.person-card.featured {
  background: var(--ink);
  color: var(--paper);
}

.person-card.featured h3,
.person-card.featured .role {
  color: var(--paper);
}

.role {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
}

.services-grid {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.services-grid li {
  position: relative;
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 18px 48px 18px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: 6px;
  background: rgba(253, 252, 249, 0.9);
  color: var(--ink-strong);
  font-weight: 740;
  box-shadow: 0 8px 20px rgba(35, 79, 80, 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.services-grid li::after {
  content: "→";
  position: absolute;
  right: 18px;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.services-grid li:hover {
  transform: translateY(-5px);
  border-color: rgba(162, 178, 150, 0.8);
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(35, 79, 80, 0.1);
}

.services-grid li:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.final-cta-section {
  padding-top: 56px;
  padding-bottom: 34px;
}

.final-cta {
  display: grid;
  gap: 28px;
  padding: 30px;
  border-radius: 10px;
  background:
    linear-gradient(rgba(20, 62, 64, 0.94), rgba(20, 62, 64, 0.94)),
    url("assets/trama-definitiva-vettoriale.svg") center / 1400px auto no-repeat;
  color: var(--paper);
  box-shadow: var(--shadow-soft);
}

.final-cta h2,
.final-cta .eyebrow {
  color: var(--paper);
}

.final-cta p {
  max-width: 720px;
  margin-bottom: 0;
}

.final-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-section {
  padding-top: 30px;
  padding-bottom: 64px;
}

.contact-panel {
  display: grid;
  gap: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(rgba(20, 62, 64, 0.94), rgba(20, 62, 64, 0.94)),
    url("assets/trama-definitiva-vettoriale.svg") center / 1200px auto no-repeat;
  color: var(--paper);
  box-shadow: var(--shadow-soft);
}

.contact-panel h2,
.contact-panel .eyebrow {
  color: var(--paper);
}

.contact-panel address {
  font-style: normal;
  font-size: 1.08rem;
}

.contact-details {
  display: grid;
  gap: 18px;
}

.contact-details p {
  margin-bottom: 0;
}

.opening-hours {
  display: grid;
  gap: 3px;
}

.opening-hours strong {
  margin-bottom: 3px;
}

.contact-details a {
  color: var(--paper);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.contact-details a:hover {
  color: var(--sage-soft);
}

.site-footer {
  padding: 24px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  max-width: var(--max);
  margin: 0 auto;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 62, 64, 0.58);
  backdrop-filter: blur(8px);
}

.contact-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(253, 252, 249, 0.96), rgba(253, 252, 249, 0.98)),
    url("assets/trama-definitiva-vettoriale.svg") center / 1100px auto no-repeat;
  box-shadow: 0 30px 90px rgba(20, 62, 64, 0.28);
}

.contact-modal__dialog h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.contact-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.modal-intro {
  max-width: 560px;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label,
.privacy-field label {
  color: var(--ink-strong);
  font-weight: 760;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--text);
  padding: 12px 13px;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(108, 127, 174, 0.2);
}

.privacy-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: var(--text);
}

.privacy-field input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--ink);
}

.privacy-field a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--ink);
  font-weight: 740;
}

.form-status.is-error {
  color: #8A2F25;
}

.form-status.is-success {
  color: var(--ink-strong);
}

.privacy-content h1 {
  color: var(--ink-strong);
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  line-height: 1.02;
}

.privacy-text {
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.privacy-text h2 {
  margin-top: 30px;
  margin-bottom: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
}

.privacy-text h2:first-of-type {
  margin-top: 0;
}

.privacy-text p:last-child {
  margin-bottom: 0;
}

[data-reveal],
.person-card,
.services-grid li {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 540ms ease var(--reveal-delay, 0ms), transform 540ms ease var(--reveal-delay, 0ms);
}

.is-visible,
.person-card.is-visible,
.services-grid li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideRight {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes symbolIntro {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(calc(var(--hero-shift, 0px) * -0.3)); }
}

@keyframes patternBreath {
  from { background-position: center top; }
  to { background-position: center 26px; }
}

@keyframes heroPatternDrift {
  from { background-position: center; }
  to { background-position: calc(50% + 32px) center; }
}

@media (min-width: 700px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding-inline: clamp(28px, 5vw, 72px);
  }

  .hero-actions,
  .final-cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-field--full,
  .form-status,
  .form-actions {
    grid-column: 1 / -1;
  }

  .text-columns,
  .numbers-grid,
  .contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .numbers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .section {
    padding: 104px clamp(36px, 6vw, 86px);
  }

  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.54fr) minmax(340px, 430px);
    gap: clamp(26px, 3.7vw, 64px);
    min-height: calc(100vh - 78px);
  }

  .hero::before {
    inset: 4% -10vw auto -8vw;
    height: 64%;
    background-size: 1800px auto;
    opacity: 0.075;
  }

  .hero-symbol {
    width: clamp(340px, 27vw, 460px);
    opacity: 0.78;
  }

  .hero-symbol-wrap {
    top: clamp(-92px, -6vw, -58px);
    left: clamp(-162px, -8.2vw, -92px);
    justify-self: start;
  }

  .hero-media {
    justify-self: end;
  }

  .people-grid {
    grid-template-columns: 1.08fr 0.96fr 0.96fr;
  }

  .services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .services-grid li {
    min-height: 118px;
  }

  .final-cta,
  .contact-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 42px;
  }

  .contact-section {
    padding-top: 24px;
    padding-bottom: 54px;
  }

  .contact-panel {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal],
  .person-card,
  .services-grid li {
    opacity: 1;
    transform: none;
  }
}
