/* ulisse.imaginaria.eu — Luigi Ulisse Iovane */
:root {
  --bg: #fff;
  --ink: #000;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --side: 210px;
  --gutter: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 "Work Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .55; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- sidebar ---------- */
.side {
  position: fixed;
  top: 0; left: 0;
  width: var(--side);
  padding: 44px 0 0 var(--gutter);
  z-index: 20;
}
.brand {
  display: block;
  font: 200 22px/1.1 "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: .01em;
  white-space: nowrap;
  margin-bottom: 64px;
}
.side nav a {
  display: block;
  font: 200 19px/1.38 "Oswald", sans-serif;
}
.side nav a.on { font-weight: 300; }
.burger { display: none; }

/* ---------- content ---------- */
main {
  flex: 1;
  margin-left: var(--side);
  padding: 120px var(--gutter) 40px;
}
footer {
  margin-left: var(--side);
  padding: 24px var(--gutter) 40px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* home slideshow */
.home main { padding-top: 0; padding-bottom: 0; display: flex; }
.slideshow {
  position: relative;
  flex: 1;
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
}
.slide {
  margin: 0;
  position: absolute; inset: 60px 70px 20px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .6s ease;
  pointer-events: none;
}
.slide.is-on { opacity: 1; pointer-events: auto; }
.slide img { max-height: 100%; width: auto; object-fit: contain; }
.slideshow button {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer;
  font: 200 46px/1 "Oswald", sans-serif; color: #444; padding: 12px;
}
.slideshow .prev { left: 0; }
.slideshow .next { right: 0; }

/* text pages */
.text { max-width: 640px; margin: 0 auto; }
.text p { margin: 0 0 1.4em; text-align: justify; hyphens: auto; }
.text.center p { text-align: center; }
.text h2 { font: 300 18px/1.3 "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .04em; margin: 2.2em 0 .8em; }
.links { list-style: none; padding: 0; margin: 0; }
.links li { margin-bottom: .8em; }
.links a { border-bottom: 1px solid currentColor; }
.muted { color: var(--muted); font-size: 13px; }

/* works */
.works { list-style: none; padding: 0; margin: 0 auto; text-align: center; font-size: 17px; line-height: 1.9; }
.works a:hover { opacity: 1; border-bottom: 1px solid; }

/* series */
.intro { max-width: 470px; margin: 0 auto 70px; }
.intro h1 { font: 400 20px/1.3 "Work Sans", sans-serif; text-align: center; margin: 0 0 1.6em; }
.intro h1.caps { font: 200 22px/1.3 "Oswald", sans-serif; text-transform: uppercase; }
.intro p { font-size: 14px; margin: 0 0 1.4em; }
.intro p.justify { text-align: justify; letter-spacing: .02em; }

.grid { column-gap: 24px; }
.grid.cols4 { columns: 4; }
.grid.cols3 { columns: 3; }
.grid.narrow { max-width: 900px; margin: 0 auto; }
.tile { display: block; break-inside: avoid; margin-bottom: 24px; cursor: zoom-in; }
.tile.framed { background: #f4f4f2; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tile:hover { opacity: .85; }

/* video */
.videos { max-width: 860px; margin: 0 auto; }
.video { margin: 0 0 64px; }
.ratio { position: relative; padding-top: 56.25%; background: #111; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { text-align: center; margin-top: 12px; font-size: 14px; }

/* single image pages */
.single { margin: 0 auto; max-width: 980px; }
.single img { margin: 0 auto; }

/* contact */
.lead { font-size: 15px; }
.contact { margin: 40px auto 0; text-align: left; max-width: 460px; display: grid; gap: 16px; }
.contact label { display: grid; gap: 6px; font: 300 14px/1 "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.contact input, .contact textarea {
  font: inherit; font-family: "Work Sans", sans-serif; text-transform: none; letter-spacing: 0;
  font-size: 15px; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 0; background: #fff; color: #000;
}
.contact input:focus, .contact textarea:focus { outline: none; border-color: #000; }
.contact button {
  justify-self: start; background: #000; color: #fff; border: 0; padding: 12px 28px; cursor: pointer;
  font: 300 15px/1 "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .08em;
}
.contact button:disabled { opacity: .4; cursor: wait; }
.contact .hp { position: absolute; left: -9999px; }
.status { min-height: 1.4em; margin: 0; font-size: 14px; }
.ig { margin-top: 48px; }
.ig a { border-bottom: 1px solid; }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.97);
  display: none; align-items: center; justify-content: center;
}
.lb.open { display: flex; }
.lb img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); width: auto; height: auto; }
.lb button {
  position: absolute; background: none; border: 0; cursor: pointer; color: #333;
  font: 200 44px/1 "Oswald", sans-serif; padding: 14px;
}
.lb .x { top: 10px; right: 16px; font-size: 34px; }
.lb .p { left: 10px; top: 50%; transform: translateY(-50%); }
.lb .n { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid.cols4 { columns: 3; }
}
@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .side {
    position: sticky; width: 100%; padding: 16px var(--gutter);
    background: var(--bg); display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .brand { margin: 0; font-size: 19px; }
  .burger {
    display: grid; gap: 6px; background: none; border: 0; padding: 8px 0 8px 8px; cursor: pointer;
  }
  .burger span { display: block; width: 24px; height: 1px; background: #000; }
  .side nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--line);
  }
  .side.open nav { display: block; }
  .side nav a { font-size: 22px; line-height: 1.6; }
  main, footer { margin-left: 0; }
  main { padding: 40px var(--gutter) 24px; }
  .home main { padding: 0; }
  .slideshow { min-height: calc(100vh - 120px); }
  .slide { inset: 16px 36px; }
  .slideshow button { font-size: 36px; padding: 6px; }
  .grid.cols4, .grid.cols3 { columns: 2; column-gap: 12px; }
  .tile { margin-bottom: 12px; }
  .tile.framed { padding: 8px; }
  .intro { margin-bottom: 40px; }
  .lb img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); }
  .lb .p, .lb .n { top: auto; bottom: 10px; transform: none; }
}
@media (max-width: 420px) {
  .grid.cols4, .grid.cols3 { columns: 1; }
}
