:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: #080b10;
  color: #fff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

.site-shell {
  --accent: #e4a575;
  --tint: rgba(133, 57, 22, .17);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #080b10;
}
.site-shell[data-active="1"] { --accent: #9ad9ef; --tint: rgba(15, 106, 142, .15); }
.site-shell[data-active="2"] { --accent: #a4c9ff; --tint: rgba(30, 74, 158, .18); }
.site-shell[data-active="3"] { --accent: #8ce2e0; --tint: rgba(16, 111, 128, .18); }
.site-shell[data-active="4"] { --accent: #96bdff; --tint: rgba(22, 65, 160, .18); }
.site-shell[data-active="5"] { --accent: #d3a880; --tint: rgba(103, 57, 27, .18); }
.site-shell[data-active="6"] { --accent: #e7c29b; --tint: rgba(148, 91, 51, .16); }
.site-shell[data-active="7"] { --accent: #e6bd8f; --tint: rgba(138, 78, 31, .17); }

.scene, .scene-fallback, .fallback-image, #liquid-canvas, .scene-tint, .scene-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene { z-index: -1; overflow: hidden; pointer-events: none; }
.fallback-image {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 700ms ease, transform 1400ms ease;
}
.fallback-image.is-active { opacity: 1; transform: scale(1); }
.fallback-one { background-image: url("./assets/lukoshko.webp"); }
.fallback-two { background-image: url("./assets/superhero-hero.png"); }
@media(max-width:760px){.fallback-two{background-image:url("./assets/superhero-hero-mobile.png");background-size:100% auto;background-position:center top;background-repeat:no-repeat;background-color:#050c1d}}
.fallback-three { background-image: url("./assets/zrpk.webp"); }
.fallback-four { background-image: url("./assets/future.webp"); }
.fallback-five { background-image: url("./assets/tank.webp"); }
.fallback-six { background-image: url("./assets/vr.webp"); }
.fallback-seven { background-image: url("./assets/apartment.jpg"); }
.fallback-eight { background-image: url("./assets/house.webp"); }
#liquid-canvas { display: none; object-fit: cover; }
.has-webgl #liquid-canvas { display: block; }
.has-webgl .scene-fallback { opacity: 0; }
.scene-tint {
  background:
    linear-gradient(90deg, rgba(4, 6, 9, .94) 0%, rgba(4, 6, 9, .74) 30%, rgba(4, 6, 9, .24) 66%, rgba(4, 6, 9, .30) 100%),
    linear-gradient(0deg, rgba(4, 6, 9, .86) 0%, transparent 35%, rgba(4, 6, 9, .20) 80%, rgba(4, 6, 9, .36) 100%),
    linear-gradient(115deg, var(--tint), transparent 55%);
  transition: background 600ms ease;
}
.scene-noise {
  opacity: .13;
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,.015) 3px 4px);
  mix-blend-mode: screen;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: clamp(26px, 5vw, 84px);
  padding: 0 clamp(24px, 4.4vw, 80px);
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.brand {
  flex: none;
  font-size: clamp(18px, 1.85vw, 25px);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -.075em;
  white-space: nowrap;
}
.brand span:not(.brand-dot) { font-weight: 480; }
.brand-dot { color: var(--accent); transition: color 450ms ease; }
.header-nav { display: flex; align-items: center; gap: 35px; }
.nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 0;
  color: rgba(255,255,255,.84);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease;
}
.nav-link:hover, .nav-link:focus-visible { color: #fff; }
.header-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.note-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
  transition: background 450ms ease, box-shadow 450ms ease;
}

.stage { position: relative; height: 100svh; min-height: 650px; }
.stage-rail {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: clamp(15px, 2.5vw, 42px);
  display: flex;
  gap: 24px;
  align-items: center;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(255,255,255,.6);
}
.stage-rail span:last-child { color: var(--accent); transition: color 450ms ease; }
.project {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transform: translateY(26px);
  transition: opacity 450ms ease, transform 650ms cubic-bezier(.18,.76,.22,1), visibility 450ms;
  pointer-events: none;
}
.project.is-active { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.project-topline {
  position: absolute;
  top: clamp(148px, 20vh, 225px);
  left: clamp(24px, 8vw, 150px);
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .17em;
}
.project-topline .line { display: inline-block; width: 45px; height: 1px; background: var(--accent); transition: background 450ms ease; }
.project-copy {
  position: absolute;
  bottom: clamp(135px, 17vh, 205px);
  left: clamp(24px, 8vw, 150px);
  max-width: min(770px, 65vw);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .19em;
}
.eyebrow-square { width: 7px; height: 7px; background: var(--accent); transition: background 450ms ease; }
h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(64px, 7.5vw, 136px);
  font-weight: 820;
  line-height: .91;
  letter-spacing: -.07em;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0,0,0,.12);
}
h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.87); }
.project-long-title h1 { font-size: clamp(54px, 6.1vw, 112px); }
.description {
  max-width: 470px;
  margin: 29px 0 0;
  color: rgba(255,255,255,.85);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 32px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-link-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease, transform 220ms ease;
}
.project-link:hover .project-link-icon, .project-link:focus-visible .project-link-icon { border-color: var(--accent); color: #071015; background: var(--accent); transform: rotate(45deg); }

.side-nav {
  position: absolute;
  z-index: 7;
  right: clamp(38px, 5vw, 84px);
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 19px;
  transform: translateY(-50%);
}
.side-dot {
  display: flex;
  align-items: center;
  gap: 10px;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  transition: color 250ms ease;
}
.side-dot::after { content: ""; display: block; width: 19px; height: 1px; background: currentColor; transition: width 250ms ease, background 250ms ease; }
.side-dot.is-active { color: #fff; }
.side-dot.is-active::after { width: 38px; background: var(--accent); }
.stage-footer {
  position: absolute;
  z-index: 7;
  bottom: 42px;
  left: clamp(24px, 4.4vw, 80px);
  right: clamp(24px, 4.4vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scroll-hint { display: flex; align-items: center; gap: 17px; color: rgba(255,255,255,.72); font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.scroll-symbol { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid rgba(255,255,255,.43); border-radius: 50%; font-size: 20px; font-weight: 400; }
.stage-controls { display: flex; gap: 20px; align-items: center; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.stage-controls i { color: rgba(255,255,255,.4); font-style: normal; padding: 0 8px; }
.arrow-button { appearance: none; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #fff; background: rgba(255,255,255,.04); cursor: pointer; font-size: 19px; line-height: 1; transition: background 200ms ease, border-color 200ms ease; }
.arrow-button:hover, .arrow-button:focus-visible { background: var(--accent); border-color: var(--accent); color: #071015; }
.demo-tag {
  position: absolute;
  z-index: 9;
  top: 115px;
  right: clamp(24px, 4.4vw, 80px);
  color: rgba(255,255,255,.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 760px) {
  .site-header { min-height: 76px; padding-inline: 22px; gap: 20px; }
  .brand { font-size: 19px; }
  .header-nav { margin-left: auto; gap: 17px; }
  .nav-link { font-size: 12px; }
  .header-note, .stage-rail { display: none; }
  .scene-tint { background: linear-gradient(0deg, rgba(4,6,9,.94) 0%, rgba(4,6,9,.57) 44%, rgba(4,6,9,.06) 85%), linear-gradient(90deg, rgba(4,6,9,.34), rgba(4,6,9,.06)); }
  .fallback-image { background-position: 56% center; }
  .project-topline { top: 123px; left: 25px; font-size: 10px; }
  .project-copy { left: 25px; right: 25px; bottom: 128px; max-width: none; }
  .eyebrow { font-size: 9px; line-height: 1.4; margin-bottom: 16px; }
  h1 { font-size: clamp(51px, 12.7vw, 92px); line-height: .95; }
  .project-long-title h1 { font-size: clamp(39px, 10vw, 72px); }
  .project[data-project="7"] h1 { font-size: clamp(43px, 11vw, 78px); }
  h1 em { -webkit-text-stroke-width: 1px; }
  .description { max-width: 440px; margin-top: 20px; font-size: 15px; line-height: 1.47; }
  .project-link { margin-top: 21px; font-size: 11px; }
  .project-link-icon { width: 39px; height: 39px; font-size: 19px; }
  .side-nav { top: auto; right: 22px; bottom: 84px; flex-direction: row; gap: 3px; transform: none; }
  .side-dot { padding: 5px 2px; font-size: 0; gap: 0; }
  .side-dot span { display: none; }
  .side-dot::after { width: 12px; height: 2px; }
  .side-dot.is-active::after { width: 23px; }
  .stage-footer { left: 25px; right: 25px; bottom: 25px; }
  .scroll-hint { font-size: 9px; letter-spacing: .08em; gap: 9px; }
  .scroll-symbol { width: 30px; height: 30px; font-size: 16px; }
  .stage-controls { gap: 9px; }
  .stage-controls #project-count { display: none; }
  .arrow-button { width: 34px; height: 34px; font-size: 16px; }
  .demo-tag { top: 89px; right: 23px; font-size: 8px; }
}
@media (max-width: 440px) {
  .site-header { gap: 8px; }
  .brand { font-size: 16px; }
  .header-nav { gap: 12px; }
  .nav-link { font-size: 11px; }
  .project-copy { bottom: 117px; }
  .description { font-size: 14px; }
  .project-long-title h1 { font-size: 38px; }
  .project[data-project="7"] h1 { font-size: 40px; }
  .scroll-hint span:last-child { max-width: 140px; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  #liquid-canvas { display: none !important; }
  .scene-fallback { opacity: 1 !important; }
}

@media (max-width: 760px) {
  .site-header { min-height: 112px; flex-wrap: wrap; align-content: center; row-gap: 10px; padding-block: 13px; }
  .site-header .brand { width: 100%; }
  .header-nav { width: 100%; margin-left: 0; gap: 25px; }
  .project-topline { top: 158px; }
  .demo-tag { display: none; }
}
@media (max-width: 440px) {
  .site-header .brand { font-size: 17px; }
  .header-nav .nav-link { font-size: 12px; }
  .project-topline { top: 153px; }
}
