/* Lucca Fracassi — black canvas portfolio. Pure black, white grotesk type,
   photography carries all color. Interactive layer: custom cursor, parallax
   splash, marquee, hover-reveal grid, lightbox, line reveals, magnetic buttons. */
@font-face {
  font-family: "Archivo Black";
  src: url("fonts/archivo-black.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #9a9a9a;
  --line: #262626;
  --gutter: clamp(18px, 4vw, 56px);
  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--black); }
body {
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--white); color: var(--black); }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  animation: grain 900ms steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 1.4%); }
  50% { transform: translate(1.6%, -1%); } 75% { transform: translate(-1%, -1.8%); } 100% { transform: translate(0, 0); }
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px;
  border-radius: 50%; background: var(--white);
  pointer-events: none; z-index: 200;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease;
  display: none;
}
.cursor .cursor-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--black); opacity: 0; transition: opacity .15s ease;
}
.cursor.is-view { width: 84px; height: 84px; mix-blend-mode: normal; }
.cursor.is-view .cursor-label { opacity: 1; }
.cursor.is-link { width: 44px; height: 44px; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  body { cursor: none; }
  a, button, .card { cursor: none; }
}

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,0));
  transition: background .3s ease, padding .3s ease;
}
.site-head.is-solid { background: rgba(0,0,0,.92); padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.wordmark {
  font-family: var(--display); font-size: 19px; letter-spacing: .02em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; gap: clamp(16px, 3vw, 36px); align-items: center; }
.site-nav a {
  text-decoration: none; font-size: 13.5px; letter-spacing: .04em; color: var(--white);
  position: relative; padding: 4px 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--white); transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-ig { border: 1px solid var(--white); border-radius: 999px; padding: 7px 15px !important; }
.nav-ig::after { display: none; }
.nav-ig:hover { background: var(--white); color: var(--black); }

/* ---------- splash ---------- */
.splash { position: relative; height: 100svh; min-height: 540px; overflow: hidden; }
.splash-media { position: absolute; inset: 0; }
.splash-media img {
  width: 100%; height: 112%; object-fit: cover; object-position: center 26%;
  will-change: transform;
}
.splash-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 42%, rgba(0,0,0,.28));
}
.splash-ui {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 9vh;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.splash-loc {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85);
  max-width: 340px;
}
.ghost-btn {
  display: inline-block; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--white); border: 1px solid rgba(255,255,255,.9); border-radius: 999px;
  padding: 15px 34px; background: rgba(0,0,0,.18); backdrop-filter: blur(3px);
  transition: background .25s ease, color .25s ease;
  will-change: transform;
}
.ghost-btn:hover { background: var(--white); color: var(--black); }
.ghost-btn.big { padding: 19px 42px; font-size: 14px; }
.splash-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 1px; height: 52px; background: rgba(255,255,255,.25); overflow: hidden;
}
.splash-scroll span {
  position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--white); animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse { 0% { top: -40%; } 60%, 100% { top: 110%; } }

/* ---------- ticker ---------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 15px 0; }
.ticker-track {
  display: flex; gap: 44px; width: max-content; white-space: nowrap;
  animation: tick 36s linear infinite; align-items: center;
}
.ticker-track span { font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.ticker-track i { font-style: normal; color: var(--grey); font-size: 12px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- work ---------- */
.work { padding: clamp(56px, 9vw, 120px) var(--gutter) 0; }
.work-banner { position: relative; margin: 0 calc(var(--gutter) * -1); height: clamp(240px, 38vw, 430px); overflow: hidden; }
.work-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.work-banner::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.22); }
.banner-title {
  position: absolute; z-index: 2; left: var(--gutter); top: 8%;
  font-family: var(--display); font-size: clamp(64px, 13vw, 178px);
  text-transform: uppercase; line-height: .95; letter-spacing: .01em;
}
.work-note { color: var(--grey); font-size: 14.5px; margin: 26px 0 30px; letter-spacing: .02em; }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.6vw, 38px);
}
.card { position: relative; overflow: hidden; background: #0d0d0d; }
.card img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .8s cubic-bezier(.19, 1, .22, 1), filter .5s ease;
}
.card figcaption {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.48); opacity: 1; transition: opacity .45s ease;
}
.card figcaption span {
  font-family: var(--display); font-size: clamp(17px, 1.8vw, 27px);
  text-transform: uppercase; letter-spacing: .05em; text-align: center; padding: 0 12px;
}
.card:hover figcaption, .card:focus-within figcaption { opacity: 0; }
.card:hover img { transform: scale(1.045); }
html.js .card { opacity: 0; transform: translateY(34px); }
html.js .card.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.19, 1, .22, 1); }

/* ---------- statement ---------- */
.statement { padding: clamp(90px, 14vw, 190px) var(--gutter); text-align: center; }
.statement-text {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(30px, 5.6vw, 76px); line-height: 1.12; max-width: 1050px; margin: 0 auto;
}
.statement-sub { color: var(--grey); margin-top: 26px; font-size: 16px; }
html.js [data-split] .line { display: block; overflow: hidden; }
html.js [data-split] .line > span { display: block; transform: translateY(110%); transition: transform .9s cubic-bezier(.19, 1, .22, 1); }
html.js [data-split].in .line > span { transform: none; }

/* ---------- film ---------- */
.film { padding: 0 var(--gutter) clamp(70px, 10vw, 130px); }
.section-title {
  font-family: var(--display); font-size: clamp(52px, 9vw, 120px);
  text-transform: uppercase; line-height: 1; margin-bottom: 38px;
}
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.6vw, 38px); }
.reel-card { position: relative; display: block; overflow: hidden; text-decoration: none; background: #0d0d0d; }
.reel-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s cubic-bezier(.19, 1, .22, 1); }
.reel-card:hover img { transform: scale(1.05); }
.reel-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 55%); }
.reel-meta { position: absolute; z-index: 2; left: 16px; bottom: 14px; font-size: 14.5px; }
.reel-meta strong { font-family: var(--display); font-size: 19px; letter-spacing: .02em; }
.reel-play {
  position: absolute; z-index: 2; top: 14px; right: 14px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.85); border-radius: 999px; padding: 7px 13px;
  background: rgba(0,0,0,.25); transition: background .25s, color .25s;
}
.reel-card:hover .reel-play { background: var(--white); color: var(--black); }

/* ---------- about ---------- */
.about {
  border-top: 1px solid var(--line);
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  max-width: 1100px;
}
.about-title {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(44px, 8.4vw, 116px); line-height: 1.02; margin-bottom: 40px;
}
.about-text { color: #d8d8d8; max-width: 640px; margin-bottom: 20px; font-size: 18px; }
.about .ghost-btn { margin-top: 18px; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 26px var(--gutter);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--grey); letter-spacing: .05em;
}
.site-foot a { color: var(--grey); text-decoration: none; }
.site-foot a:hover { color: var(--white); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.96);
  display: grid; place-items: center; padding: 26px;
}
.lightbox[hidden] { display: none; }
.lb-figure { max-width: min(1180px, 94vw); }
.lb-figure img { max-height: 78vh; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.lb-bar {
  display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap;
  margin-top: 16px; font-size: 14px; color: var(--grey);
}
.lb-bar #lbCap { font-family: var(--display); color: var(--white); text-transform: uppercase; font-size: 16px; letter-spacing: .04em; }
.lb-bar a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--white); margin-left: auto; }
.lb-close, .lb-nav {
  position: absolute; background: none; border: 1px solid rgba(255,255,255,.4);
  color: var(--white); border-radius: 999px; width: 48px; height: 48px;
  font-size: 17px; display: grid; place-items: center; transition: background .2s, color .2s;
}
.lb-close:hover, .lb-nav:hover { background: var(--white); color: var(--black); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .reels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .wordmark { font-size: 15.5px; }
  .site-nav a:not(.nav-ig) { display: none; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .card img { aspect-ratio: 1 / 1; }
  .card figcaption span { font-size: 8.5px; letter-spacing: .02em; line-height: 1.25; padding: 0 2px; }
  .work { padding-top: 44px; }
  .reels { grid-template-columns: 1fr; }
  .splash-ui { bottom: 11vh; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-nav { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .grain, .splash-scroll span { animation: none; }
  html { scroll-behavior: auto; }
  html.js .card { opacity: 1; transform: none; }
  html.js [data-split] .line > span { transform: none; }
}
