/* ==========================================================================
   BLAAAST — Agenzia di comunicazione
   Design system "COWBOY SPAZIALI — DIURNO" (V1.1)
   ========================================================================== */

/* ---------- Token di design ---------- */
:root {
  /* Palette V1.1 "diurna": cowboy-spaziale in chiaro — sabbia d'alba + accenti */
  --bg:         #F6F0E6;   /* fondo pagina — carta sabbia              */
  --space:      #EFE6D6;   /* fondo "cielo d'alba" (hero, CTA)          */
  --ink-2:      #FCFAF5;   /* superfici / card                         */
  --ink-3:      #E4D9C5;   /* bordi                                    */
  --ink:        #241B12;   /* inchiostro caldo — testo principale      */
  --bone:       #241B12;   /* testo principale (alias di --ink)        */
  --bone-dim:   #6E5F4E;   /* testo secondario                         */
  --acid:       #F0521E;   /* arancio tramonto brillante                */
  --acid-soft:  #FF7A3C;   /* hover arancio                             */
  --acid-ink:   #B72B0A;   /* arancio scuro — testi piccoli (AA ovunque) */
  --accent:     var(--acid);   /* accento UI unico: l'arancio tramonto   */
  --accent-soft: var(--acid-soft);
  /* Alias legacy (deprecati, non usare): ex blu rimosso dalla palette */
  --cyan:       var(--accent);
  --cyan-soft:  var(--accent-soft);
  --magenta:    #BE185D;   /* accent "emozione"                        */
  --sunset:     #E9A12B;   /* oro ambra                                */

  /* Tipografia — titoli in Space Grotesk (come la V1); parole-emblema,
     logo e badge in Baloo 2 (bold e tondeggiante) */
  --font-rye:    "Baloo 2", "Arial Black", sans-serif;
  --font-display: "Space Grotesk", "Arial Black", sans-serif;
  --font-body:    "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "Rubik Mono One", "Courier New", monospace; /* teletype HUD */

  /* Spaziature */
  --space-section: clamp(5rem, 10vw, 8rem);
  --radius: 6px;   /* angoli "legno/cartone" — i pulsanti restano pillola */

  /* Transizioni */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* ---------- Accessibilità: focus visibile "sistema" ---------- */
:focus-visible {
  outline: 2px solid var(--acid-ink);
  outline-offset: 3px;
}

/* ---------- Grana pellicola globale (noise SVG data-URI, zero file) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 200;
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  to { transform: translate(30px, 30px); }
}

/* ---------- Utilità ---------- */
.container {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acid-ink);
  margin-bottom: 1rem;
}

.section {
  padding-block: var(--space-section);
}

.section-head {
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* Parola-emblema: Baloo 2 al massimo, in maiuscolo, mai spezzata */
em {
  font-style: normal;
  font-family: var(--font-rye);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--acid);
}

/* Divider tratteggiato western */
.divider {
  border-top: 2px dashed rgba(245, 243, 239, 0.14);
  margin-block: 3rem;
}

/* ---------- Pattern decorativi (CSS puro) ---------- */

/* Campo stellare */
.starfield {
  background-image:
    radial-gradient(1px 1px at 18px 30px, rgba(245, 243, 239, 0.9), transparent),
    radial-gradient(1px 1px at 62px 12px, rgba(245, 243, 239, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 96px 54px, rgba(233, 161, 43, 0.8), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(245, 243, 239, 0.5), transparent),
    radial-gradient(1px 1px at 170px 22px, rgba(255, 46, 151, 0.7), transparent);
  background-size: 200px 110px;
  background-repeat: repeat;
}

/* Stella a sei punte (badge dello sceriffo) */
.star-badge {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--acid), var(--sunset));
  clip-path: polygon(
    50% 0, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
  );
}

/* Scanline CRT + banda luminosa */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.04) 0 1px,
    transparent 1px 3px
  );
}

.scanlines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(240, 82, 30, 0.55), transparent);
  box-shadow: 0 0 18px rgba(240, 82, 30, 0.55);
  animation: scan 6s linear infinite;
}

@keyframes scan {
  from { top: -8%; }
  to   { top: 108%; }
}

/* Griglia prospettica — inchiostro tenue */
.grid-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background-image:
    linear-gradient(rgba(36, 27, 18, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 27, 18, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, transparent, #000);
  mask-image: linear-gradient(to top, transparent, #000);
  opacity: 0.55;
  pointer-events: none;
}

/* Corner brackets HUD per le card */
.card-hud::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
  background:
    linear-gradient(var(--acid-ink) 0 0) top left / 14px 2px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) top left / 2px 14px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) top right / 14px 2px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) top right / 2px 14px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) bottom left / 14px 2px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) bottom left / 2px 14px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) bottom right / 14px 2px no-repeat,
    linear-gradient(var(--acid-ink) 0 0) bottom right / 2px 14px no-repeat;
}

/* Badge "CASE FILE" stile WANTED */
.badge-wanted {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  transform: rotate(6deg);
  font-family: var(--font-rye);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  background: var(--bone);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--speed) var(--ease), background var(--speed) var(--ease),
              border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

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

/* Primario: arancio pieno brillante, testo inchiostro, bordo netto */
.btn-accent {
  border: 2px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
}

.btn-accent:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Secondario: bordo inchiostro tenue, si accende in hover */
.btn-ghost {
  border-color: rgba(36, 27, 18, 0.35);
  color: var(--bone);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(240, 82, 30, 0.18);
}

.btn-small {
  padding: 0.65rem 1.3rem;
  font-size: 0.75rem;
}

.btn-big {
  padding: 1.1rem 2.4rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
              backdrop-filter var(--speed) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--ink-3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 76px;
}

/* Logo: insegna di legno in Rye */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-rye);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.logo-mark {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--acid), var(--sunset));
  clip-path: polygon(
    50% 0, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
  );
}

/* Nav desktop */
.nav-list {
  display: flex;
  gap: 2.2rem;
}

.nav-list a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--bone-dim);
  transition: color var(--speed) var(--ease);
}

.nav-list a:hover {
  color: var(--acid-ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Toggle menu mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--ink-3);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--bone);
  transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 8rem 4rem;
  position: relative;
  background: var(--space);
  overflow: hidden;
}

/* Layer di sfondo: stelle + griglia + bagliori */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--space);
}

.hero-bg .starfield {
  position: absolute;
  inset: 0;
}

/* Tre bagliori: arancio (tramonto), magenta, oro */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(255, 77, 0, 0.22) 0%, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(255, 46, 151, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 20% 85%, rgba(233, 161, 43, 0.16) 0%, transparent 50%);
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
}

/* Seconda riga del titolo: sempre intera (mai a capo a metà) */
.hero-line2 {
  white-space: nowrap;
}

.hero-sub {
  max-width: 560px;
  color: var(--bone-dim);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  margin-bottom: 2.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--magenta);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 151, 0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 46, 151, 0); }
}

/* ==========================================================================
   MARQUEE — ticker da trasmissione
   ========================================================================== */
.marquee {
  position: relative;
  border-top: 1px solid rgba(240, 82, 30, 0.35);
  border-bottom: 1px solid rgba(255, 46, 151, 0.35);
  background: var(--ink-2);
  overflow: hidden;
  padding-block: 1rem;
}

/* Etichetta fissa a sinistra */
.marquee-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0.3rem 1.2rem 0.3rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--acid-ink);
  background: linear-gradient(90deg, var(--ink-2) 75%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-sep {
  color: var(--acid-ink);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   SERVIZI
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.6rem;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.service-card:hover::before {
  opacity: 1;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--acid-ink);
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.service-text {
  color: var(--bone-dim);
  font-size: 0.95rem;
  flex: 1;
}

.service-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bone);
  transition: color var(--speed) var(--ease);
}

.service-link span {
  display: inline-block;
  transition: transform var(--speed) var(--ease);
}

.service-card:hover .service-link {
  color: var(--acid-ink);
}

.service-card:hover .service-link span {
  transform: translateX(4px);
}

/* ==========================================================================
   LAVORI — "reperti dal campo"
   ========================================================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.work-card {
  position: relative;
  background: var(--ink-2);
  border: 1px dashed var(--ink-3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.work-card:hover::before {
  opacity: 1;
}

.work-visual {
  aspect-ratio: 4 / 3;
  position: relative;
  background: linear-gradient(135deg, var(--c1, var(--ink)), var(--c2, #1A1410));
  transition: transform 0.6s var(--ease);
}

/* Stelle + scanline sul visual */
.work-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 18px 30px, rgba(245, 243, 239, 0.8), transparent),
    radial-gradient(1px 1px at 62px 12px, rgba(245, 243, 239, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 96px 54px, rgba(255, 255, 255, 0.7), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px);
  background-size: 200px 110px, 200px 110px, 200px 110px, 100% 100%;
  background-repeat: repeat, repeat, repeat, no-repeat;
}

.work-card:hover .work-visual {
  transform: scale(1.04);
}

/* I tre "mondi": tramonto / oro / magenta-prugna */
.work-visual-1 { --c1: #F0521E; --c2: #8F2507; }
.work-visual-2 { --c1: #F9A825; --c2: #7E4A00; }
.work-visual-3 { --c1: #E06BB0; --c2: #8E2450; }

.work-info {
  padding: 1.4rem 1.6rem 1.8rem;
}

.work-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acid-ink);
}

.work-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-block: 0.4rem 0.3rem;
}

.work-desc {
  color: var(--bone-dim);
  font-size: 0.92rem;
}

/* ==========================================================================
   STUDIO
   ========================================================================== */
.studio-statement {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: start;
}

.studio-text {
  color: var(--bone-dim);
  font-size: 1.1rem;
  max-width: 52ch;
}

.studio-values {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.studio-values li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.value-mark {
  color: var(--magenta);
  font-size: 1rem;
}

/* ==========================================================================
   CTA FINALE
   ========================================================================== */
.cta-section {
  position: relative;
  text-align: center;
  border-block: 1px solid var(--ink-3);
  background: var(--space);
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 46, 151, 0.28), transparent 60%),
    radial-gradient(1px 1px at 40px 90px, rgba(245, 243, 239, 0.5), transparent),
    radial-gradient(1px 1px at 140px 30px, rgba(233, 161, 43, 0.6), transparent),
    radial-gradient(1px 1px at 220px 120px, rgba(245, 243, 239, 0.4), transparent);
  background-size: 100% 100%, 240px 140px, 240px 140px, 240px 140px;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}

.cta-text {
  color: var(--bone-dim);
  max-width: 480px;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding-block: 4rem 2rem;
  border-top: 1px solid var(--ink-3);
  background: var(--ink-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-tagline {
  margin-top: 1.1rem;
  color: var(--bone-dim);
  font-size: 0.95rem;
}

/* Coordinate della base */
.footer-coords {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acid-ink);
}

.footer-nav li,
.footer-contact p {
  margin-bottom: 0.7rem;
}

.footer-nav a,
.footer-contact a {
  color: var(--bone-dim);
  transition: color var(--speed) var(--ease);
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--acid-ink);
}

.footer-contact p {
  margin-bottom: 0.7rem;
}

.footer-social {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.footer-social a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bone-dim);
  transition: color var(--speed) var(--ease);
}

.footer-social a:hover {
  color: var(--acid-ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink-3);
  color: var(--bone-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   ANIMAZIONI REVEAL (JS + IntersectionObserver)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Ritardi scaglionati per le griglie */
.service-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.service-card.reveal:nth-child(4) { transition-delay: 0.24s; }
.work-card.reveal:nth-child(2)    { transition-delay: 0.1s; }
.work-card.reveal:nth-child(3)    { transition-delay: 0.2s; }

/* Rispetto per chi preferisce meno movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track,
  .pulse-dot { animation: none; }
  body::after { animation: none; inset: 0; }
  .scanlines::after { animation: none; display: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .service-card,
  .work-card { transition: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: rgba(10, 10, 11, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ink-3);
    padding: 1.5rem 1.5rem 2rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease),
                visibility var(--speed);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.4rem;
  }

  .nav-list a {
    display: block;
    padding: 0.8rem 0.4rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bone);
    border-bottom: 1px solid var(--ink-3);
  }
}

@media (max-width: 640px) {
  .container { width: min(1160px, 100% - 2rem); }
  .hero { min-height: auto; padding-top: 8.5rem; }
  .header-actions .btn { display: none; }
  /* Il titolo resta su 2 righe: font più piccolo perché la riga 2
     (oltre l'ULTIMA FRONTIERA.) non deve andare a capo */
  .hero-title {
    font-size: clamp(1.8rem, 9.5vw, 3rem);
    line-height: 1.08;
  }
}

/* ==========================================================================
   V1.1 — DIURNO CHIARO
   Override per il tema chiaro: i pattern "spazio notturno" diventano
   stampa su carta sabbia (stelle scure, griglia inchiostro, glow d'alba).
   ========================================================================== */

/* Fondo pagina + grana pellicola un po' più visibile su chiaro */
body { background: var(--bg); }
body::after { opacity: 0.07; }

/* Divider tratteggiato — inchiostro tenue */
.divider { border-top-color: rgba(233, 161, 43, 0.4); }

/* Campo stellare "diurno": stelle scure stampate + accenti oro/magenta */
.starfield {
  background-image:
    radial-gradient(1px 1px at 18px 30px, rgba(36, 27, 18, 0.5), transparent),
    radial-gradient(1px 1px at 62px 12px, rgba(36, 27, 18, 0.32), transparent),
    radial-gradient(1.5px 1.5px at 96px 54px, rgba(240, 82, 30, 0.55), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(36, 27, 18, 0.28), transparent),
    radial-gradient(1px 1px at 170px 22px, rgba(190, 24, 93, 0.4), transparent);
}

/* Scanline: sole righe orizzontali statiche — scanner verticale rimosso */
.scanlines::before {
  background: repeating-linear-gradient(
    0deg,
    rgba(36, 27, 18, 0.05) 0 1px,
    transparent 1px 3px
  );
}
.scanlines::after {
  display: none; /* scanner verticale disattivato (niente banda in movimento) */
}

/* Griglia prospettica — inchiostro tenue (neutra) */
.grid-floor {
  background-image:
    linear-gradient(rgba(36, 27, 18, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 27, 18, 0.16) 1px, transparent 1px);
  opacity: 0.6;
}

/* Bagliori d'alba: pastello tenui sul fondo chiaro */
.hero-bg::after {
  background:
    radial-gradient(circle at 75% 18%, rgba(240, 82, 30, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(190, 24, 93, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 20% 85%, rgba(233, 161, 43, 0.14) 0%, transparent 50%);
}

/* Badge WANTED: cartellino stampato — inchiostro su carta sabbia */
.badge-wanted {
  font-family: var(--font-rye);
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 4px 4px 0 rgba(240, 82, 30, 0.5);
}

/* Bottoni: la base gestisce già palette e hover — nessun override
   ulteriore per evitare conflitti tra regole duplici. */

/* Header scrollato: carta sabbia con blur */
.site-header.is-scrolled {
  background: rgba(246, 240, 230, 0.9);
}

/* Toggle menu mobile: righe inchiostro */
.nav-toggle span { background: var(--ink); }

/* Marquee: bordi arancio/magenta scuri */
.marquee {
  border-top-color: rgba(240, 82, 30, 0.4);
  border-bottom-color: rgba(190, 24, 93, 0.4);
}

/* Pulsazione: magenta scuro (leggibile in chiaro) */
.pulse-dot { background: var(--magenta); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(190, 24, 93, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(190, 24, 93, 0); }
}

/* I tre "mondi" — versioni diurne, medium saturo per staccare dalla carta */
/* I tre "mondi": tramonto / oro / magenta-prugna (niente blu) */
.work-visual-1 { --c1: #F0521E; --c2: #8F2507; }
.work-visual-2 { --c1: #F9A825; --c2: #7E4A00; }
.work-visual-3 { --c1: #E06BB0; --c2: #8E2450; }

/* CTA: bagliori e stelle diurne */
.cta-section::before {
  background:
    radial-gradient(circle at 50% 120%, rgba(190, 24, 93, 0.14), transparent 60%),
    radial-gradient(1px 1px at 40px 90px, rgba(36, 27, 18, 0.35), transparent),
    radial-gradient(1px 1px at 140px 30px, rgba(240, 82, 30, 0.5), transparent),
    radial-gradient(1px 1px at 220px 120px, rgba(36, 27, 18, 0.28), transparent);
}

/* Menu mobile: pannello carta */
@media (max-width: 900px) {
  .site-nav { background: rgba(251, 247, 240, 0.97); }
}
