/* supersmirnov.com — стили. Референс: antontammi.com */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700.woff2") format("woff2"); }

:root {
  --bg: #fafafa;
  --fg: #111;
  --mute: #8c8c8c;
  --line: #111;
  --max: 1000px;
  --gutter: 24px;
  --gap-x: 8px;
  --gap-y: 26px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg) linear-gradient(90deg, #fbfbfb 20%, #f1f1f1);
  background-attachment: fixed;
  color: var(--fg);
  font: 400 13px/1.45 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* шапка */
.header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 30px; }
.logo { display: inline-block; color: var(--fg); }
.logo svg { display: block; height: 12px; width: auto; }
.logo:hover { opacity: .7; }
.contact { margin-top: 8px; }
.contact a:hover { color: var(--mute); }
.nav { display: flex; gap: 28px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1; padding-top: 4px; }
.nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--mute); }
.nav a.on { border-color: var(--line); }

main.wrap { flex: 1; margin-top: 72px; }

/* сетка проектов */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-y) var(--gap-x); }
.grid.vertical { grid-template-columns: repeat(3, 1fr); }
.item h2 { font: inherit; font-size: 13px; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e6e6e6; }
.vertical .thumb { aspect-ratio: 9 / 16; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .3s; }
.thumb.playing video { opacity: 1; }

/* страница проекта */
.project h1 { font: inherit; font-size: 13px; margin: 9px 0 26px; }
.project .desc { margin: -12px 0 26px; }
.project .stills { margin-top: 0; }
.player { position: relative; background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; background: #000; }
.player.vertical { aspect-ratio: auto; background: transparent; display: flex; justify-content: center; }
.player.vertical video { width: auto; height: min(82vh, 900px); aspect-ratio: 9 / 16; }
.pending { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pending img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.pending span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; text-transform: uppercase; font-weight: 700; text-align: center; padding: 20px; }
.desc { max-width: 640px; margin-top: 18px; font-size: 14px; line-height: 1.55; }
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-x); margin-top: var(--gap-x); }
.stills .still:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.still { border: 0; padding: 0; background: #e6e6e6; cursor: zoom-in; display: block; width: 100%; }
.still img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.pager { display: flex; justify-content: center; gap: 40px; margin: 56px 0 8px; text-transform: uppercase; }
.pager a:hover { color: var(--mute); }

/* подвал */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 64px 0 32px; }
.footer .links { display: flex; gap: 24px; text-transform: uppercase; }
.footer a:hover { color: var(--mute); }

/* увеличение кадров */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(250,250,250,.97); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lb img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lb button { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: none; font: 400 40px/1 "Inter", Arial, sans-serif; color: var(--fg); padding: 24px; cursor: pointer; }
.lb button:hover { color: var(--mute); }
.lb .prev { left: 4px; } .lb .next { right: 4px; }
.lb .close { top: 28px; right: 8px; transform: none; font-size: 13px; font-weight: 700; text-transform: uppercase; }

/* пометка черновика */
.draft-badge { position: fixed; left: 12px; bottom: 12px; z-index: 40; background: #111; color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }

@media (max-width: 786px) {
  :root { --gutter: 16px; --gap-y: 28px; }
  .header { flex-direction: column; gap: 14px; padding-top: 20px; }
  .nav { gap: 10px 18px; flex-wrap: wrap; }
  .logo svg { height: 11px; }
  main.wrap { margin-top: 36px; }
  .grid { grid-template-columns: 1fr; }
  .grid.vertical { grid-template-columns: 1fr 1fr; }
  .stills { grid-template-columns: 1fr; gap: 4px; margin-top: 4px; }
  .player.vertical video { height: auto; width: 100%; max-height: 85vh; }
  .footer { flex-direction: column; align-items: flex-start; padding-top: 48px; }
}
