@font-face {
  font-family: "Bebas Neue";
  src: url("../fonts/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #151515;
  --panel: #242424;
  --text: #f7f7f4;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.12);
  --pad: clamp(18px, 5vw, 64px);
  --frame: min(100% - (var(--pad) * 2), 1495px);
  --inner: min(100% - (var(--pad) * 2), 1120px);
  --font-main: "Bebas Neue", "Arial Narrow", Impact, Haettenschweiler, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
}

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

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

button,
input,
textarea {
  font: inherit;
  font-family: var(--font-main);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.09;
  background-image: radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px);
  background-size: 31px 31px, 19px 19px;
  mix-blend-mode: overlay;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 34px var(--pad) 22px;
  background: rgba(21, 21, 21, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  font-size: clamp(1.1rem, 1.5vw, 1.42rem);
  font-weight: 900;
  text-align: center;
}

.site-nav,
.header-socials {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(0.9rem, 1vw, 1.08rem);
}

.site-nav a:hover,
.site-nav a.is-active,
.header-socials a:hover {
  color: #fff;
}

.header-socials {
  justify-content: flex-end;
  gap: 18px;
}

.header-socials a,
.hero-socials a {
  display: grid;
  place-items: center;
}

.header-socials a {
  width: 22px;
  height: 22px;
}

.header-socials svg,
.hero-socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 0.28s var(--ease);
}

.menu-toggle.is-open span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.video-page {
  padding-top: 108px;
}

.hero {
  position: relative;
  width: var(--frame);
  aspect-ratio: 1725 / 866;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101010;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 860px);
  --hero-content-offset: clamp(38px, 3.5vw, 54px);
  margin-bottom: 0;
  text-align: center;
  transform: translateY(var(--hero-content-offset));
}

.hero-content.reveal {
  transform: translateY(calc(var(--hero-content-offset) + 24px));
}

.hero-content.reveal.is-visible {
  transform: translateY(var(--hero-content-offset));
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.25vw, 4.35rem);
  line-height: 0.88;
  font-weight: 400;
}

.hero p {
  margin: 12px 0 0;
  font-size: clamp(0.82rem, 1vw, 1.05rem);
  font-weight: 400;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 400;
  text-transform: uppercase;
}

.button:hover {
  background: #fff;
  color: #151515;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.video-grid {
  width: var(--frame);
  margin: 8px auto 0;
}

.project-tile {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 430px;
  margin-bottom: 8px;
  background: var(--panel);
  cursor: pointer;
}

.project-tile.reverse {
  grid-template-columns: 1fr 1.5fr;
}

.project-tile.reverse .tile-media {
  order: 2;
}

.project-tile.reverse .tile-copy {
  order: 1;
}

.tile-media {
  overflow: hidden;
  background: #111;
}

.visual-tile .tile-media {
  min-height: inherit;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  visibility: visible;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.project-tile:hover .tile-media img {
  filter: brightness(0.82);
  transform: scale(1.035);
}

.tile-copy {
  display: grid;
  place-content: center;
  padding: 32px;
  text-align: center;
}

.tile-copy h2 {
  margin: 0;
  font-size: clamp(0.9rem, 1vw, 1.2rem);
  line-height: 1.1;
  font-weight: 600;
}

.visual-tile {
  --accent: #d8ad6a;
  --accent-rgb: 216, 173, 106;
  grid-template-columns: minmax(0, 1.62fr) minmax(390px, 1fr);
  min-height: 650px;
  background: #080808;
}

.sport-tile {
  --accent: #e85a13;
  --accent-rgb: 232, 90, 19;
}

.automotive-tile {
  --accent: #172844;
  --accent-rgb: 23, 40, 68;
}

.social-tile {
  --accent: #c83a2f;
  --accent-rgb: 200, 58, 47;
}

.moda-tile {
  --accent: #f7f7f4;
  --accent-rgb: 247, 247, 244;
}

.visual-copy {
  position: relative;
  overflow: hidden;
  min-height: inherit;
  container-type: inline-size;
  place-content: center;
  padding: 58px 0;
  isolation: isolate;
  background: #050505;
}

.visual-copy h2 {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: none;
  margin: 0;
  color: #fff;
  font-family: var(--font-main);
  font-size: clamp(7rem, 23cqw, 12.4rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.76;
  text-transform: uppercase;
  transform: translateX(7%) scaleX(0.96) scaleY(1.08);
  transform-origin: center;
  text-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
}

.automotive-tile .visual-copy h2,
.social-tile .visual-copy h2 {
  font-size: clamp(4.8rem, 14.5cqw, 8.8rem);
  line-height: 0.8;
  transform: translateX(7%) scaleX(0.92) scaleY(1.08);
}

.moda-tile .visual-copy h2 {
  font-size: clamp(6rem, 18cqw, 10rem);
}

.moda-project .project-content {
  width: min(100% - (var(--pad) * 2), 1380px);
}

.moda-video-grid {
  display: grid;
  gap: clamp(44px, 6vw, 86px);
  justify-items: center;
}

.moda-horizontal {
  width: min(100%, 1080px);
}

.moda-square-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.8vw, 42px);
  width: min(100%, 1180px);
}

.moda-horizontal .project-video-frame {
  aspect-ratio: 16 / 9;
}

.moda-square-grid .project-video-frame {
  aspect-ratio: 1 / 1;
}

.moda-video-grid .project-video-frame video {
  object-fit: contain;
}

.moda-video-grid .project-video-card h3 {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.inner-page {
  width: var(--inner);
  margin: 0 auto;
  padding-top: 170px;
}

.about-page {
  width: min(100% - (var(--pad) * 2), 1320px);
  padding-bottom: 96px;
}

.page-title {
  margin: 0 0 74px;
  text-align: center;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 0.95;
  font-weight: 400;
}

.about-story {
  display: grid;
  justify-items: center;
  gap: clamp(34px, 5vw, 64px);
  margin-top: 0;
}

.about-copy {
  display: grid;
  align-content: center;
  padding: 0;
  text-align: center;
}

.about-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 22px);
  width: min(100%, 820px);
  margin: 0;
}

.about-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-copy h2 {
  max-width: 620px;
  margin: 0 auto 26px;
  font-size: clamp(1.55rem, 2.6vw, 3rem);
  line-height: 0.94;
  font-weight: 400;
}

.about-copy p {
  max-width: 680px;
  margin: 0 auto 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.08rem, 1.45vw, 1.42rem);
  line-height: 1.18;
}

.pill-button {
  display: flex;
  width: fit-content;
  min-width: 130px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin: 26px auto 0;
  padding: 0 24px;
  border-radius: 999px;
  background: #fff;
  color: #151515;
  font-size: 0.82rem;
  font-weight: 900;
}

.contact-page {
  min-height: calc(100svh - 250px);
}

.contact-layout {
  display: grid;
  grid-template-columns: 330px minmax(360px, 630px);
  justify-content: center;
  gap: 10px;
}

.contact-layout img {
  width: 330px;
  height: 404px;
  object-fit: cover;
}

.contact-form {
  display: grid;
  align-content: start;
  gap: 28px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-radius: 2px;
  background: #f4f4f4;
  color: #151515;
  outline: 0;
  padding: 15px 16px;
  font-size: 1.08rem;
}

.contact-form textarea {
  min-height: 164px;
  resize: vertical;
}

.form-trap {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.contact-form button {
  width: 102px;
  min-height: 50px;
  border: 0;
  border-radius: 5px;
  background: #5f5f5f;
  color: #fff;
  cursor: pointer;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 1.4em;
  margin: -12px 0 0;
  color: #5f5f5f;
  font-size: 0.98rem;
}

.form-status.is-success {
  color: #2d6f42;
}

.form-status.is-error {
  color: #9b2f2f;
}

.info-footer {
  width: var(--inner);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin: 70px auto 56px;
  color: rgba(255, 255, 255, 0.68);
}

.contact-info {
  margin-top: 140px;
}

.info-footer h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
  color: rgba(255, 255, 255, 0.68);
}

.info-footer p {
  margin: 7px 0;
  font-weight: 850;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-socials a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.footer-socials svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-page {
  min-height: 100svh;
  padding-top: 108px;
  background: #151515;
  color: var(--text);
}

.project-content {
  width: min(100% - (var(--pad) * 2), 1530px);
  margin: 0 auto;
  padding: 82px 0 90px;
}

.project-heading {
  margin-bottom: 72px;
  text-align: center;
}

.project-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 950;
}

.project-video-list {
  display: grid;
  gap: 70px;
}

.project-social .project-video-list {
  justify-items: center;
}

.project-social .project-video-card {
  width: min(100%, 1180px);
}

.project-social .project-video-frame {
  aspect-ratio: 16 / 9;
}

.project-video-card h3 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 950;
  text-transform: uppercase;
}

/* ---- Pagina Social: fasce con il titolo sotto al video ---- */
.video-solo,
.video-duo {
  width: 100%;
  margin-inline: auto;
}

.video-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
}

/* Due verticali affiancati: senza un tetto di larghezza diventerebbero
   alti quasi il doppio dello schermo. */
.video-duo.is-portrait {
  width: min(100%, 720px);
}

/* Gap piu' stretto fra i due orizzontali: ogni pixel risparmiato qui
   finisce nei riquadri, che restano cosi' i piu' grandi possibili. */
.video-duo.is-landscape {
  gap: clamp(14px, 1.6vw, 24px);
}

.video-solo .project-video-frame,
.video-duo.is-landscape .project-video-frame {
  aspect-ratio: 16 / 9;
}

.video-duo.is-portrait .project-video-frame {
  aspect-ratio: 9 / 16;
}

/* .project-social .project-video-card impone un tetto di 1180px a tutte
   le card della pagina: qui va scavalcato, altrimenti la fascia singola
   resta piu' stretta della coppia sotto e le due file non si allineano. */
.video-solo .project-video-card,
.video-duo .project-video-card {
  width: 100%;
}

.video-solo .project-video-card h3,
.video-duo .project-video-card h3 {
  margin: 18px 0 0;
}

.project-video-frame {
  position: relative;
  overflow: hidden;
  background: #0c0c0c;
  aspect-ratio: 16 / 7.4;
}

.project-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  filter: brightness(0.58) saturate(0.92);
  pointer-events: none;
}

.project-video-frame.is-playing .project-play {
  opacity: 0;
  pointer-events: none;
}

.project-play[hidden] {
  display: none;
}

.project-video-frame.is-playing video {
  filter: none;
  pointer-events: auto;
}

.project-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: clamp(78px, 8vw, 126px);
  height: clamp(78px, 8vw, 126px);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #151515;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.project-play svg {
  width: 36%;
  height: 36%;
  fill: currentColor;
  transform: translateX(8%);
}

.automotive-project .project-content {
  width: min(100% - (var(--pad) * 2), 1480px);
  padding-top: 54px;
}

.automotive-project .project-heading {
  margin-bottom: 54px;
}

.automotive-video-grid {
  display: grid;
  gap: clamp(54px, 7vw, 104px);
}

.automotive-video-grid .project-video-card h3 {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.auto-feature {
  width: min(100%, 1080px);
  justify-self: center;
}

.auto-feature .project-video-frame {
  aspect-ratio: 16 / 9;
}

.auto-triplet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(18px, 2.4vw, 32px);
  width: min(100%, 1480px);
  justify-self: center;
}

.auto-triplet .project-video-card h3 {
  text-align: center;
}

.auto-portrait .project-video-frame {
  aspect-ratio: 9 / 16;
}

.project-sport {
  background: #171717;
}

.project-sport .project-content {
  width: min(100% - (var(--pad) * 2), 1380px);
}

.sport-video-grid {
  display: grid;
  gap: clamp(44px, 6vw, 86px);
  justify-items: center;
}

/* Stessa larghezza per orizzontali e terzetto verticale, cosi' i bordi
   delle tre fasce restano allineati. */
.sport-horizontal,
.sport-portrait-grid {
  width: min(100%, 1080px);
}

.sport-portrait-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(18px, 2.4vw, 32px);
}

.sport-horizontal .project-video-frame {
  aspect-ratio: 16 / 9;
}

.sport-portrait-grid .project-video-frame {
  aspect-ratio: 9 / 16;
}

.sport-video-grid .project-video-card h3 {
  margin: 18px 0 0;
}

.project-video-frame video:fullscreen,
.project-video-frame video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.to-top {
  position: fixed;
  right: 36px;
  bottom: 36px;
  z-index: 65;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #151515;
  cursor: pointer;
}

.to-top svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .site-header {
    width: 100%;
    grid-template-columns: auto 1fr auto;
    padding: 22px 18px 16px;
  }

  .brand {
    text-align: left;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav,
  .header-socials {
    display: none;
  }

  /* backdrop-filter sull'header crea un containing block: senza questa riga
     il menu fixed si ancora all'header (80px) invece che alla finestra,
     e i link finiscono sovrapposti al contenuto della pagina. */
  body.menu-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* brand e pulsante di chiusura devono restare sopra l'overlay del menu,
     altrimenti la X risulta illeggibile e il menu non si chiude. */
  body.menu-open .brand,
  body.menu-open .menu-toggle {
    position: relative;
    z-index: 66;
  }

  .site-nav.is-open {
    position: fixed;
    inset: 0;
    z-index: 65;
    width: 100vw;
    height: 100dvh;
    overflow-y: auto;
    padding: 96px var(--pad) 40px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 30px;
    background: rgba(17, 17, 17, 0.97);
    color: #fff;
    font-size: clamp(2.3rem, 11vw, 4.3rem);
  }

  .video-page {
    padding-top: 84px;
  }

  .hero {
    width: 100%;
    min-height: 520px;
    aspect-ratio: auto;
  }

  .hero-content {
    --hero-content-offset: clamp(32px, 5.5vw, 46px);
  }

  .project-tile,
  .project-tile.reverse,
  .visual-tile,
  .moda-square-grid,
  .about-story,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  /* I due orizzontali si impilano: affiancati su telefono sarebbero
     larghi ~174px. I due verticali invece restano affiancati. */
  .video-duo.is-landscape {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-tile.reverse .tile-media,
  .project-tile.reverse .tile-copy {
    order: initial;
  }

  .project-tile {
    min-height: 0;
  }

  .visual-tile {
    min-height: 0;
  }

  .tile-media {
    min-height: 300px;
  }

  .visual-copy {
    min-height: 320px;
    padding: 44px 18px;
  }

  .visual-copy h2,
  .automotive-tile .visual-copy h2,
  .social-tile .visual-copy h2,
  .moda-tile .visual-copy h2 {
    width: 100%;
    max-width: 100%;
    text-align: center;
    overflow-wrap: anywhere;
    transform: scaleX(0.96) scaleY(1.04);
  }

  .social-tile .visual-copy h2 {
    font-size: clamp(4.1rem, 22cqw, 7rem);
    line-height: 0.86;
  }

  .contact-layout img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .info-footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  :root {
    --pad: 18px;
  }

  .inner-page {
    padding-top: 120px;
  }

  .page-title {
    margin-bottom: 42px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10vw, 3.6rem);
  }

  .hero-actions .button {
    min-width: 140px;
  }

  .tile-copy {
    min-height: 170px;
  }

  .visual-copy h2 {
    font-size: clamp(4.6rem, 25vw, 7.4rem);
  }

  /* I tre verticali restano affiancati come su Social, ma qui sono larghi
     ~106px: il play da 78px li coprirebbe quasi del tutto. */
  .sport-portrait-grid .project-play {
    width: 50px;
    height: 50px;
  }

  .automotive-project .project-content {
    width: calc(100% - 36px);
  }

  .auto-triplet {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .auto-feature {
    width: 100%;
  }

  .about-copy h2,
  .about-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-form {
    gap: 18px;
  }

  .info-footer,
  .contact-info {
    margin-top: 70px;
  }

  .to-top {
    right: 18px;
    bottom: 18px;
  }
}

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