/* =========================================================
   Studio Tecnico Alfa — Sito vetrina (restyle moderno · caldo)
   Palette: crema + terracotta + espresso (toni terrosi)
   Type: Space Grotesk (titoli) + Inter (testo)
   ========================================================= */

:root {
  --blue:        #c2663f;   /* accento terracotta (brand) */
  --blue-strong: #a8502e;
  --navy:        #3c332a;   /* sezioni scure (espresso chiaro) */
  --navy-2:      #2f2820;
  --blue-soft:   #f3e3d6;   /* chip icone (terra) */
  --warm:        #c2663f;   /* accento caldo (terracotta) */
  --warm-soft:   #f4e4d7;
  --ink:         #2a241d;   /* testo: carboncino caldo */
  --muted:       #6f6555;   /* taupe caldo */
  --line:        #e7ddca;   /* bordi caldi */
  --line-strong: #d8ccb2;
  --bg:          #f6f1e8;   /* crema */
  --surface:     #fffdf8;   /* bianco caldo */
  --bg-alt:      #efe8da;   /* sabbia */
  --radius:      16px;
  --radius-lg:   26px;
  --shadow:      0 1px 2px rgba(60,45,25,.05), 0 8px 24px rgba(60,45,25,.07);
  --shadow-lg:   0 30px 70px rgba(60,45,25,.16);
  --maxw:        1140px;
  --font:    "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --serif:   "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--font);
  color: var(--ink); background: var(--bg);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}

/* ---------- Sfondo globale: sfumature calde + griglia tenue ---------- */
/* pozze di luce/ombra calde (profondità), fisse mentre si scorre */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(75% 60% at 38% 4%,  rgba(255,251,245,.90), transparent 72%),
    radial-gradient(58% 62% at 92% 60%, rgba(236,226,208,.55), transparent 70%),
    radial-gradient(72% 62% at 2% 104%, rgba(234,223,204,.60), transparent 70%);
}
/* griglia di quadrati a trasparenza variabile: visibile in due "zone"
   (alto-sinistra e basso-destra), quasi assente nel resto della pagina */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(110,85,55,.145) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,85,55,.145) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image:
    radial-gradient(56% 56% at 22% 20%, #000 0%, transparent 72%),
    radial-gradient(60% 62% at 82% 82%, #000 0%, transparent 72%);
  mask-image:
    radial-gradient(56% 56% at 22% 20%, #000 0%, transparent 72%),
    radial-gradient(60% 62% at 82% 82%, #000 0%, transparent 72%);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); letter-spacing: -1px; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -.5px; }
h3 { font-size: 1.18rem; letter-spacing: -.2px; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Brand mark (alpha) ---------- */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: var(--surface); background: var(--blue);
}
.brand-mark.small { width: 40px; height: 40px; border-radius: 11px; }
.brand-mark .alpha { width: 66%; height: 66%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,232,.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-size: 1.02rem; letter-spacing: -.2px; }
.brand-text small { color: var(--muted); font-size: .74rem; letter-spacing: .5px; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--ink); padding: 9px 14px; border-radius: 10px;
  font-size: .94rem; font-weight: 500; transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--blue); }
.main-nav .nav-cta { background: var(--navy); color: var(--surface); margin-left: 6px; }
.main-nav .nav-cta:hover { background: var(--blue); color: var(--surface); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: .98rem;
  font-family: var(--font); cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--surface); }
.btn-primary:hover { background: var(--blue); color: var(--surface); box-shadow: 0 10px 24px rgba(194,102,63,.3); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: var(--surface); color: var(--navy); }
.btn-light:hover { background: #fff; }
.btn-ghost-light { background: transparent; color: var(--surface); border-color: rgba(255,255,255,.45); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center; padding: 92px 24px 100px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .8rem; font-weight: 600; color: var(--blue-strong);
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 15px; border-radius: 999px; margin: 0 0 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--blue); }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 30em; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 34px 0 0; }
.hero-tags li {
  font-size: .84rem; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); padding: 6px 13px; border-radius: 8px;
}

.hero-figure { position: relative; justify-self: center; width: 100%; max-width: 480px; }
.plan { width: 100%; height: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* --- parti del disegno di progettazione (SVG) --- */
.plan-grid line { stroke: var(--line); stroke-width: 1; }
.plan-fill { fill: rgba(194,102,63,.06); }
.plan-wall { stroke: var(--ink); stroke-width: 6; stroke-linejoin: miter; }
.plan-partition { stroke: var(--ink); stroke-width: 4; stroke-linecap: butt; }
.plan-erase rect { fill: var(--surface); }
.plan-erase { fill: var(--surface); }
.plan-window line { stroke: var(--blue); stroke-width: 1.6; }
.plan-door { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; }
.plan-furn { fill: rgba(194,102,63,.06); stroke: var(--blue); stroke-width: 1.5; stroke-linejoin: round; }
.plan-furn line { stroke: var(--blue); stroke-width: 1.3; }
.plan-stair { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-linecap: round; }
.plan-dim line { stroke: var(--muted); stroke-width: 1; }
.plan-dim .plan-ext { stroke: var(--line-strong); }
.plan-dim .plan-tick { stroke: var(--muted); stroke-width: 1.3; }
.plan-dim text { font-family: var(--font); font-size: 11px; font-weight: 600; fill: var(--muted); }
.plan-title-block rect, .plan-title-block line { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.plan-title-block .tb-name { font-family: var(--display); font-size: 11px; font-weight: 700; fill: var(--ink); letter-spacing: .5px; }
.plan-title-block .tb-sub  { font-family: var(--font); font-size: 9.5px; fill: var(--muted); letter-spacing: .5px; }
.plan-frame { fill: none; stroke: var(--line); stroke-width: 1.5; }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: rgba(239,232,218,.6); }
.section-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.kicker {
  display: inline-block; font-family: var(--font);
  text-transform: uppercase; letter-spacing: 2px; font-size: .76rem;
  font-weight: 600; color: var(--blue); margin: 0 0 12px;
}
.kicker::before { content: "— "; color: var(--warm); }
.section-sub { color: var(--muted); }

/* ---------- Studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.studio-text p { color: var(--muted); font-size: 1.06rem; }
.studio-text strong { color: var(--ink); }
.people { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.person {
  flex: 1 1 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.person-role { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--warm); margin-bottom: 5px; }
.person strong { font-family: var(--display); font-size: 1.06rem; }

.studio-stats {
  background: var(--navy); color: var(--surface);
  border-radius: var(--radius-lg); padding: 32px 34px;
  display: flex; flex-direction: column;
}
.stats-title { font-family: var(--display); font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.6); margin: 0 0 8px; }
.stat { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.stat:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-num { display: block; font-family: var(--display); font-size: 2.4rem; font-weight: 700; color: #fff; line-height: 1; }
.stat-label { display: block; font-size: .85rem; opacity: .78; margin-top: 7px; }

/* ---------- Servizi cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d2f2; }
.card-icon {
  width: 50px; height: 50px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue); background: var(--blue-soft); margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Referenze ---------- */
.ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ref-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; }
.ref-block h3 { color: var(--ink); padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ref-block ul { margin: 0; padding-left: 0; list-style: none; }
.ref-block li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--muted); }
.ref-block li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 9px; height: 9px; border: 2px solid var(--blue); border-radius: 3px;
}

/* ---------- Dove siamo ---------- */
.dove-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: stretch; }
.dove-text p { color: var(--muted); font-size: 1.06rem; }
.dove-text strong { color: var(--ink); }
.contact-list { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list .ci {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue);
}
.contact-list .ci svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a, .contact-list span span { font-weight: 500; color: var(--ink); }
.contact-list a:hover { color: var(--blue); }
.dove-map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); min-height: 350px; display: flex; }
.dove-map iframe { width: 100%; height: 100%; min-height: 350px; border: 0; display: block; }
.map-placeholder {
  flex: 1; min-height: 350px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px; background: var(--bg-alt);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
}
.map-ph-inner { max-width: 320px; }
.map-ph-icon { display: inline-flex; width: 54px; height: 54px; border-radius: 14px; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 14px; }
.map-ph-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-ph-inner p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }

#dove { position: relative; }
#dove .container { position: relative; z-index: 1; }

/* ---------- CTA ---------- */
.cta { background: var(--navy); color: var(--surface); position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; opacity: .6;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
          mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
}
.cta-inner { position: relative; text-align: center; padding: 84px 24px; }
.cta h2 { color: var(--surface); }
.cta p { color: rgba(255,255,255,.78); font-size: 1.12rem; margin-bottom: 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-2); color: rgba(255,255,255,.78); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 48px 24px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand .brand-mark { background: var(--blue); }
.footer-brand strong { font-family: var(--display); color: var(--surface); }
.footer-brand small { color: rgba(255,255,255,.55); }
.footer-meta { text-align: right; }
.footer-meta p { margin: 0 0 4px; font-size: .92rem; }
.footer-meta a { color: #e6a883; }
.footer-piva { color: rgba(255,255,255,.45); font-size: .82rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { padding: 16px 24px; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom span { font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom a { font-size: .82rem; color: rgba(255,255,255,.7); }
.footer-bottom a:hover { color: #e6a883; }

/* ---------- Pagina legale (privacy) ---------- */
.legal { padding: 64px 0 88px; }
.legal .prose { max-width: 760px; margin: 0 auto; }
.legal .prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal .prose .updated { color: var(--muted); font-size: .9rem; margin-bottom: 36px; }
.legal .prose h2 { font-size: 1.3rem; margin: 36px 0 10px; }
.legal .prose p, .legal .prose li { color: var(--muted); }
.legal .prose ul { padding-left: 20px; }
.legal .prose li { margin-bottom: 8px; }
.legal .prose strong { color: var(--ink); }
.legal .back-home { display: inline-block; margin-top: 40px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--navy); color: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s, transform .25s, background .2s;
}
.to-top:hover { background: var(--blue); }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding: 64px 24px 80px; }
  .hero-figure { order: -1; max-width: 420px; }
  .studio-grid, .dove-grid { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 24px 20px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav .nav-cta { margin-left: 0; text-align: center; }
  .section { padding: 66px 0; }
  /* su telefono la planimetria non serve: nascosta */
  .hero-figure { display: none; }
  .hero-inner { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
