/* ============================================================
   NOJ COSTRUZIONI - FINAL STYLE
   ============================================================ */

:root {
  --red: #c1121f;
  --red-bright: #e01e2d;
  --red-dark: #8f0d16;
  --black: #0b0d0f;
  --black-soft: #121518;
  --black-light: #1b1f23;
  --white: #ffffff;
  --paper: #f3f0ea;
  --paper-light: #faf8f4;
  --paper-dark: #e8e3db;
  --text: #121416;
  --text-soft: #5f6164;
  --line: rgba(17, 19, 21, 0.12);
  --line-light: rgba(255, 255, 255, 0.12);
  --radius-xl: 42px;
  --radius-lg: 30px;
  --radius-md: 20px;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 30px 70px rgba(0, 0, 0, 0.13);
  --shadow-dark: 0 35px 80px rgba(0, 0, 0, 0.28);
  --header-h: 172px;
  --max-width: 1280px;
  --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper-light);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  color: inherit;
}

::selection {
  background: var(--red);
  color: var(--white);
}

.section-shell {
  width: min(calc(100% - 56px), var(--max-width));
  margin-inline: auto;
}

.section-spacing {
  padding-block: 120px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
  padding: 38px max(34px, calc((100vw - var(--max-width)) / 2));
  background: linear-gradient(135deg, #c1121f 0%, #b10f1a 65%, #980b14 100%);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  transition: min-height var(--transition), padding var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  min-height: 124px;
  padding-top: 22px;
  padding-bottom: 22px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
}

.brand-logo {
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}

.brand-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.header-logo-full {
  width: 220px;
  height: auto;
  object-fit: contain;
}

.brand-name {
  justify-self: center;
  position: relative;
  font-size: clamp(35px, 3vw, 49px);
  font-weight: 800;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.brand-name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-50%);
}

.header-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 15px;
  font-weight: 700;
}

.header-nav a {
  position: relative;
  padding: 10px 0;
  opacity: 0.86;
  transition: opacity var(--transition), transform var(--transition);
}

.header-nav a:hover,
.header-nav a.is-active {
  opacity: 1;
  transform: translateY(-2px);
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

.header-nav a:hover::after,
.header-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 11px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

/* LABELS */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  backdrop-filter: blur(10px);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(193, 18, 31, 0.11);
}

.eyebrow-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.eyebrow-light::before {
  background: var(--white);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08);
}

.eyebrow-red {
  color: #ff626b;
  border-color: rgba(255, 98, 107, 0.28);
  background: rgba(193, 18, 31, 0.06);
}

.eyebrow-red::before {
  background: #ff626b;
}

/* HERO */
.hero {
  position: relative;
  min-height: auto;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 80px;
  padding-top: 70px;
  padding-bottom: 65px;
}

.hero-kicker {
  margin: 22px 0 10px;
  color: var(--red);
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero h1,
.works-hero h1 {
  margin: 0;
  max-width: 790px;
  font-size: clamp(56px, 6.5vw, 100px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.hero-text,
.works-hero-copy > p:last-child {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-4px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  color: var(--white);
  box-shadow: 0 16px 34px rgba(193, 18, 31, 0.25);
}

.btn-ghost {
  border-color: rgba(17, 19, 21, 0.22);
  background: rgba(255, 255, 255, 0.48);
  color: var(--black);
}

.btn-ghost:hover {
  background: var(--black);
  color: var(--white);
}

.btn-full {
  width: 100%;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 0 54px 54px 54px;
  background: var(--black);
  box-shadow: var(--shadow-dark);
}

.hero-main-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-visual:hover .hero-main-image {
  transform: scale(1.035);
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72) 100%);
}

.hero-image-note {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 30px;
  color: var(--white);
  z-index: 2;
}

.hero-image-note span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 900;
  opacity: 0.7;
}

.hero-image-note strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

/* HEADINGS */
.section-heading {
  max-width: 820px;
}

.section-heading h2,
.contact-copy h2,
.featured-heading h2 {
  margin: 20px 0 0;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.section-heading-light h2 {
  color: var(--white);
}

/* ABOUT */
.intro-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 90px;
  align-items: center;
  margin-top: 80px;
}

.intro-lead {
  margin: 0;
  max-width: 590px;
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.value-list {
  width: 100%;
  border-top: 1px solid var(--line);
}

.value-card {
  position: relative;
  display: block;
  min-height: 112px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left var(--transition), background var(--transition);
}

.value-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--red);
  transform: translateY(-50%);
  transition: height var(--transition);
}

.value-card:hover {
  padding-left: 16px;
}

.value-card:hover::before {
  height: 55%;
}

.value-card h3 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.value-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================================
   COME LAVORIAMO - PERCORSO EDITORIALE
   ============================================================ */

.process-section {
  position: relative;
  overflow: hidden;
  background: #f2efe9;
  color: var(--text);
}

.process-section::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -180px;
  border-radius: 50%;
  background: rgba(193, 18, 31, 0.055);
  pointer-events: none;
}

.process-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
}

.process-heading .eyebrow {
  grid-column: 1 / -1;
  width: fit-content;
}

.process-heading h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.process-heading > p {
  margin: 0;
  max-width: 450px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

.process-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 90px 1fr 90px 1fr;
  align-items: center;
}

.process-step {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 10px 10px;
  border-top: 2px solid var(--black);
}

.process-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(193, 18, 31, 0.22);
  transition: transform var(--transition), box-shadow var(--transition);
}

.process-step:hover .process-icon {
  transform: translateY(-4px) rotate(-3deg);
  box-shadow: 0 18px 34px rgba(193, 18, 31, 0.28);
}

.process-content h3 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.process-content p {
  margin: 0;
  max-width: 310px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}

.process-connector {
  position: relative;
  height: 1px;
  margin: 0 18px;
  background: rgba(17, 19, 21, 0.22);
}

.process-connector::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: translateY(-50%) rotate(45deg);
}

/* SERVICES */
.services {
  background: var(--black);
  color: var(--white);
}

.section-heading-inline {
  display: grid;
  grid-template-columns: 1fr 0.68fr;
  align-items: end;
  gap: 90px;
}

.section-heading-inline > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 65px;
}

.service-card {
  min-height: 260px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(225, 30, 45, 0.55);
  background: linear-gradient(145deg, rgba(193, 18, 31, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.28);
}

.service-card h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 29px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.service-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.6;
}

/* FEATURED WORK */
.featured-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 35px;
}

.text-link {
  font-weight: 800;
  white-space: nowrap;
}

.text-link span {
  color: var(--red);
}

/* BEFORE / AFTER */
.ba-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 0 40px 40px 40px;
  background: var(--black);
  box-shadow: var(--shadow-medium);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}

.ba-slider:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 5px;
}

.ba-base,
.ba-before,
.ba-before-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
}

.ba-base,
.ba-before {
  width: 100%;
}

.ba-before-wrap {
  width: 50%;
  overflow: hidden;
  right: auto;
}

.ba-base img,
.ba-before img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ba-before {
  width: 100vw;
  max-width: var(--max-width);
}

.ba-badge {
  position: absolute;
  top: 20px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.ba-after .ba-badge {
  right: 20px;
}

.ba-before .ba-badge {
  left: 20px;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 2px;
  background: rgba(255, 255, 255, 0.88);
  transform: translateX(-1px);
}

.ba-divider button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--white);
  background-clip: padding-box;
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
  cursor: ew-resize;
}

/* CONTACT */
.contact-wrap {
  padding: 80px 0 26px;
  background: var(--paper-light);
}

.contact-panel {
  min-height: 630px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 80px;
  padding: 70px;
  border-radius: 48px;
  background: radial-gradient(circle at 90% 8%, rgba(193, 18, 31, 0.22), transparent 30%), linear-gradient(145deg, #171a1d 0%, #090b0d 72%);
  color: var(--white);
  box-shadow: var(--shadow-dark);
}

.contact-copy h2 {
  color: var(--white);
}

.contact-intro {
  max-width: 650px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 36px;
  margin-top: 40px;
}

.contact-details div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-details span,
.contact-mini-copy span {
  display: block;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.contact-details strong,
.contact-mini-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.contact-chip:hover {
  transform: translateY(-3px);
  background: var(--red);
  border-color: var(--red);
}

.contact-form {
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.form-row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 800;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #090b0d;
  color: var(--white);
  outline: none;
  padding: 15px 16px;
  resize: vertical;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: rgba(225, 30, 45, 0.85);
  background: #0d1013;
  box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.12);
}

.form-field textarea {
  min-height: 120px;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.62) !important;
  font-weight: 500 !important;
  line-height: 1.5;
}

.checkbox-label input {
  width: auto;
  margin-top: 3px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-note {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
}

.form-note.success {
  color: #bff4ca;
}

.form-note.error {
  color: #ffb5ba;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 6px;
  color: #7c7f82;
  font-size: 11px;
}

/* WORKS PAGE */
.works-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding-block: 90px 75px;
}

.project-card {
  padding: 55px 0 110px;
  border-top: 1px solid var(--line);
}

.project-heading {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 55px;
  align-items: end;
  margin-bottom: 38px;
}

.project-heading > div {
  display: block;
}

.project-heading h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(42px, 4.5vw, 66px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.project-heading > p {
  margin: 0;
  max-width: 560px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 14px;
  margin-top: 16px;
}

.gallery-item {
  position: relative;
  min-height: 360px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: var(--black);
  cursor: pointer;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item::after {
  content: "APRI";
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.compact-contact .contact-panel {
  min-height: 380px;
  grid-template-columns: 1fr auto;
}

.contact-mini-copy {
  min-width: 230px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-stage {
  width: min(1200px, 94vw);
  height: min(82vh, 900px);
  display: grid;
  place-items: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 30px;
  cursor: pointer;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* TABLET */
@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .intro-grid,
  .section-heading-inline {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 104px;
  }

  .section-shell {
    width: min(calc(100% - 34px), var(--max-width));
  }

  .section-spacing {
    padding-block: 80px;
  }

  .site-header {
    min-height: var(--header-h);
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    padding: 18px 17px;
  }

  .site-header.is-scrolled {
    min-height: 92px;
    padding: 13px 17px;
  }

  .brand-logo {
    padding: 7px 11px;
    border-radius: 13px;
  }

  .header-logo-full {
    width: 155px;
  }

  .brand-name {
    font-size: clamp(20px, 4.5vw, 28px);
  }

  .brand-name::after {
    display: none;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .header-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 34px 24px;
    background: linear-gradient(145deg, #b50f1a, #870a12);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .header-nav.is-open {
    transform: translateX(0);
  }

  .header-nav a {
    padding: 17px 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    font-size: 29px;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    min-height: auto;
    padding-block: 55px 75px;
    gap: 50px;
  }

  .hero-visual {
    min-height: 500px;
  }
.featured-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 45px;
    padding: 45px 30px;
    border-radius: 34px;
  }

  .works-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 70px 60px;
  }

  .project-heading {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .compact-contact .contact-panel {
    grid-template-columns: 1fr;
  }
}


/* COME LAVORIAMO - TABLET */
@media (max-width: 860px) {
  .process-heading {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 55px;
  }

  .process-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-step {
    min-height: auto;
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    align-items: start;
    padding: 28px 0;
    border-top: 1px solid var(--line);
  }

  .process-icon {
    width: 48px;
    height: 48px;
  }

  .process-connector {
    display: none;
  }
}

/* SMARTPHONE */
@media (max-width: 560px) {
  :root {
    --header-h: 84px;
  }

  .section-shell {
    width: calc(100% - 28px);
  }

  .section-spacing {
    padding-block: 56px;
  }

  .site-header {
    min-height: var(--header-h);
    padding: 13px 14px;
    gap: 8px;
  }

  .site-header.is-scrolled {
    min-height: 76px;
    padding: 10px 14px;
  }

  .brand-logo {
    padding: 6px 9px;
    border-radius: 11px;
  }

  .header-logo-full {
    width: 115px;
  }

  .brand-name {
    font-size: 18px;
  }

  .menu-toggle {
    width: 41px;
    height: 41px;
    padding: 9px;
    border-radius: 11px;
  }

  .header-nav {
    inset: var(--header-h) 0 0 0;
    padding: 24px 20px;
  }

  .header-nav a {
    padding: 14px 2px;
    font-size: 23px;
  }

  .hero {
    padding-block: 38px 55px;
    gap: 35px;
  }

  .hero-kicker {
    margin-top: 15px;
    font-size: 16px;
  }

  .hero h1,
  .works-hero h1 {
    font-size: clamp(36px, 10vw, 46px);
    line-height: 0.98;
  }

  .hero-text,
  .works-hero-copy > p:last-child {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-actions {
    margin-top: 24px;
    gap: 9px;
  }

  .btn {
    min-height: 43px;
    padding: 0 16px;
    font-size: 12px;
  }

  .hero-visual {
    min-height: 330px;
    border-radius: 0 24px 24px 24px;
  }

  .hero-image-note {
    left: 18px;
    right: 18px;
    bottom: 16px;
  }

  .hero-image-note strong {
    font-size: 18px;
  }

  .section-heading h2,
  .contact-copy h2,
  .featured-heading h2 {
    margin-top: 14px;
    font-size: 31px;
    line-height: 1;
  }

  .intro-grid {
    margin-top: 38px;
    gap: 30px;
  }

  .intro-lead {
    font-size: 27px;
    line-height: 1.15;
  }

  .value-card {
    min-height: auto;
    padding: 18px 0;
  }

  .value-card:hover {
    padding-left: 0;
  }

  .value-card::before {
    display: none;
  }

  .value-card h3 {
    font-size: 20px;
  }

  .value-card p {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.55;
  }
.section-heading-inline {
    gap: 15px;
  }

  .section-heading-inline > p {
    font-size: 13px;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 32px;
  }

  .service-card {
    min-height: 145px;
    padding: 18px 14px;
    border-radius: 16px;
    justify-content: flex-end;
  }

  .service-card:hover {
    transform: none;
  }

  .service-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .service-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
  }

  .ba-slider {
    min-height: 360px;
    border-radius: 0 22px 22px 22px;
  }

  .ba-before {
    width: calc(100vw - 28px);
  }

  .ba-badge {
    top: 12px;
    padding: 6px 9px;
    font-size: 8px;
  }

  .ba-after .ba-badge {
    right: 12px;
  }

  .ba-before .ba-badge {
    left: 12px;
  }

  .ba-divider button {
    width: 44px;
    height: 44px;
    border-width: 5px;
    font-size: 10px;
  }

  .contact-wrap {
    padding-top: 35px;
  }

  .contact-panel {
    min-height: auto;
    gap: 30px;
    padding: 27px 20px;
    border-radius: 25px;
  }

  .contact-intro {
    margin-top: 16px;
    font-size: 13px;
  }

  .contact-details {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .contact-details strong,
  .contact-mini-copy strong {
    font-size: 15px;
  }

  .contact-chip {
    min-height: 35px;
    padding: 0 11px;
    font-size: 10px;
  }

  .contact-form {
    padding: 17px;
    border-radius: 18px;
  }

  .form-row.two-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-field {
    margin-bottom: 13px;
  }

  .form-field input,
  .form-field textarea,
  .form-field select {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .project-card {
    padding: 32px 0 62px;
  }

  .project-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 24px;
  }

  .project-heading h2 {
    font-size: 32px;
    line-height: 1;
  }

  .project-heading > p {
    font-size: 14px;
    line-height: 1.55;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-item {
    min-height: 230px;
    border-radius: 17px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 18px 0 4px;
    font-size: 9px;
  }
}



/* ============================================================
   MENU HEADER MODERNO - SOLO DESKTOP
   ============================================================ */

@media (min-width: 861px) {
  .header-nav {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .header-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 1;
    transition:
      background 0.25s ease,
      color 0.25s ease,
      transform 0.25s ease,
      box-shadow 0.25s ease;
  }

  .header-nav a::after {
    display: none;
  }

  .header-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    transform: translateY(-1px);
  }

  .header-nav a.is-active {
    background: var(--white);
    color: var(--red);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    transform: none;
  }
}

/* La foto grande della gallery deve riempire tutto il riquadro. */
.gallery-item-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
}

@media (max-width: 560px) {
  .process-heading {
    margin-bottom: 38px;
  }

  .process-heading h2 {
    font-size: 34px;
    line-height: 1;
  }

  .process-heading > p {
    font-size: 14px;
  }

  .process-step {
    grid-template-columns: 48px 1fr;
    gap: 15px;
    padding: 22px 0;
  }

  .process-icon {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .process-content h3 {
    margin-bottom: 7px;
    font-size: 21px;
  }

  .process-content p {
    font-size: 13px;
    line-height: 1.55;
  }
}

/* Telefoni molto stretti: manteniamo due servizi per riga, ma più compatti. */
@media (max-width: 390px) {
  .services-grid {
    gap: 8px;
  }

  .service-card {
    min-height: 138px;
    padding: 16px 11px;
  }

  .service-card h3 {
    font-size: 16px;
  }

  .service-card p {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
