/* ==========================================================================
   Design tokens — monochrome "gallery vitrine" system (see DESIGN.md)
   ========================================================================== */
:root {
  --black: #000000;
  --white: #ffffff;
  --ash: #e5e7eb;
  --smoke: #bfbfbf;
  --iron: #999999;
  --hair: rgba(229, 231, 235, 0.14);
  --hair-strong: rgba(229, 231, 235, 0.26);
  --panel: #0b0b0b;
  --panel-2: #141414;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 17.6px;
  --radius-sm: 11px;
  --pill: 9999px;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 41px);
  --section: clamp(72px, 10vw, 128px);
  --gap: 18px;
  --card-pad: 26px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }

svg use { pointer-events: none; }
svg:not([class*="card"]):not(.crm__line) { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 6px; }
.section--light :focus-visible { outline-color: var(--black); }

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

.skip {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  background: var(--white); color: var(--black); padding: 10px 18px; border-radius: var(--pill);
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip:focus { transform: none; }

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

/* ==========================================================================
   Typography
   ========================================================================== */
.kicker {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.15;
  letter-spacing: -0.029em;
  color: var(--ash);
  font-weight: 400;
}

.display {
  font-size: clamp(42px, 7.2vw, 88px);
  line-height: 0.92;
  font-weight: 450;
  letter-spacing: -0.06em;
  color: var(--white);
}

.heading-lg {
  font-size: clamp(28px, 3.4vw, 35px);
  line-height: 1.11;
  font-weight: 450;
  letter-spacing: -0.033em;
}

.note {
  font-size: 15px;
  color: var(--iron);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { padding: var(--section) 0; position: relative; }
.section--tight { padding: calc(var(--section) * 0.55) 0; }
.section--light { background: var(--ash); color: var(--black); }
.section--light .kicker { color: #4b4b4b; }
.section--light .display { color: var(--black); }

.title-block {
  text-align: center;
  display: grid;
  gap: 14px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.title-block--sm { margin-bottom: 36px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  padding: 16px 32px;
  border: 0; border-radius: var(--pill);
  background: var(--white); color: var(--black);
  font-size: 15px; font-weight: 500; letter-spacing: -0.02em; line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.pill:hover { background: var(--ash); }
.pill:active { transform: scale(0.97); }
.pill--sm { min-height: 40px; padding: 10px 20px; font-size: 14px; }
.pill--dark { background: var(--black); color: var(--white); }
.pill--dark:hover { background: #262626; }
.pill--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.pill--ghost:hover { background: rgba(255,255,255,.08); }
.pill[disabled] { opacity: .5; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--ash);
  padding: 14px 6px;
  transition: color .2s;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--white); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--pill);
  color: var(--white);
  transition: background-color .2s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(255,255,255,.08); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 13px; letter-spacing: -0.02em; line-height: 1;
  padding: 7px 11px;
  border-radius: var(--pill);
  background: var(--ash); color: #333;
}
.tags--dark li { background: transparent; color: var(--smoke); border: 1px solid var(--hair-strong); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top);
}
.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: var(--hair);
}
.nav__inner {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; stroke-width: 2.4 !important; }
.brand__name { font-size: 17px; font-weight: 500; letter-spacing: -0.04em; }

.nav__links { display: none; gap: 6px; }
.nav__links a {
  display: grid; gap: 2px;
  padding: 6px 18px;
  border-radius: 12px;
  font-size: 15px; line-height: 1.15;
  transition: background-color .2s;
}
.nav__links span { color: var(--iron); font-size: 13px; }
.nav__links b { font-weight: 450; color: var(--white); }
.nav__links a:hover { background: rgba(255,255,255,.06); }

.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__actions .pill--sm { display: none; }

.burger {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-content: center; gap: 6px; border-radius: var(--pill);
}
.burger span { display: block; width: 22px; height: 1.6px; background: var(--white); transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

.mobile-menu {
  display: grid; gap: 4px;
  padding: 8px var(--gutter) 28px;
  background: rgba(0,0,0,.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hair);
  min-height: calc(100dvh - 72px);
  align-content: start;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.pill) {
  font-size: 32px; font-weight: 450; letter-spacing: -0.04em; line-height: 1.1;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
}
.mobile-menu .pill { margin-top: 24px; width: 100%; }
body.menu-open { overflow: hidden; }
body.menu-open .nav { background: #000; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__actions .pill--sm { display: inline-flex; }
  .burger, .mobile-menu { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(84px + env(safe-area-inset-top)) var(--gutter) clamp(48px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
}

.stage {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: grid; place-items: center;
  perspective: 1200px;
}
.orbit {
  position: relative;
  width: min(1000px, 100%, calc((100svh - 520px) * 1.95));
  min-width: min(560px, 100%);
  aspect-ratio: 16 / 8.2;
  margin-top: 3%;
}

.obj {
  position: absolute;
  --x: 0px; --y: 0px; --r: 0deg;
  transform: translate3d(var(--x), var(--y), 0) rotate(var(--r));
  transition: transform .9s var(--ease);
  will-change: transform;
}
.obj > * {
  animation: float 9s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.obj:nth-child(2n) > * { animation-duration: 11s; animation-delay: -3s; }
.obj:nth-child(3n) > * { animation-duration: 13s; animation-delay: -6s; }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.obj--main  { left: 50%; top: 50%; width: 52%; margin-left: -26%; translate: 0 -50%; z-index: 3; }
.obj--main > * { animation: none; box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 0 1px var(--hair); }
.obj--tg    { left: 2%;  top: 4%;   width: 22%; z-index: 2; }
.obj--code  { right: 1%; top: 0%;   width: 25%; z-index: 2; }
.obj--score { left: 12%; bottom: 0%; width: 12%; z-index: 4; }
.obj--chart { right: 5%; bottom: 3%; width: 19%; z-index: 4; }
.obj--ai    { left: 21%; top: -4%;  width: 22%; z-index: 1; }
.obj--json  { right: 23%; top: -5%; width: 15%; z-index: 1; }
.obj--crm   { left: -2%; bottom: 20%; width: 17%; z-index: 1; }

/* Browser window mock */
.win {
  background: #0d0d0d;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hair);
}
.win__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hair);
  background: #111;
}
.win__bar i { width: 8px; height: 8px; border-radius: 50%; background: #333; }
.win__bar span {
  margin: 0 auto; font-size: 11px; color: var(--iron);
  padding: 3px 14px; border-radius: var(--pill); background: #1a1a1a;
}
.win__body { padding: 5% 6% 6%; display: grid; gap: 18px; aspect-ratio: 16 / 9.4; align-content: start; }

.mini-nav { display: flex; align-items: center; gap: 10px; }
.mini-nav b { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--white); }
.mini-nav span { width: 34px; height: 5px; border-radius: 3px; background: #3a3a3a; }
.mini-nav span:first-of-type { margin-left: auto; }
.mini-nav em { width: 44px; height: 14px; border-radius: 7px; background: var(--white); }

.mini-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 6%; align-items: center; }
.mini-hero__text { display: grid; gap: 8px; }
.mini-hero__text i { height: 12px; border-radius: 6px; background: var(--white); }
.mini-hero__text .l1 { width: 90%; } .mini-hero__text .l2 { width: 70%; }
.mini-hero__text .l3 { width: 80%; height: 6px; background: #444; margin-top: 4px; }
.mini-hero__text em { width: 38%; height: 18px; border-radius: 9px; background: var(--white); margin-top: 8px; }
.mini-hero__img {
  aspect-ratio: 1.2; border-radius: 12px; background: #1c1c1c;
  position: relative; overflow: hidden;
}
.mini-hero__img span {
  position: absolute; inset: 18% 22%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #cfcfcf 18%, #5a5a5a 55%, #151515 80%);
}
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-cards i { height: 44px; border-radius: 10px; border: 1px solid var(--hair); background: #121212; }

/* Floating cards */
.card-tg, .card-ai, .card-chart, .card-score, .card-crm, .card-code {
  background: #0e0e0e;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}
.card-tg { padding: 12px; display: grid; gap: 7px; font-size: 11px; }
.card-tg__head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.card-tg__head b { display: block; font-weight: 500; font-size: 12px; }
.card-tg__head small { color: var(--iron); font-size: 10px; }
.ava { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #fff, #666); flex: none; }
.msg { padding: 7px 10px; border-radius: 12px; max-width: 88%; line-height: 1.35; }
.msg--in { background: #222; justify-self: end; border-bottom-right-radius: 4px; }
.msg--out { background: var(--white); color: var(--black); border-bottom-left-radius: 4px; }
.kb { display: grid; grid-auto-flow: column; gap: 5px; }
.kb span { text-align: center; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--hair-strong); color: var(--ash); font-size: 10.5px; }

.card-code {
  font-family: var(--mono);
  font-size: 11px; line-height: 1.6; letter-spacing: 0;
  padding: 14px 16px;
  color: var(--ash);
  white-space: pre;
  overflow: hidden;
}
.card-code .k { color: var(--white); font-weight: 500; }
.card-code .c { color: #6e6e6e; }
.card-code--sm { font-size: 10.5px; }

.card-score { padding: 14px 10px; display: grid; justify-items: center; align-items: center; gap: 4px; }
.card-score svg { width: 70%; transform: rotate(-90deg); grid-area: 1 / 1; }
.card-score circle { fill: none; stroke: #2a2a2a; stroke-width: 3; }
.card-score .arc { stroke: var(--white); stroke-dasharray: 119.4; stroke-dashoffset: 119.4; stroke-linecap: round; animation: arc 2.2s .6s var(--ease) forwards; }
@keyframes arc { to { stroke-dashoffset: 0; } }
.card-score b { grid-area: 1 / 1; font-size: clamp(14px, 1.6vw, 20px); font-weight: 450; letter-spacing: -0.04em; }
.card-score small { font-size: 10px; color: var(--iron); }

.card-chart { padding: 14px; display: grid; gap: 2px; }
.card-chart small { font-size: 10px; color: var(--iron); }
.card-chart b { font-size: 22px; font-weight: 450; letter-spacing: -0.05em; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 8px; }
.bars i { flex: 1; height: var(--h); background: #3a3a3a; border-radius: 4px 4px 1px 1px; transform-origin: bottom; animation: grow 1.4s var(--ease) both; }
.bars i:last-child { background: var(--white); }
.bars i:nth-child(2) { animation-delay: .1s; } .bars i:nth-child(3) { animation-delay: .2s; }
.bars i:nth-child(4) { animation-delay: .3s; } .bars i:nth-child(5) { animation-delay: .4s; }
.bars i:nth-child(6) { animation-delay: .5s; } .bars i:nth-child(7) { animation-delay: .6s; }
@keyframes grow { from { transform: scaleY(0); } }

.card-ai { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 11.5px; line-height: 1.4; color: var(--ash); }
.spark { width: 26px; height: 26px; border-radius: 8px; background: var(--white); color: var(--black); display: grid; place-items: center; flex: none; }
.spark svg { width: 16px; height: 16px; }
.caret { display: inline-block; width: 6px; height: 1.05em; background: var(--white); vertical-align: -2px; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.card-crm { padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.card-crm .col { display: grid; gap: 5px; align-content: start; }
.card-crm small { font-size: 9px; color: var(--iron); }
.card-crm i { height: 18px; border-radius: 5px; background: #222; border: 1px solid var(--hair); }
.card-crm i.w { background: var(--white); }

/* Hero copy */
.hero__copy {
  position: relative; z-index: 5;
  text-align: center;
  display: grid; justify-items: center; gap: 16px;
  max-width: 820px; margin: 0 auto;
}
.hero__copy .display { font-size: clamp(46px, min(8.4vw, 11svh), 104px); }
.hero__lead { color: var(--smoke); font-size: clamp(16px, 1.5vw, 18px); max-width: 560px; line-height: 1.5; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 10px; }

/* Entrance */
.hero .obj { opacity: 0; animation: pop 1.1s var(--ease) forwards; }
.hero .obj--main { animation-delay: .05s; }
.hero .obj:nth-child(2) { animation-delay: .25s; } .hero .obj:nth-child(3) { animation-delay: .35s; }
.hero .obj:nth-child(4) { animation-delay: .45s; } .hero .obj:nth-child(5) { animation-delay: .5s; }
.hero .obj:nth-child(6) { animation-delay: .6s; } .hero .obj:nth-child(7) { animation-delay: .65s; }
.hero .obj:nth-child(8) { animation-delay: .7s; }
@keyframes pop { from { opacity: 0; scale: .92; filter: blur(8px); } to { opacity: 1; scale: 1; filter: blur(0); } }
.hero__copy > * { animation: rise .9s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: .1s; }
.hero__copy > :nth-child(3) { animation-delay: .2s; }
.hero__copy > :nth-child(4) { animation-delay: .3s; }
.hero__copy > :nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Hero — tablet & phone */
@media (max-width: 899px) {
  .orbit { aspect-ratio: 4 / 3.1; width: min(640px, 100%); min-width: 0; margin-top: 0; }
  .obj--main { width: 72%; margin-left: -36%; }
  .obj--tg { left: -2%; top: 2%; width: 34%; }
  .obj--code { right: -3%; top: 0; width: 38%; }
  .obj--score { left: 2%; bottom: 2%; width: 20%; }
  .obj--chart { right: 0; bottom: 0; width: 30%; }
  .obj--ai, .obj--json, .obj--crm { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: calc(76px + env(safe-area-inset-top)); }
  .stage { min-height: 0; }
  .orbit { width: 100%; aspect-ratio: 4 / 3.4; }
  .obj--main { width: 72%; margin-left: -36%; }
  .obj--tg { width: 42%; left: -1%; top: auto; bottom: -6%; z-index: 5; }
  .obj--code { width: 46%; right: -3%; top: 0; }
  .card-code { font-size: 9px; padding: 10px 11px; }
  .card-tg { font-size: 9.5px; padding: 9px; gap: 5px; }
  .card-tg__head b { font-size: 10px; }
  .kb span { font-size: 9px; padding: 4px 2px; }
  .obj--score { width: 22%; left: 2%; top: 1%; bottom: auto; }
  .obj--chart { width: 34%; right: 1%; bottom: -3%; }
  .card-chart b { font-size: 17px; }
  .bars { height: 34px; }
  .win__body { gap: 10px; }
  .mini-cards i { height: 26px; }
  .hero__copy { margin-top: 36px; }
  .hero__cta .pill { width: 100%; }
  .hero__cta { width: 100%; flex-direction: column; gap: 4px; }
}

/* Language switch */
.lang-switch {
  display: grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: var(--pill); border: 1px solid var(--hair-strong);
  font-size: 13px; font-weight: 500; letter-spacing: 0;
  color: var(--ash);
  transition: background-color .2s, color .2s;
}
.lang-switch:hover { background: var(--white); color: var(--black); }

/* ==========================================================================
   Showcase
   ========================================================================== */
.showcase { padding-bottom: calc(var(--section) * 0.7); }
.showcase__img { margin: 0 calc(var(--gutter) * -1); }
.showcase__img img { width: 100%; height: auto; }
@media (min-width: 1240px) { .showcase__img { margin: 0 -60px; } }
.showcase__facts {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-top: clamp(24px, 4vw, 48px);
}
@media (min-width: 760px) { .showcase__facts { grid-template-columns: repeat(3, 1fr); gap: var(--gap); } }
.showcase__facts li { border-top: 1px solid var(--hair-strong); padding-top: 18px; display: grid; gap: 6px; }
.showcase__facts b { font-size: clamp(21px, 2.2vw, 26px); font-weight: 450; letter-spacing: -0.03em; }
.showcase__facts span { color: var(--smoke); font-size: 15px; }

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  overflow: hidden;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker ul { display: flex; flex: none; }
.ticker li {
  font-size: clamp(18px, 2vw, 21px); letter-spacing: -0.03em; color: var(--smoke);
  padding: 0 22px; white-space: nowrap; position: relative;
}
.ticker li::after { content: "·"; position: absolute; right: -4px; color: #555; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Services (light section)
   ========================================================================== */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(3, 1fr); gap: var(--gap); } }

.service {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--card-pad);
  display: grid; gap: 12px; align-content: start;
  transition: transform .35s var(--ease);
}
.service:hover { transform: translateY(-4px); }
.service__icon { width: 30px; height: 30px; margin-bottom: 18px; stroke-width: 1.5 !important; }
.service h3 { font-size: 21px; font-weight: 450; letter-spacing: -0.029em; line-height: 1.15; }
.service p { font-size: 15px; color: #4b4b4b; line-height: 1.5; }
.service .tags { margin-top: 6px; }

/* ==========================================================================
   Work / cases
   ========================================================================== */
.work { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .work { grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
  .case--wide { grid-column: 1 / -1; }
}

.case {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  background: var(--black);
  transition: border-color .3s;
}
.case:hover { border-color: var(--hair-strong); }
.case__preview {
  background: #000;
  border-bottom: 1px solid var(--hair);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.case__preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case:hover .case__preview img { transform: scale(1.03); }
.case__meta { padding: var(--card-pad); display: grid; gap: 10px; align-content: start; }
.case__type { font-size: 13px; color: var(--iron); }
.case h3 { font-size: clamp(19px, 2vw, 21px); font-weight: 450; letter-spacing: -0.029em; line-height: 1.2; color: var(--white); }
.case .tags { margin-top: 6px; }

@media (min-width: 760px) {
  .case--wide { grid-template-columns: 1.5fr 1fr; }
  .case--wide .case__preview { border-bottom: 0; border-right: 1px solid var(--hair); }
  .case--wide .case__meta { align-content: end; padding: 35px; }
  .case--wide h3 { font-size: clamp(24px, 2.6vw, 30px); }
}

/* Real projects */
.projects { display: grid; gap: 12px; }
@media (min-width: 900px) { .projects { gap: var(--gap); } }
.project {
  border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 1fr; background: var(--black);
  transition: border-color .3s;
}
.project:hover { border-color: var(--hair-strong); }
.project__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--hair); background: #000; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project__media img { transform: scale(1.03); }
.project__body { padding: var(--card-pad); display: grid; gap: 12px; align-content: center; }
.project__type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; color: var(--iron); }
.badge { display: inline-block; padding: 4px 10px; border-radius: var(--pill); background: var(--white); color: var(--black); font-size: 12px; font-weight: 500; letter-spacing: -0.01em; }
.project h3 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 450; letter-spacing: -0.035em; line-height: 1.12; }
.project__lead { color: var(--smoke); font-size: 15px; }
.project__list { display: grid; gap: 8px; margin: 4px 0 6px; }
.project__list li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ash); }
.project__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
@media (min-width: 900px) {
  .project { grid-template-columns: 1.35fr 1fr; }
  .project__media { border-bottom: 0; border-right: 1px solid var(--hair); }
  .project__body { padding: 35px; }
  .project:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
  .project:nth-child(even) .project__media { order: 2; border-right: 0; border-left: 1px solid var(--hair); }
}
.title-block--sub { margin: clamp(56px, 8vw, 96px) 0 clamp(28px, 4vw, 48px); }

/* ==========================================================================
   Stats (review-card style)
   ========================================================================== */
.stats { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--gap); } }
.stat {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: var(--card-pad);
  display: grid; gap: 12px; align-content: start;
  min-height: 200px;
}
.stat b { font-size: clamp(35px, 4vw, 47px); font-weight: 450; letter-spacing: -0.05em; line-height: 1; }
.stat p { color: var(--ash); font-size: 16px; line-height: 1.45; }
.stat small { color: var(--iron); font-size: 15px; margin-top: auto; align-self: end; }

/* ==========================================================================
   Process
   ========================================================================== */
.steps { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.step {
  position: relative;
  border-top: 1px solid var(--hair-strong);
  padding: 22px 4px 8px;
  display: grid; gap: 10px; align-content: start;
}
.step::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--white);
}
.step__n { font-size: 13px; color: var(--iron); font-family: var(--mono); letter-spacing: 0; }
.step h3 { font-size: 21px; font-weight: 450; letter-spacing: -0.029em; }
.step p { color: var(--smoke); font-size: 15px; }
.step small { color: var(--iron); font-size: 13px; }

/* ==========================================================================
   Stack
   ========================================================================== */
.stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; margin: 0 auto; }
.stack li {
  padding: 11px 18px; border-radius: var(--pill);
  border: 1px solid var(--hair-strong);
  color: var(--ash); font-size: 15px;
  transition: background-color .2s, color .2s;
}
.stack li:hover { background: var(--white); color: var(--black); }

/* ==========================================================================
   Plans
   ========================================================================== */
.plans { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); gap: var(--gap); } }
.plan {
  background: var(--white); color: var(--black);
  border-radius: var(--radius);
  padding: 29px var(--card-pad) var(--card-pad);
  display: grid; gap: 12px; align-content: start;
  grid-template-rows: auto auto auto 1fr auto;
}
.plan--accent { background: var(--black); color: var(--white); }
.plan__label { font-size: 13px; color: var(--iron); }
.plan h3 { font-size: clamp(22px, 2.4vw, 26px); font-weight: 450; letter-spacing: -0.03em; line-height: 1.14; }
.plan__time { font-size: 15px; color: #666; }
.plan--accent .plan__time { color: var(--smoke); }
.plan ul { display: grid; gap: 10px; margin: 14px 0 22px; padding-top: 18px; border-top: 1px solid var(--ash); }
.plan--accent ul { border-top-color: var(--hair); }
.plan li { display: flex; gap: 10px; font-size: 15px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.plan .pill { width: 100%; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 0;
  font-size: clamp(18px, 2vw, 21px); font-weight: 450; letter-spacing: -0.029em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: none; transition: transform .3s var(--ease); color: var(--smoke); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { color: var(--smoke); padding: 0 40px 26px 0; max-width: 680px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { border-top: 1px solid var(--hair); }
.contact__grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1.6fr 1fr; gap: var(--gap); } }

.form {
  border: 1px solid var(--hair); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 35px);
  display: grid; gap: 22px;
}
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 13px; color: var(--iron); padding: 0; margin-bottom: 0; }
.field legend { margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--hair-strong);
  padding: 10px 0 12px;
  font-size: 19px; letter-spacing: -0.03em;
  border-radius: 0;
  transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder { color: #555; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--white); }
.field input[aria-invalid="true"] { border-bottom-color: var(--white); background: rgba(255,255,255,.04); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 10px 16px; border-radius: var(--pill);
  border: 1px solid var(--hair-strong); color: var(--ash); font-size: 14px;
  transition: background-color .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.chips input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
.chips input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.chips label:hover span { border-color: var(--smoke); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.form__status.is-ok { color: var(--white); }
.form__status.is-err { color: var(--white); }
@media (max-width: 560px) { .form__foot .pill { width: 100%; } }

.direct {
  border: 1px solid var(--hair); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 35px);
  display: grid; gap: 12px; align-content: start;
}
.direct__label { font-size: 13px; color: var(--iron); margin-bottom: 6px; }
.direct__link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px;
  border: 1px solid var(--hair);
  transition: background-color .2s, border-color .2s;
  min-width: 0;
}
.direct__link:hover { background: rgba(255,255,255,.05); border-color: var(--hair-strong); }
.direct__link > svg { width: 22px; height: 22px; flex: none; }
.direct__link span { display: grid; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.direct__link small { color: var(--iron); font-size: 12px; }
.direct__link .arr { margin-left: auto; color: var(--iron); transition: transform .25s var(--ease); width: 18px; height: 18px; }
.direct__link:hover .arr { transform: translateX(4px); color: var(--white); }
.direct .note { margin-top: 12px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--hair); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer__inner { display: grid; gap: 22px; justify-items: center; text-align: center; }
.footer__services { color: var(--smoke); font-size: 15px; max-width: 760px; }
.footer__copy { color: var(--iron); font-size: 13px; }
.footer__copy a { text-decoration: underline; text-underline-offset: 3px; }
.footer__copy a:hover { color: var(--white); }
.footer__note { color: var(--iron); font-size: 13px; }
.footer__note a, .linklike { color: var(--iron); text-decoration: underline; text-underline-offset: 3px; }
.footer__note a:hover, .linklike:hover { color: var(--white); }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* Calls to action */
.pill svg { width: 18px; height: 18px; }
.pill--line { background: transparent; color: var(--black); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.pill--line:hover { background: rgba(0,0,0,.06); }

.cta-inline {
  margin-top: 12px;
  background: var(--white); border-radius: var(--radius);
  padding: 22px var(--card-pad);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.cta-inline p { font-size: 16px; color: #4b4b4b; max-width: 560px; }
.cta-inline b { color: var(--black); font-weight: 500; }
.cta-inline__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .cta-inline__actions, .cta-inline__actions .pill { width: 100%; } }

.cta-band {
  margin-top: 12px;
  border: 1px solid var(--hair-strong); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 41px);
  display: grid; gap: 22px; align-items: center;
  background: radial-gradient(120% 140% at 100% 0%, #161616 0%, #000 60%);
}
.cta-band__text { display: grid; gap: 10px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.3fr auto; margin-top: var(--gap); } }
@media (max-width: 560px) { .cta-band__actions .pill { width: 100%; } }

/* Floating Telegram button */
.fab {
  position: fixed; z-index: 55;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 20px 0 16px;
  border-radius: var(--pill);
  background: var(--white); color: var(--black);
  font-size: 15px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transform: translateY(24px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s var(--ease), background-color .2s;
}
.fab svg { width: 22px; height: 22px; }
.fab:hover { background: var(--ash); }
.fab.is-visible { transform: none; opacity: 1; pointer-events: auto; }
@media (min-width: 640px) { .fab { right: 24px; bottom: 24px; } }

/* Cookie consent */
.cookie {
  position: fixed; z-index: 60;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 440px;
  background: rgba(12, 12, 12, 0.92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--hair-strong); border-radius: var(--radius);
  padding: 18px 20px;
  display: grid; gap: 14px;
  font-size: 14px; line-height: 1.45; color: var(--ash);
  animation: rise .5s var(--ease) both;
}
.cookie[hidden] { display: none; }
.cookie a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie__actions .pill { flex: 1 1 auto; }
@media (min-width: 640px) { .cookie { left: 24px; right: auto; bottom: 24px; } }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal { padding-top: calc(120px + env(safe-area-inset-top)); }
.legal .display { font-size: clamp(38px, 6vw, 64px); margin: 10px 0 12px; }
.legal h2 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 450; letter-spacing: -0.03em; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--smoke); font-size: 16px; line-height: 1.6; }
.legal p + p { margin-top: 12px; }
.legal b { color: var(--white); font-weight: 500; }
.legal ul { display: grid; gap: 10px; }
.legal li { position: relative; padding-left: 18px; }
.legal li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
.legal a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font-family: var(--mono); font-size: 13px; letter-spacing: 0; color: var(--white); }
.legal__table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--hair); border-radius: var(--radius); }
.legal__table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.legal__table th, .legal__table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hair); color: var(--smoke); vertical-align: top; }
.legal__table th { color: var(--iron); font-weight: 400; font-size: 13px; }
.legal__table tr:last-child td { border-bottom: 0; }
