:root {
  color-scheme: light;
  --ink: #1f2622;
  --muted: #66716a;
  --paper: #fffdf8;
  --soft: #f3f7f3;
  --line: #dfe5dd;
  --sage: #314d42;
  --sage-2: #4f7563;
  --clay: #ad644e;
  --water: #537887;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(31, 38, 34, 0.13);
  --radius: 8px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  transform: translateY(-140%);
  background: var(--sage);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 6px;
  transition: transform 180ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(255, 253, 248, 0.93);
  border-bottom: 1px solid rgba(223, 229, 221, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--sage);
  border-radius: 50%;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
  transition: background-color 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--soft);
  color: var(--sage);
  outline: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(660px, 72svh);
  padding: clamp(70px, 9vw, 112px) clamp(20px, 5vw, 72px) clamp(42px, 6vw, 64px);
  color: var(--white);
  background-color: var(--sage);
  background-image: url("../img/esterno.webp");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 24, 0.42);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #f9d9c7;
}

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

h1,
h2 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.7rem, 12vw, 7.3rem);
  font-weight: 700;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 700;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.93);
  font-size: clamp(1.08rem, 2.4vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: 0;
}

.button-primary {
  background: var(--clay);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #934f3d;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.68);
  color: var(--white);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--white);
  color: var(--sage);
}

.section {
  padding: clamp(58px, 9vw, 112px) clamp(20px, 5vw, 72px);
}

.section-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
}

.section-muted {
  background: var(--soft);
}

.intro-grid,
.area-layout,
.contact-layout,
.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: start;
}

.intro h2,
.section-heading h2,
.contact-copy h2 {
  max-width: 780px;
}

.intro-copy p,
.area-copy p,
.contact-copy p,
.section-heading p {
  font-size: 1.05rem;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-facts div {
  padding: 18px 16px;
  border-right: 1px solid var(--line);
}

.quick-facts div:last-child {
  border-right: 0;
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.space-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.space-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.space-card picture,
.space-card img {
  width: 100%;
}

.space-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.space-card div {
  padding: 22px;
}

.space-card p {
  margin-bottom: 0;
}

.sticky-heading {
  position: sticky;
  top: 104px;
  margin-bottom: 0;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-list article {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.service-list article:nth-child(2n) {
  border-color: rgba(83, 120, 135, 0.28);
}

.service-list h3 {
  color: var(--sage);
}

.service-list p {
  margin-bottom: 0;
}

.gallery-section {
  background: var(--paper);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery-item {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  overflow: hidden;
}

.gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-featured img {
  aspect-ratio: 4 / 3;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1.03);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 3px;
}

.area-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.area-list li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  position: relative;
}

.area-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--water);
}

.contact-section {
  background: var(--sage);
  color: var(--white);
}

.contact-section p,
.contact-section .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.contact-section .eyebrow {
  color: #f5cdb9;
}

.contact-copy address {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.82);
}

.contact-copy a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
  font-weight: 800;
}

.contact-form .honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  padding: 13px 12px;
  outline: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #f5cdb9;
  box-shadow: 0 0 0 3px rgba(245, 205, 185, 0.24);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.site-footer {
  padding: 30px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, var(--container));
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--sage);
  font-weight: 800;
}

.lightbox {
  width: min(980px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(20, 28, 24, 0.74);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #111814;
}

.lightbox p {
  margin: 0;
  padding: 14px 18px 18px;
  color: var(--ink);
  font-weight: 800;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(31, 38, 34, 0.68);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 18px 18px;
    background: rgba(255, 253, 248, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .intro-grid,
  .area-layout,
  .contact-layout,
  .services-layout {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }

  .space-grid {
    grid-template-columns: 1fr;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero {
    min-height: min(610px, 72svh);
    padding: 68px 18px 36px;
    background-image: url("../img/esterno-sm.webp");
    background-position: center;
  }

  h1 {
    font-size: clamp(3.45rem, 18vw, 5.4rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .button {
    width: 100%;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .quick-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-facts div:last-child {
    border-bottom: 0;
  }

  .gallery-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 15px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-featured {
    grid-column: span 1;
  }

  .section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@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;
  }
}
