/* ==========================================================================
   Ideativi — Restyle 2026 — Design tokens & base
   ========================================================================== */

:root {
  --dark: #2b1c14;
  --dark-2: #3d2a1d;
  --dark-3: #4a3527;
  --accent: #f16d20;
  --accent-dark: #d85c12;
  --accent-light: #ff9152;
  --accent-2: #c9973e;
  --accent-2-light: #e0b565;
  --bg-light: #f7f7f9;
  --bg-white: #ffffff;
  --text: #20222b;
  --text-muted: #6b6f7b;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #cbb9a8;
  --border: #e7e7ec;
  --border-dark: #4f3c2c;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 8px 24px rgba(20, 22, 28, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 22, 28, 0.14);
  --container: 1180px;
  --header-h: 84px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Sora", "Inter", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; color: var(--text-muted); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--dark { background: var(--dark); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3 { color: var(--text-on-dark); }
.section--dark p { color: var(--text-on-dark-muted); }
.section--light { background: var(--bg-light); }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: rgba(255,255,255,0.35); color: var(--text-on-dark); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-dark { border-color: var(--border); color: var(--text); }
.btn-outline-dark:hover { border-color: var(--accent); color: var(--accent); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease, height 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(30, 20, 14, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.18);
  height: 72px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.site-header .logo img { height: 48px; width: auto; transition: height 0.25s ease; }
.site-header.is-scrolled .logo img { height: 40px; }
.site-header .logo .logo-light { display: block; }
.site-header .logo .logo-dark { display: none; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-on-dark);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { background: rgba(255,255,255,0.1); color: var(--accent-light); }
.caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform 0.2s ease; }
.main-nav > ul > li:hover .caret { transform: rotate(225deg); margin-top: 3px; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* Mega menu */
.mega-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  transition: opacity 0.2s ease, translate 0.2s ease, visibility 0.2s;
}
.main-nav > ul > li:hover .mega-panel { opacity: 1; visibility: visible; translate: 0 0; }
.mega-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  color: var(--text);
  transition: background 0.15s ease;
}
.mega-panel a:hover { background: var(--bg-light); }
.mega-panel .mega-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(241, 109, 32, 0.1);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}
.mega-panel .mega-text strong { display: block; font-size: 0.92rem; font-family: var(--font-head); }
.mega-panel .mega-text span { font-size: 0.8rem; color: var(--text-muted); }

.mega-promo {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--dark), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mega-promo strong { display: block; color: #fff; font-family: var(--font-head); font-size: 0.92rem; }
.mega-promo span { display: block; color: var(--text-on-dark-muted); font-size: 0.8rem; margin-top: 2px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 90px) 0 100px;
  background: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/emotional/home-workspace.jpg");
  background-size: cover;
  background-position: center;
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 85% 10%, rgba(241,109,32,0.24), transparent 60%),
    radial-gradient(520px circle at 8% 95%, rgba(201,151,62,0.22), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: var(--text-on-dark-muted); max-width: 620px; }
.hero-cta { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-page {
  padding: calc(var(--header-h) + 64px) 0 64px;
  background: var(--dark);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.hero-page--about {
  background: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.92)), url("/images/restyle/emotional/chi-siamo-villa.jpg");
  background-size: cover;
  background-position: center 65%;
}
.hero-page--services {
  background: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.92)), url("/images/restyle/emotional/servizi-architettura.jpg");
  background-size: cover;
  background-position: center;
}
.hero-page--casestudy {
  background: linear-gradient(180deg, rgba(20,12,8,0.86), rgba(43,28,20,0.92)), url("/images/restyle/emotional/case-study-mountain.jpg");
  background-size: cover;
  background-position: center 40%;
}
.hero-page--cs-sistema-mercato {
  background: linear-gradient(180deg, rgba(20,12,8,0.72), rgba(43,28,20,0.88)), url("/images/restyle/case-studies/sistema-mercato-car.jpg");
  background-size: cover;
  background-position: center;
}
.hero-page--cs-le-sai-tutte {
  background: linear-gradient(180deg, rgba(20,12,8,0.75), rgba(43,28,20,0.9)), url("/images/restyle/case-studies/le-sai-tutte-3italia.jpg");
  background-size: cover;
  background-position: center 30%;
}
.hero-page--cs-emergenza {
  background: linear-gradient(180deg, rgba(20,12,8,0.68), rgba(43,28,20,0.88)), url("/images/restyle/case-studies/emergenza-festival.png");
  background-size: cover;
  background-position: center;
}
.hero-page--cs-interfishmarket {
  background: linear-gradient(180deg, rgba(20,12,8,0.68), rgba(43,28,20,0.86)), url("/images/restyle/case-studies/interfishmarket-hero.png");
  background-size: cover;
  background-position: center;
}
.hero-page--cs-cinecitta {
  background: linear-gradient(180deg, rgba(20,12,8,0.7), rgba(43,28,20,0.88)), url("/images/restyle/case-studies/cinecitta-hero.jpg");
  background-size: cover;
  background-position: center 70%;
}
.hero-page--blog {
  background: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.92)), url("/images/title/title-blog.jpg");
  background-size: cover;
  background-position: center;
}
.hero-page--contact {
  background: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.9)), url("/images/restyle/emotional/contatti-office.jpg");
  background-size: cover;
  background-position: center;
}
.hero-page::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px circle at 90% 0%, rgba(241,109,32,0.22), transparent 60%),
    radial-gradient(420px circle at 5% 100%, rgba(201,151,62,0.20), transparent 60%);
}
.hero-page .container { position: relative; z-index: 1; max-width: 760px; }
.hero-page p.lead { color: var(--text-on-dark-muted); font-size: 1.1rem; }

/* Stat band */
.stat-band {
  position: relative;
  z-index: 1;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border-dark);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-band .stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: #fff;
}
.stat-band .stat span { font-size: 0.85rem; color: var(--text-on-dark-muted); }

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

/* ---------------- Horizontal services scroll ---------------- */
.services-scroll-wrap { position: relative; margin: 0 -24px; padding: 0 24px; }
.services-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 12px;
  width: 64px;
  background: linear-gradient(90deg, transparent, var(--bg-light));
  pointer-events: none;
}
.services-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.services-scroll::-webkit-scrollbar { height: 8px; }
.services-scroll::-webkit-scrollbar-track { background: transparent; }
.services-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.services-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.services-scroll-item {
  flex: 0 0 230px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.services-scroll-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.services-scroll-item h3 { font-size: 1rem; margin: 6px 0 8px; }
.services-scroll-item p { font-size: 0.85rem; margin: 0; }

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.scroll-arrow:hover { border-color: var(--accent); color: var(--accent); }
.scroll-arrow.is-disabled { opacity: 0.35; }
.scroll-arrow--prev { left: 4px; }
.scroll-arrow--next { right: 4px; }
@media (max-width: 760px) {
  .scroll-arrow { display: none; }
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .card-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(241,109,32,0.1);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 8px; }
.card .card-tag {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-top: 8px;
}
.card .card-link .arrow { transition: transform 0.2s ease; }
.card:hover .card-link .arrow { transform: translateX(4px); }

.card-dark {
  background: var(--dark-2);
  border: 1px solid var(--border-dark);
  color: var(--text-on-dark);
}
.card-dark p { color: var(--text-on-dark-muted); }

/* Case study card */
.cs-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-white);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cs-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cs-card .cs-media {
  height: 190px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--accent-2) 55%, var(--accent-dark) 140%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.cs-card .cs-media::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.cs-card .cs-tag {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.cs-card .cs-body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.cs-card .cs-result {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

/* Site screenshot gallery (case study) */
.site-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.site-shot {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-white);
  text-decoration: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.site-shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.site-shot .site-shot-frame { height: 220px; overflow: hidden; }
.site-shot img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.site-shot-caption { padding: 14px 18px; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--text); border-top: 1px solid var(--border); }
.site-shot-caption span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(20,12,8,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.lightbox-img { max-width: 90vw; max-height: 80vh; width: auto; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox-caption { color: var(--text-on-dark-muted); font-family: var(--font-head); font-size: 0.9rem; text-align: center; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
@media (max-width: 700px) {
  .lightbox { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
@media (max-width: 700px) {
  .site-gallery { grid-template-columns: 1fr; }
}
.placeholder-note {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(241,109,32,0.12);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Team */
.team-card { text-align: center; }
.team-avatar {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  overflow: hidden;
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { margin-bottom: 2px; font-size: 1.05rem; }
.team-card .role { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.team-bio { font-size: 0.85rem; margin: 14px 0 0; }
.team-quote { font-size: 0.85rem; font-style: italic; color: var(--accent-dark); margin: 10px 0 0; }
.person-contacts { margin-top: 16px; display: flex; gap: 10px; justify-content: center; }
.person-contacts a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.person-contacts a:hover { border-color: var(--accent); color: var(--accent); background: rgba(241,109,32,0.06); }

.founders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-bottom: 28px; }
.founder-card { text-align: center; padding: 40px 32px; }
.founder-card .team-avatar { width: 108px; height: 108px; font-size: 1.9rem; }
.founder-card h3 { font-size: 1.25rem; margin-top: 4px; }
.founder-card .role { font-size: 0.88rem; }
.founder-card .team-bio { font-size: 0.92rem; max-width: 440px; margin-left: auto; margin-right: auto; }
.founder-card .team-quote { font-size: 1rem; }
@media (max-width: 760px) {
  .founders-grid { grid-template-columns: 1fr; }
}

/* Blog */
.blog-card { display: flex; flex-direction: column; height: 100%; }
.blog-card .blog-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.blog-card .blog-meta b { color: var(--accent); }

.blog-article-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  color: var(--accent-dark);
}
.blog-article-body h3 { margin-top: 36px; margin-bottom: 10px; }
.blog-article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.blog-article-body a:hover { color: var(--accent-dark); }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, rgba(20,12,8,0.92), rgba(43,28,20,0.86)), url("/images/restyle/emotional/cta-city.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px circle at 90% 20%, rgba(241,109,32,0.28), transparent 60%),
    radial-gradient(420px circle at 10% 100%, rgba(201,151,62,0.26), transparent 60%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: var(--text-on-dark-muted); margin-bottom: 0; }
.cta-band--matrix {
  background: linear-gradient(120deg, rgba(10,10,10,0.82), rgba(10,10,10,0.6)), url("/public/Pagine/bg_matrix_pills_blue_red.jpg");
  background-size: cover;
  background-position: center 30%;
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 28px; }
.contact-info-item .ci-ico {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 12px;
  background: rgba(241,109,32,0.1);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700;
}
.contact-info-item h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-info-item p { margin: 0; }

.form-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-light);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.field-check { display: flex; align-items: flex-start; gap: 10px; }
.field-check input { width: auto; margin-top: 4px; }
.field-check label { font-family: var(--font-body); font-weight: 400; font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--dark); color: var(--text-on-dark-muted); padding: 72px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-dark);
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-grid li { margin-bottom: 12px; }
.footer-grid a:hover { color: var(--accent-light); }
.footer-brand img { height: 58px; margin-bottom: 16px; }
.footer-brand p { max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom ul { display: flex; gap: 20px; }
.footer-bottom a:hover { color: var(--accent-light); }

/* ---------------- Logo cloud (portfolio clienti) ---------------- */
.logo-cloud {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.logo-cloud .logo-item {
  background: var(--bg-white);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 96px;
  transition: background 0.2s ease;
}
.logo-cloud .logo-item:hover { background: var(--bg-light); }
.logo-cloud .logo-item img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.72);
  transition: filter 0.2s ease;
}
.logo-cloud .logo-item:hover img { filter: grayscale(0%) opacity(1); }

/* ---------------- Process timeline ("Come lavoriamo") ---------------- */
.process-timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.process-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-dark);
  transform: translateX(-50%);
}
.process-step {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  padding: 10px 0;
}
.process-side { flex: 1; min-width: 0; }
.process-side--left { padding-right: 36px; text-align: right; position: relative; }
.process-side--right { padding-left: 36px; text-align: left; position: relative; }
.process-side--left:has(.process-body)::after,
.process-side--right:has(.process-body)::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 2px;
  background: var(--border-dark);
  transform: translateY(-50%);
}
.process-side--left:has(.process-body)::after { right: 0; }
.process-side--right:has(.process-body)::before { left: 0; }
.process-body {
  display: inline-block;
  background: var(--dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 14px 26px;
  max-width: 100%;
}
.process-num {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  background: var(--dark-2);
  border: 2px solid var(--accent);
  position: relative;
  z-index: 1;
}
.process-num svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.process-step-num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 6px;
}
.process-body h3 { color: #fff; margin-bottom: 6px; }
.process-body p { color: var(--text-on-dark-muted); margin-bottom: 0; }

@media (max-width: 760px) {
  .process-timeline::before { left: 29px; transform: none; }
  .process-step { padding: 10px 0; }
  .process-side { order: 1; text-align: left !important; padding: 0 0 0 20px !important; }
  .process-side:empty { display: none; }
  .process-side--left::after, .process-side--right::before { content: none; }
  .process-num { order: 0; width: 52px; height: 52px; }
  .process-num svg { width: 20px; height: 20px; }
  .process-body { padding: 18px 20px; }
}

/* ---------------- Service graph (grafo a nodi) ---------------- */
.section--graph { background: linear-gradient(180deg, #faf5ec, #f2e8d9); }
.service-graph {
  max-width: 1000px;
  margin: 0 auto;
}
.service-graph-svg { width: 100%; height: auto; overflow: visible; }
.graph-edge { stroke: rgba(74, 53, 39, 0.35); stroke-width: 2; fill: none; }
.graph-edge--support { stroke: var(--accent-2); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.7; }
.graph-node { cursor: pointer; }
.graph-node circle {
  fill: var(--gradient-brand);
  stroke: var(--bg-white);
  stroke-width: 3;
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: center;
  transform-box: fill-box;
}
.graph-node--support circle {
  fill: var(--dark);
  stroke: var(--accent-2);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}
.graph-node:hover circle { transform: scale(1.08); filter: drop-shadow(0 6px 14px rgba(241,109,32,0.35)); }
.graph-node .node-ico {
  font-family: var(--font-head);
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 15px;
  pointer-events: none;
}
.graph-node .node-label {
  font-family: var(--font-head);
  font-weight: 600;
  fill: var(--text);
  text-anchor: middle;
  font-size: 13px;
  pointer-events: none;
}
.graph-node:hover .node-label { fill: var(--accent); }
.service-graph-legend {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.service-graph-legend span { display: inline-flex; align-items: center; gap: 8px; }
.service-graph-legend .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--gradient-brand); display: inline-block; }
.service-graph-legend .dot--support { background: var(--dark); border: 2px dashed var(--accent-2); }
.service-graph-legend .line { width: 20px; height: 2px; background: rgba(74, 53, 39, 0.35); display: inline-block; }
.service-graph-legend .line--support { background: none; border-top: 2px dashed var(--accent-2); }

@media (max-width: 700px) {
  .service-graph-svg { min-width: 640px; }
  .service-graph-scroll { overflow-x: auto; padding-bottom: 8px; }
}

/* ---------------- Featured service (es. IT Manager in Outsourcing) ---------------- */
.feature-service {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-service .btn-primary { margin-top: 8px; }
.feature-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.pull-quote {
  max-width: 620px;
  margin: 32px auto 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.4;
  color: var(--accent-dark);
}
.check-list {
  background: var(--dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.check-list h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.check-list ul { display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-on-dark-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.check-list li b { color: #fff; font-family: var(--font-head); font-weight: 600; }
.check-list .check-ico {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 1px;
}

/* ---------------- Services grid → expanding feature card ---------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-item {
  grid-column: span 1;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-item.is-open {
  grid-column: 1 / -1;
  background:
    radial-gradient(600px circle at 85% 0%, rgba(241,109,32,0.22), transparent 60%),
    radial-gradient(500px circle at 10% 100%, rgba(201,151,62,0.18), transparent 60%),
    var(--dark);
  border-color: transparent;
  box-shadow: none;
  border-radius: 0;
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}

.service-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 32px;
  cursor: pointer;
}
.service-item.is-open .service-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 24px;
}
.service-head .card-ico { margin-bottom: 0; flex-shrink: 0; }
.service-head-text { flex: 1; min-width: 0; }
.service-head-text .card-tag { display: block; }
.service-head-text h3 { margin: 4px 0 8px; }
.service-teaser { display: block; color: var(--text-muted); margin: 0; transition: opacity 0.2s ease; }
.service-item.is-open .service-head-text h3 { color: #fff; font-size: 1.5rem; }
.service-item.is-open .card-tag { color: var(--accent-light); }
.service-item.is-open .service-teaser { display: none; }

.service-chevron {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: transform 0.35s ease, border-color 0.3s ease, color 0.3s ease;
}
.service-chevron::before {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -5px;
}
.service-item.is-open .service-chevron { transform: rotate(180deg); border-color: var(--accent); color: var(--accent-light); }

.service-expanded {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}
.service-item.is-open .service-expanded { grid-template-rows: 1fr; }
.service-expanded-inner { overflow: hidden; min-height: 0; }
.service-expanded-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}
.service-expanded-grid p { color: var(--text-on-dark-muted); }
.service-expanded-grid .btn-primary { margin-top: 4px; }
.check-list--inline { padding: 24px; }

/* ---------------- Subtle scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Anchors offset (fixed header) ---------------- */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .logo-cloud { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-service { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .service-item.is-open { grid-column: auto; }
}

/* Servizi con foto tematica reale sullo sfondo, quando aperti */
#sviluppo-software.is-open,
#siti-web.is-open,
#app-mobile.is-open,
#consulenza.is-open,
#analisi-fattibilita.is-open,
#raccolta-dati-web.is-open,
#servizi-backoffice.is-open,
#it-manager-outsourcing.is-open,
#business-intelligence.is-open,
#digital-marketing-seo.is-open {
  background-size: cover;
  background-position: center;
}
#servizi-backoffice.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/servizi-backoffice.jpg");
}
#it-manager-outsourcing.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/it-manager-outsourcing.jpg");
}
#business-intelligence.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/business-intelligence.jpg");
}
#digital-marketing-seo.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/digital-marketing-seo.jpg");
}
#analisi-fattibilita.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/analisi-fattibilita.jpg");
}
#sviluppo-software.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/sviluppo-software.jpg");
}
#siti-web.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/siti-web.jpg");
}
#app-mobile.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/app-mobile.jpg");
}
#consulenza.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/consulenza.jpg");
}
#raccolta-dati-web.is-open {
  background-image: linear-gradient(180deg, rgba(20,12,8,0.88), rgba(43,28,20,0.94)), url("/images/restyle/services/raccolta-dati-web.jpg");
}

@media (max-width: 760px) {
  .service-expanded-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .logo-cloud { grid-template-columns: repeat(2, 1fr); }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--dark); flex-direction: column; align-items: stretch; padding: 24px; transform: translateY(-110%); transition: transform 0.3s ease; overflow-y: auto; }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav > ul > li > a { padding: 16px; justify-content: space-between; }
  .mega-panel { position: static; transform: none; width: auto; opacity: 1; visibility: visible; box-shadow: none; background: var(--dark-2); display: none; grid-template-columns: 1fr; margin-top: 4px; }
  .main-nav > ul > li.mobile-open .mega-panel { display: grid; }
  .mega-panel a { color: #fff; }
  .mega-panel a:hover { background: rgba(255,255,255,0.06); }
  .mega-panel .mega-text span { color: var(--text-on-dark-muted); }
  .nav-toggle { display: flex; }
  .header-actions .btn-outline { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .service-head { padding: 22px; gap: 14px; }
  .service-expanded-grid { padding: 0 22px 26px; gap: 24px; }
}
