@font-face {
  font-family: "Innovator Grotesk VF";
  src: url("assets/InnovatorGroteskVF-VF.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: block;
}

:root {
  --blue: #130CF2;
  --page-pad: 24px;
  --sidebar-w: 152px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
.sidebar::-webkit-scrollbar { display: none; }

body {
  background: #fff;
  color: var(--blue);
  font-family: "Innovator Grotesk VF", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: var(--page-pad);
}

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

/* ---------- sidebar ---------- */

.sidebar {
  position: absolute;
  top: var(--page-pad);
  left: var(--page-pad);
  width: var(--sidebar-w);
}

/* pin contacts to the bottom edge when the viewport is tall enough;
   otherwise the sidebar scrolls with the page and contacts stay in flow */
@media (min-width: 801px) and (min-height: 840px) {
  .sidebar {
    position: fixed;
    bottom: var(--page-pad);
    display: flex;
    flex-direction: column;
  }
  .sidebar-blocks {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .sidebar-blocks .contacts {
    margin-top: auto;
    padding-top: 30px;
  }
}

.logo {
  display: flex;
  width: 94px;
  height: 47px;
}
.logo:hover { text-decoration: none; }

.logo-photo {
  width: 47px;
  height: 47px;
  overflow: hidden;
  background: #2C2C2C;
  flex: none;
}
.logo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.logo-mark {
  width: 47px;
  height: 47px;
  flex: none;
}

.corner-link {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.sidebar-blocks {
  margin-top: 24px;
  line-height: 2.1;
}
.sidebar-blocks p + p { margin-top: 30px; }

/* ---------- works grid ---------- */

.grid {
  margin-left: var(--sidebar-w);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-img {
  position: relative;
  aspect-ratio: 608 / 380;
  overflow: hidden;
  background: var(--blue);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* slideshow track */
.slides {
  display: flex;
  height: 100%;
}
.slides img,
.slides .reveal {
  flex: none;
  width: 100%;
}

/* dither preloader: blue rectangle erodes into the image once it loads */
.reveal {
  position: relative;
  width: 100%;
  height: 100%;
}
.reveal img { opacity: 0; }
.reveal.loaded img { opacity: 1; }
.reveal canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* pagination — round dots, top-left; visible only while hovering the image */
.pagination {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.card-img:hover .pagination { opacity: 1; }
.pagination span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C4C4C4;
  transition: background 0.2s ease;
}
.pagination span.on { background: var(--blue); }

.card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
}
.card h2 {
  font-size: 13px;
  font-weight: 500;
}
.card p {
  line-height: 1.4;
  max-width: 420px;
}

/* ---------- mobile ---------- */

@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .corner-link {
    display: block;
    position: fixed;
    top: 41px;
    right: var(--page-pad);
    line-height: 1;
    z-index: 20;
  }

  .sidebar-blocks { display: none; }

  /* "about" popover: full-screen info panel over the works grid */
  .about-open .sidebar {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: #fff;
    padding: var(--page-pad);
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
  }
  .about-open .sidebar-blocks {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 33px;
  }
  .about-open .sidebar-blocks .contacts {
    margin-top: auto;
    padding-top: 30px;
  }
  .about-open { overflow: hidden; }

  .grid {
    margin-left: 0;
    margin-top: 48px;
    grid-template-columns: 1fr;
  }

  .card p { max-width: none; }
}
