/* ============================================================
   HOME.CSS — Homepage-specific styles
   ============================================================ */

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-end;
  padding: 140px 5% 6rem;
  position: relative;
  overflow: hidden;
  background: #060a08;
}

#matrix-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  display: block;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(6, 10, 8, 0.96) 0%,
    rgba(6, 10, 8, 0.88) 40%,
    rgba(6, 10, 8, 0.55) 70%,
    rgba(6, 10, 8, 0.15) 100%
  );
  z-index: 1;
}

.hero-inner,
.hero-bg-text {
  position: relative;
  z-index: 2;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: -2%;
  transform: translateY(-50%);
  font-family: 'Syne', sans-serif;
  font-size: clamp(120px, 18vw, 280px);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(10, 10, 10, 0.06);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  z-index: 2;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--green-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-eyebrow span {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(44px, 6.5vw, 88px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}

.hero-right {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}


.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-stat {
  text-align: left;
}

.hero-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.3rem;
}

/* Hero dark overrides (matrix background) */
.hero .hero-title        { color: #fff; }
.hero .hero-title em     { color: var(--green-light); }
.hero .hero-eyebrow span { color: var(--green-light); }
.hero .hero-stat-num     { color: #fff; }
.hero .hero-stat-label   { color: rgba(255,255,255,0.4); }
.hero .hero-bottom       { border-top-color: rgba(255,255,255,0.08); }
.hero .hero-bg-text      { -webkit-text-stroke: 1px rgba(255,255,255,0.04); }
.hero .btn-secondary {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
}
.hero .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* ---- SERVIZI ---- */
.servizi {
  padding: 7rem 5%;
  background: var(--paper);
}

.servizi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.servizi-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.servizi-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}

.servizi-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 340px;
  text-align: right;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5px;
  background: var(--border);
}

.servizio-card {
  background: var(--paper);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: default;
}

.servizio-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.servizio-card:hover::before {
  transform: scaleX(1);
}

.servizio-card:hover {
  background: var(--warm);
}

.servizio-number {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--sand);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
}

.servizio-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  transition: border-color 0.3s, background 0.3s;
}

.servizio-card:hover .servizio-icon {
  border-color: rgba(28, 92, 68, 0.3);
  background: rgba(28, 92, 68, 0.06);
}

.servizio-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--ink);
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.3s;
}

.servizio-card:hover .servizio-icon svg {
  stroke: var(--green);
}

.servizio-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.servizio-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.servizio-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.servizio-list li {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.servizio-list li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--green-light);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- WORK PREVIEW ---- */
.work {
  padding: 7rem 5%;
  background: var(--warm);
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.work-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.work-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}

.work-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.work-count {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--border);
}

.project-card {
  background: var(--paper);
  overflow: hidden;
  position: relative;
}

.project-card:first-child {
  grid-column: span 2;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  position: relative;
  background: var(--warm);
}

.project-card:first-child .project-thumb {
  aspect-ratio: 16 / 7;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-thumb-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
}

.project-thumb-badge.wip {
  background: var(--sand);
  color: var(--ink);
}

.project-next-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
}

.project-next-label {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.04em;
}

.project-next-sub {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.14em;
}

.project-body {
  padding: 2rem 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.project-card:first-child .project-body {
  padding: 2.5rem 3rem;
}

.project-index {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sand);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.project-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.project-card:first-child .project-name {
  font-size: 1.7rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 480px;
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  flex-shrink: 0;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.1rem;
  transition: color 0.2s, border-color 0.2s;
}

.project-link:hover {
  color: var(--green);
  border-color: var(--green);
}

.project-link svg {
  transition: transform 0.2s;
}

.project-link:hover svg {
  transform: translate(2px, -2px);
}

.work-cta {
  margin-top: 3rem;
  text-align: center;
}

/* ---- RECENSIONI ---- */
.recensioni {
  padding: 7rem 5%;
  background: var(--paper);
}

.recensioni-header {
  text-align: center;
  margin-bottom: 4rem;
}

.recensioni-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1rem;
}

.recensioni-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}

.recensioni-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.recensioni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.recensione-card {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.recensione-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.recensione-stars {
  display: flex;
  gap: 0.25rem;
  color: var(--sand);
  font-size: 1rem;
}

.recensione-text {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  flex: 1;
}

.recensione-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.recensione-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.recensione-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.recensione-role {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---- BRAND / CLIENTI ---- */
.brand {
  padding: 5rem 5%;
  background: var(--warm);
  border-top: 1px solid var(--border);
}

.brand-header {
  text-align: center;
  margin-bottom: 3rem;
}

.brand-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.brand-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem 4rem;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.3s, filter 0.3s;
  cursor: default;
}

.brand-item:hover {
  opacity: 1;
  filter: grayscale(0);
}

.brand-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-logo span {
  color: var(--green);
}

/* ---- CTA BANNER ---- */
.cta-banner {
  background: var(--ink);
  padding: 7rem 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(28, 92, 68, 0.35) 0%, transparent 65%);
  pointer-events: none;
}

.cta-banner > * {
  position: relative;
  z-index: 1;
}

.cta-banner-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 1.5rem;
}

.cta-banner-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: white;
  margin-bottom: 1.5rem;
}

.cta-banner-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--green-light);
}

.cta-banner-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3rem;
  line-height: 1.7;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--ink);
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-white:hover {
  background: var(--green-light);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.9rem 2rem;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  transform: translateY(-2px);
}

/* ---- RESPONSIVE HOME ---- */
@media (max-width: 1100px) {
  .servizi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-right {
    max-width: 500px;
  }

  .hero-bottom {
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .servizi-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .servizi-subtitle {
    text-align: left;
    max-width: 100%;
  }

  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .work-header-right {
    align-items: flex-start;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card:first-child {
    grid-column: span 1;
  }

  .project-body {
    flex-direction: column;
  }

  .project-meta {
    align-items: flex-start;
  }

  .project-tags {
    justify-content: flex-start;
  }

  .recensioni-grid {
    grid-template-columns: 1fr;
  }

  .brand-grid {
    gap: 2rem 3rem;
  }
}

@media (max-width: 600px) {
  .servizi-grid {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .cta-banner-actions {
    flex-direction: column;
  }
}
