/* =====================================================================
   COSTRUZIONI PRIMAVERA 23 — Industrial / Architectural
   Bespoke stylesheet. Zero-build. Mobile-first. Accessible.
   Palette: warm concrete + ink + safety orange
   Type: Anton (display) · Inter (body) · Space Mono (technical labels)
   ===================================================================== */

/* ----------------------------- Tokens ------------------------------ */
:root {
  /* Color */
  --ink:        #15130E;
  --ink-2:      #1D1B15;   /* dark section background */
  --ink-3:      #272420;
  --concrete-50:  #F5F3EE; /* page background */
  --concrete-100: #ECE9E1;
  --concrete-200: #DED9CD; /* hairlines on light */
  --concrete-300: #CDC6B6;
  --concrete-500: #8C867A;
  --muted:        #5E5A50; /* muted text on light (>= 4.5:1) */
  --muted-dark:   #ADA694; /* muted text on dark */
  --white:        #FBFAF7;
  --orange:       #E8551A; /* safety orange */
  --orange-600:   #C7470F;

  --grid-line:    rgba(21, 19, 14, 0.055);
  --grid-line-dk: rgba(251, 250, 247, 0.06);

  /* Type */
  --font-display: "Anton", "Arial Narrow", "Haettenschweiler", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(72px, 11vw, 168px);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-scale */
  --z-nav: 50;
  --z-menu: 60;
  --z-top: 70;
}

/* ----------------------------- Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--concrete-50);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Selection */
::selection { background: var(--orange); color: var(--white); }

/* ------------------------- Texture / noise ------------------------- */
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------- Typography ---------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--orange); }
.label--light { color: var(--muted-dark); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--orange);
}

/* ----------------------------- Layout ------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: clamp(56px, 7vw, 104px); }

/* Section header with index number */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .index {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.2em; color: var(--orange);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: 0.92; letter-spacing: -0.01em;
}
.section-head .lede {
  max-width: 46ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem);
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
    gap: 40px;
  }
  .section-head .lede { justify-self: end; }
}

/* Blueprint hairline rule with end-labels */
.rule {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 18px;
  border-top: 1px solid var(--concrete-200);
}
.rule span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }

/* Faint blueprint grid background helper */
.grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 96px);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 100% at 50% 0%, #000 55%, transparent 100%);
}
.section > .container { position: relative; z-index: 2; }

/* --------------------------- Buttons ------------------------------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 26px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg); border: 1px solid var(--bd);
  border-radius: var(--radius); overflow: hidden;
  transition: color .35s var(--ease);
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg);
  transition: transform .45s var(--ease); transform-origin: left;
}
.btn::after { /* fill that slides in on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover { color: var(--ink); }
.btn:hover::after { transform: scaleX(1); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--ghost:hover { color: var(--ink); }
.btn--light { --bg: transparent; --fg: var(--white); --bd: rgba(251,250,247,0.5); }
.btn--light:hover { color: var(--ink); }
.btn--block { width: 100%; justify-content: center; }

/* Text link with animated underline */
.tlink { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.tlink::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1.5px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.tlink:hover::after { transform: scaleX(1); }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 65;
  color: var(--white);
  transition: background .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease), color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--concrete-50) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--concrete-200);
  color: var(--ink);
}
.site-header.hidden { transform: translateY(-100%); }
/* When the mobile menu is open, keep brand + close button light above the dark overlay */
.site-header.over-menu {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom-color: transparent; color: var(--white);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 11px; line-height: 1; color: currentColor; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Official logo image, used unchanged as a self-contained badge */
.logo-mark { width: 42px; height: 42px; display: block; flex: none; border-radius: 4px; object-fit: cover; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.brand-divider { width: 1px; height: 28px; background: currentColor; opacity: 0.3; }
.brand-word {
  display: flex; flex-direction: column; gap: 1px;
  font-family: var(--font-body); font-weight: 800; font-size: 12.5px;
  line-height: 1.02; letter-spacing: 0.045em; text-transform: uppercase;
}
@media (max-width: 360px) { .brand-divider, .brand-word { display: none; } }

.nav-links { display: none; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em;
  display: inline-flex; gap: 7px; align-items: baseline; position: relative;
}
.nav-links a .n { font-family: var(--font-mono); font-size: 10px; color: var(--orange); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: currentColor; }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-cta { display: none; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}

/* Hamburger */
.burger {
  width: 48px; height: 48px; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  border: 1px solid color-mix(in srgb, currentColor 32%, transparent); border-radius: var(--radius);
}
.burger span { width: 20px; height: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (min-width: 900px) { .burger { display: none; } }

/* Fullscreen mobile menu */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--ink); color: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease);
  visibility: hidden;
}
.menu.open { clip-path: inset(0 0 0% 0); visibility: visible; }
.menu ol { display: flex; flex-direction: column; gap: 6px; }
.menu li { overflow: hidden; }
.menu a {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.4rem, 12vw, 4.5rem); line-height: 1.04;
  display: inline-flex; align-items: baseline; gap: 16px;
  transform: translateY(110%); transition: transform .6s var(--ease), color .3s;
}
.menu.open a { transform: translateY(0); }
.menu a .n { font-family: var(--font-mono); font-size: 13px; color: var(--orange); }
.menu a:hover { color: var(--orange); }
.menu .menu-foot {
  margin-top: clamp(32px, 6vw, 64px); display: flex; flex-wrap: wrap; gap: 8px 28px;
  border-top: 1px solid rgba(251,250,247,0.14); padding-top: 24px;
}
.menu .menu-foot a, .menu .menu-foot span {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--muted-dark); transform: none; text-transform: none;
}
.menu .menu-foot a:hover { color: var(--orange); }
/* stagger delay */
.menu.open li:nth-child(1) a { transition-delay: .12s; }
.menu.open li:nth-child(2) a { transition-delay: .18s; }
.menu.open li:nth-child(3) a { transition-delay: .24s; }
.menu.open li:nth-child(4) a { transition-delay: .30s; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding-top: 120px; padding-bottom: clamp(36px, 6vw, 72px);
  color: var(--white); overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--ink-2); }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.35) contrast(1.05) brightness(0.82);
  transform: scale(1.08); transform-origin: center;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(21,19,14,0.55) 0%, rgba(21,19,14,0.15) 32%, rgba(21,19,14,0.72) 100%),
    linear-gradient(90deg, rgba(21,19,14,0.5) 0%, transparent 55%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--grid-line-dk) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-dk) 1px, transparent 1px);
  background-size: clamp(60px, 7vw, 110px) clamp(60px, 7vw, 110px);
}
.hero__top {
  position: absolute; top: 96px; left: var(--gutter); right: var(--gutter); z-index: 3;
  display: flex; justify-content: space-between; gap: 16px;
}
.hero__inner { position: relative; z-index: 3; width: 100%; }
.hero h1 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.2rem, 14.5vw, 13rem);
  line-height: 0.86; letter-spacing: -0.015em;
  margin-bottom: clamp(22px, 3vw, 38px);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; will-change: transform; }
.hero h1 .accent { color: var(--orange); }
.hero h1 .outline {
  color: transparent; -webkit-text-stroke: 1.5px rgba(251,250,247,0.85);
}
.hero__row {
  display: grid; gap: 26px; align-items: end;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .hero__row { grid-template-columns: 1fr auto; }
}
.hero__lede {
  max-width: 40ch; color: rgba(251,250,247,0.86); font-size: clamp(1rem, 1.5vw, 1.2rem);
}
.hero__lede .quote { font-style: italic; color: var(--white); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  margin-top: clamp(30px, 4vw, 52px); display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(251,250,247,0.7);
}
.scroll-cue .bar { position: relative; width: 46px; height: 1px; background: rgba(251,250,247,0.35); overflow: hidden; }
.scroll-cue .bar::after { content:""; position:absolute; inset:0; width:40%; background: var(--orange); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0%{transform:translateX(-110%)} 60%,100%{transform:translateX(260%)} }

/* corner crop marks */
.crop { position: absolute; width: 14px; height: 14px; z-index: 3; pointer-events: none; opacity: .7; }
.crop::before, .crop::after { content:""; position:absolute; background: var(--orange); }
.crop::before { width: 100%; height: 1.5px; top: 0; }
.crop::after { width: 1.5px; height: 100%; left: 0; }
.crop.tl { top: 90px; left: var(--gutter); }
.crop.tr { top: 90px; right: var(--gutter); transform: scaleX(-1); }
.crop.bl { bottom: 28px; left: var(--gutter); transform: scaleY(-1); }
.crop.br { bottom: 28px; right: var(--gutter); transform: scale(-1); }

/* =====================================================================
   MARQUEE
   ===================================================================== */
.marquee {
  background: var(--ink); color: var(--white);
  border-block: 1px solid var(--ink-3);
  padding-block: 22px; overflow: hidden; white-space: nowrap;
}
.marquee__track { display: inline-flex; gap: 0; will-change: transform; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2.4rem); letter-spacing: 0.01em;
  padding-inline: 28px; display: inline-flex; align-items: center; gap: 28px;
}
.marquee__track span::after { content: ""; width: 9px; height: 9px; background: var(--orange); display: inline-block; transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =====================================================================
   MANIFESTO / INTRO
   ===================================================================== */
.manifesto { background: var(--concrete-50); }
.manifesto .grid {
  display: grid; gap: clamp(36px, 6vw, 72px); align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) { .manifesto .grid { grid-template-columns: 1.35fr 0.65fr; } }
.manifesto .statement {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.7rem); line-height: 1.0; letter-spacing: -0.01em;
}
.manifesto .statement em { color: var(--orange); font-style: normal; }
.manifesto .statement .reveal-word { display: inline-block; }
.manifesto .aside { display: flex; flex-direction: column; gap: 22px; }
.manifesto .aside p { color: var(--muted); }
.manifesto figure { position: relative; overflow: hidden; border-radius: var(--radius); }
.manifesto figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(0.2) contrast(1.03); }
.figcap {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); mix-blend-mode: difference;
}

/* stats / pillars */
.pillars {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--concrete-200);
}
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  padding: clamp(26px, 3vw, 40px) 0; padding-right: 24px;
  border-bottom: 1px solid var(--concrete-200);
}
@media (min-width: 760px) {
  .pillar { border-bottom: none; border-left: 1px solid var(--concrete-200); padding-left: clamp(20px, 2.4vw, 36px); }
  .pillar:first-child { border-left: none; padding-left: 0; }
}
.pillar .pn { font-family: var(--font-mono); font-size: 12px; color: var(--orange); letter-spacing: 0.18em; }
.pillar h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 14px 0 10px; line-height: 1; }
.pillar p { color: var(--muted); font-size: 0.98rem; max-width: 34ch; }

/* =====================================================================
   SERVIZI
   ===================================================================== */
.servizi { background: var(--concrete-100); }
.services {
  border-top: 1px solid var(--concrete-200);
}
.service {
  position: relative; display: grid; gap: 16px;
  grid-template-columns: 1fr; align-items: start;
  padding: clamp(28px, 3.4vw, 46px) 0;
  border-bottom: 1px solid var(--concrete-200);
  transition: padding-left .5s var(--ease);
}
@media (min-width: 760px) {
  .service { grid-template-columns: 88px 1fr 1.1fr; gap: 32px; align-items: center; }
}
.service::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ink); z-index: 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.service > * { position: relative; z-index: 1; transition: color .45s var(--ease); }
.service .sn { font-family: var(--font-mono); font-size: 13px; color: var(--orange); letter-spacing: 0.12em; }
.service h3 {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 0.98; letter-spacing: -0.005em;
}
.service p { color: var(--muted); max-width: 50ch; }
.service .go {
  display: none; justify-self: end; width: 46px; height: 46px;
  border: 1px solid var(--concrete-300); border-radius: 50%;
  align-items: center; justify-content: center; transition: transform .45s var(--ease), border-color .45s, background .45s;
}
@media (min-width: 1100px) { .service { grid-template-columns: 88px 1fr 1.1fr 60px; } .service .go { display: inline-flex; } }
@media (hover: hover) {
  .service:hover::before { transform: scaleX(1); }
  .service:hover { padding-left: clamp(18px, 2vw, 34px); }
  .service:hover h3, .service:hover .sn { color: var(--white); }
  .service:hover p { color: var(--muted-dark); }
  .service:hover .go { background: var(--orange); border-color: var(--orange); transform: rotate(-45deg); }
  .service:hover .go svg { stroke: var(--ink); }
}

/* =====================================================================
   REALIZZAZIONI
   ===================================================================== */
.lavori { background: var(--ink-2); color: var(--white); }
.lavori .section-head h2 { color: var(--white); }
.lavori .section-head .lede { color: var(--muted-dark); }
.lavori .section-head .index { color: var(--orange); }

.gallery {
  display: grid; grid-template-columns: 1fr; gap: clamp(14px, 1.6vw, 22px);
}
@media (min-width: 680px) { .gallery { grid-template-columns: repeat(6, 1fr); } }

.project {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--ink-3); grid-column: span 1;
  display: block;
}
@media (min-width: 680px) {
  .project { grid-column: span 3; }
  .project.wide { grid-column: span 4; }
  .project.narrow { grid-column: span 2; }
}
.project__frame { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.project.tall .project__frame { aspect-ratio: 3/4; }
.project__frame img {
  width: 100%; height: 116%; object-fit: cover;
  filter: grayscale(0.55) contrast(1.05) brightness(0.92);
  transition: transform .8s var(--ease), filter .6s var(--ease);
  will-change: transform;
}
@media (hover: hover) {
  .project:hover img { transform: scale(1.06); filter: grayscale(0) contrast(1.05) brightness(1); }
}
.project__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(21,19,14,0.82) 100%);
}
.project__meta {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.project__meta .t { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.2rem, 2vw, 1.7rem); line-height: 0.96; }
.project__meta .m { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted-dark); text-transform: uppercase; margin-top: 6px; }
.project__tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--orange); color: var(--ink); padding: 5px 9px; border-radius: var(--radius);
}
.project__idx {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; color: rgba(251,250,247,0.65);
}

/* =====================================================================
   ESPERIENZA
   ===================================================================== */
.esperienza { background: var(--ink-2); color: var(--white); }
.esperienza .section-head h2 { color: var(--white); }
.esperienza .section-head .lede { color: var(--muted-dark); }
.esperienza .section-head .lede em { color: var(--orange); font-style: normal; }
.stats { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink-3); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { padding: clamp(28px, 3.4vw, 50px) 24px clamp(28px, 3.4vw, 50px) 0; border-bottom: 1px solid var(--ink-3); }
@media (min-width: 760px) {
  .stat { border-bottom: none; border-left: 1px solid var(--ink-3); padding-left: clamp(22px, 2.6vw, 44px); }
  .stat:first-child { border-left: none; padding-left: 0; }
}
.stat__num { display: block; font-family: var(--font-display); font-size: clamp(3.4rem, 8vw, 6rem); line-height: 0.86; letter-spacing: -0.02em; }
.stat__num .plus { color: var(--orange); }
.stat__label { display: block; margin-top: 16px; color: var(--muted-dark); font-size: 1rem; max-width: 30ch; }

/* =====================================================================
   CTA BAND
   ===================================================================== */
.cta-band {
  background: var(--orange); color: var(--ink); position: relative; overflow: hidden;
}
.cta-band .container { padding-block: clamp(56px, 8vw, 110px); position: relative; z-index: 2; }
.cta-band__big {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(2.2rem, 6.4vw, 5.4rem); line-height: 0.92; letter-spacing: -0.01em;
  max-width: 18ch;
}
.cta-band__row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: clamp(26px, 3vw, 40px); }
.cta-band .btn { --bg: var(--ink); --fg: var(--white); --bd: var(--ink); }
.cta-band .btn::after { background: var(--white); }
.cta-band .btn:hover { color: var(--ink); }
.cta-band__deco {
  position: absolute; right: -4%; top: -30%; z-index: 1; opacity: 0.14;
  font-family: var(--font-display); font-size: clamp(16rem, 40vw, 40rem); line-height: 1; color: var(--ink);
  pointer-events: none; user-select: none;
}

/* =====================================================================
   CONTATTI
   ===================================================================== */
.contatti { background: var(--concrete-50); }
.contact-grid { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-block { border-top: 1px solid var(--concrete-200); padding-top: 18px; }
.contact-block .label { display: block; margin-bottom: 8px; }
.contact-block .val { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.01em; }
.contact-block .val a:hover { color: var(--orange); }

.socials { display: flex; gap: 12px; margin-top: 6px; }
.socials a {
  width: 46px; height: 46px; border: 1px solid var(--concrete-300); border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; transition: background .3s, border-color .3s, color .3s;
}
.socials a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.map-wrap { position: relative; border: 1px solid var(--concrete-200); border-radius: var(--radius); overflow: hidden; margin-top: 8px; min-height: 220px; background: var(--concrete-100); }
/* Fallback shown if the embed is blocked; the iframe sits on top when it loads */
.map-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 6px;
  padding: 18px; color: var(--ink);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
}
.map-fallback .map-pin { color: var(--orange); }
.map-fallback .map-addr { font-weight: 600; }
.map-fallback .map-open { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.map-fallback:hover .map-open { color: var(--orange); }
.map-wrap iframe { position: relative; z-index: 1; width: 100%; height: 220px; border: 0; filter: grayscale(0.6) contrast(1.05); background: transparent; }

/* Form */
.contact-form { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: clamp(24px, 3vw, 44px); position: relative; }
.contact-form h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; margin-bottom: 6px; }
.contact-form .sub { color: var(--muted-dark); font-size: 0.95rem; margin-bottom: 26px; }
.field { position: relative; margin-bottom: 22px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-dark); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--white);
  border: 0; border-bottom: 1px solid rgba(251,250,247,0.22);
  padding: 10px 0; font-family: var(--font-body); font-size: 1.02rem;
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(251,250,247,0.32); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #ff6b4a; }
.field .err { display: none; color: #ff8a6e; font-size: 12px; margin-top: 7px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.field.invalid .err { display: block; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-dark); letter-spacing: 0.06em; max-width: 28ch; }
.form-status {
  margin-top: 18px; padding: 14px 16px; border: 1px solid var(--orange); border-radius: var(--radius);
  font-size: 0.92rem; color: var(--white); display: none; align-items: center; gap: 10px;
}
.form-status.show { display: flex; }
.form-status .dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex: none; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--ink); color: var(--white); padding-top: clamp(56px, 7vw, 96px); }
.footer-top { display: grid; gap: 40px; grid-template-columns: 1fr; padding-bottom: clamp(48px, 6vw, 80px); }
@media (min-width: 820px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo { display: flex; align-items: center; gap: 16px; color: var(--white); }
.logo-mark--lg { width: 60px; height: 60px; }
.footer-word {
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-body); font-weight: 800; font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.0; letter-spacing: 0.03em; text-transform: uppercase;
}
.footer-brand p { color: var(--muted-dark); max-width: 34ch; margin-top: 18px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col span { color: var(--muted-dark); font-size: 0.96rem; }
.footer-col a:hover { color: var(--white); }
.footer-bar {
  border-top: 1px solid var(--ink-3); padding-block: 26px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
}
.footer-bar span, .footer-bar a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted-dark); text-transform: uppercase; }
.footer-bar a:hover { color: var(--orange); }

/* back to top */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 34px); bottom: clamp(16px, 3vw, 34px); z-index: var(--z-top);
  width: 50px; height: 50px; border-radius: 50%; background: var(--ink); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-3);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--orange); color: var(--ink); }

/* =====================================================================
   ANIMATION INITIAL STATES — applied ONLY when motion is allowed + JS on
   (class .anim-ready set by inline head script). Content stays visible
   for no-JS / reduced-motion users.
   ===================================================================== */
.anim-ready [data-reveal] { opacity: 0; transform: translateY(34px); }
.anim-ready [data-reveal="fade"] { transform: none; }
.anim-ready [data-split] .word { opacity: 0; transform: translateY(50%); display: inline-block; }

/* Hero intro — CSS-driven via .reveal (percentage transforms are computed by
   the browser at paint time, so they are immune to webfont-metric races). */
.anim-ready .hero h1 .line > span { transform: translateY(110%); transition: transform 1.05s var(--ease-out); }
.anim-ready .hero h1 .line:nth-child(1) > span { transition-delay: 0.10s; }
.anim-ready .hero h1 .line:nth-child(2) > span { transition-delay: 0.22s; }
.anim-ready .hero h1 .line:nth-child(3) > span { transition-delay: 0.34s; }
.anim-ready .hero.reveal h1 .line > span { transform: translateY(0); }

.anim-ready .hero [data-reveal="fade"] { opacity: 0; transition: opacity 0.95s var(--ease-out) 0.5s; }
.anim-ready .hero.reveal [data-reveal="fade"] { opacity: 1; }

.anim-ready .hero__media img { transform: scale(1.16); transition: transform 2s var(--ease-out); }
.anim-ready .hero.reveal .hero__media img { transform: scale(1.08); }

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-top);
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .scroll-cue .bar::after { animation: none; transform: translateX(0); width: 100%; }
  * { scroll-behavior: auto !important; }
}
