/* I Gentilin: posatori e marmisti a Vicenza dal 1960
   Colori presi dalle pietre: grigio chiaro del Bianco Lasa, nero del Sahara Noir,
   verde scuro del Rustic Green, travertino per i dettagli. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --stone: #e8e8e3;
  --paper: #f4f4f0;
  --ink: #1c1f1e;
  --ink-2: #4a4f4c;
  --verde: #33443a;
  --verde-hover: #263329;
  --nero: #151918;
  --nero-2: #232827;
  --travertino: #c7b495;
  --line: #cfcfc8;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 82rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }
main:focus { outline: none; }

/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.5rem;
  background: var(--verde); color: var(--paper);
  border: 1px solid var(--verde); border-radius: var(--radius);
  font-weight: 550; font-stretch: 110%; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 2.5rem; padding: 0 1rem; font-size: .95rem; }
.btn--line { background: transparent; color: var(--verde); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--verde-hover); }
  .btn--line:hover { background: var(--verde); color: var(--paper); }
}

/* Barra in alto */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--stone) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: .7rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem; min-height: 44px;
  text-decoration: none; font-weight: 650; font-stretch: 125%; font-size: 1.1rem; letter-spacing: .01em;
}
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a {
  text-decoration: none; font-size: .98rem; color: var(--ink-2); padding: .4rem 0;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 150ms ease, box-shadow 200ms ease;
}
.nav__links a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--verde); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); } }
.nav__toggle { display: none; }
.btn--small { min-height: 2.75rem; }

@media (max-width: 860px) {
  .nav__inner { gap: .75rem; }
  .nav__call { margin-left: auto; }
  .nav__toggle {
    display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .9rem;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--stone); border-bottom: 1px solid var(--line);
    padding: .25rem var(--gutter) 1rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .85rem 0; font-size: 1.1rem; color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: none; }
  .nav__links a[aria-current="true"] { color: var(--verde); box-shadow: none; }
  .nav__links a:last-child { border-bottom: 0; }
}

/* Apertura */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: end;
}
/* La riga più lunga ("Posiamo marmi") misura circa 9 volte il corpo:
   il corpo segue la larghezza della colonna, così nessuna riga va a capo. */
.hero__text { container-type: inline-size; }
.hero__title {
  font-size: min(6rem, 10.9cqi);
  font-stretch: 125%; font-weight: 640;
  line-height: .96; letter-spacing: -.02em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: block; }
.hero__lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 34rem; font-size: clamp(1.08rem, 1.4vw, 1.2rem); color: var(--ink-2);
}
.hero__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.link-phone {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; font-stretch: 115%; font-size: 1.15rem;
  text-decoration: underline 1px var(--travertino); text-underline-offset: .35em;
  font-variant-numeric: tabular-nums;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .link-phone:hover { color: var(--verde); text-decoration-color: var(--verde); } }
.hero__photo { margin: 0; }
.hero__photo img { width: 100%; aspect-ratio: 582 / 640; object-fit: cover; border-radius: var(--radius); }
.hero__photo figcaption { margin-top: .7rem; font-size: .88rem; color: var(--ink-2); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__photo img { aspect-ratio: 4 / 3; }
}

/* Entrata della pagina: un solo momento, poi tutto fermo */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line > span { transform: translateY(105%); }
  .js .hero__lead, .js .hero__actions { opacity: 0; transform: translateY(10px); }
  .js .hero__photo img { clip-path: inset(100% 0 0 0); }
  .js .hero__photo figcaption { opacity: 0; }

  .is-ready .hero__title .line > span { transform: none; transition: transform 900ms var(--ease-out); }
  .is-ready .hero__title .line:nth-child(2) > span { transition-delay: 70ms; }
  .is-ready .hero__title .line:nth-child(3) > span { transition-delay: 140ms; }
  .is-ready .hero__title .line:nth-child(4) > span { transition-delay: 210ms; }
  .is-ready .hero__lead, .is-ready .hero__actions { opacity: 1; transform: none; transition: opacity 600ms ease 420ms, transform 600ms var(--ease-out) 420ms; }
  .is-ready .hero__photo img { clip-path: inset(0 0 0 0); transition: clip-path 1100ms cubic-bezier(0.77, 0, 0.175, 1) 150ms; }
  .is-ready .hero__photo figcaption { opacity: 1; transition: opacity 500ms ease 1000ms; }
}

/* Intestazioni di sezione */
.section-head, .stones__head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); font-stretch: 118%; line-height: 1.02; letter-spacing: -.015em; }
.section-head p, .stones__head p { margin-top: 1rem; color: var(--ink-2); max-width: 34rem; }

/* Pietre (sezione scura) */
.stones {
  background: var(--nero); color: #ecebe6;
  padding: clamp(4rem, 9vw, 7.5rem) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.stones :focus-visible { outline-color: var(--travertino); }
.stones__head p { color: #a9aca7; }
.stones__list { list-style: none; margin: 0; padding: 0; position: relative; }
.stone { border-top: 1px solid #343a38; }
.stone:last-child { border-bottom: 1px solid #343a38; }
.stone__name {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  padding: clamp(.9rem, 1.8vw, 1.35rem) 0;
  font-size: clamp(1.75rem, 4.2vw, 3.4rem); font-stretch: 125%; font-weight: 500;
  line-height: 1.05; letter-spacing: -.01em;
  color: #6d7370;
  transition: color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
.stone.is-active .stone__name { color: #f1f0eb; }
@media (hover: hover) and (pointer: fine) { .stone__name:hover { color: #c9cbc6; } }
.stone__photo__in { margin: 0; }
.stone__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.stone__photo figcaption { font-size: .92rem; color: #a9aca7; }

/* Telefono: la foto si apre sotto il nome */
@media (max-width: 899px) {
  .stone__photo {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows 380ms var(--ease-out);
  }
  .stone__photo__in { min-height: 0; overflow: hidden; }
  .stone__photo img { height: auto; aspect-ratio: 4 / 3; }
  .stone__photo figcaption { padding: .6rem 0 1.4rem; }
  .stone.is-active .stone__photo { grid-template-rows: 1fr; }
}

/* Computer: elenco a sinistra, foto fissa a destra */
@media (min-width: 900px) {
  .stones__list { padding-right: 52%; min-height: 36rem; }
  .stone__photo__in { margin: 0; height: 100%; display: flex; flex-direction: column; gap: .75rem; }
  .stone__photo {
    position: absolute; top: 0; right: 0; bottom: 0; width: 46%;
    opacity: 0; visibility: hidden;
    transition: opacity 320ms ease, visibility 0s linear 320ms;
  }
  .stone__photo img { flex: 1; min-height: 0; transform: scale(1.02); transition: transform 700ms var(--ease-out); }
  .stone.is-active .stone__photo { opacity: 1; visibility: visible; transition: opacity 320ms ease; }
  .stone.is-active .stone__photo img { transform: none; }
  .stone.is-active .stone__name { padding-left: .5rem; }
  .stone__name { transition: color 220ms ease, padding-left 300ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  .stone__photo, .stone__photo img, .stone__name { transition: none !important; }
}

/* Altri lavori */
.works, .services, .family, .contact {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) 0;
}
.works__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2rem) clamp(.75rem, 1.6vw, 1.25rem);
}
@media (max-width: 860px) { .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work {
  display: block; width: 100%; margin: 0;
  padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.work img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); transition: filter 200ms ease;
}
.work__caption { display: block; padding-top: .55rem; font-size: .95rem; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 560px) { .work__caption { font-size: .88rem; } }
@media (hover: hover) and (pointer: fine) { .work:hover img { filter: brightness(1.06); } }
.works__more { margin-top: 1.5rem; color: var(--ink-2); }
.works__more a { color: var(--verde); font-weight: 550; text-underline-offset: .2em; display: inline-block; padding: .7rem 0; margin: -.7rem 0; }

/* Servizi */
.services__list {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 5rem);
}
.services__list > div {
  display: grid; grid-template-columns: minmax(9rem, 2fr) 3fr; gap: 1rem;
  padding: 1.15rem 0; border-top: 1px solid var(--line);
}
.services__list dt { font-weight: 600; font-stretch: 112%; }
.services__list dd { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) {
  .services__list { grid-template-columns: 1fr; }
  .services__list > div { grid-template-columns: 1fr; gap: .2rem; }
}

/* Famiglia e metodo */
.family {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.family__year {
  font-size: clamp(5rem, 15vw, 13rem); font-stretch: 125%; font-weight: 200;
  line-height: .85; letter-spacing: -.04em; color: var(--travertino);
  font-variant-numeric: lining-nums;
}
.family__text p { margin-top: 1.1rem; max-width: 36rem; color: var(--ink-2); }
.family__text h2 { max-width: 16ch; }
.steps {
  grid-column: 1 / -1; list-style: none; padding: 0; margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem;
  counter-reset: passo;
}
.steps li { counter-increment: passo; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(passo); display: block; margin-bottom: .6rem;
  font-stretch: 125%; font-weight: 600; color: var(--verde);
}
.steps h3 { font-size: 1.15rem; font-stretch: 112%; }
.steps p { margin-top: .35rem; color: var(--ink-2); font-size: .98rem; }
@media (max-width: 860px) {
  .family { grid-template-columns: 1fr; }
  .family__year { margin-bottom: 1rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Recensioni */
.reviews { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) 0; }
.reviews__ask {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem clamp(2rem, 5vw, 5rem);
  align-items: end; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.reviews__ask h2 { grid-row: span 2; }
.reviews__ask p { color: var(--ink-2); max-width: 34rem; }
.reviews__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
@media (max-width: 860px) {
  .reviews__ask { grid-template-columns: 1fr; }
  .reviews__ask h2 { grid-row: auto; }
}

/* Contatti */
.contact {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem); padding-bottom: clamp(4rem, 9vw, 7rem);
}
.contact__intro p { margin-top: 1rem; color: var(--ink-2); max-width: 30rem; }
.contact__phones { margin: 2rem 0 1.5rem; display: grid; gap: .25rem; }
.contact__phones a {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-stretch: 120%; font-weight: 600;
  text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  width: fit-content;
}
@media (hover: hover) and (pointer: fine) { .contact__phones a:hover { color: var(--verde); } }
.contact__zone { font-size: .95rem; }

.form {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: grid; gap: 1.1rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 550; font-size: .95rem; }
.opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem .85rem;
  background: #fff; border: 1px solid #b9bab3; border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 22%, transparent);
}
.field input::placeholder, .field textarea::placeholder { color: #6e726d; }
.form__trap { position: absolute; left: -9999px; }
.form__error { color: #8a2a1c; font-size: .95rem; }
.form__error a { color: inherit; font-weight: 600; white-space: nowrap; }
.form__send .btn { width: 100%; }
.form__send .btn:disabled { opacity: .7; cursor: progress; transform: none; }
.form__note { font-size: .88rem; color: var(--ink-2); }
.form__note a { color: var(--verde); display: inline-block; padding: .7rem 0; margin: -.7rem 0; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

/* Piede */
.foot { background: var(--nero); color: #b5b8b3; font-size: .95rem; }
.foot__inner {
  max-width: var(--max); margin: 0 auto; padding: 3rem var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem;
}
.foot__name { color: #f1f0eb; font-weight: 650; font-stretch: 125%; font-size: 1.15rem; }
.foot a {
  color: #e7e6e1; text-underline-offset: .2em; text-decoration-color: #5d635f;
  display: inline-flex; align-items: center; min-height: 44px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: #fff; text-decoration-color: var(--travertino); } }
.foot__inner p { line-height: 1.4; }
.foot :focus-visible { outline-color: var(--travertino); }
.sep { color: #5d635f; margin: 0 .35rem; }
.foot__legal { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid #2c3230; font-size: .85rem; }
@media (max-width: 600px) { .foot__inner { grid-template-columns: 1fr; } }

/* Barra chiamata su telefono */
.callbar { display: none; }
@media (max-width: 860px) {
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--nero);
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%); transition: transform 300ms var(--ease-out);
  }
  .callbar.is-visible { transform: none; }
  .callbar a {
    display: flex; align-items: center; justify-content: center; min-height: 3.4rem;
    color: #f1f0eb; text-decoration: none; font-weight: 600; font-stretch: 115%;
    -webkit-tap-highlight-color: transparent;
  }
  .callbar a + a { border-left: 1px solid #343a38; }
  .callbar a:active { background: var(--nero-2); }
  .foot { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
}

/* Foto ingrandita */
.viewer {
  width: min(92vw, 60rem); max-height: 92vh; padding: 0; border: 0;
  background: transparent; color: #ecebe6; overflow: visible;
}
.viewer::backdrop { background: rgba(14, 16, 15, .95); backdrop-filter: blur(6px); }
.viewer[open] { animation: viewer-in 220ms var(--ease-out); }
@keyframes viewer-in { from { opacity: 0; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: none; } }
.viewer figure { margin: 0; display: grid; justify-items: center; gap: .75rem; }
.viewer img { max-height: 76vh; width: auto; border-radius: var(--radius); }
.viewer figcaption { text-align: center; font-size: .98rem; }
.viewer__bar { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.viewer__bar button {
  min-height: 2.75rem; padding: 0 1rem; cursor: pointer;
  background: transparent; border: 1px solid #4a514e; border-radius: var(--radius); color: #ecebe6;
}
.viewer__bar button:focus-visible { outline-color: var(--travertino); }
@media (hover: hover) and (pointer: fine) { .viewer__bar button:hover { border-color: #ecebe6; } }

/* Pagine secondarie */
.page { max-width: 44rem; margin: 0 auto; padding: 3rem var(--gutter) 5rem; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); font-stretch: 120%; margin: 1.5rem 0 1rem; }
.page h2 { font-size: 1.3rem; font-stretch: 112%; margin: 2.2rem 0 .6rem; }
.page p, .page li { color: var(--ink-2); }
.page p + p { margin-top: .8rem; }
.page ul { padding-left: 1.2rem; }
.page li + li { margin-top: .4rem; }
.page a:not(.btn) { color: var(--verde); }
.page > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
.page .btn { margin-top: 2.5rem; }
