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

:root {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --bg-3: #16161a;
  --fg: #f4f4f2;
  --muted: #9a9a9f;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ffffff;      /* bianco & nero */
  --accent-dim: #b8b8bc;
  --radius: 14px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; }

/* Logo: PNG nero -> bianco su fondo scuro */
.logo-img,
.footer-logo { filter: invert(1) brightness(1.6); }

/* ===================== HEADER ===================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease);
}
/* Scrim di default: garantisce leggibilità della barra anche su immagini chiare */
.site-header {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12) 70%, transparent);
}
.site-header.scrolled {
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--line);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.logo-img { height: 40px; width: auto; filter: invert(1) brightness(1.6) drop-shadow(0 1px 5px rgba(0, 0, 0, 0.5)); }

.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(244, 244, 242, 0.82);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 1.2rem; }
.lang-switch { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font: inherit; padding: 0.15rem; letter-spacing: 0.03em;
  transition: color 0.2s var(--ease);
}
.lang-switch button.is-active { color: var(--accent); }
.lang-switch button:hover { color: var(--fg); }
.lang-sep { color: var(--line); }

/* Mobile menu toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--fg); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(10, 10, 11, 0.97);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 600; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Placeholder animato dello showreel (finché non c'è il video vero) */
.hero-placeholder {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(232,255,89,0.10), transparent 60%),
    radial-gradient(ellipse 70% 70% at 80% 70%, rgba(90,120,255,0.12), transparent 60%),
    linear-gradient(120deg, #0c0c12, #141018 40%, #0a0a0b);
  background-size: 200% 200%;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { background-position: 0% 0%, 100% 100%, 0 0; }
  to   { background-position: 100% 50%, 0% 30%, 0 0; }
}
.grain {
  position: absolute; inset: -50%; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.08; mix-blend-mode: overlay;
  animation: grainShift 0.6s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0,0); } 33% { transform: translate(-3%,2%); }
  66% { transform: translate(2%,-2%); } 100% { transform: translate(0,0); }
}
.scanline {
  position: absolute; left: 0; right: 0; height: 40vh; z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(232,255,89,0.04), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan { from { top: -40vh; } to { top: 100vh; } }

.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(10,10,11,0.35), rgba(10,10,11,0.55) 60%, var(--bg));
}
.hero-content { position: relative; z-index: 3; max-width: 900px; }
.hero-logo {
  height: clamp(70px, 13vw, 150px);
  width: auto; margin: 0 auto 2rem;
  filter: invert(1) brightness(2) drop-shadow(0 6px 30px rgba(0,0,0,0.6));
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.35em; font-size: 0.75rem;
  color: var(--accent-dim); font-weight: 600; margin-bottom: 1.2rem;
}
.hero-title { font-size: clamp(2.6rem, 8vw, 6rem); font-weight: 700; }
.hero-title span { display: block; }
.hero-title .accent { color: var(--accent); font-style: italic; }
.hero-sub { margin: 1.6rem auto 0; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem); max-width: 540px; }

.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2.4rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.7rem; border-radius: 100px;
  font-weight: 600; font-size: 0.92rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #101012; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); transform: translateY(-2px); }

.scroll-hint {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.25em; color: var(--muted);
}
.scroll-arrow { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.4; transform: scaleY(0.7);} 50% { opacity: 1; transform: scaleY(1);} }

/* ===================== SECTIONS ===================== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) clamp(1.2rem, 4vw, 2rem); }
.section-head { max-width: 620px; margin-bottom: 3.2rem; }
.section-index { display: inline-block; font-family: 'Space Grotesk'; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.2em; margin-bottom: 0.8rem; }
.section-head h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.section-lead { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.service-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.45); background: var(--bg-3); }
.service-card h3 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.service-card > p { color: var(--muted); margin-bottom: 1.4rem; }
.service-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.service-list li { position: relative; padding-left: 1.4rem; font-size: 0.94rem; color: var(--fg); }
.service-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* Works */
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.work-card { display: flex; flex-direction: column; gap: 0.85rem; }
.work-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; border: 1px solid var(--line);
}
.work-thumb { position: absolute; inset: 0; z-index: 0; transition: transform 0.6s var(--ease); }
.work-media:hover .work-thumb { transform: scale(1.06); }
.work-caption {
  font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 1.02rem;
  color: var(--fg); letter-spacing: -0.01em;
}
.work-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.3rem; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 65%);
  opacity: 0.85; transition: opacity 0.4s var(--ease); pointer-events: none;
}
.work-card:hover .work-overlay { opacity: 1; }
.work-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 0.3rem; }
.work-title { font-family: 'Space Grotesk'; font-weight: 600; font-size: 1.15rem; }
.work-play {
  position: absolute; top: 50%; left: 50%; z-index: 3; transform: translate(-50%,-50%) scale(0.8);
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.95);
  display: grid; place-items: center; opacity: 0.9; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none; box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.work-media:hover .work-play { opacity: 1; transform: translate(-50%,-50%) scale(1.08); }
.work-play::before { content: ""; border-left: 15px solid #101012; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }

/* Video modal (player) */
.video-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 6, 8, 0.94); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 4vw;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.video-modal.open { display: flex; opacity: 1; }
.video-modal-inner { width: min(1120px, 100%); }
.video-modal-player {
  width: 100%; max-height: 84vh; border-radius: 12px; background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); display: block;
}
.video-modal-close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2.2rem);
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.video-modal-close:hover { background: #fff; color: #000; }

/* Card link (nelle service card) */
.card-link {
  display: inline-block; margin-top: 1.4rem; font-size: 0.9rem; font-weight: 600;
  color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 2px;
  transition: border-color 0.25s var(--ease);
}
.card-link:hover { border-color: var(--fg); }

/* Renting */
.rent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.rent-card {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.rent-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.4); }
.rent-media {
  position: relative; aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1c1c1f, #2e2e33);
}
.rent-van { background: linear-gradient(135deg, #16161a, #34343a); }
.rent-komodo { background: radial-gradient(ellipse at center, #1e1e22, #0d0d0f); }
.rent-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.rent-van img { object-fit: cover; }
.rent-komodo img { object-fit: contain; padding: 1.6rem; }
.rent-media::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: overlay;
}
.rent-media-label {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.28); font-size: clamp(1rem, 2.6vw, 1.5rem);
}
.rent-body { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
.rent-tag {
  align-self: flex-start; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 0.3rem 0.8rem; margin-bottom: 1rem;
}
.rent-body h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.rent-body > p { color: var(--muted); font-size: 0.96rem; margin-bottom: 1.4rem; }
.spec { margin-bottom: 1.6rem; }
.spec > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-top: 1px solid var(--line);
}
.spec > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: 0.85rem; }
.spec dd { text-align: right; font-size: 0.9rem; font-weight: 500; }
.rent-body .btn { margin-top: auto; align-self: flex-start; }

/* About */
.about-inner { max-width: var(--maxw); }
.about-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 3.5rem;
}
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-photos img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about-photos img:nth-child(2) { transform: translateY(1.8rem); }
.about-text { display: flex; flex-direction: column; gap: 1.4rem; }
.about-text p { color: var(--muted); font-size: 1.08rem; }
.clients { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.clients-title { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 1.8rem; }
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.client {
  display: grid; place-items: center; min-height: 120px; padding: 1.6rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.client:hover { border-color: rgba(255,255,255,0.35); background: var(--bg-3); }
.client img {
  max-height: 64px; max-width: 100%; width: auto; object-fit: contain;
  opacity: 0.9; transition: opacity 0.3s var(--ease);
}
.client:hover img { opacity: 1; }

/* Contact */
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; }
.contact-info { display: flex; flex-direction: column; gap: 0.4rem; }
.contact-line {
  display: flex; flex-direction: column; gap: 0.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
a.contact-line:hover { padding-left: 0.6rem; }
.contact-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }
.contact-value { font-family: 'Space Grotesk'; font-size: 1.25rem; }
.socials { display: flex; gap: 1.4rem; margin-top: 1.6rem; }
.socials a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s var(--ease); }
.socials a:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.85rem 1rem; color: var(--fg); font: inherit; font-size: 0.95rem; resize: vertical;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-3); }
.contact-form .btn { align-self: flex-start; margin-top: 0.4rem; }
.form-note { color: var(--accent); font-size: 0.9rem; }

/* FWW nav link (work in progress) */
.fww-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.05em;
  color: var(--fg); border: 1px solid var(--line); border-radius: 100px; padding: 0.32rem 0.75rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.fww-link:hover { border-color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.wip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* FWW teaser (homepage) */
.fww-teaser {
  text-align: center; padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255,255,255,0.05), transparent 70%),
    var(--bg-2);
}
.fww-teaser .wip-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 100px; padding: 0.4rem 0.9rem; margin-bottom: 1.6rem;
}
.fww-name {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(3rem, 12vw, 7rem); font-weight: 700;
  letter-spacing: 0.02em; line-height: 1; margin-bottom: 1.2rem;
}
.fww-lead { color: var(--muted); max-width: 520px; margin: 0 auto 2rem; font-size: 1.05rem; }

/* Footer */
.site-footer { text-align: center; padding: 4rem 1.5rem 3rem; border-top: 1px solid var(--line); }
.footer-logo { height: 34px; margin: 0 auto 1rem; }
.footer-tag { color: var(--muted); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; }
.footer-legal { color: var(--muted); font-size: 0.8rem; margin-top: 1.4rem; opacity: 0.8; }
.footer-copy { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }

/* ===================== REVEAL ANIMATION ===================== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .rent-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content { grid-template-columns: 1fr; }
  .about-photos img:nth-child(2) { transform: none; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
