/* =====================================================
   LENZ CODER — Portfolio CSS
   Palette: #0A0A0A bg | #F5F5F5 text | #C8FF00 accent
   Font: Panchang (display) + Stack Sans Notch (body)
   ===================================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --bg:           #171514;
  --bg-2:         #2c2825;
  --bg-card:      #171514;
  --text:         #F5F5F5;
  --text-muted:   #9a9390;
  --text-dim:     #5a5350;
  --accent:       #fa6f1e;
  --accent-hover: #fb8a42;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.13);

  /* Typography */
  --font-display: 'Panchang', sans-serif;
  --font-body:    'Stack Sans Notch', sans-serif;

  /* Layout */
  --nav-h:        72px;
  --max-w:        1400px;
  --pad:          clamp(1.5rem, 5vw, 4rem);

  /* Border radius */
  --radius:    8px;
  --radius-sm: 4px;

  /* Easing */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:  cubic-bezier(0.87, 0, 0.13, 1);

  /* Transitions */
  --t:   0.35s var(--ease-out);
  --t-s: 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* Smooth scrolling gestito da Lenis */
  scroll-behavior: auto;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none; /* cursore sostituito dal custom */
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

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

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

button {
  background: none;
  border: none;
  cursor: none;
  font-family: inherit;
  color: inherit;
}

/* ===== UTILITY ===== */
.accent { color: var(--accent); }

/* ===== PAGE TRANSITION OVERLAY ===== */
#pageOverlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.pt-stripe {
  flex: 1;
  transform: scaleY(0);
  transform-origin: bottom center;
  will-change: transform;
}

/* ===== CUSTOM CURSOR ===== */
.cursor-blob {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width  0.4s cubic-bezier(0.77, 0, 0.175, 1),
              height 0.4s cubic-bezier(0.77, 0, 0.175, 1),
              background 0.4s ease,
              mix-blend-mode 0.4s ease;
}

.cursor-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #000;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* Hover su qualsiasi elemento cliccabile: si allarga + effetto negativo */
body.cursor-hover .cursor-blob,
body.cursor-card  .cursor-blob {
  width: 64px;
  height: 64px;
  background: #ffffff;
  mix-blend-mode: difference;
}

/* Hover sulle project-card: ancora più grande + "VIEW" */
body.cursor-card .cursor-blob {
  width: 120px;
  height: 120px;
}

body.cursor-card .cursor-label {
  opacity: 1;
}

/* Touch/mobile: cursore nativo */
@media (hover: none) {
  .cursor-blob { display: none; }
  body, button, a { cursor: auto; }
  button, a { cursor: pointer; }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 500;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.navbar.scrolled,
.navbar.menu-open {
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--t-s);
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2.5rem);
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s ease-out, transform 0.3s ease-out;
}

/* Trattino accent che entra da sinistra */
.nav-link::before {
  content: '—';
  position: absolute;
  left: -1.4em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  font-style: normal;
}

.nav-link:hover {
  color: var(--accent);
  transform: translateX(8px);
}

.nav-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* CTA link navbar — box arancione al hover */
.nav-link-cta {
  color: var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.nav-link-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--accent);
  transition: height 0.35s cubic-bezier(0.86, 0, 0.07, 1);
  z-index: -1;
}

.nav-link-cta:hover {
  color: var(--bg);
  transform: none;
}

.nav-link-cta:hover::after {
  height: 100%;
}

.nav-link-cta::before { display: none; }

/* Right side: lingua + hamburger */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.lang-opt {
  color: var(--text-muted);
  transition: color var(--t-s);
}

.lang-opt:hover { color: var(--text); }

.lang-divider {
  color: var(--text-muted);
  opacity: 0.25;
}

/* Lingua attiva */
[data-lang="it"] .lang-it { color: var(--text); }
[data-lang="en"] .lang-en { color: var(--text); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 600;
}

.nav-hamburger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text);
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  min-height: 100svh;
  overflow: hidden;
}

.hero > * {
  grid-area: 1 / 1;
}

.hero-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-container {
  position: relative;
  z-index: 1;
  align-self: end;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--nav-h) var(--pad) 4rem;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 5rem);
}

/* Colonna sinistra */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex: 1;
  min-width: 0; /* evita overflow del testo */
}

/* Colonna destra: foto */
.hero-right {
  flex-shrink: 0;
  opacity: 0; /* animato via GSAP */
}

/* Cornice foto */
.hero-photo-frame {
  position: relative;
  width: clamp(180px, 20vw, 280px);
  aspect-ratio: 3 / 4;
  transform: rotate(2.5deg);
  /* Ombra offset accent */
  filter: drop-shadow(10px 10px 0px var(--accent));
  transition: transform 0.4s var(--ease-out), filter 0.4s ease;
}

.hero-photo-frame:hover {
  transform: rotate(0deg);
  filter: drop-shadow(6px 6px 0px var(--accent));
}

/* Contenitore interno — applica overflow hidden e bordo */
.hero-photo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: var(--bg-card);
}

/* Immagine vera */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  z-index: 1;
}

/* Placeholder: visibile finché la foto non viene caricata */
.hero-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-card),
    var(--bg-card) 12px,
    rgba(255,255,255,0.02) 12px,
    rgba(255,255,255,0.02) 13px
  );
  z-index: 0;
}

.hero-photo-placeholder span {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Status badge */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0; /* animato via GSAP */
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(250,111,30,0.4); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 6px rgba(250,111,30,0); }
}

/* Tagline + orologio */
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  opacity: 0; /* animato via GSAP */
}

.hero-tagline {
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-clock-wrapper {
  text-align: right;
}

.hero-clock-city {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.hero-clock {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Scroll hint */
.hero-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0;
  animation: pulseDivider 2.8s ease-in-out infinite;
}

.scroll-chevron {
  color: var(--accent);
}

/* ===== SEZIONI (layout comune) ===== */
.section { padding: clamp(4rem, 10vw, 8rem) 0; }

.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
  flex: 1;
}

.section-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--t-s);
}

.section-link:hover { color: var(--accent); }

/* ===== WORKS GRID ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.project-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Linea verticale accent sul lato sinistro — cresce dal basso */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0%;
  background: var(--accent);
  z-index: 2;
  transition: height 0.5s var(--ease-out);
}

@media (hover: hover) {
  .project-card:hover::before {
    height: 100%;
  }
}

/* Thumbnail */
.project-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
}

.project-img-placeholder,
.project-img {
  position: absolute;
  inset: 0;
  clip-path: inset(0px);
  transition: clip-path 0.5s var(--ease-out);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img-hover {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out), clip-path 0.5s var(--ease-out);
}

@media (hover: hover) {
  .project-card:hover .card-img-hover {
    opacity: 1;
  }

  .project-card:hover .project-img-placeholder,
  .project-card:hover .project-img {
    clip-path: inset(8px);
  }
}

/* Pattern decorativo sul placeholder */
.project-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.015) 18px,
      rgba(255,255,255,0.015) 19px
    );
}

/* Overlay vecchio — nascosto */
.project-overlay { display: none; }

/* Info sotto la card */
.project-info {
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--border);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  transition: color 0.35s ease;
}

@media (hover: hover) {
  .project-card:hover .project-title {
    color: var(--accent);
  }
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* La categoria (primo span) scorre a destra all'hover */
.project-meta span:first-child {
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}

@media (hover: hover) {
  .project-card:hover .project-meta span:first-child {
    transform: translateX(12px);
  }
}


/* ===== COMING SOON CARD ===== */
.project-card--coming-soon {
  cursor: default;
  pointer-events: none;
}

.project-card--coming-soon::before { display: none; }

.coming-soon-bg {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(255,255,255,0.03) 6px,
    rgba(255,255,255,0.03) 12px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255,255,255,0.12);
}

.coming-soon-label {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

/* ===== SERVICES ===== */
.services-section { background: var(--bg-2); }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-item {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3.5rem);
  border: 1px solid var(--border);
  position: relative;
  transition: background-color 0.3s ease;
}

/* Corner brackets — top-left */
.service-item::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--text-dim);
  border-left: 1px solid var(--text-dim);
  transition: width 0.4s ease, height 0.4s ease, border-color 0.4s ease;
}

/* Corner brackets — bottom-right */
.service-item::after {
  content: '';
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-bottom: 1px solid var(--text-dim);
  border-right: 1px solid var(--text-dim);
  transition: width 0.4s ease, height 0.4s ease, border-color 0.4s ease;
}

.service-item:hover::before,
.service-item:hover::after        { width: 20px; height: 20px; border-color: var(--accent); }

.service-icon {
  width: 14px;
  height: 14px;
  background: var(--text-dim);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.35em;
  transform: rotate(0deg);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1),
              background 0.3s ease;
}

.service-item:hover .service-icon {
  background: var(--accent);
  transform: rotate(135deg);
}

.service-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.service-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: uppercase;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ===== CTA ===== */
/* ===== CHI SONO ===== */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.about-photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
}

.about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity 0.45s var(--ease-out);
}

.about-photo-default {
  opacity: 1;
}

.about-photo-hover {
  opacity: 0;
}

.about-photo-wrap:hover .about-photo-default {
  opacity: 0;
}

.about-photo-wrap:hover .about-photo-hover {
  opacity: 1;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.about-bio {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-photo-wrap {
    max-width: 260px;
  }
}

/* ===== DIVISORE PULSANTE ===== */
.pulse-divider {
  width: 100%;
  height: 1px;
  background: var(--accent);
  animation: pulseDivider 2.8s ease-in-out infinite;
}

@keyframes pulseDivider {
  0%, 100% { opacity: 0.15; }
  50%       { opacity: 0.75; }
}

/* ===== CTA ===== */
.cta-section {
  padding: clamp(5rem, 14vw, 12rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Glow centrale */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(250,111,30,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.cta-container {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.cta-eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 5.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 0.88;
  text-transform: uppercase;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: color 0.4s cubic-bezier(0.77, 0, 0.175, 1),
              transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Wipe: blocco accent che scorre da sinistra a destra */
.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 0;
}

.cta-button span {
  position: relative;
  z-index: 1;
}

.cta-button:hover {
  color: var(--bg);
  transform: skewX(-2deg);
}

.cta-button:hover::before {
  transform: scaleX(1);
}

/* ===== ANIMATION OVERLAYS ===== */

/* Overlay pollici */
.thumb-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  overflow: hidden;
}

.thumb-emoji {
  position: absolute;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Vernice arancione */
.paint-overlay {
  position: fixed;
  inset: 0;
  background: var(--accent);
  z-index: 8500;
  pointer-events: none;
  will-change: transform;
  transform: translateY(-100%);
}

/* Canvas coriandoli */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8600;
  pointer-events: none;
  opacity: 0;
}

/* ===== VIBE SLIDER ===== */
.vibe-slider-wrap {
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

.vibe-question {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.vibe-track-wrap {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  max-width: 600px;
}

.vibe-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  min-width: 1rem;
  text-align: center;
}

.vibe-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
  /* area cliccabile estesa verticalmente */
  padding: 16px 0;
  margin: -16px 0;
}

.vibe-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 40%;
  background: var(--accent);
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: width 0.05s ease;
}

.vibe-thumb {
  position: absolute;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  cursor: grab;
  transition: left 0.05s ease, transform 0.2s ease, box-shadow 0.2s ease;
  /* area touch estesa */
  touch-action: none;
}

.vibe-thumb::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
}

.vibe-thumb:hover {
  box-shadow: 0 0 0 6px rgba(250, 111, 30, 0.2);
}

.vibe-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 8px rgba(250, 111, 30, 0.15);
}

.vibe-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 2ch;
  text-align: center;
  transition: color 0.3s ease;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 280px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--t-s);
}

.footer-logo:hover { color: var(--accent); }

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  gap: clamp(2rem, 5vw, 5rem);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col-title {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--t-s);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-align: center;
}

.footer-clock-wrap {
  display: flex;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

/* ===== PIXEL GRID HERO CANVAS ===== */
.hero-pixel-canvas {
  display: block;
  width: 100%;
  max-width: 100%;  /* prevents canvas from overflowing its flex container */
  height: auto;     /* scales height proportionally when width changes */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Nasconde l'<h1> originale quando il canvas è attivo (solo desktop) */
.pixel-grid-hidden {
  display: none !important;
}

/* Su mobile: forza il canvas invisibile, l'<h1> torna visibile */
@media (max-width: 768px), (hover: none) {
  .hero-pixel-canvas   { display: none !important; }
  .pixel-grid-hidden   { display: block !important; }
}

/* ===== ANIMAZIONI SCROLL (classi di reveal) ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  /* GSAP anima a opacity:1, translateY:0 */
}

/* ===== RESPONSIVE — 1024px ===== */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Hero — allineamento sinistra su schermi medi */
  .hero-container {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-clock-wrapper { text-align: left; }

  /* Navbar mobile */
  .nav-container { gap: 1rem; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100dvh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: calc(var(--nav-h) + 1.5rem) 2rem 3rem;
    border-top: none;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 499;
  }

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

  .nav-link {
    font-size: 1.1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    color: var(--text-muted);
    letter-spacing: 0.08em;
  }

  .nav-link::after { display: none; }

  .nav-link:not(.nav-link-cta)::before {
    display: block;
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
  }
  .nav-link-cta::before { display: none; }

  .nav-link-cta {
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 1.1rem 0;
    margin: 0;
    color: var(--accent);
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
  }

  .nav-link-cta::after { display: none; }

  @media (hover: hover) {
    .nav-link:not(.nav-link-cta):hover::before {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }
    .nav-link.nav-link-cta:hover { transform: translateX(8px); }
    .nav-link-cta:hover { color: var(--bg); transform: none; }
  }

  .nav-hamburger { display: flex; }
}

/* ===== RESPONSIVE — 768px ===== */
@media (max-width: 768px) {
  /* Disabilita cursore custom su mobile */
  .cursor-blob { display: none; }
  body, button, a { cursor: auto; }
  button, a { cursor: pointer; }

  /* Hero — tutto a sinistra */
  .hero-container {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero-left {
    align-items: flex-start;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-clock-wrapper { text-align: left; }

  /* Works */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }


  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-title { font-size: clamp(1.8rem, 8vw, 3rem); }

  /* Footer */
  .footer-top {
    flex-direction: column;
  }

  .footer-brand { max-width: 100%; }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* ===== RESPONSIVE — 480px ===== */
@media (max-width: 480px) {
  .footer-links { flex-wrap: wrap; gap: 2rem; }
}
