@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("HelveticaNeueCyr-Roman.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("HelveticaNeueCyr-MediumItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper-bg: #e9e5df;
  --paper-light: #f8f5f0;
  --ink: #1d1a1b;
  --ink-soft: #5e585a;
  --line: #cfc7c1;
  --pink: #e8608b;
  --pink-hover: #d14d77;
  --pink-active: #b83e66;
  --white: #ffffff;
  --folder-ux: #c7d4ff;
  --folder-ai: #f0c8f0;
  --folder-web: #f5d786;
  --folder-graphic: #f3a7bd;
  --dark-card: #1d1c20;
  --shell: 1240px;
  --section-space: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(.22, .78, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper-bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper-bg);
  font-family: "HelveticaNeueCyr", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; }
button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }

::selection { color: var(--white); background: var(--pink-active); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-180%);
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--white);
  background: var(--pink-active);
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.section-shell,
.hero-shell {
  width: min(var(--shell), calc(100% - 64px));
  margin: 0 auto;
}

.section { padding: var(--section-space) 0; }

.eyebrow,
.paper-status,
.case-badge,
.case-number,
.dialog-topline,
.dialog-index,
.wordmark,
.hero-role {
  font-size: 12px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h2, h3, p { margin-top: 0; }

h2 {
  margin-bottom: 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: -.045em;
}

h2 em,
.contact h2 em {
  font-style: italic;
  font-weight: 500;
}

.pill {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--pink);
  box-shadow: 0 6px 18px rgba(92, 29, 54, .13);
  font-size: 19px;
  line-height: 1;
  font-style: normal;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.pill:hover {
  background: var(--pink-hover);
  box-shadow: 0 10px 24px rgba(92, 29, 54, .2);
  transform: translateY(-2px) scale(1.035);
}

.pill:active {
  background: var(--pink-active);
  box-shadow: 0 3px 8px rgba(92, 29, 54, .16);
  transform: scale(.97);
  transition-duration: 100ms;
}

.pill:focus-visible,
.folder-tab:focus-visible,
.case-card:focus-visible,
.dialog-close:focus-visible,
.contact-link:focus-visible,
.footer-row a:focus-visible {
  outline: 3px solid #ffbad0;
  outline-offset: 4px;
}

/* HERO */
.hero-scroll {
  position: relative;
  height: 200svh;
  min-height: 1500px;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper-bg) url("hero-desk-background.webp") center / cover no-repeat;
}

.hero-shell {
  width: min(1600px, 100%);
  height: 100%;
  padding: 10px 8px 0;
}

.pill-nav {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pill-nav .pill {
  min-height: 34px;
  padding: 8px 17px;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.hero-stage {
  --portrait-width: min(26%, 32svh);
  --portrait-top: 0px;
  --portrait-ratio: 981 / 1266;
  position: relative;
  height: calc(100% - 42px);
  min-height: 0;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}

.portrait-scene,
.printer-scene {
  position: absolute;
  margin: 0;
  overflow: hidden;
}

.portrait-scene {
  z-index: 4;
  top: var(--portrait-top);
  left: 50%;
  width: var(--portrait-width);
  height: auto;
  aspect-ratio: var(--portrait-ratio);
  transform: translateX(-50%);
  background: #d8d3cf;
}

.portrait-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.printer-scene {
  z-index: 3;
  left: 50%;
  top: 36%;
  bottom: auto;
  width: var(--printer-width, min(100%, 80svh));
  height: auto;
  aspect-ratio: 963 / 493;
  transform: translateX(-50%);
  background: transparent;
}

.printer-scene img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.paper-track {
  position: absolute;
  z-index: 5;
  top: var(--portrait-top);
  left: 50%;
  width: var(--portrait-width);
  aspect-ratio: var(--portrait-ratio);
  transform: translateX(-50%);
  overflow: hidden;
  container-type: inline-size;
  pointer-events: none;
}

.paper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 -3px 12px rgba(20, 16, 17, .12);
  transform: translateY(0);
  will-change: transform;
}

.js .paper {
  visibility: hidden;
  transform: translateY(100%);
}

.paper-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.paper.is-printed,
html:not(.js) .paper { pointer-events: auto; }

/* ABOUT */
.about { border-top: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 54px 88px;
}

.section-heading h2 { max-width: 9.5ch; }

.about-copy {
  align-self: end;
  max-width: 650px;
  padding-top: 36px;
}

.about-copy p {
  max-width: 53ch;
  color: var(--ink-soft);
  font-size: 19px;
}

.about-copy .about-intro {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
}

.about-photo {
  grid-column: 1 / -1;
  position: relative;
  height: min(76vw, 780px);
  margin: 28px 0 0;
  overflow: hidden;
  border-radius: 34px;
  background: #d8d3cf;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 29%;
}

.about-photo figcaption {
  position: absolute;
  right: 24px;
  bottom: 24px;
  max-width: 300px;
  padding: 15px 18px;
  border-radius: 20px;
  color: var(--white);
  background: var(--pink-active);
  font-size: 16px;
}

/* CASE FOLDERS */
.cases {
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.cases .eyebrow { color: #e6b6c6; }

.cases-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 68px;
}

.cases-head h2 { margin-top: 16px; }

.cases-head > p {
  max-width: 38ch;
  margin-bottom: 6px;
  color: #c7c0c2;
  font-size: 17px;
}

.folder-tabs {
  display: flex;
  align-items: end;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px;
  scrollbar-width: none;
}

.folder-tabs::-webkit-scrollbar { display: none; }

.folder-tab {
  flex: 0 0 auto;
  min-height: 55px;
  padding: 14px 24px 13px;
  border: 0;
  border-radius: 20px 20px 0 0;
  color: var(--ink);
  background: #a9a4a6;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: min-height 250ms var(--ease), background 250ms ease, transform 250ms var(--ease);
}

.folder-tab:hover { transform: translateY(-3px); }
.folder-tab.is-active { min-height: 66px; }
.folder-tab[data-folder-tab="ux"] { background: var(--folder-ux); }
.folder-tab[data-folder-tab="ai"] { background: var(--folder-ai); }
.folder-tab[data-folder-tab="web"] { background: var(--folder-web); }
.folder-tab[data-folder-tab="graphic"] { background: var(--folder-graphic); }

.folder-stack { position: relative; }

.folder-panel {
  min-height: 680px;
  padding: 34px;
  border-radius: 0 34px 34px 34px;
  color: var(--ink);
  animation: folder-in 420ms var(--ease) both;
}

.folder-panel[hidden] { display: none; }
.folder-ux { background: var(--folder-ux); }
.folder-ai { background: var(--folder-ai); }
.folder-web { background: var(--folder-web); }
.folder-graphic { background: var(--folder-graphic); }

@keyframes folder-in {
  from { opacity: 0; transform: translateX(24px) rotate(.4deg); }
  to { opacity: 1; transform: none; }
}

.folder-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
  letter-spacing: -.03em;
}

.folder-label small {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 280px;
  gap: 18px;
}

.case-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 24px;
  border: 0;
  border-radius: 24px;
  color: var(--white);
  background: var(--dark-card);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition: transform 350ms var(--ease), box-shadow 350ms ease;
}

.case-card-wide { grid-column: 1 / -1; }

.case-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .62;
  transition: transform 600ms var(--ease), opacity 300ms ease;
}

.case-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(18, 17, 20, .46);
}

.case-card:hover {
  z-index: 2;
  box-shadow: 0 20px 36px rgba(26, 17, 21, .28);
  transform: translateY(-6px) rotate(-.25deg);
}

.case-card:hover img { opacity: .78; transform: scale(1.035); }
.case-card:active { transform: translateY(-1px) scale(.985); }

.case-badge,
.case-number {
  position: absolute;
  top: 20px;
}

.case-badge {
  left: 20px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  letter-spacing: .07em;
}

.case-number { right: 20px; }

.case-card strong,
.case-note {
  position: absolute;
  right: 24px;
  left: 24px;
}

.case-card strong {
  bottom: 55px;
  font-size: clamp(28px, 4vw, 50px);
  line-height: .96;
  font-weight: 400;
  letter-spacing: -.035em;
}

.case-note {
  bottom: 22px;
  font-size: 14px;
  line-height: 1.2;
}

.swipe-hint {
  display: none;
  margin: 18px 0 0;
  color: #bbb4b6;
  font-size: 13px;
  text-align: center;
}

/* APPROACH */
.approach { border-bottom: 1px solid var(--line); }

.approach-head {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 70px;
}

.approach-head h2 { max-width: 10ch; }

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 28px;
  background: var(--ink);
  list-style: none;
}

.approach-grid li {
  min-height: 320px;
  padding: 26px;
  background: var(--paper-bg);
}

.approach-grid li > span {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 70px;
  border-radius: 50%;
  color: var(--white);
  background: var(--pink);
  font-size: 14px;
}

.approach-grid h3 {
  margin-bottom: 14px;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -.02em;
}

.approach-grid p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* CONTACT */
.contact { background: var(--paper-light); }

.contact-shell {
  text-align: center;
}

.contact h2 {
  max-width: 12ch;
  margin: 22px auto 34px;
}

.contact-shell > p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 19px;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 46px;
}

.pill-large { min-height: 62px; padding: 17px 32px; font-size: 21px; }

.contact-link {
  padding: 9px 0 6px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-link:hover { color: var(--pink-active); border-color: var(--pink-active); }

footer { padding: 26px 0; color: var(--white); background: var(--ink); }

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}

.footer-row a { text-underline-offset: 4px; }

/* CASE DIALOG */
.case-dialog {
  width: min(1040px, calc(100% - 40px));
  max-height: calc(100svh - 40px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 30px;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

.case-dialog::backdrop { background: rgba(20, 17, 18, .76); }

.case-dialog[open] { animation: dialog-in 340ms var(--ease) both; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.dialog-topline {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 240, .94);
  backdrop-filter: blur(12px);
}

.dialog-close {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.dialog-close:hover { color: var(--white); background: var(--ink); }

.dialog-copy { padding: 54px 54px 30px; }
.dialog-index { color: var(--pink-active); }

.dialog-copy h2 {
  max-width: 10ch;
  margin: 16px 0 24px;
  font-size: clamp(48px, 8vw, 92px);
}

.dialog-lead {
  max-width: 34ch;
  margin-bottom: 38px;
  font-size: 24px;
  line-height: 1.2;
  font-style: italic;
  font-weight: 500;
}

.dialog-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 34px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-meta div { min-width: 0; }
.dialog-meta dt { margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }
.dialog-meta dd { margin: 0; font-size: 16px; }

.dialog-text {
  max-width: 63ch;
  color: var(--ink-soft);
  font-size: 18px;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.dialog-gallery img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  border-radius: 20px;
  background: #e4dfda;
}

.dialog-gallery img:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

/* REVEALS */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms var(--ease);
}

.js .reveal.in-view { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .section-shell { width: min(100% - 40px, 900px); }

  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .section-heading h2 { max-width: 11ch; }
  .about-copy { padding-top: 0; }

  .approach-head { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach-grid li { min-height: 260px; }
  .approach-grid li > span { margin-bottom: 42px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section-shell { width: min(100% - 28px, 620px); }
  .section { padding: 92px 0; }

  h2 { font-size: clamp(40px, 13vw, 62px); }

  .hero-scroll { height: 190svh; min-height: 1450px; }
  .hero-shell { padding: 8px 0 0; }

  .pill-nav {
    justify-content: center;
    gap: 9px;
    margin-bottom: 8px;
  }

  .pill-nav .pill {
    min-height: 32px;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .pill {
    min-height: 44px;
    padding: 11px 18px;
    font-size: 19px;
  }

  .hero-stage {
    --portrait-width: 58vw;
    height: calc(100% - 40px);
  }

  .portrait-scene {
    top: var(--portrait-top);
    left: 50%;
    width: var(--portrait-width);
    height: auto;
    aspect-ratio: var(--portrait-ratio);
    transform: translateX(-50%);
  }

  .portrait-scene img { object-fit: cover; }

  .printer-scene {
    left: 50%;
    top: calc(15px + 59vw);
    bottom: auto;
    width: var(--printer-width, 100vw);
    height: auto;
    aspect-ratio: 963 / 493;
    transform: translateX(-50%);
  }

  .printer-scene img { object-fit: contain; }

  .about-copy .about-intro { font-size: 23px; }
  .about-copy p { font-size: 17px; }
  .about-photo { height: 112vw; max-height: 620px; border-radius: 24px; }
  .about-photo img { object-position: 50% 25%; }
  .about-photo figcaption { right: 12px; bottom: 12px; left: 12px; max-width: none; padding: 13px 15px; font-size: 14px; }

  .cases-head { display: block; margin-bottom: 44px; }
  .cases-head > p { margin: 24px 0 0; }
  .folder-tabs { margin-right: -14px; }
  .folder-tab { min-height: 49px; padding: 12px 17px 11px; border-radius: 16px 16px 0 0; font-size: 14px; }
  .folder-tab.is-active { min-height: 58px; }
  .folder-panel { min-height: 0; padding: 18px; border-radius: 0 24px 24px 24px; }
  .folder-label { margin-bottom: 18px; font-size: 32px; }
  .case-grid { grid-template-columns: 1fr; grid-auto-rows: 248px; gap: 12px; }
  .case-card-wide { grid-column: auto; }
  .case-card { padding: 18px; border-radius: 19px; }
  .case-card strong { right: 18px; bottom: 48px; left: 18px; font-size: 32px; }
  .case-note { right: 18px; bottom: 18px; left: 18px; font-size: 13px; }
  .case-badge { top: 15px; left: 15px; }
  .case-number { top: 18px; right: 15px; }
  .swipe-hint { display: block; }

  .approach-head { gap: 18px; margin-bottom: 42px; }
  .approach-grid { grid-template-columns: 1fr; border-radius: 22px; }
  .approach-grid li { min-height: 0; padding: 22px; }
  .approach-grid li > span { margin-bottom: 36px; }

  .contact h2 { max-width: 10ch; }
  .contact-shell > p { font-size: 17px; }
  .contact-actions { flex-direction: column; gap: 18px; margin-top: 34px; }
  .pill-large { width: 100%; min-height: 56px; font-size: 19px; }

  .footer-row { flex-direction: column; align-items: flex-start; }

  .case-dialog { width: calc(100% - 20px); max-height: calc(100svh - 20px); border-radius: 24px; }
  .dialog-topline { padding: 15px 16px; }
  .dialog-copy { padding: 36px 22px 22px; }
  .dialog-copy h2 { font-size: 49px; }
  .dialog-lead { font-size: 20px; }
  .dialog-meta { grid-template-columns: 1fr; gap: 14px; }
  .dialog-text { font-size: 16px; }
  .dialog-gallery { grid-template-columns: 1fr; padding: 0 10px 10px; }
  .dialog-gallery img,
  .dialog-gallery img:first-child:nth-last-child(odd) { grid-column: auto; height: auto; max-height: 520px; }
}

@media (max-width: 390px) {
  .pill-nav { gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-scroll { height: 100svh; min-height: 0; }
  .paper,
  .js .paper { visibility: visible; opacity: 1; transform: translateY(0) !important; pointer-events: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
