@font-face {
  font-family: Tiny5;
  src: url("/assets/tiny5-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
  font-family: Tiny5;
  src: url("/assets/tiny5-cyrillic.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0400-045F;
}

:root {
  color-scheme: dark;
  --bg: #0e0f10;
  --panel: #16181a;
  --line: #303336;
  --text: #f1f1ea;
  --muted: #b6bab4;
  --lime: #d5fa52;
  --page: 1200px;
  --gutter: clamp(1rem, 4.4vw, 3.5rem);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
img { display: block; max-width: 100%; }

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--page));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 3;
  padding: .65rem 1rem;
  background: var(--lime);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: #0e0f10f5;
}

.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font: 1.35rem/1 Tiny5, monospace;
  letter-spacing: .07em;
  text-decoration: none;
}

.wordmark__mark {
  position: relative;
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
  border: 1px solid var(--lime);
}

.wordmark__mark::before, .wordmark__mark::after {
  position: absolute;
  inset: 3px;
  border: 1px solid var(--lime);
  content: "";
}

.wordmark__mark::after { inset: 7px; background: var(--lime); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 2.4vw, 1.9rem);
}

.site-nav a, .footer-inner > a:last-child {
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover, .footer-inner > a:last-child:hover { color: var(--lime); }

.site-nav .nav-pro {
  display: inline-flex;
  min-height: 2.75rem;
  padding: .45rem .95rem;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--text);
}

.site-nav .nav-pro:hover { border-color: var(--lime); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--lime);
  font: 1.05rem/1.4 Tiny5, monospace;
  letter-spacing: .04em;
}

.eyebrow span { width: .45rem; height: .45rem; background: currentColor; flex: none; }

h1, h2 {
  font-weight: 770;
  letter-spacing: -.06em;
  line-height: .99;
}

h1 {
  margin-top: 1.15rem;
  font-size: clamp(3.35rem, 6.45vw, 6.1rem);
}

h1 span, .pro h2 span { color: var(--lime); }

.hero__description {
  margin-top: 1.45rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.23rem);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3.2rem;
  padding: .7rem 1.15rem;
  margin-top: 1.75rem;
  background: var(--lime);
  color: #13180b;
  font-weight: 730;
  text-decoration: none;
}

.button:hover { background: #e3ff87; }

.hero__figure { border: 1px solid var(--line); padding: .65rem; background: var(--panel); }
.hero__image { aspect-ratio: 4 / 3; overflow: hidden; background: #080909; }
.hero__image img { width: 100%; height: 100%; object-fit: cover; }
.hero__figure:has(video) { width: min(100%, 21rem); justify-self: center; }
.hero__image:has(video) { aspect-ratio: 9 / 16; }
.hero__image video, .demo__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__figure figcaption {
  padding: .65rem .2rem .08rem;
  color: var(--muted);
  font: .9rem/1.3 Tiny5, monospace;
  letter-spacing: .035em;
}

.demos, .gallery, .about, .pro { padding-block: clamp(2.6rem, 6vw, 5.3rem); }

.demos { border-bottom: 1px solid var(--line); }

.demo__media {
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080909;
}

.demo__media:not(:has(video)) {
  background:
    radial-gradient(ellipse at 50% 82%, #262b21, transparent 66%),
    #151719;
}

.demo__placeholder {
  padding: .5rem;
  color: var(--muted);
  text-align: center;
  font: 1rem/1.3 Tiny5, monospace;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

h2 { font-size: clamp(2.6rem, 5.3vw, 4.55rem); }
.section-head p { max-width: 35ch; color: var(--muted); }

.effect-grid, .demo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 4.2vw, 3.25rem) clamp(.75rem, 2vw, 1.65rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.effect { min-width: 0; --grid: #20241c; --accent: #909f69; }
.effect:nth-child(4n + 2) { --grid: #232225; --accent: #a09aab; }
.effect:nth-child(4n + 3) { --grid: #262133; --accent: #b2a2cd; }
.effect:nth-child(4n + 4) { --grid: #1b2524; --accent: #87a9a4; }

.effect__frame {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: #141617;
}

.effect__frame:not(:has(img)) {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: center;
}

.effect__frame img { width: 100%; height: 100%; object-fit: contain; }
.effect__frame:has(img) .effect__placeholder { display: none; }

.effect__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  margin: .4rem;
  padding: 1rem .45rem;
  background: #141617;
  color: var(--accent);
  text-align: center;
  font: .875rem/1.3 Tiny5, monospace;
}

.effect__placeholder::before {
  width: 1.4rem;
  aspect-ratio: 9 / 16;
  border: 1px solid currentColor;
  content: "";
  background:
    linear-gradient(currentColor, currentColor) center / 7px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 7px no-repeat;
}

.effect h3, .demo h3 { margin-top: .85rem; font-size: clamp(1.02rem, 1.8vw, 1.28rem); line-height: 1.25; }
.effect > p, .demo > p { margin-top: .42rem; color: var(--muted); font-size: .94rem; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(1.2rem, 4vw, 3rem);
  border-block: 1px solid var(--line);
}

.about h2 { margin-top: .85rem; }
.about__details { max-width: 40ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.about__system { margin-top: 1rem; font: 1.04rem/1.3 Tiny5, monospace; color: var(--lime); }

.pro__card {
  padding: clamp(1.6rem, 5vw, 4.2rem);
  border: 1px solid #414733;
  background: linear-gradient(115deg, #191d15, #141617 70%);
}

.pro__card p { color: var(--muted); margin-top: .9rem; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 5rem; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero__copy { max-width: 39rem; }
  .hero__figure { max-width: 39rem; width: 100%; }
  .effect-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 5rem; }
  .header-inner { min-height: 3.9rem; gap: .5rem; }
  .wordmark { font-size: 1.17rem; gap: .45rem; }
  .site-nav a[href="#about"] { display: none; }
  .site-nav .nav-pro { padding-inline: .65rem; }
  .section-head { display: grid; gap: .75rem; }
  .effect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 375px) {
  h1 { font-size: clamp(2.4rem, 13.3vw, 3.1rem); }
  .site-nav a { font-size: .85rem; }
}
