/* ==========================================================================
   Mistura — foglio di stile condiviso
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&display=swap');

:root{
  --paper: #EFE3CE;
  --paper-deep: #E6D7BB;
  --ink: #2B211A;
  --ink-soft: #5A4C3E;
  --cognac: #7A2A22;
  --cognac-deep: #5C1F19;
  --moss: #4B5842;
  --brass: #B08D3E;
  --line: rgba(43,33,26,0.16);
  --cream: #FBF7EE;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1100px;
}

*{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a{ color: inherit; }

img, svg{ display:block; max-width: 100%; }

h1, h2, h3{
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em 0;
  color: var(--ink);
}

h1{ font-size: clamp(2.6rem, 5.5vw, 4.8rem); font-weight: 500; letter-spacing: -0.01em; }
h2{ font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3{ font-size: 1.3rem; }

p{ margin: 0 0 1em 0; max-width: 62ch; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header / Nav ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(239,227,206,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav{
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark{
  font-family: var(--serif);
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordmark img{
  height: 20px;
  width: auto;
  display: block;
}

.wordmark .nav-emblem{
  height: 26px;
  width: auto;
  display: block;
}

.wordmark small{
  font-family: var(--sans);
  font-size: 0.6rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.footer-grid .wordmark img{ height: 26px; }

.nav-links{
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a{
  text-decoration: none;
  font-size: 0.98rem;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"]{
  color: var(--cognac-deep);
}

.nav-links a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-2px;
  height: 2px;
  background: var(--cognac);
}

.nav-toggle{
  display:none;
  background:none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 42px; height: 38px;
  cursor:pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:"";
  position:absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink);
}
.nav-toggle span{ top: 18px; }
.nav-toggle span::before{ top: -6px; }
.nav-toggle span::after{ top: 6px; }

/* ---------- Buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary{
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover{ background: var(--cognac-deep); }

.btn-ghost{
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover{ background: var(--ink); color: var(--cream); }

/* ---------- Hero ---------- */

.hero-wrap{
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 28px;
}

.hero{
  padding: 56px 0 70px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 56px;
  align-items: start;
}

.hero .eyebrow{
  color: var(--moss);
  font-size: 0.95rem;
  margin: 0 0 18px 0;
}

.hero h1{
  max-width: 14ch;
}

.hero p.lede{
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42ch;
}

.tagline{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--cognac-deep);
  margin: 4px 0 22px 0;
}

.footer-tagline{
  font-family: var(--serif);
  font-style: italic;
  color: var(--cognac-deep);
  font-size: 1rem;
  margin: 6px 0 0 0;
}

.hero-actions{
  display:flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Mosaico fotografico — masonry a colonne: ogni foto mantiene le sue proporzioni,
   nessun ritaglio forzato e nessun "buco" (le colonne si chiudono naturalmente) */

.hero-mosaic{
  position: relative;
  column-count: 5;
  column-gap: 10px;
}

.mosaic-tile{
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--cream);
}

.mosaic-tile img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s cubic-bezier(.22,.61,.36,1);
}

@media (hover: hover){
  .mosaic-tile:hover img{
    transform: scale(1.08);
  }
}

.hero-mosaic .emblem-badge{
  position: absolute;
  left: 40%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: 86px;
  height: 86px;
  padding: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(43,33,26,0.2);
}

@media (max-width: 1180px){
  .hero-wrap{ max-width: 1200px; }
  .hero-mosaic{ column-count: 4; }
}

@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; gap: 40px; }
  .hero h1{ max-width: none; }
  .hero-mosaic{ column-count: 4; }
}

@media (max-width: 640px){
  .hero-mosaic{ column-count: 2; }
  .mosaic-tile:nth-child(n+9){ display: none; }
  .hero-mosaic .emblem-badge{ width: 60px; height: 60px; left: 50%; }
}

section{
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

section.tight{ padding: 56px 0; }

.section-head{
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head .kicker{
  color: var(--cognac-deep);
  font-size: 0.95rem;
  margin: 0 0 10px 0;
}

/* ---------- Cards / grid ---------- */

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card{
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px;
}

.card h3{ margin-bottom: 10px; }
.card p{ color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Values row ---------- */

.values-row{
  display:grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.value-box{
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.value-box h3{ font-size: 1.1rem; margin-bottom: 8px; }
.value-box p{ color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Timeline (Chi siamo) ---------- */

.timeline{
  position: relative;
  margin-left: 8px;
  padding-left: 34px;
  border-left: 2px solid var(--paper-deep);
}

.timeline-item{
  position: relative;
  padding-bottom: 46px;
}
.timeline-item:last-child{ padding-bottom: 0; }

.timeline-item::before{
  content:"";
  position:absolute;
  left: -41px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cognac);
  border: 3px solid var(--paper);
  outline: 2px solid var(--cognac);
}

.timeline-year{
  font-family: var(--serif);
  color: var(--cognac-deep);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.timeline-item p{ color: var(--ink-soft); }

/* ---------- Services detail ---------- */

.service-block{
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: 40px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
}
.service-block:first-of-type{ border-top: none; }

.service-block h3{ font-size: 1.6rem; }
.service-block .tag{
  color: var(--moss);
  font-size: 0.9rem;
  margin-bottom: 8px;
  display:block;
}

.substeps{
  list-style: none;
  margin: 18px 0 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.substeps li{
  padding-left: 20px;
  border-left: 2px solid var(--brass);
}
.substeps li strong{ display:block; font-family: var(--serif); font-weight:500; font-size: 1.02rem; }
.substeps li span{ color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- CTA band ---------- */

.cta-band{
  background: var(--ink);
  color: var(--cream);
}
.cta-band h2{ color: var(--cream); }
.cta-band p{ color: rgba(251,247,238,0.75); }
.cta-band .btn-ghost{ border-color: var(--cream); color: var(--cream); }
.cta-band .btn-ghost:hover{ background: var(--cream); color: var(--ink); }

/* ---------- Contact page ---------- */

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.info-row{
  display:flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.info-row .label{
  width: 110px;
  flex-shrink:0;
  color: var(--moss);
  font-size: 0.9rem;
}
.info-row .value{ color: var(--ink); }

form.contact-form{
  display: grid;
  gap: 16px;
}
form.contact-form label{
  display:block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
form.contact-form input,
form.contact-form textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
}
form.contact-form textarea{ min-height: 130px; resize: vertical; }

/* ---------- Footer ---------- */

footer.site-footer{
  border-top: 1px solid var(--line);
  padding: 50px 0 40px;
}
.footer-grid{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-grid .wordmark{ margin-bottom: 8px; }
.footer-meta{ color: var(--ink-soft); font-size: 0.92rem; }
.footer-meta a{ text-decoration: underline; text-decoration-color: var(--line); }

/* ---------- Product gallery (Prodotti) ---------- */

.gallery-intro{
  max-width: 640px;
  margin-bottom: 38px;
}
.gallery-intro .kicker{
  color: var(--cognac-deep);
  font-size: 0.95rem;
  margin: 0 0 8px 0;
}
.gallery-intro p{ color: var(--ink-soft); }

.photo-grid{
  column-count: 4;
  column-gap: 22px;
}
.photo-grid.cols-3{ column-count: 3; }
.photo-grid.cols-2{ column-count: 2; }

.photo-card{
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  break-inside: avoid;
}
.photo-card .frame{
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--line);
  line-height: 0;
}
.photo-card img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s cubic-bezier(.22,.61,.36,1);
}
@media (hover: hover){
  .photo-card:hover img{ transform: scale(1.06); }
}
.photo-card figcaption{
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.gallery-section{
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.gallery-section:first-of-type{ border-top: none; }
.gallery-section h2{ margin-bottom: 6px; }
.gallery-section .section-note{
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 30px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; padding-top: 50px; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .values-row{ grid-template-columns: 1fr 1fr; }
  .service-block{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .photo-grid{ column-count: 2 !important; }

  .nav-links{
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px 28px 26px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 18px;
  }
  .nav-links.open{ display:flex; }
  .nav-toggle{ display:block; }
}

@media (max-width: 520px){
  .values-row{ grid-template-columns: 1fr; }
  .photo-grid{ column-count: 1 !important; }
}
