/* =========================================================
   PGC Lattoneria — sistema visivo "industriale premium"
   Signature: aggraffatura (standing seam) come motivo ricorrente
   Type: Archivo (display) · Space Mono (dati) · Inter (corpo)
   ========================================================= */

:root {
  --ink:        #14171a;   /* antracite base */
  --ink-2:      #1a1e23;   /* superficie */
  --ink-3:      #21262d;   /* elevata */
  --line:       rgba(245, 243, 239, 0.10);
  --line-soft:  rgba(245, 243, 239, 0.06);

  --copper:        #c17d3f;
  --copper-bright: #e2a368;
  --copper-deep:   #9a5f2a;

  --zinc:  #9aa3ad;        /* testo secondario */
  --fog:   #c9cdd3;        /* testo corrente */
  --paper: #f5f3ef;        /* titoli / on-dark */

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-mono: "Space Mono", ui-monospace, monospace;
  --ff-body: "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------- reset ------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--fog);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--copper-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* shared bits ------------------------------------------------ */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--copper);
  opacity: 0.7;
}

.section-title {
  font-family: var(--ff-display);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--paper);
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.section-lede {
  color: var(--zinc);
  font-size: 1.06rem;
  max-width: 54ch;
}

/* buttons ---------------------------------------------------- */
.btn {
  --bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: var(--bg);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-copper { --bg: var(--copper); color: #1c1206; }
.btn-copper:hover { --bg: var(--copper-bright); }

.btn-ghost {
  color: var(--paper);
  border-color: var(--line);
  background: rgba(245, 243, 239, 0.02);
}
.btn-ghost:hover { border-color: var(--copper); color: var(--copper-bright); }

.btn-lg { padding: 1.05em 1.9em; font-size: 0.86rem; }
.btn-block { width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(18, 21, 24, 0.85);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
  transition: height 0.3s var(--ease);
}
.site-header.scrolled .header-inner { height: 66px; }

.brand { display: flex; align-items: baseline; gap: 0.5ch; line-height: 1; }
.brand-mark {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--paper);
}
.brand-sub {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper);
}

.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fog);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--copper);
  transition: width 0.28s var(--ease);
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 22px; }
.phone { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.phone-label {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zinc);
}
.phone-num { font-weight: 600; color: var(--paper); font-size: 0.98rem; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
}
.burger span {
  width: 26px; height: 2px;
  background: var(--paper);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 84px 0 auto 0;
  z-index: 55;
  background: rgba(16, 19, 22, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px var(--gutter) 28px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.drawer.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.drawer a {
  padding: 14px 0;
  font-size: 1.05rem;
  color: var(--fog);
  border-bottom: 1px solid var(--line-soft);
}
.drawer .drawer-cta { margin-top: 16px; border-bottom: 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 84px;
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(193, 125, 63, 0.16), transparent 55%),
    radial-gradient(80% 70% at 0% 100%, rgba(193, 125, 63, 0.07), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #101316 100%);
  overflow: hidden;
}

/* aggraffatura — nervature verticali (signature) */
.seams {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding-inline: clamp(10px, 6vw, 90px);
  pointer-events: none;
  z-index: 0;
}
.seams span {
  display: block;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 14%, var(--line) 86%, transparent);
  transform: scaleY(0);
  transform-origin: top;
  animation: seam-draw 1.1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms);
}
/* due nervature ramate per accento */
.seams span:nth-child(4),
.seams span:nth-child(9) {
  background: linear-gradient(180deg, transparent, rgba(193,125,63,0.55) 18%, rgba(193,125,63,0.25) 82%, transparent);
  width: 2px;
}
@keyframes seam-draw { to { transform: scaleY(1); } }

.hero-inner { position: relative; z-index: 1; padding-block: 6vh; }

.hero-title {
  font-family: var(--ff-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.92;
  color: var(--paper);
  font-size: clamp(2.7rem, 8.2vw, 6.2rem);
  margin-top: 22px;
}
.hero-title em {
  font-style: normal;
  color: var(--copper);
  position: relative;
}
.hero-lede {
  margin-top: 26px;
  max-width: 50ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--zinc);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-spec {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-spec div { display: flex; flex-direction: column; gap: 2px; }
.hero-spec dt {
  font-family: var(--ff-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.hero-spec dd {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--zinc);
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 1;
}
.scroll-cue span {
  width: 3px; height: 8px;
  border-radius: 2px;
  background: var(--copper);
  animation: cue 1.6s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* =========================================================
   STATS
   ========================================================= */
.stats {
  background: var(--ink-2);
  border-block: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-inline: 1px solid var(--line);
}
.stat {
  background: var(--ink-2);
  padding: clamp(32px, 5vw, 52px) clamp(16px, 3vw, 34px);
  text-align: left;
}
.stat-num {
  display: block;
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}

/* =========================================================
   SECTION base
   ========================================================= */
.section { padding-block: clamp(72px, 11vw, 140px); }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 68px); }
.section-head .section-title { margin-top: 18px; }
.section-head .section-lede { margin-top: 20px; }
.section-lede .note {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--copper-deep);
  display: inline-block;
  margin-top: 6px;
}

/* =========================================================
   SERVIZI
   ========================================================= */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.svc {
  background: var(--ink);
  padding: clamp(26px, 3vw, 38px) clamp(22px, 2.4vw, 32px) clamp(34px, 4vw, 46px);
  position: relative;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  isolation: isolate;
}
.svc::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.svc:hover { background: var(--ink-3); }
.svc:hover::before { transform: scaleX(1); }
.svc-idx {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--copper);
}
.svc h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.15;
  color: var(--paper);
  margin-top: 22px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.svc p { margin-top: 12px; font-size: 0.95rem; color: var(--zinc); }

/* =========================================================
   PERCHÉ PGC
   ========================================================= */
.perche { background: var(--ink-2); border-block: 1px solid var(--line); }
.perche-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.perche-intro .section-title { margin-top: 18px; }
.perche-intro .section-lede { margin-top: 22px; margin-bottom: 30px; }

.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.reasons li {
  background: var(--ink-2);
  padding: clamp(26px, 3vw, 36px);
  transition: background 0.3s var(--ease);
}
.reasons li:hover { background: var(--ink-3); }
.reason-tag {
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--copper);
}
.reasons h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-top: 16px;
}
.reasons p { margin-top: 10px; font-size: 0.92rem; color: var(--zinc); }

/* =========================================================
   REALIZZAZIONI (gallery — campioni di finitura)
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.6s var(--ease);
}
.shot:hover img { transform: scale(1.06); }
/* cornice rame all'hover */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.shot:hover::after { border-color: var(--copper); }
.shot figcaption {
  width: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(180deg, transparent, rgba(10, 12, 14, 0.85));
}
.shot-cat {
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-bright);
}
.shot-name { font-weight: 600; color: var(--paper); font-size: 0.98rem; }

/* =========================================================
   METODO (steps)
   ========================================================= */
.metodo { background: var(--ink-2); border-block: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 36px);
  counter-reset: step;
}
.step { position: relative; padding-top: 30px; border-top: 2px solid var(--line); }
.step:hover { border-top-color: var(--copper); }
.step { transition: border-color 0.3s var(--ease); }
.step-num {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--copper);
  display: block;
}
.step h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.08rem;
  color: var(--paper);
  margin-top: 18px;
  letter-spacing: -0.01em;
}
.step p { margin-top: 12px; font-size: 0.92rem; color: var(--zinc); }

/* =========================================================
   CONTATTI
   ========================================================= */
.contatti {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(193, 125, 63, 0.12), transparent 55%),
    var(--ink);
}
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contatti-copy .section-title { margin-top: 18px; }
.contatti-copy .section-lede { margin-top: 20px; }

.contact-list { margin-top: 36px; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-list li {
  background: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.ci-label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--zinc);
}
.contact-list a, .contact-list li > span:last-child { color: var(--paper); font-weight: 500; }
.contact-list a:hover { color: var(--copper-bright); }

/* form */
.lead-form {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(26px, 3.5vw, 40px);
}
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zinc);
}
.field input, .field textarea {
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  padding: 13px 15px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #5e656d; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--copper);
  background: #101316;
}
.lead-form .btn-block { margin-top: 8px; }
.form-note {
  margin-top: 16px;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--zinc);
}
.form-feedback {
  margin-top: 14px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--copper-bright);
  min-height: 1.2em;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #0f1214; border-top: 1px solid var(--line); padding-top: clamp(54px, 7vw, 80px); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .brand-mark { font-size: 1.6rem; }
.footer-tag { margin-top: 14px; color: var(--zinc); font-size: 0.94rem; max-width: 28ch; }
.fn-title {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 16px;
}
.footer-nav, .footer-contacts { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-contacts a, .footer-contacts span {
  color: var(--zinc);
  font-size: 0.94rem;
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover, .footer-contacts a:hover { color: var(--paper); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--fog);
  border: 1px solid var(--line);
  padding: 6px 10px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 26px;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--zinc);
}
.demo-flag { color: var(--copper-deep); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .nav, .header-cta .phone { display: none; }
  .burger { display: flex; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .perche-grid, .contatti-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-cta .btn { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-spec { gap: 18px; }
}

/* =========================================================
   MOTION SAFETY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .seams span { transform: scaleY(1); }
}
