/* giacomosoranzio.com — custom rebuild of the Cargo site (1:1 base) */

@font-face {
  font-family: "Gambarino";
  src: url("/fonts/Gambarino-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Cargo scaled the root size with the viewport: 1.44vh on desktop, 2.24vw on mobile */
html { font-size: 1.44vh; --pad: 1.5rem; }
@media (orientation: portrait), (max-width: 600px) {
  html { font-size: 2.24vw; --pad: 0.8rem; }
}

* { box-sizing: border-box; --fsc: 1; }
html, body { margin: 0; background: #000; color: #fff; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: 0.035em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: #fff; text-decoration: none; }
a.active { color: #ff0000; }
a:active { opacity: .7; color: #ff0000; }
img, video, iframe { display: block; max-width: 100%; }
figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }

h1 {
  font-family: Gambarino, Georgia, serif;
  font-weight: 400;
  margin: 0;
  font-size: calc(4.6rem * var(--fsc));
  line-height: .85;
  letter-spacing: 0;
}
h1 a:hover { color: #ff0000; }
h2 {
  font-family: VT323, monospace;
  font-weight: 400;
  margin: 0;
  font-size: calc(2.3rem * var(--fsc));
  line-height: 1;
  letter-spacing: .025em;
}
h2 a:hover { color: #ff0000; }
.small-caps { font-variant: small-caps; text-transform: lowercase; }
.caption {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: calc(1.2rem * var(--fsc));
  line-height: 1.3;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .4);
}
.funky {
  font-family: VT323, monospace;
  font-size: calc(3.85rem * var(--fsc));
  line-height: .85;
  color: rgba(255, 255, 255, .85);
  display: block;
}
.funky a, .funky a:hover { color: #ff0000; }
.overlay-text-522611 { font-family: VT323, monospace; font-size: calc(.95rem * var(--fsc)); }
.overlay-text-522611 a:hover { color: red; }
blockquote { margin: 0; padding: 0 0 0 2em; }
sup { position: relative; vertical-align: baseline; top: -.4em; }

@media (orientation: portrait), (max-width: 600px) {
  h1 { font-size: calc(3.45rem * var(--fsc)); }
  h2 { font-size: calc(2.9rem * var(--fsc)); }
  .funky { font-size: calc(3.5rem * var(--fsc)); }
  .overlay-text-522611 { font-size: calc(2.6rem * var(--fsc)); }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; width: 100%; padding: .12em 0; margin: -.12em 0; }
.mq-track { display: inline-flex; animation: mq calc(var(--len, 60) * 1s / var(--speed, 10) * 6) linear infinite; }
.mq-item { flex: none; padding-right: 1em; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } }

/* ---------- chrome ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: #ff0000; color: #000;
  font-family: VT323, monospace; font-size: calc(2.5rem * .79); line-height: 1.2;
}
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem;
  align-items: start;
  padding: 3rem var(--pad) 0;
  pointer-events: none;
}
.topnav > * { pointer-events: auto; }
.logo { grid-column: 1 / span 7; font-size: calc(4.6rem * 1.6); line-height: .55; color: rgb(255, 241, 241); justify-self: start; }
.logo a { color: rgb(255, 241, 241); }
.logo a:hover { color: #ff0000; }
.about-btn {
  grid-column: 9 / span 4; justify-self: start;
  font-size: calc(2.3rem * .85); line-height: .85;
  border: .2rem solid rgba(255, 255, 255, .85); border-radius: .75rem;
  padding: .3rem 1.6rem .5rem;
}
.icons {
  position: fixed; top: 3.4rem; right: var(--pad); z-index: 21;
  display: flex; gap: 1rem;
}
.icons a { display: block; width: 2.6rem; height: 2.6rem; }
.icons svg { width: 100%; height: 100%; }
.icons a:hover { color: #ff0000; }

.page { padding: 14.1rem var(--pad) 22rem; min-height: 100vh; }
.layout { max-width: calc(var(--maxw, 67%) - 2 * var(--pad)); margin: 0 auto; }

.foot-desktop {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(.99rem); backdrop-filter: blur(.99rem);
  padding: 1rem var(--pad) 2.6rem;
}
.menu { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem; }
.menu h2 { line-height: 1.3; color: rgba(255, 255, 255, .97); white-space: nowrap; }
.menu h2:nth-child(1) { grid-column: 1 / span 2; }
.menu h2:nth-child(2) { grid-column: 3 / span 2; text-align: center; }
.menu h2:nth-child(3) { grid-column: 5 / span 4; text-align: center; }
.menu h2:nth-child(4) { grid-column: 9 / span 2; }
.menu h2:nth-child(5) { grid-column: 11 / span 2; text-align: right; }
.foot-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.4rem; }
.foot-row h1 { --fsc: .6; line-height: 1; }
.foot-row .mail i { font-style: normal; }

.menu-mobile, .foot-mobile, .home-m { display: none; }

/* ---------- contacts overlay ---------- */
.contacts {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .86);
  -webkit-backdrop-filter: blur(.4rem); backdrop-filter: blur(.4rem);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.contacts .funky { line-height: .6; color: #000; }
.contacts .close { color: #ff0000; font-family: VT323, monospace; font-size: 1.2em; line-height: 1; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; cursor: zoom-out;
  background: rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(.32rem); backdrop-filter: blur(.32rem);
  display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- content blocks ---------- */
.mi { position: relative; width: var(--w, 100%); max-width: 100%; margin: 0 auto; }
.mi img, .mi video, .mi iframe { width: 100%; height: 100%; border-radius: 1.2rem; object-fit: cover; }
.mi.embed iframe { position: absolute; inset: 0; border: 0; }
.mi.embed { width: var(--w, 100%); }
.mi[style*="--h"] { height: var(--h); width: auto; aspect-ratio: auto; display: inline-block; }
.mi[style*="--h"] img, .mi[style*="--h"] video { height: var(--h); width: auto; }
.mi.fit img, .mi.fit video { max-height: calc(100vh - 20rem); width: auto; margin: 0 auto; }
.mi.fit { aspect-ratio: auto !important; }
.mi a { display: block; height: 100%; }
.mi a.zoom { cursor: zoom-in; }
.mi a.linked:active img, .mi a.linked:active video { opacity: .7; }

.cs { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.cu { grid-column: span var(--span); min-width: 0; }

.ggrid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--gap); align-items: center; }
.ggrid > .mi { --w: 100%; }
.ggrid > .mi[style*="--w"] { width: var(--w); }

.gjust { position: relative; display: flex; flex-wrap: wrap; gap: var(--gap); }
.gjust > .mi { flex: none; margin: 0; }

.gcol { position: relative; }
.gcol > .mi { position: absolute; margin: 0; }
.gcol:not(.ready) > .mi { position: relative; margin-bottom: var(--gap); }

/* ---------- home ---------- */
.page-home { display: flex; align-items: flex-start; justify-content: center; padding-top: 12.7rem; }
.home-d { text-align: center; }
.home-d .mi { display: inline-block; }
.page-home .caption { color: #fff; }
.home-d .mi video { height: 34rem; width: auto; }
.home-d figcaption { margin-top: 3.2rem; width: 0; min-width: 100%; }

/* ---------- about ---------- */
.slitscan { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
.kind-about .page { position: relative; z-index: 0; }
.kind-about h1 .marquee { line-height: .65; }
.kind-about h1 { margin-top: .4rem; }

/* ---------- mobile ---------- */
@media (orientation: portrait), (max-width: 600px) {
  .page { padding: 16rem var(--pad) 22rem; }
  .layout { max-width: 100%; }
  .topnav { padding-top: 3.4rem; grid-template-columns: 1fr; row-gap: 2.4rem; }
  .logo { grid-column: 1; font-size: calc(3.45rem * 1.6); }
  .about-btn { grid-column: 1; font-size: calc(2.9rem * .85); }
  .icons { top: 3.6rem; gap: .9rem; }
  .icons a { width: 2.7rem; height: 2.7rem; }

  .cs.mstack { grid-template-columns: 1fr; column-gap: 0; }
  .cs.mstack > .cu { grid-column: 1; }
  .cs.mstack > .cu.empty { display: none; }
  .cs { column-gap: var(--mgap); }
  .ggrid { grid-template-columns: repeat(var(--mcols), 1fr); gap: var(--mgap); }
  .gjust { gap: var(--mgap); }

  .foot-desktop, .home-d { display: none; }
  .home-m { display: block; text-align: center; width: 100%; }
  .page-home { padding-top: 16rem; }
  .home-m .mi video { width: 100%; height: auto; }

  .menu-mobile {
    display: flex; flex-wrap: wrap; justify-content: center; column-gap: 3rem; row-gap: 1.2rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 2.4rem 1rem 6rem;
    background: rgba(0, 0, 0, .4);
    -webkit-backdrop-filter: blur(.4rem); backdrop-filter: blur(.4rem);
    font-family: VT323, monospace; font-size: calc(2.6rem * .9); line-height: .85;
  }
  .menu-mobile .br { flex-basis: 100%; height: 0; }
  .foot-mobile { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; text-align: center; padding: 0 var(--pad) 3rem; }
  .foot-mobile h1 { --fsc: .9; }
  .foot-mobile i { font-style: normal; }
  .blink { animation: blink 2s steps(1) infinite; }
  @keyframes blink { 50% { opacity: .15; } }
  .lightbox { padding: 10px; }
}
