/* ======================================================
   BLUCINELAB – STYLE v1.2
   Mood: cinematic midnight, studio visivo
   Font: GT Sectra Fine (titles) + Neue Haas Grotesk (text)
   ====================================================== */

/* ------------------------------
   FONT FACE
   (sostituisci i percorsi con i tuoi file reali in /fonts)
   ------------------------------ */

@font-face {
  font-family: "GT Sectra Fine";
  src: url("fonts/GT-Sectra-Fine-Regular.woff2") format("woff2"),
       url("fonts/GT-Sectra-Fine-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Sectra Fine";
  src: url("fonts/GT-Sectra-Fine-Medium.woff2") format("woff2"),
       url("fonts/GT-Sectra-Fine-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("fonts/NeueHaasGrotesk-Regular.woff2") format("woff2"),
       url("fonts/NeueHaasGrotesk-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk";
  src: url("fonts/NeueHaasGrotesk-Medium.woff2") format("woff2"),
       url("fonts/NeueHaasGrotesk-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"),
       url("fonts/IBMPlexMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------
   VARIABILI
   ------------------------------ */

:root {
  --bg: #02030a;
  --bg-soft: #050816;
  --bg-alt: #070b1a;
  --surface: rgba(10, 16, 32, 0.9);
  --surface-soft: rgba(12, 19, 40, 0.86);
  --text: #f5f5f5;
  --muted: rgba(220, 230, 255, 0.74);
  --accent: #3df5ff;
  --accent-soft: #7de5ff;
  --border-soft: rgba(255, 255, 255, 0.08);
  --grain-opacity: 0.12;
  --shadow-soft: 0 28px 80px rgba(0, 0, 0, 0.85);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --transition: 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  --max-width: 1040px;
}

/* ------------------------------
   RESET & BASE
   ------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #050816 0, #01020a 55%, #000000 100%);
  color: var(--text);
  font-family: "Neue Haas Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

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

/* Links */

a {
  color: var(--accent-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Typo */

h1,
h2,
h3 {
  font-family: "GT Sectra Fine", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  margin: 0 0 0.8rem;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.9rem, 4.8vw, 4.4rem);
}

h2 {
  font-size: clamp(2.05rem, 3.1vw, 2.7rem);
  color: var(--accent);
}

h3 {
  font-size: 1.12rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1.2rem;
  line-height: 1.8;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.04vw, 1.05rem);
  font-weight: 400;
}

/* ------------------------------
   BACKGROUND LAYERS (SHADER + GRAIN)
   ------------------------------ */

#hero-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  display: block;
}

#grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX///+nxBvIAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==");
  background-size: 2px 2px;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  z-index: -2;
  animation: grainShift 0.5s steps(2) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2px, 1px);
  }
  50% {
    transform: translate(1px, -1px);
  }
  75% {
    transform: translate(-1px, 1px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Fade nero iniziale */

.fade-cover {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 999;
  opacity: 1;
  transition: opacity 2.8s ease-out;
}

/* ------------------------------
   HEADER
   ------------------------------ */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 10;
  pointer-events: none;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 1.2rem auto 0;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(24, 36, 72, 0.96), rgba(4, 6, 18, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.site-logo {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(220, 232, 255, 0.9);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 216, 255, 0.8);
  text-decoration: none;
  position: relative;
  padding-block: 0.1rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease-out;
}

.site-nav a:hover::after {
  width: 100%;
}

/* ------------------------------
   HERO
   ------------------------------ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  padding: 5.5rem 1.5rem 4rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-label {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(190, 210, 255, 0.68);
  margin-bottom: 0.9rem;
}

.hero-copy {
  margin-top: 0.9rem;
}

.hero-subcopy {
  margin-top: 0.2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.8rem;
}

.hero-tags span {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(106, 142, 255, 0.4);
  background: radial-gradient(circle at top, rgba(34, 54, 110, 0.7), rgba(9, 13, 32, 0.8));
  color: rgba(224, 234, 255, 0.9);
}

.scroll-hint {
  margin-top: 2.4rem;
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(160, 190, 255, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(4px);
  }
}

.hero-image {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  filter: saturate(1.05);
}

/* ------------------------------
   BEAM SECTION (CYAN LIGHT)
   ------------------------------ */

.beam-scene {
  position: relative;
  min-height: 55vh;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
}

.beam-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.beam-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.05);
}

.beam-text-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

.beam-text {
  max-width: 520px;
  font-size: 1.02rem;
  line-height: 1.9;
  color: rgba(235, 244, 255, 0.92);
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.92);
}

/* ------------------------------
   SEZIONI GENERALI
   ------------------------------ */

.scene {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 4.5rem 1.5rem;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity var(--transition), transform var(--transition);
}

.scene.visible {
  opacity: 1;
  transform: translateY(0);
}

.scene-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.scene-text {
  flex: 1.1;
}

.scene-image {
  flex: 1;
}

.scene-image img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  transition:
    transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.6s ease-out,
    opacity 0.6s ease-out;
  opacity: 0.96;
}

.scene-image img:hover {
  transform: translateY(-6px);
  opacity: 1;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.96);
}

/* Sfondo morbido per le scene */

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(29, 45, 92, 0.45), transparent 60%);
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: -1;
}

.scene--studio::before {
  background-image: url("assets/analog-digital-texture.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.scene--services::before {
  background-image: url("assets/minimal-cosmic-restfulness.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.scene--works::before {
  background-image: url("assets/cyan-light-study.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.14;
}

.scene--method::before {
  background-image: url("assets/analog-digital-texture.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.16;
}

.scene--contact::before {
  background-image: url("assets/minimal-cosmic-restfulness.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

/* ------------------------------
   SERVIZI
   ------------------------------ */

.scene--services {
  flex-direction: column;
  align-items: flex-start;
}

.services-grid {
  max-width: var(--max-width);
  margin: 2.4rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.9rem;
}

.service-card {
  background: linear-gradient(
    145deg,
    rgba(8, 14, 32, 0.96),
    rgba(12, 20, 46, 0.96)
  );
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.78);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.3fr);
  min-height: 230px;
}

.service-image {
  position: relative;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.service-body {
  padding: 1.6rem 1.7rem 1.7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-body p {
  margin-bottom: 0;
}

.service-card:hover .service-image img {
  transform: scale(1.08);
}

/* ------------------------------
   LAVORI – REEL ORIZZONTALE
   ------------------------------ */

.scene--works {
  flex-direction: column;
  align-items: stretch;
}

.works-header {
  margin-bottom: 2.4rem;
}

.works-reel {
  width: 100%;
  overflow: hidden;
  padding: 1rem 0 0.5rem;
}

.reel-strip {
  display: flex;
  gap: 1.2rem;
  transform: translate3d(0, 0, 0);
}

.reel-frame {
  flex: 0 0 46%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.9);
  position: relative;
}

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

/* ------------------------------
   METODO & CONTATTI
   ------------------------------ */

.scene--method .scene-inner,
.scene--contact .scene-inner {
  max-width: 800px;
}

.scene--contact {
  padding-bottom: 5.5rem;
}

.scene--contact .scene-text p:nth-of-type(2),
.scene--contact .scene-text p:nth-of-type(3) {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(195, 210, 240, 0.9);
}

.scene--contact .scene-text p:nth-of-type(2) a,
.scene--contact .scene-text p:nth-of-type(3) a {
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0.03em;
  color: var(--accent-soft);
}

.scene--contact .scene-text p:last-of-type {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: rgba(205, 218, 245, 0.82);
}

/* ------------------------------
   FOOTER
   ------------------------------ */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.8rem 1.5rem 2.4rem;
  background: radial-gradient(circle at top, rgba(12, 20, 44, 0.85), rgba(1, 2, 10, 0.98));
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(190, 204, 235, 0.75);
}

/* ------------------------------
   RESPONSIVE
   ------------------------------ */

@media (max-width: 960px) {
  .site-header-inner {
    margin-inline: 1rem;
    padding-inline: 1.1rem;
    gap: 1.1rem;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .hero {
    padding-top: 5.2rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-image {
    order: -1;
    margin-bottom: 1.8rem;
  }

  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .reel-frame {
    flex-basis: 70%;
  }
}

@media (max-width: 720px) {
  .site-header-inner {
    border-radius: 16px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding-inline: 1.3rem;
  }

  .scene,
  .beam-scene {
    padding-inline: 1.3rem;
  }

  .scene-inner {
    flex-direction: column;
  }

  .scene-image img {
    max-width: 380px;
  }

  .hero-tags {
    gap: 0.4rem;
  }

  .hero-tags span {
    font-size: 0.65rem;
    padding-inline: 0.7rem;
  }

  .reel-frame {
    flex-basis: 82%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.4rem;
  }

  p {
    font-size: 0.94rem;
    line-height: 1.7;
  }
}

/* ------------------------------
   MOTION REDUCE
   ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}