:root {
  color-scheme: light;
  --paper: #f5f5f1;
  --ink: #20241f;
  --muted: #555c53;
  --rule: #a6aa9c;
  --mono: "Cascadia Mono", "IBM Plex Mono", Consolas, monospace;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background-image: linear-gradient(#3b49340a 1px, transparent 1px),
    linear-gradient(90deg, #3b49340a 1px, transparent 1px);
  background-size: 28px 28px;
}
a { color: inherit; }
:focus-visible { outline: 2px solid #94672a; outline-offset: 5px; }
.shell { width: min(1184px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 2; padding: .75rem; background: white; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { background: #f5f5f1ed; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: 81px; border-bottom: 1px solid #a6aa9c7d; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.18rem; letter-spacing: -.04em; text-decoration: none; }
.brand img { width: 35px; height: 35px; object-fit: contain; }
.main-nav, .site-footer nav { display: flex; align-items: center; gap: clamp(1rem, 3.3vw, 3rem); }
.main-nav a, .site-footer nav a { font-size: .91rem; font-weight: 700; text-decoration: none; }
.main-nav a:hover, .site-footer nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .28em; }
.main-nav .order-link { border: 1px solid #848a7e; padding: .65rem .95rem; background: #fff5; white-space: nowrap; }

.hero { min-height: 590px; display: grid; grid-template-columns: 51% 49%; align-items: center; position: relative; }
.hero::before { content: ""; position: absolute; height: 54px; left: 0; top: 0; border-left: 1px solid #a6aa9c7d; }
.intro { padding-block: 50px 64px; z-index: 1; }
.kicker { display: flex; align-items: center; gap: .7rem; font: 600 .84rem/1.45 var(--mono); text-transform: uppercase; letter-spacing: .055em; margin: 0 0 1.2rem; }
.kicker span { width: 8px; height: 8px; border: 1px solid currentColor; transform: rotate(45deg); flex: none; }
.intro h1 { font-size: clamp(3rem, 6.45vw, 6.2rem); line-height: .99; letter-spacing: -.072em; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.intro h1 span { color: #9b692e; }
.intro-text { max-width: 485px; font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.72; color: var(--muted); margin: 1.6rem 0 1.85rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.7rem; align-items: center; }
.button { display: inline-flex; padding: .78rem 1.15rem; min-height: 46px; align-items: center; font-size: .93rem; font-weight: 800; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.dark { background: #242923; color: #fff; }
.dark:hover { background: #41483d; }
.text-link { font-size: .94rem; font-weight: 800; text-underline-offset: .25em; }
.hero-drawing { position: relative; align-self: center; min-width: 0; }
canvas { display: block; width: 100%; height: auto; }
.hero-drawing canvas { width: 113%; max-width: none; margin-left: -7%; aspect-ratio: 670 / 535; }
.drawing-caption { display: flex; justify-content: space-between; gap: .5rem; margin: -.4rem 0 0 17%; border-top: 1px solid #949b8b; padding-top: .6rem; color: #555c53; font: .72rem var(--mono); letter-spacing: .06em; }

#content { overflow-x: clip; }
.home-section { padding-block: clamp(2.5rem, 7vw, 6rem); }
.home-section--colored { --section: var(--section-background); color: var(--section-text); }
.home-section--colored .button.dark { background: var(--section-text); color: var(--section-background); }
.home-section h2 { margin: 0 0 1.4rem; font-size: clamp(2rem, 4vw, 3.75rem); letter-spacing: -.055em; overflow-wrap: anywhere; }
.home-section-elements { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; }
.home-section-element { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; min-width: 0; overflow-wrap: anywhere; }
.home-section-element p { margin: 0; max-width: 70ch; font-size: 1.05rem; line-height: 1.7; }
.home-section-element img { display: block; max-width: 100%; width: 100%; height: auto; max-height: 520px; object-fit: contain; object-position: left center; }
.section-heading { display: flex; gap: 2rem; align-items: center; padding: 2rem 0 2.8rem; }
.section-heading h2 { min-width: 0; font-size: clamp(2.25rem, 4.7vw, 4.45rem); line-height: 1; letter-spacing: -.078em; margin: 0; overflow-wrap: anywhere; }
.section-rule { background: var(--rule); height: 1px; flex: 1; min-width: 1rem; position: relative; }
.section-rule::before, .section-rule::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--rule); background: var(--paper); top: -3px; }
.section-rule::before { left: 0; }
.section-rule::after { right: 0; }

.project {
  --section: #e4e6dc;
  --text: #252c22;
  --accent: #47553c;
  color: var(--text);
}
.project, .home-section--colored {
  --edge: min(1%, 5px);
  --shape: polygon(
    0 calc(3 * var(--edge)), 11% var(--edge), 27% calc(2.4 * var(--edge)), 43% 0,
    65% calc(2.1 * var(--edge)), 79% calc(1.3 * var(--edge)), 100% calc(3 * var(--edge)),
    100% calc(100% - 5 * var(--edge)), 90% calc(100% - 2.5 * var(--edge)),
    75% calc(100% - 3 * var(--edge)), 58% 100%, 42% calc(100% - 3.5 * var(--edge)),
    23% calc(100% - 1.3 * var(--edge)), 0 calc(100% - 4 * var(--edge))
  );
  position: relative;
  isolation: isolate;
  margin-block: 0 8px;
}
.project::before, .home-section--colored::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--section); clip-path: var(--shape); }
.project--games { --section: #172a23; --text: #f1f6eb; --accent: #caf18b; }
.project--cad { --section: #e5e7e3; --text: #242b31; --accent: #3b526b; --shape: polygon(0 2%, 14% 3.2%, 36% .4%, 60% 2.6%, 81% 0, 100% 1.6%, 100% 98%, 84% 96%, 66% 99%, 40% 97%, 23% 100%, 0 97%); }
.project--stock { --section: #25223e; --text: #f3efff; --accent: #d9c6ff; --shape: polygon(0 2.8%, 17% 0, 30% 2%, 60% 1%, 85% 3%, 100% 0, 100% 98%, 79% 100%, 56% 97%, 35% 98%, 17% 96%, 0 99%); }
.project--avito { --section: #eee6d6; --text: #302c25; --accent: #724d32; }
.project-inner { min-height: 430px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 54px; padding-block: 62px; }
.project:nth-of-type(even) .project-inner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.project:nth-of-type(even) .project-copy { grid-column: 2; grid-row: 1; }
.project:nth-of-type(even) .project-art { grid-column: 1; grid-row: 1; }
.project-inner:not(:has(.project-art)) { grid-template-columns: 1fr; min-height: 300px; }
.project-inner:not(:has(.project-art)) .project-copy { grid-column: 1; }
.project-copy { container-type: inline-size; }
.project-copy .kicker { color: var(--accent); }
.project-copy h3 { font-size: min(clamp(2.65rem, 5.4vw, 5.3rem), 16cqi); line-height: 1; letter-spacing: -.075em; margin: 0; overflow-wrap: anywhere; scroll-margin-top: 5rem; }
.project-copy > p:not(.kicker) { max-width: 420px; line-height: 1.7; font-size: 1.06rem; margin: 1.15rem 0 1.55rem; }
.project-link { border: 1px solid currentColor; color: var(--accent); }
.project-link:hover { background: var(--accent); color: var(--section); }
.project-art { min-width: 0; position: relative; }
.games-art { filter: drop-shadow(0 26px 24px #0b170d88); }
.cad-art { background-image: linear-gradient(#6173871c 1px, transparent 1px), linear-gradient(90deg, #6173871c 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(ellipse at center, black 59%, transparent 98%); }
.stock-art, .avito-art { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 290px; }
.stock-art { background: radial-gradient(ellipse, #8b64d67a, transparent 68%); }
.stock-panel {
  font: .85rem var(--mono);
  color: #eee6ff;
  width: min(88%, 485px);
  padding: 1.2rem 1.45rem;
  border: 1px solid #8f7cbb;
  border-radius: 14px;
  background: #332950;
  transform: rotate(-5deg);
  box-shadow: 18px 25px 0 #19152f, 32px 38px 0 #8265b534;
}
.mock-header, .stock-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mock-header { font-weight: 700; color: #d8c6ff; }
.stock-chart { display: flex; align-items: end; gap: 3.5%; height: 112px; margin: 1rem 0; border-bottom: 1px solid #9784b9; background: repeating-linear-gradient(to top, transparent 0 21px, #9c81c336 21px 22px); }
.stock-chart i { flex: 1; height: 45%; background: linear-gradient(#e5d4ff, #9165d0); border-radius: 2px 2px 0 0; }
.stock-chart i:nth-child(3n) { height: 78%; }
.stock-chart i:nth-child(4n) { height: 57%; }
.stock-chart i:nth-child(5n) { height: 30%; }
.stock-chart i:nth-child(7n) { height: 91%; }
.stock-row { color: #e6ddef; padding: .5rem 0; border-top: 1px solid #8772a55c; }
.stock-row span:last-child { text-align: right; }
.avito-art { background: radial-gradient(ellipse, #e5c184, transparent 69%); }
.search-mini { position: relative; width: min(83%, 475px); border: 1px solid #cab998; background: #fffaf0; border-radius: 20px; padding: 1.2rem; transform: rotate(4deg); box-shadow: 20px 24px 0 #b88b4a38; }
.search-input, .search-alert { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: .85rem; color: #4a3b28; }
.search-input { border: 1px solid #dfcbaa; border-radius: 8px; padding: .55rem .7rem; }
.search-input i { width: 12px; height: 12px; border: 2px solid #89673b; border-radius: 50%; position: relative; }
.search-input i::after { content: ""; position: absolute; width: 6px; height: 2px; background: #89673b; transform: rotate(45deg); bottom: -2px; right: -5px; }
.search-row { display: flex; gap: 12px; padding-top: .7rem; }
.search-row b { width: 56px; height: 37px; border-radius: 6px; background: #d7b6e8; }
.search-row:nth-child(3) b { background: #b1ca99; }
.search-row:nth-child(4) b { background: #f0bf8a; }
.search-row div { flex: 1; align-self: center; }
.search-row i { display: block; width: 49%; height: 5px; border-radius: 6px; margin: 6px 0; background: #e5d5b9; }
.search-row i + i { width: 30%; background: #efe5d0; }
.search-alert { position: absolute; bottom: 14%; right: -7%; padding: .7rem .9rem; border-radius: 8px; background: #dce9c6; box-shadow: 0 6px 20px #39290f25; transform: rotate(-8deg); }
.search-alert i { width: 8px; height: 8px; background: #47723c; border-radius: 50%; }
.custom-art img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.empty { padding-block: 1rem 4rem; }

.site-footer { margin-top: 58px; padding: 0 0 24px; }
.footer-inner { min-height: 100px; border-top: 1px solid #a6aa9c7d; }

@media (max-width: 960px) {
  .shell { width: calc(100% - 64px); }
  .hero { min-height: 510px; }
  .project-inner { gap: 28px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 68px; }
  .brand { gap: .35rem; font-size: 1rem; }
  .brand img { width: 30px; height: 30px; }
  .main-nav { gap: .85rem; }
  .main-nav a:first-child { display: none; }
  .main-nav .order-link { padding: .48rem .62rem; }
  .hero { grid-template-columns: 1fr; }
  .hero::before { height: 31px; }
  .intro { padding-block: 52px 0; }
  .intro h1 { font-size: clamp(2.95rem, 10.8vw, 4.8rem); }
  .intro-text { margin-block: 1.1rem 1.25rem; }
  .hero-drawing { max-width: 470px; width: 100%; margin: -.25rem auto 1.5rem; }
  .hero-drawing canvas { width: 100%; margin: 0; }
  .drawing-caption { margin-top: -1rem; margin-left: 5%; }
  .section-heading { gap: 1rem; padding: 1.8rem 0 1.6rem; }
  .project .project-inner { grid-template-columns: minmax(0, 1fr); min-height: auto; gap: 1.6rem; padding-block: 52px 42px; }
  .project:nth-of-type(even) .project-copy, .project:nth-of-type(even) .project-art { grid-column: auto; grid-row: auto; }
  .project-copy h3 { font-size: min(clamp(2.5rem, 10vw, 4.2rem), 16cqi); }
  .project-copy > p:not(.kicker) { font-size: 1rem; }
  .stock-art, .avito-art { min-height: 250px; }
  .stock-panel { padding: .8rem; font-size: .73rem; }
  .search-alert { right: 0; }
  .site-footer { margin-top: 34px; }
  .footer-inner { flex-wrap: wrap; padding-block: 1rem; min-height: auto; }
  .site-footer nav { flex-wrap: wrap; gap: .7rem 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
