/* alessiocagnano.com, v0.1 preview. Brand tokens from brand-tokens.css v1.3 (brand colours only). */
:root {
  --ac-near-black: #0F0F0F;
  --ac-graphite: #1A1A1A;
  --ac-ivory: #F2F1EE;
  --ac-mid-grey: #8A8A8A;
  --ac-fjord: #788D91;
  --ac-font-display: "Jost", Futura, "Century Gothic", sans-serif;
  --ac-font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --ac-tracking-label: 0.24em;
  --pad: 40px;
  --gap: 6px;
  --logo-w: 280px;   /* larghezza del logo nell'header */
  --nav-size: 12px;  /* misura delle voci del menu */
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ac-near-black); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ac-near-black); color: var(--ac-ivory);
  font-family: var(--ac-font-body); font-weight: 300; font-size: 17px; line-height: 1.65;
}
main { flex: 1; }
a { color: var(--ac-ivory); text-decoration: none; }
a:hover { color: var(--ac-fjord); }
:focus-visible { outline: 1px solid var(--ac-fjord); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }

/* Labels and headings: Jost uppercase, tracked */
.label, h1, h2, nav a, .btn, .pn a {
  font-family: var(--ac-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--ac-tracking-label);
}
.label { font-size: 12px; color: var(--ac-mid-grey); margin: 0 0 14px; }
h1 { font-size: 26px; font-weight: 500; margin: 0 0 12px; line-height: 1.3; }
h2 { font-size: 12px; color: var(--ac-mid-grey); margin: 56px 0 14px; }

/* Header */
header.site { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 28px var(--pad); }
header.site .logo img { width: var(--logo-w); height: auto; }
nav { display: flex; gap: 36px; }
nav a { font-size: var(--nav-size); padding: 4px 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--ac-ivory); border-bottom-color: var(--ac-fjord); }
.scrim { position: absolute; top: 0; left: 0; right: 0; height: 160px; background: linear-gradient(to bottom, rgba(15,15,15,.75), rgba(15,15,15,0)); pointer-events: none; z-index: 4; }

/* Home hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: var(--ac-near-black); }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.btn { display: inline-block; font-size: 13px; color: var(--ac-ivory); background: rgba(15,15,15,.6); border: 1px solid var(--ac-fjord); padding: 14px 26px; cursor: pointer; }
.btn:hover { color: var(--ac-ivory); background: rgba(15,15,15,.85); }
.hero .btn { position: absolute; left: var(--pad); bottom: 40px; z-index: 3; }

/* Work grid */
.work { padding: var(--gap); }
.work-head { padding: 56px var(--pad) 18px; }
.page-work .work { padding-top: 110px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tile { display: block; }
.tile .thumb { aspect-ratio: 16 / 9; background: var(--ac-graphite); }
.tile .thumb img { width: 100%; height: 100%; object-fit: contain; }
.tile .cap { height: 64px; padding-top: 10px; opacity: 0; transition: opacity .2s; }
.tile .cap::before { content: ""; display: block; width: 24px; border-top: 1px solid var(--ac-fjord); margin-bottom: 8px; }
.tile .cap .t { display: block; font-family: var(--ac-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--ac-tracking-label); font-size: 13px; line-height: 1.3; color: var(--ac-ivory); }
.tile .cap .m { display: block; font-size: 13px; color: var(--ac-mid-grey); line-height: 1.4; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
@media (hover: none) { .tile .cap { opacity: 1; } }

/* Pages with text */
.page { padding: 150px var(--pad) 80px; max-width: 980px; }
.page p { margin: 0 0 18px; }
.page .intro { font-size: 21px; line-height: 1.55; max-width: 780px; }
.page .mail { font-family: var(--ac-font-display); font-size: 28px; letter-spacing: 0.04em; border-bottom: 1px solid var(--ac-fjord); padding-bottom: 4px; }
.page .mail:hover { color: var(--ac-ivory); }
.page ul.links { list-style: none; padding: 0; margin: 0; display: flex; gap: 32px; flex-wrap: wrap; }
.page ul.links a { border-bottom: 1px solid var(--ac-fjord); }
.placeholder { color: var(--ac-mid-grey); }
.more { margin-top: 56px; }

/* Project page */
.proj { padding: 130px var(--pad) 60px; max-width: 1500px; margin: 0 auto; }
.back { font-family: var(--ac-font-display); text-transform: uppercase; letter-spacing: var(--ac-tracking-label); font-size: 12px; color: var(--ac-mid-grey); display: inline-block; margin-bottom: 26px; }
.back:hover { color: var(--ac-ivory); }
.caption { color: var(--ac-mid-grey); font-size: 15px; margin: 0 0 14px; }
.proj .txt { max-width: 720px; margin: 0 0 34px; }
.block { margin-bottom: 48px; }
.player, .compare { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .play { position: absolute; inset: 0; width: 100%; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.player .play svg { width: 72px; height: 72px; }
.player .play:hover svg circle, .player .play:hover svg path { stroke: var(--ac-ivory); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare .final { clip-path: inset(0 0 0 50%); }
.compare .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ac-fjord); pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-labels { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--ac-font-display); font-size: 12px; letter-spacing: var(--ac-tracking-label); text-transform: uppercase; color: var(--ac-mid-grey); }
.pn { display: flex; justify-content: space-between; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--ac-graphite); }
.pn a { font-size: 12px; color: var(--ac-mid-grey); }
.pn a:hover { color: var(--ac-ivory); }

/* Reel dialog */
dialog#reel { border: 0; padding: 0; background: var(--ac-near-black); width: min(94vw, 1600px); max-width: none; color: var(--ac-ivory); }
dialog#reel::backdrop { background: rgba(0,0,0,.92); }
dialog#reel video { width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
dialog#reel .x { display: block; margin: 0 0 0 auto; padding: 14px 6px; background: none; border: 0; color: var(--ac-mid-grey); cursor: pointer; font-family: var(--ac-font-display); font-size: 12px; letter-spacing: var(--ac-tracking-label); text-transform: uppercase; }
dialog#reel .x:hover { color: var(--ac-ivory); }

/* Footer */
footer.site { display: flex; gap: 28px; padding: 28px var(--pad); font-size: 13px; color: var(--ac-mid-grey); border-top: 1px solid var(--ac-graphite); margin-top: 40px; }
footer.site a { color: var(--ac-mid-grey); }
footer.site a:hover { color: var(--ac-ivory); }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  :root { --pad: 20px; }
  .grid { grid-template-columns: 1fr; }
  header.site { padding: 20px var(--pad); }
  :root { --logo-w: 140px; --nav-size: 11px; }
  nav { gap: 16px; }
  nav a { letter-spacing: 0.18em; }
  .page, .proj { padding-top: 110px; }
  .page-work .work { padding-top: 90px; }
  .page .mail { font-size: 21px; }
  .hero .btn { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { .tile .cap { transition: none; } }
