/* DATADELIRIUM — redesign
   Built from Figma "DATADELIRIUM REDISIGN" (frames 1:3 hub, 1:165 hall, 1:379 hall locked, 1:598 mobile).
   Desktop values are 1:1 with the 1920px frames; cards scale via container units below 1330px. */

:root {
  --fg: #d9d9d9;
  --bg: #000;
  --white: #fff;
  --link: #d8ce92; /* warm khaki of the outgoing bubbles in the bot demos (#C8C088), lifted for contrast */
  --ghost: rgba(217, 217, 217, 0.15);
  --container: 1280px;
  --gutter: 24px;
  --ls: 0.04em;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.21;
  letter-spacing: var(--ls);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: none;
}

a {
  color: inherit;
}

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

/* ---------- page shell ---------- */

.site {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding-top: 24px;
  overflow-x: clip;
}

/* halftone statues (STATUE frame, 1384×1020 at x=296,y=31) — always above content, never clickable */
.statue {
  position: absolute;
  z-index: 5;
  top: 31px;
  left: calc(50% - 664px);
  width: 1384px;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.header {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 139px;
}

.header__logo {
  display: block;
  width: 259px;
  margin-top: 7px;
}

.header__logo img {
  width: 100%;
  height: auto;
}

/* ---------- hub / hall switch ---------- */

.switch {
  position: relative;
  z-index: 6;
  width: 510px;
  height: 99px;
}

.switch__nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  border: 1px solid var(--fg);
  border-radius: 5px;
  background: var(--fg);
  color: var(--bg);
  font: 700 16px/1.21 var(--font);
  letter-spacing: var(--ls);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--bg);
  color: var(--fg);
}

.btn:focus-visible,
.switch__btn:focus-visible,
.card:focus-visible,
.product:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.btn--wide {
  width: 336px;
}

.switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 239px;
  height: 43px;
  border: 2px solid var(--fg);
  border-radius: 5px;
  background: var(--bg);
  color: var(--fg);
  font: 700 16px/1.21 var(--font);
  letter-spacing: var(--ls);
  text-transform: lowercase;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.switch__btn:hover {
  background: rgba(217, 217, 217, 0.12);
}

/* HALL is not open yet: shown but not clickable */
.switch__btn.is-disabled,
.switch__btn.is-disabled:hover {
  background: var(--bg);
  color: var(--fg);
  opacity: 0.35;
  cursor: not-allowed;
  user-select: none;
}

.switch__btn[aria-current="page"] {
  border-width: 1px;
  background: var(--fg);
  color: var(--bg);
}

.switch__info {
  margin: 0;
  padding-top: 15px;
  text-align: justify;
  text-align-last: left;
  text-transform: lowercase;
}

/* ---------- services (hub) ---------- */

.services {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  width: min(1282px, 100% - 2 * var(--gutter));
}

.services__bg {
  position: absolute;
  z-index: 0;
  top: 484px;
  left: -2px;
  width: 1282px;
  height: 718px;
  background:
    linear-gradient(to bottom, #000 10%, rgba(0, 0, 0, 0) 65%),
    url("../assets/img/services-bg.jpg") center / cover no-repeat;
  pointer-events: none;
}

.card {
  /* 1 unit = 1 design px of this card's width; set per size below */
  --k: calc(100cqw / 625);
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 1;
  border: 0.5px solid var(--fg);
  border-radius: 4px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  isolation: isolate;
}

.card > * {
  position: absolute;
}

.card--lg {
  --k: calc(100cqw / 625);
  grid-column: span 6;
  aspect-ratio: 625 / 406;
}

.card--md {
  --k: calc(100cqw / 406);
  grid-column: span 4;
}

.card--sm {
  --k: calc(100cqw / 296);
  grid-column: span 3;
}

.card--dark {
  background: var(--bg);
  color: var(--fg);
}

.card__text {
  margin: 0;
  font-size: max(14 * var(--k), 9px);
  text-align: justify;
  text-align-last: left;
  text-transform: lowercase;
}

.card__fill {
  object-fit: cover;
}

/* Figma line separator (U+2028) inside justified copy: the line before it stays justified */
.card__line {
  display: block;
  text-align-last: justify;
}

/* animated layers */
.fx {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card.fx-live .fx-fallback {
  visibility: hidden;
}

.grain {
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background: url("../assets/img/grain.png") repeat;
  background-size: 128px;
  opacity: 0.09;
  pointer-events: none;
  animation: grain 0.9s steps(5) infinite;
}

.grain--soft {
  opacity: 0.07;
}

/* dark grain over white cards (LUMEKKO) */
.grain--dark {
  background-image: url("../assets/img/grain-dark.png");
  opacity: 0.1;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-9%, 6%); }
  40% { transform: translate(6%, -10%); }
  60% { transform: translate(-4%, 12%); }
  80% { transform: translate(10%, 3%); }
  100% { transform: translate(0, 0); }
}

/* SINKORA */
.sinkora,
.lumekko { background: #fff; }
.sinkora__logo { left: calc(68 * var(--k)); top: calc(80 * var(--k)); width: calc(490 * var(--k)); height: auto; }
.sinkora .card__text { left: calc(68 * var(--k)); top: calc(302 * var(--k)); width: calc(490 * var(--k)); }

/* LUMEKKO */
.lumekko__logo { left: calc(94 * var(--k)); top: calc(95 * var(--k)); width: calc(438 * var(--k)); height: auto; }
.lumekko .card__text { left: calc(94 * var(--k)); top: calc(305 * var(--k)); width: calc(438 * var(--k)); }

/* SATELAINEN */
.satelainen__bg { left: calc(64 * var(--k)); top: calc(75 * var(--k)); width: calc(278 * var(--k)); height: calc(155 * var(--k)); }
.satelainen__logo { left: calc(64 * var(--k)); top: calc(139 * var(--k)); width: calc(282 * var(--k)); height: auto; }
.card--md .card__text { left: calc(64 * var(--k)); top: calc(260 * var(--k)); width: calc(278 * var(--k)); }

/* UMIKORIA */
.umikoria { background: #000085; color: var(--fg); }
.umikoria__bg { left: calc(64 * var(--k)); top: calc(86 * var(--k)); width: calc(278 * var(--k)); height: calc(155 * var(--k)); }
.umikoria__clouds { left: 0; top: 0; width: calc(405 * var(--k)); height: calc(187 * var(--k)); }
.umikoria__logo { left: calc(64 * var(--k)); top: calc(132 * var(--k)); width: calc(278 * var(--k)); height: auto; }
.umikoria__buildings { left: calc(-1 * var(--k)); bottom: calc(-9 * var(--k)); width: calc(406 * var(--k)); height: calc(153 * var(--k)); }

/* DOROGAYAHERNYA */
/* the GIF as a small CRT: scanlines and a slow rolling light band */
.dorogaya__screen {
  left: calc(64 * var(--k));
  top: calc(64 * var(--k));
  width: calc(278 * var(--k));
  height: calc(156 * var(--k));
  overflow: hidden;
  background: #000;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
}
.dorogaya__screen > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dorogaya__screen::before,
.dorogaya__screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
/* scanlines + vignette */
.dorogaya__screen::before {
  z-index: 3;
  inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45) 100%);
  transition: opacity 0.4s ease;
}
/* rolling light band */
.dorogaya__screen::after {
  z-index: 4;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0));
  animation: crt-roll 7s linear infinite;
}
@keyframes crt-roll {
  to { transform: translateY(350%); }
}

/* small cards: shared black caption */
.card__label {
  left: calc(23 * var(--k));
  top: calc(194 * var(--k));
  width: calc(250 * var(--k));
  min-height: calc(58 * var(--k));
  padding: calc(2 * var(--k)) calc(3 * var(--k)) calc(2 * var(--k)) calc(4 * var(--k));
  background: var(--bg);
  color: var(--fg);
}

.card__label .card__text {
  position: static;
}

/* RAITA */
.raita__bg {
  left: calc(-89 * var(--k));
  top: calc(-87 * var(--k));
  width: calc(471 * var(--k));
  height: calc(334 * var(--k));
  background:
    linear-gradient(to top, #fff, rgba(255, 255, 255, 0)),
    url("../assets/img/raita-bg.webp") center / cover no-repeat;
  filter: blur(2px);
}
.raita__fx {
  left: calc(-89 * var(--k));
  top: calc(-87 * var(--k));
  width: calc(471 * var(--k));
  height: calc(334 * var(--k));
  filter: blur(2.5px);
}
.raita__cd {
  left: calc(39 * var(--k));
  top: calc(43 * var(--k));
  width: calc(218 * var(--k));
  height: calc(209 * var(--k));
  background:
    linear-gradient(to top, #fff, rgba(255, 255, 255, 0)),
    url("../assets/img/raita-cd.webp") center / cover no-repeat;
  transition: rotate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), scale 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.raita__logo { left: calc(27 * var(--k)); top: calc(49 * var(--k)); width: calc(243 * var(--k)); height: auto; }

/* IKKUNA */
.ikkuna__win {
  width: calc(240 * var(--k));
  height: calc(162 * var(--k));
  transition: translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}
.ikkuna__win--1 { left: calc(141 * var(--k)); top: calc(163 * var(--k)); filter: blur(2px); animation: win-a 13s ease-in-out -3s infinite alternate; }
.ikkuna__win--2 { left: calc(-59 * var(--k)); top: calc(10 * var(--k)); filter: blur(2px); animation: win-b 11s ease-in-out -6s infinite alternate; }
.ikkuna__win--3 { left: calc(148 * var(--k)); top: calc(-14 * var(--k)); animation: win-b 15s ease-in-out -9s infinite alternate; }
.ikkuna__win--4 { left: calc(-120 * var(--k)); top: calc(157 * var(--k)); animation: win-a 12s ease-in-out -1s infinite alternate; }

@keyframes win-a {
  0% { width: calc(240 * var(--k)); height: calc(162 * var(--k)); }
  50% { width: calc(198 * var(--k)); height: calc(198 * var(--k)); }
  100% { width: calc(264 * var(--k)); height: calc(138 * var(--k)); }
}

@keyframes win-b {
  0% { width: calc(240 * var(--k)); height: calc(162 * var(--k)); }
  50% { width: calc(282 * var(--k)); height: calc(128 * var(--k)); }
  100% { width: calc(212 * var(--k)); height: calc(182 * var(--k)); }
}

/* Windows 98 chrome (after jdan/98.css) */
.win98 {
  display: flex;
  flex-direction: column;
  padding: 3px;
  background: #c0c0c0;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
  font-family: Tahoma, "MS Sans Serif", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
.win98__bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 18px;
  padding: 0 2px 0 3px;
  background: linear-gradient(90deg, #000080, #1084d0);
}
.win98__title {
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}
.win98__ctrls {
  display: flex;
  flex: none;
}
.win98__btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0 no-repeat;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.win98__btn--min {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='2'%3E%3Cpath d='M0 0h6v2H0z'/%3E%3C/svg%3E");
  background-position: left 4px bottom 3px;
}
.win98__btn--max {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath fill-rule='evenodd' d='M9 0H0v9h9V0zM8 2H1v6h7V2z'/%3E%3C/svg%3E");
  background-position: left 3px top 2px;
}
.win98__btn--close {
  margin-left: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7'%3E%3Cpath d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0V0z'/%3E%3C/svg%3E");
  background-position: left 4px top 3px;
}
.win98__body {
  flex: 1;
  margin: 2px 0;
  background: #c0c0c0;
}
.win98__status {
  display: flex;
  flex: none;
  gap: 2px;
  height: 14px;
}
.win98__status span {
  flex: 1;
  box-shadow: inset -1px -1px #dfdfdf, inset 1px 1px #808080;
}
.win98__status span:first-child {
  flex: 2.5;
}
.ikkuna__logo {
  left: calc(27 * var(--k));
  top: calc(91 * var(--k));
  width: calc(243 * var(--k));
  height: auto;
  filter: drop-shadow(-1px 0 0 #fff) drop-shadow(2px 2px 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff);
}

/* TEKSTO */
.teksto__sample {
  left: calc(28 * var(--k));
  top: calc(13 * var(--k));
  width: calc(242 * var(--k));
  height: calc(327 * var(--k));
  overflow: hidden;
  color: #000;
  filter: blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.14) 61%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.14) 61%);
  transition: filter 0.5s ease;
}
.teksto__scroll {
  animation: teksto-scroll 60s linear infinite;
}
.teksto__scroll p {
  margin: 0;
  padding-bottom: 1.2em;
  font-size: calc(14 * var(--k));
  text-align: justify;
  text-transform: lowercase;
  white-space: pre-line;
}
@keyframes teksto-scroll {
  to { transform: translateY(-50%); }
}
.teksto__select {
  left: calc(22 * var(--k));
  top: calc(91 * var(--k));
  width: calc(252 * var(--k));
  height: calc(48 * var(--k));
  border-radius: calc(3 * var(--k));
  background: rgba(51, 144, 236, 0.32);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.6, 0, 0.2, 1);
}
.teksto__logo { left: calc(28 * var(--k)); top: calc(97 * var(--k)); width: calc(241 * var(--k)); height: auto; }
.teksto__caret {
  left: calc(273 * var(--k));
  top: calc(93 * var(--k));
  width: max(calc(2 * var(--k)), 1.5px);
  height: calc(42 * var(--k));
  background: #000;
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret {
  50% { opacity: 0; }
}
.teksto__toolbar {
  left: 50%;
  top: calc(40 * var(--k));
  display: flex;
  align-items: center;
  gap: calc(2 * var(--k));
  padding: calc(4 * var(--k));
  border-radius: calc(8 * var(--k));
  background: #1c1c1e;
  box-shadow: 0 calc(8 * var(--k)) calc(20 * var(--k)) rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: calc(12 * var(--k));
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  translate: -50% calc(8 * var(--k));
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.teksto__toolbar > * {
  padding: calc(4 * var(--k)) calc(6 * var(--k));
  border-radius: calc(5 * var(--k));
  font-style: normal;
  opacity: 0;
  translate: 0 calc(4 * var(--k));
  transition: opacity 0.25s ease, translate 0.3s ease, background-color 0.2s;
}
.teksto__toolbar b { font-weight: 800; }
.teksto__toolbar i { font-style: italic; font-family: Georgia, serif; }
.teksto__toolbar code { font-family: ui-monospace, Consolas, monospace; }
.teksto__spoiler {
  color: transparent;
  background: url("../assets/img/grain.png") 0 0 / 48px, rgba(255, 255, 255, 0.12);
  animation: spoiler 0.5s steps(4) infinite;
}
@keyframes spoiler {
  25% { background-position: 11px 7px, 0 0; }
  50% { background-position: -9px 13px, 0 0; }
  75% { background-position: 5px -10px, 0 0; }
}

/* SIGNETIX */
.signetix__pattern {
  left: calc(20 * var(--k));
  top: calc(25 * var(--k));
  width: calc(258 * var(--k));
  height: calc(257 * var(--k));
  overflow: hidden;
  opacity: 0.36;
  filter: blur(1.2px);
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.12));
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.12));
  transition: opacity 0.5s ease, filter 0.5s ease;
}
/* oversized so the pattern still fills the card once it is tilted into a diagonal watermark */
.signetix__tilt {
  position: absolute;
  left: -30%;
  top: -30%;
  width: 160%;
  height: 160%;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.signetix__row {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 140 * var(--k));
  height: 100%;
  background: url("../assets/svg/signetix-tile.svg") repeat;
  background-size: calc(140 * var(--k)) calc(52 * var(--k));
}
.signetix__row--a { animation: watermark-l 24s linear infinite; }
.signetix__row--b { top: calc(26 * var(--k)); animation: watermark-r 24s linear infinite; }
@keyframes watermark-l {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-140 * var(--k))); }
}
@keyframes watermark-r {
  from { transform: translateX(calc(-140 * var(--k))); }
  to { transform: translateX(0); }
}
.signetix__logo { left: calc(38.5 * var(--k)); top: calc(103.5 * var(--k)); width: calc(222 * var(--k)); height: auto; }
.signetix__scan {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 65%);
  transform: translateX(-130%);
  pointer-events: none;
}


/* ---------- panels (bot / author / banner) ---------- */

.panel {
  position: relative;
  z-index: 1;
  width: min(var(--container), 100% - 2 * var(--gutter));
  overflow: hidden;
  border: 1px solid var(--fg);
}

.person {
  display: flex;
  align-items: flex-start;
  gap: 19px;
}

.person__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.person__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 13px;
  font-size: 16px;
  text-transform: uppercase;
}

.person__meta strong {
  font-weight: 700;
}

.panel__title {
  margin: 0;
  font: 700 32px/1.21 var(--font);
  letter-spacing: var(--ls);
  text-transform: uppercase;
}

/* TELEGRAM BOT */
.bot {
  min-height: 500px;
  padding: 26px 28px 28px;
  border-radius: 12px;
  background:
    linear-gradient(to bottom, #000, rgba(0, 0, 0, 0)),
    url("../assets/img/bot-bg.jpg") center / cover no-repeat;
}

.bot__content {
  position: relative;
  z-index: 1;
  max-width: 693px;
}

.bot .panel__title {
  margin-top: 25px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 21px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 39px;
  overflow: hidden;
  padding: 0 26px;
  border: 1.6px solid var(--fg);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  font: 700 13px/1.21 var(--font);
  letter-spacing: var(--ls);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.chip:hover {
  background: rgba(217, 217, 217, 0.12);
}

.chip:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.chip.is-active {
  background: var(--fg);
  color: var(--bg);
}

/* autoplay progress: a thin bar fills while the random demo plays */
.chip::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--bg);
  transform: scaleX(0);
  transform-origin: left center;
}

.chip.is-auto::after {
  animation: chip-progress var(--demo-dur, 7s) linear forwards;
}

@keyframes chip-progress {
  to { transform: scaleX(1); }
}

.bot__text {
  max-width: 425px;
  margin: 38px 0 0;
  font-size: 16px;
  text-align: justify;
  text-align-last: left;
  text-transform: lowercase;
}

.bot__demo {
  position: absolute;
  user-select: none;
  -webkit-user-select: none;
  top: 0;
  right: 0;
  width: 521px;
  height: 514px;
}

/* video backdrop: sits above the phones, under the demo clips, and floats with them */
.bot__backdrop {
  position: absolute;
  z-index: 1;
  left: 98px;
  top: 36px;
  width: 336px;
  height: 330px;
  border-radius: 12px;
  background: linear-gradient(to bottom, rgba(217, 217, 217, 0.22), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* demo clips (transparent chat UI) play on top of the phones */
.bot__screen {
  position: absolute;
  z-index: 2;
  left: 16.5%;
  top: 0;
  width: 69%;
  aspect-ratio: 4 / 5;
  pointer-events: none;
}

.bot__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bot__video.is-on {
  opacity: 1;
}

.bot__phones {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: phones-float 6.5s ease-in-out infinite;
}

/* idle float: the phones drift up and down a little (the demo screen above them stays still) */
@keyframes phones-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-0.5deg); }
}


.bot__demo .btn {
  position: absolute;
  z-index: 3;
  left: 98px;
  top: 403px;
}

/* AUTHOR */
.author {
  min-height: 491px;
  border-radius: 12px;
  padding: 26px 28px;
  background:
    linear-gradient(to bottom, #000, rgba(0, 0, 0, 0)),
    url("../assets/img/author-bg.jpg") center / cover no-repeat;
}

.author .panel__title {
  margin-top: 41px;
}

.author__cta {
  margin-top: 43px;
}

.author__socials,
.author__credits {
  margin: 0;
  font-size: 16px;
  text-transform: lowercase;
}

.author__socials {
  margin-top: 45px;
}

.author__lead {
  display: block;
  margin-bottom: 29px;
  font-size: 24px;
}

.author__aside {
  position: absolute;
  top: 264px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.author__credits .author__lead {
  margin-bottom: 38px;
}

.author__mark {
  width: 161px;
  height: auto;
  margin-top: 26px;
}

/* BANNER */
.banner {
  display: flex;
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  min-height: 263px;
  padding: 66px 28px 40px;
  background:
    linear-gradient(to bottom, #000 -8%, rgba(0, 0, 0, 0)),
    url("../assets/img/banner-bg.jpg") center / cover no-repeat;
}

.banner__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 350px));
  justify-content: center;
  gap: 40px;
  width: 100%;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.banner__links li {
  font: 600 20px/1.2 var(--font);
  letter-spacing: var(--ls);
  text-align: center;
  text-transform: uppercase;
}

.banner__powered {
  margin: 28px 0 0;
  font: 600 12px/1.2 var(--font);
  letter-spacing: var(--ls);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.banner__powered:hover {
  opacity: 1;
}

.link {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(216, 206, 146, 0.55);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

/* middle halftone figure (root Vector 1:164) — overlaps the lower panels */
.lower {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

.figure {
  position: absolute;
  z-index: 4;
  top: 41px;
  left: calc(50% - 229px);
  width: 445px;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(var(--container), 100% - 2 * var(--gutter));
  height: 139px;
  padding-top: 18px;
  background: var(--bg);
}

.footer--wide {
  width: min(1440px, 100% - 2 * var(--gutter));
}

.footer__rule {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 2px solid var(--fg);
}

.footer__copy {
  margin: 17px 0 0;
  font-weight: 600;
  font-size: 16px;
}

.footer__logo {
  width: 224px;
  height: auto;
  margin-top: 7px;
}

/* ---------- hall: market ---------- */

.market {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 260px);
  justify-content: center;
  gap: 10px;
  width: min(1440px, 100%);
  padding: 10px;
}

.market__ghost {
  aspect-ratio: 1;
  border: 1px solid var(--ghost);
  border-radius: 4px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--fg);
  border-radius: 4px;
  color: var(--white);
  text-decoration: none;
}

.product__media {
  height: 73.5%;
  background: var(--white);
}

.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product:hover .product__media img {
  transform: scale(1.04);
}

.product__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 1px 26px 6px;
}

.product__title {
  margin: 0;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product__price {
  align-self: flex-end;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
}

/* ---------- hall: locked ---------- */

.locked {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 76px;
  width: 100%;
  min-height: 506px;
  padding: 10px;
}

.locked__title {
  margin: 0;
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

.locked__form {
  width: min(510px, 100%);
}

.locked__input {
  display: block;
  width: 100%;
  height: 53px;
  padding: 0 16px;
  border: 2px solid var(--fg);
  border-radius: 5px;
  background: transparent;
  color: var(--white);
  font: italic 600 16px/1.21 var(--font);
  letter-spacing: var(--ls);
  text-align: center;
}

.locked__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.locked__input:focus {
  outline: none;
  border-color: var(--white);
}

.locked__input.is-wrong {
  animation: shake 0.35s ease;
  border-color: #ff4d4d;
}

@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* ---------- card hover ---------- */

@media (hover: hover) {
  .card {
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease, border-color 0.3s ease;
  }
  .card:hover {
    transform: translateY(-6px);
    border-color: #fff;
    box-shadow: 0 24px 44px -24px rgba(217, 217, 217, 0.5);
  }

  .satelainen__bg { transition: scale 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .satelainen:hover .satelainen__bg { scale: 1.07; }
  .satelainen .grain { transition: opacity 0.4s ease; }
  .satelainen:hover .grain { opacity: 0.16; }

  .umikoria__buildings { transition: translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .umikoria:hover .umikoria__buildings { translate: 0 calc(-6 * var(--k)); }

  .raita:hover .raita__cd { rotate: -4deg; scale: 1.05; }

  .ikkuna:hover .ikkuna__win { filter: none; }
  .ikkuna:hover .ikkuna__win--1 { translate: calc(12 * var(--k)) calc(10 * var(--k)); }
  .ikkuna:hover .ikkuna__win--2 { translate: calc(-12 * var(--k)) calc(-8 * var(--k)); }
  .ikkuna:hover .ikkuna__win--3 { translate: calc(14 * var(--k)) calc(-12 * var(--k)); }
  .ikkuna:hover .ikkuna__win--4 { translate: calc(-10 * var(--k)) calc(8 * var(--k)); }
  .ikkuna:hover .ikkuna__win:not(.ikkuna__win--4) .win98__bar { background: linear-gradient(90deg, #808080, #b5b5b5); }

  .teksto:hover .teksto__sample { filter: blur(0.6px); }
  .teksto:hover .teksto__select { transform: scaleX(1); }
  .teksto:hover .teksto__caret { visibility: hidden; }
  .teksto:hover .teksto__toolbar { opacity: 1; translate: -50% 0; transition-delay: 0.3s; }
  .teksto:hover .teksto__toolbar > * { opacity: 1; translate: 0 0; }
  .teksto:hover .teksto__toolbar > :nth-child(1) { transition-delay: 0.38s; }
  .teksto:hover .teksto__toolbar > :nth-child(2) { transition-delay: 0.42s; }
  .teksto:hover .teksto__toolbar > :nth-child(3) { transition-delay: 0.46s; }
  .teksto:hover .teksto__toolbar > :nth-child(4) { transition-delay: 0.5s; }
  .teksto:hover .teksto__toolbar > :nth-child(5) { transition-delay: 0.54s; }
  .teksto:hover .teksto__toolbar > :nth-child(6) { transition-delay: 0.58s; }

  .dorogaya:hover .dorogaya__screen { transform: scale(1.04); filter: saturate(1.25) contrast(1.08); }
  .dorogaya:hover .dorogaya__screen::before { opacity: 0.6; }

  /* hover: the pattern turns into a classic diagonal watermark and a light sweep "applies" it */
  .signetix:hover .signetix__pattern { opacity: 0.6; filter: blur(0.4px); }
  .signetix:hover .signetix__tilt { transform: rotate(-24deg) scale(0.92); }
  .signetix:hover .signetix__scan {
    transform: translateX(130%);
    transition: transform 0.95s cubic-bezier(0.45, 0, 0.2, 1) 0.1s;
  }
}

/* CSS loops pause while their card is off screen (main.js toggles .is-live) */
.js .card:not(.is-live),
.js .card:not(.is-live) * {
  animation-play-state: paused !important;
}

/* ---------- first-load intro / page enter / scroll reveal ---------- */

.intro .header__logo { animation: dd-logo 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s backwards; }
.intro .statue { animation: dd-statue 2s cubic-bezier(0.3, 0.6, 0.2, 1) 0.35s backwards; }
.intro .switch__btn { animation: dd-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.55s backwards; }
.intro .switch__btn + .switch__btn { animation-delay: 0.65s; }
.intro .switch__info { animation: dd-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.75s backwards; }
.intro .services__bg { animation: dd-fade 1.6s ease 1.1s backwards; }
.intro .card,
.intro .product { animation: dd-card 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.85s + var(--i, 0) * 70ms) backwards; }
.intro .market__ghost { animation: dd-fade 1.2s ease 1.4s backwards; }
.intro .locked > * { animation: dd-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.85s backwards; }
.intro .locked > * + * { animation-delay: 0.95s; }
.enter .site { animation: dd-fade 0.45s ease backwards; }

@keyframes dd-logo {
  from { opacity: 0; filter: blur(12px); transform: scale(0.9); }
}
@keyframes dd-statue {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes dd-up {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes dd-card {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
}
@keyframes dd-fade {
  from { opacity: 0; }
}

.reveal {
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-ready .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(32px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   Tablet (768–1329): container-unit cards keep their proportions,
   panels reflow.
   ========================================================= */

@media (max-width: 1329px) {
  .services__bg {
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    top: 38%;
    height: 56%;
  }

  .market {
    grid-template-columns: repeat(3, minmax(0, 260px));
  }

  .market__ghost {
    display: none;
  }

  .bot__demo {
    width: 40%;
    height: auto;
    aspect-ratio: 521 / 514;
  }

  .bot__backdrop,
  .bot__demo .btn {
    left: 18.8%;
    width: 64.5%;
  }

  .bot__backdrop { top: 7%; height: 64%; }
  .bot__demo .btn { top: auto; bottom: 13%; font-size: 13px; }
  .bot__content { max-width: 58%; }
}

@media (max-width: 1023px) {
  .author__aside {
    position: static;
    align-items: flex-start;
    margin-top: 40px;
    text-align: left;
  }

  .banner__links {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bot {
    min-height: 0;
  }

  .bot__content { max-width: none; }

  .bot__demo {
    position: relative;
    width: min(420px, 100%);
    margin: 24px auto -40px;
  }

  .bot__demo .btn { font-size: 14px; }
}

/* =========================================================
   Mobile (frame 1:598, 390px)
   ========================================================= */

@media (max-width: 767px) {
  :root {
    --gutter: 24px;
  }

  .site {
    gap: 0;
    padding-top: 4px;
  }

  .statue {
    top: 4px;
    left: 0;
    width: 100%;
  }

  .header {
    height: 84px;
  }

  .header__logo {
    width: 164px;
    margin-top: 0;
  }

  .switch {
    width: min(273px, 100% - 2 * var(--gutter));
    height: auto;
    margin-top: 77px;
  }

  .switch__nav {
    gap: 17px;
    padding-top: 0;
  }

  .switch__btn {
    width: 128px;
    height: 34px;
    border-width: 1px;
    font-size: 12px;
  }

  .switch__info {
    padding-top: 8px;
    font-size: 11px;
    letter-spacing: 0.02em;
    hyphens: auto;
  }

  /* services: Lumekko first, 1/2/3 columns, Dorogayahernya & Ikkuna hidden as in the mobile frame */
  .services {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 15px;
    margin-top: 30px;
  }

  .services__bg {
    top: 11px;
    height: 332px;
    width: 152vw;
  }

  .card--lg { grid-column: 1 / -1; }
  .card--md { grid-column: span 3; }
  .card--sm { grid-column: span 2; }

  .lumekko { order: -1; }
  .dorogaya,
  .ikkuna { display: none; }

  .card__text { font-size: max(14 * var(--k), 10px); hyphens: auto; }
  .card__line { display: inline; text-align-last: auto; }
  .card--lg .card__text { top: auto; bottom: calc(26 * var(--k)); }
  .card--md .card__text { font-size: 9px; }

  .card--sm { aspect-ratio: 296 / 340; }

  .card--sm .card__label {
    top: auto;
    bottom: calc(8 * var(--k));
    left: 6%;
    width: 88%;
    min-height: 0;
    padding: 2px 3px;
  }

  .card--sm .card__text {
    font-size: 7px;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .bot { display: none; }

  .lower {
    gap: 24px;
    margin-top: 24px;
  }

  .figure {
    top: 0;
    left: calc(50% - 86px);
    width: 165px;
    opacity: 0.55;
  }

  .panel {
    border-width: 0.5px;
  }

  .person { gap: 10px; }
  .person__avatar { width: 40px; height: 40px; }
  .person__meta { gap: 4px; padding-top: 6px; font-size: 11px; }

  .panel__title { font-size: 20px; }

  .author {
    min-height: 0;
    padding: 16px;
  }

  .author .panel__title { margin-top: 16px; }
  .author__cta { width: 100%; height: 36px; margin-top: 16px; font-size: 12px; }
  .author__socials,
  .author__credits { font-size: 12px; }
  .author__socials { margin-top: 20px; }
  .author__lead,
  .author__credits .author__lead { margin-bottom: 8px; font-size: 16px; }
  .author__aside { align-items: flex-end; margin-top: 20px; text-align: right; }
  .author__mark { width: 110px; }

  .banner {
    min-height: 0;
    padding: 16px;
  }

  .banner .btn { width: 100%; height: 36px; font-size: 12px; }
  .banner__links { gap: 12px; margin-top: 16px; }
  .banner__links li { font-size: 13px; }
  .banner__powered { margin-top: 14px; font-size: 11px; }

  .footer {
    height: auto;
    margin-top: 16px;
    padding: 8px 0 32px;
  }

  .footer__rule { border-top-width: 1px; }
  .footer__copy { margin-top: 10px; font-size: 12px; }
  .footer__logo { width: 115px; margin-top: 5px; }

  .market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 30px;
    padding: 0 var(--gutter);
  }

  .product { aspect-ratio: auto; }
  .product__media { height: auto; aspect-ratio: 260 / 191; }
  .product__info { gap: 6px; padding: 6px 10px 8px; }
  .product__title { font-size: 10px; }
  .product__price { font-size: 13px; }

  .locked {
    gap: 40px;
    min-height: 360px;
    margin-top: 40px;
    padding: 0 var(--gutter);
  }
}

.link-plain {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(216, 206, 146, 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link-plain:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

/* Safari: the stacked-alpha <video> only feeds the WebGL canvas next to it */
.bot__video.is-source {
  visibility: hidden;
}
