/* Sanly Armyt — public site */

/* ---------- Fonts (IBM Plex, SIL Open Font License, see /assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/assets/fonts/plex-sans-cyrillic.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-latin-ext-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-cyrillic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-latin-ext-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-cyrillic-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Tokens ---------- */
:root {
  --font: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f7f7f5;
  --paper: #ebebe7;
  --surface: #ffffff;
  --ink: #111312;
  --ink-2: #333835;
  --muted: #686e6a;
  --line: #dcdeda;
  --line-strong: #c3c7c2;
  --accent: #00a03c;
  --warn: #c27c00;
  --invert-bg: #111312;
  --invert-ink: #f1f2ef;
  --invert-muted: #979e99;
  --invert-line: rgb(255 255 255 / 0.14);
  --header-bg: rgb(247 247 245 / 0.86);
  --shadow: 0 1px 2px rgb(17 19 18 / 0.07), 0 20px 44px -22px rgb(17 19 18 / 0.38);
  --bezel: #0d0f0e;

  --radius: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1320px;
  --col: 132px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1110;
    --paper: #1a1d1b;
    --surface: #161917;
    --ink: #ebedea;
    --ink-2: #c6cbc7;
    --muted: #8b928d;
    --line: #242826;
    --line-strong: #353a37;
    --accent: #2fbf5b;
    --warn: #f0a830;
    --invert-bg: #171a18;
    --invert-ink: #ebedea;
    --invert-muted: #8b928d;
    --invert-line: rgb(255 255 255 / 0.1);
    --header-bg: rgb(15 17 16 / 0.86);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 22px 46px -22px rgb(0 0 0 / 0.85);
    --bezel: #050605;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1110;
  --paper: #1a1d1b;
  --surface: #161917;
  --ink: #ebedea;
  --ink-2: #c6cbc7;
  --muted: #8b928d;
  --line: #242826;
  --line-strong: #353a37;
  --accent: #2fbf5b;
  --warn: #f0a830;
  --invert-bg: #171a18;
  --invert-ink: #ebedea;
  --invert-muted: #8b928d;
  --invert-line: rgb(255 255 255 / 0.1);
  --header-bg: rgb(15 17 16 / 0.86);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 22px 46px -22px rgb(0 0 0 / 0.85);
  --bezel: #050605;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd, ol, ul, figure {
  margin: 0;
}
ol, ul {
  padding: 0;
  list-style: none;
}
img, svg {
  display: block;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
button {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: rgb(0 160 60 / 0.22);
}
.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.skip {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}

.hero__place,
.section__num,
.section__count,
.filter__n,
.card__year,
.badge,
.device__url,
.index__head,
.index__num,
.index__year,
.service__num,
.service__label,
.step__num,
.contact__row dt,
.case__meta dt,
.stack li,
.done li::before,
.gallery__count,
.case__nav-link span,
.notfound__code,
.langs {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled,
.site-header.is-open {
  border-bottom-color: var(--line);
}
.site-header__in {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}
.brand__mark {
  width: 28px;
  height: 28px;
}
.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
}
.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.site-header__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.langs {
  display: flex;
  gap: 2px;
  font-size: 12.5px;
}
.langs a {
  padding: 6px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}
.langs a:hover {
  color: var(--ink);
}
.langs a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.icon-btn,
.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s;
}
.icon-btn:hover,
.menu-btn:hover {
  border-color: var(--line-strong);
}
.menu-btn {
  display: none;
}
.menu-btn::before {
  content: "";
  width: 14px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform 0.2s;
}
.site-header.is-open .menu-btn::before {
  height: 0;
  border-bottom: 0;
}

@media (max-width: 900px) {
  .site-header__in {
    gap: 16px;
    height: 60px;
  }
  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .nav {
    display: flex;
  }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .menu-btn {
    display: inline-grid;
  }
}
@media (max-width: 380px) {
  .brand__name {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn .icon {
  transition: transform 0.2s;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--ink-2);
}
.btn--primary:hover .icon {
  transform: translateX(3px);
}
.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 10vw, 140px) 0 clamp(56px, 8vw, 112px);
}
.hero__place {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(24px, 3vw, 36px);
  font-size: 13px;
  color: var(--muted);
}
.hero__place::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__title {
  max-width: 20ch;
  font-size: clamp(34px, 1.2rem + 4.2vw, 80px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__title:lang(tk) {
  max-width: 22ch;
}
.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px 64px;
  margin-top: clamp(32px, 4vw, 56px);
}
.hero__lead {
  max-width: 56ch;
  font-size: clamp(17px, 0.95rem + 0.35vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.fact {
  padding: 22px 24px 0 0;
}
.fact + .fact {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.fact__num {
  font-size: clamp(36px, 1.6rem + 1.8vw, 56px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.fact__label {
  max-width: 26ch;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 760px) {
  .hero__row {
    grid-template-columns: 1fr;
  }
  .hero__actions .btn {
    flex: 1 1 auto;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .fact,
  .fact + .fact {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-left: 0;
  }
  .fact + .fact {
    border-top: 1px solid var(--line);
  }
  .fact__label {
    margin: 0;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 10vw, 136px) 0;
  border-top: 1px solid var(--line);
}
.section__head {
  display: grid;
  grid-template-columns: var(--col) minmax(0, 1fr);
  gap: 12px 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section__num {
  padding-top: 0.9em;
  font-size: 13px;
  color: var(--muted);
}
.section__title {
  font-size: clamp(32px, 1.3rem + 2.6vw, 56px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.section__count {
  margin-left: 10px;
  font-size: 14px;
  vertical-align: super;
  color: var(--muted);
}
.section__lead {
  max-width: 58ch;
  margin-top: 16px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .section__head {
    grid-template-columns: 1fr;
  }
  .section__num {
    padding-top: 0;
  }
}

/* ---------- Work: filters and views ---------- */
.work__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.filter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.filter:hover {
  color: var(--ink);
}
.filter[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.filter__n {
  font-size: 12px;
  color: var(--muted);
}
.views {
  display: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.js .views {
  display: inline-flex;
}
.view-btn {
  padding: 5px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.view-btn:hover {
  color: var(--ink);
}
.view-btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}

/* ---------- Work: grid of cards ---------- */
.work__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(44px, 5.5vw, 80px) clamp(16px, 2vw, 28px);
}
.card {
  grid-column: span 12;
  --media-h: clamp(320px, 42vw, 600px);
}
.card--l {
  grid-column: span 7;
}
.card--s {
  grid-column: span 5;
}
.card--l,
.card--s {
  --media-h: clamp(300px, 34vw, 480px);
}
@media (max-width: 860px) {
  .card--l,
  .card--s {
    grid-column: span 12;
  }
  .card,
  .card--l,
  .card--s {
    --media-h: clamp(236px, 66vw, 460px);
  }
}
.card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card .media {
  height: var(--media-h);
}
.card__body {
  display: grid;
  gap: 6px;
  padding-top: 18px;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: clamp(20px, 1.05rem + 0.45vw, 25px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.card__name {
  overflow-wrap: anywhere;
}
.card__year {
  flex: none;
  font-size: 13px;
  color: var(--muted);
}
.card__tagline {
  max-width: 60ch;
  color: var(--ink-2);
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 14px;
  color: var(--muted);
}
.badge {
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.card__link:hover .card__name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* ---------- Project pictures: screenshots in device frames ---------- */
.media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background: var(--paper);
  container-type: size;
}
.device {
  position: absolute;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Browser window: wide enough to always reach the bottom edge, so it reads as cropped, not floating. */
.device--browser {
  --bar: clamp(16px, 4.6cqh, 30px);
  top: 9cqh;
  left: 8cqw;
  width: max(84cqw, calc((91cqh - var(--bar)) * var(--ar)));
  border: 1px solid var(--line);
  border-radius: max(6px, 1.6cqh) max(6px, 1.6cqh) 0 0;
}
.device--browser img {
  height: auto;
  aspect-ratio: var(--ar);
}
.device__bar {
  display: flex;
  align-items: center;
  gap: calc(var(--bar) * 0.22);
  height: var(--bar);
  padding: 0 calc(var(--bar) * 0.55);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.device__bar i {
  flex: none;
  width: calc(var(--bar) * 0.27);
  height: calc(var(--bar) * 0.27);
  border-radius: 50%;
  background: var(--line-strong);
}
.device__url {
  max-width: 45%;
  margin-left: calc(var(--bar) * 0.5);
  padding: 0 0.8em;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
  font-size: max(9px, calc(var(--bar) * 0.4));
  line-height: calc(var(--bar) * 0.64);
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}

/* Phones */
.device--phone {
  aspect-ratio: var(--ar);
  border: max(3px, 0.9cqh) solid var(--bezel);
  border-radius: max(12px, 4.4cqh);
  background: var(--bezel);
}
.device--phone img {
  border-radius: max(9px, 3.5cqh);
}
.device--overlay {
  right: 6cqw;
  bottom: 7cqh;
  height: 70cqh;
}
.media--mobile .device--phone {
  top: var(--top);
  left: 50%;
  height: var(--h);
}
.media--mobile .device--center {
  --top: 9cqh;
  --h: 104cqh;
  z-index: 2;
  translate: -50% 0;
}
.media--n3 .device--left {
  --top: 19cqh;
  --h: 92cqh;
  translate: calc(-150% - 4cqh) 0;
}
.media--n3 .device--right {
  --top: 19cqh;
  --h: 92cqh;
  translate: calc(50% + 4cqh) 0;
}
.media--n2 .device--left {
  --top: 9cqh;
  --h: 100cqh;
  translate: calc(-100% - 2.5cqh) 0;
}
.media--n2 .device--right {
  --top: 18cqh;
  --h: 100cqh;
  translate: 2.5cqh 0;
}

/* Printed pages, banners and other pictures without a frame */
.media--image {
  display: grid;
  place-items: center;
}
.device--sheet {
  position: relative;
  width: min(84cqw, calc(80cqh * var(--ar)));
  aspect-ratio: var(--ar);
  border-radius: 4px;
}

/* No screenshots yet: logo and name set as a cover */
.media--empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7cqh 6cqw;
}
.media__name {
  font-size: min(18cqh, 12cqw);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.case__hero-link {
  display: block;
  border-radius: var(--radius);
  cursor: zoom-in;
}

@media (hover: hover) {
  .card__link:hover .device--browser,
  .card__link:hover .device--sheet,
  .card__link:hover .media--mobile .device--left,
  .card__link:hover .media--mobile .device--right {
    transform: translateY(-1.5cqh);
  }
  .card__link:hover .device--overlay,
  .card__link:hover .media--mobile .device--center {
    transform: translateY(-3cqh);
  }
}

/* ---------- Logos ---------- */
.logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 22%;
  background: var(--logo-bg, transparent);
}
.logo img {
  width: 100%;
  height: 100%;
  padding: var(--logo-pad, 0%);
  object-fit: contain;
}
.logo--sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.logo--lg {
  width: clamp(48px, 6vw, 76px);
  height: clamp(48px, 6vw, 76px);
}
.logo--md {
  width: max(40px, 13cqh);
  height: max(40px, 13cqh);
}
.logo--mono {
  color: var(--logo-fg);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.logo--sm.logo--mono {
  font-size: 11px;
}
.logo--lg.logo--mono {
  font-size: clamp(18px, 2.2vw, 28px);
}
.logo--md.logo--mono {
  font-size: max(15px, 5cqh);
}

/* ---------- Work: list view ---------- */
.index__head,
.index__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 3.2fr) minmax(0, 1.6fr) minmax(0, 1.6fr) 56px;
  align-items: center;
  gap: 16px;
}
.index__head {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.index__head span:last-child,
.index__year {
  text-align: right;
}
.index__row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.index__num {
  font-size: 12.5px;
  color: var(--muted);
}
.index__name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.index__text {
  display: grid;
  min-width: 0;
}
.index__text strong {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.index__tag {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}
.index__area,
.index__platforms {
  font-size: 14px;
  color: var(--ink-2);
}
.index__year {
  font-size: 13px;
  color: var(--muted);
}
.index__row:hover strong {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
@media (max-width: 860px) {
  .index__head {
    display: none;
  }
  .index__row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
  .index__area,
  .index__platforms {
    display: none;
  }
}
.peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 300px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.peek.is-on {
  opacity: 1;
}
.peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ---------- Services ---------- */
.services__list {
  border-top: 1px solid var(--line);
}
.service {
  display: grid;
  grid-template-columns: var(--col) minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 10px 24px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.service__num {
  padding-top: 0.4em;
  font-size: 13px;
  color: var(--muted);
}
.service__title {
  font-size: clamp(20px, 1rem + 0.5vw, 24px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.service__text {
  max-width: 52ch;
  color: var(--ink-2);
}
.service__examples {
  font-size: 14.5px;
  color: var(--ink-2);
}
.service__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}
.service__examples a {
  text-decoration-color: var(--line-strong);
}
.service__examples a:hover {
  text-decoration-color: currentColor;
}
@media (max-width: 1080px) {
  .service {
    grid-template-columns: var(--col) minmax(0, 1fr);
  }
  .service__text,
  .service__examples {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .service {
    grid-template-columns: 1fr;
  }
  .service__text,
  .service__examples {
    grid-column: 1;
  }
  .service__num {
    padding-top: 0;
  }
}

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.step {
  padding: 22px 24px 0 0;
}
.step + .step {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.step__num {
  font-size: 13px;
  color: var(--muted);
}
.step__title {
  margin-top: clamp(28px, 4vw, 56px);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.step__text {
  margin-top: 10px;
  font-size: 16px;
  color: var(--ink-2);
}
@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .step:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .step:nth-child(n + 3) {
    margin-top: 32px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .step,
  .step + .step,
  .step:nth-child(n + 3) {
    margin-top: 0;
    padding: 20px 0 24px;
    border-left: 0;
  }
  .step + .step {
    border-top: 1px solid var(--line);
  }
  .step__title {
    margin-top: 12px;
  }
}

/* ---------- Contact ---------- */
.contact {
  border-top: 0;
  background: var(--invert-bg);
  color: var(--invert-ink);
}
.contact .section__num {
  color: var(--invert-muted);
}
.contact__title {
  font-size: clamp(36px, 1.3rem + 4.4vw, 84px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.contact__lead {
  margin-top: 18px;
  font-size: clamp(17px, 1rem + 0.3vw, 20px);
  color: var(--invert-muted);
}
.contact__list {
  border-top: 1px solid var(--invert-line);
}
.contact__row {
  display: grid;
  grid-template-columns: var(--col) minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--invert-line);
}
.contact__row dt {
  font-size: 13px;
  color: var(--invert-muted);
}
.contact__row dd {
  font-size: clamp(19px, 1rem + 0.9vw, 28px);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.contact__row a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.contact__row a:hover {
  text-decoration: underline;
}
.contact__row .icon {
  width: 0.75em;
  height: 0.75em;
  color: var(--invert-muted);
}
@media (max-width: 760px) {
  .contact__row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
body:has(.contact) .site-footer {
  border-top-color: var(--invert-line);
  background: var(--invert-bg);
  color: var(--invert-muted);
}
body:has(.contact) .site-footer .langs a {
  color: var(--invert-muted);
}
body:has(.contact) .site-footer .langs a[aria-current],
body:has(.contact) .site-footer a:hover {
  color: var(--invert-ink);
}
.site-footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.site-footer__top:hover {
  color: var(--ink);
}

/* ---------- Project page ---------- */
.case__head {
  padding: clamp(28px, 4vw, 48px) 0 clamp(32px, 4vw, 56px);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(32px, 5vw, 64px);
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
}
.back:hover {
  color: var(--ink);
}
.case__title-row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
}
.case__title {
  font-size: clamp(40px, 1.4rem + 5vw, 96px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.case__tagline {
  max-width: 34ch;
  margin-top: clamp(18px, 2.4vw, 28px);
  font-size: clamp(20px, 1rem + 0.9vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  text-wrap: balance;
}
.case__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.case__meta > div {
  padding: 16px 20px 0 0;
}
.case__meta dt {
  font-size: 12px;
  color: var(--muted);
}
.case__meta dd {
  margin-top: 6px;
  font-size: 15.5px;
}
.case__meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.status--dev::before {
  background: var(--warn);
}
.case__hero .media {
  height: clamp(300px, 54vw, 720px);
}
.case__body {
  display: grid;
  gap: clamp(48px, 6vw, 88px);
  padding: clamp(64px, 8vw, 120px) 0;
}
.case__block {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.case__h {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.prose {
  display: grid;
  gap: 1em;
  max-width: 66ch;
  font-size: clamp(18px, 1rem + 0.3vw, 21px);
  line-height: 1.6;
}
.done {
  display: grid;
  max-width: 72ch;
  counter-reset: done;
}
.done li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: done;
}
.done li:first-child {
  padding-top: 0;
}
.done li::before {
  content: counter(done, decimal-leading-zero);
  padding-top: 0.3em;
  font-size: 12.5px;
  color: var(--muted);
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 72ch;
}
.stack li {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
@media (max-width: 760px) {
  .case__block {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gallery ---------- */
.gallery {
  padding-bottom: clamp(64px, 8vw, 120px);
}
.gallery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(24px, 3vw, 36px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.gallery__count {
  font-size: 13px;
  color: var(--muted);
}
.gallery__wide,
.gallery__tall {
  display: grid;
  gap: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px);
}
.gallery__wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gallery__wide .shot:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}
.gallery__tall {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gallery__wide + .gallery__tall {
  margin-top: clamp(32px, 4vw, 56px);
}
.shot__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: zoom-in;
}
.shot--mobile .shot__link {
  border-radius: 16px;
}
.shot__link img {
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.shot__link:hover img {
  transform: scale(1.015);
}
.shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 1080px) {
  .gallery__tall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .gallery__wide {
    grid-template-columns: 1fr;
  }
  .gallery__tall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Previous / next project ---------- */
.case__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.case__nav-link {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 28px 24px 8px 0;
  color: inherit;
  text-decoration: none;
}
.case__nav-link--next {
  padding: 28px 0 8px 24px;
  border-left: 1px solid var(--line);
  text-align: right;
}
.case__nav-link span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.case__nav-link--next span {
  justify-content: flex-end;
}
.case__nav-link strong {
  font-size: clamp(22px, 1rem + 1.6vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.case__nav-link:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
@media (max-width: 560px) {
  .case__nav {
    grid-template-columns: 1fr;
  }
  .case__nav-link--next {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }
  .case__nav-link--next span {
    justify-content: flex-start;
  }
}

/* ---------- Admin preview bar ---------- */
.preview-bar {
  position: relative;
  z-index: 45;
  background: var(--invert-bg);
  color: var(--invert-ink);
  font-size: 13.5px;
}
.preview-bar__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-height: 44px;
  padding: 8px 0;
}
.preview-bar strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0a830;
}
.preview-bar__langs {
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
  font-family: var(--mono);
}
.preview-bar a[aria-current] {
  font-weight: 600;
  text-decoration: none;
}

/* ---------- 404 ---------- */
.notfound {
  padding: clamp(80px, 14vw, 180px) 0;
}
.notfound__code {
  font-size: 13px;
  color: var(--muted);
}
.notfound__title {
  margin-top: 16px;
  font-size: clamp(36px, 1.4rem + 3.6vw, 72px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.notfound__text {
  max-width: 48ch;
  margin: 20px 0 36px;
  font-size: 18px;
  color: var(--ink-2);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #0c0d0d;
  color: #eceeeb;
}
.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(12px, 3vw, 24px);
  font-family: var(--mono);
  font-size: 13px;
  color: #9aa19c;
}
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 clamp(8px, 7vw, 88px) 8px;
}
.lightbox__img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 6px;
  object-fit: contain;
}
.lightbox__caption {
  min-height: 3em;
  padding: 14px clamp(16px, 4vw, 40px) 22px;
  font-size: 15px;
  text-align: center;
  color: #c6cbc7;
}
.lightbox__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.04);
  color: #eceeeb;
  cursor: pointer;
}
.lightbox__btn:hover {
  background: rgb(255 255 255 / 0.1);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
}
.lightbox__nav--prev {
  left: clamp(8px, 2vw, 24px);
}
.lightbox__nav--next {
  right: clamp(8px, 2vw, 24px);
}
@media (max-width: 640px) {
  .lightbox__nav {
    top: auto;
    bottom: 8px;
    translate: none;
  }
}
html.is-locked {
  overflow: hidden;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
