/* ==========================================================================
   CODE11 — V2
   ========================================================================== */

:root {
  /* palette */
  --bg-dark: #050505;
  --surface-dark: #111111;
  --bg-light: #F2F4FE;
  --surface-light: #FFFFFF;
  --text-on-dark: #FFFFFF;
  --text-on-light: #050505;
  --text-muted-dark: #9A9A9A;
  --text-muted-light: #5D6068;
  --accent-lime: #E7FE55;
  --accent-lavender: #F8D4FE;
  --border-dark: #2A2A2A;
  --border-light: #D9DBE2;
  --signal-blue: #246BEB;
  --blue-glass: #BFD9FF;
  --blue-deep: #123B8A;

  /* type */
  --font-heading: "Onest", system-ui, sans-serif;
  --font-text: "Manrope", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* layout */
  --page-x: 40px;
  --container: 1360px;
  --radius-card: 20px;
  --radius-btn: 14px;
  --header-h: 40px;
}

/* --------------------------------------------------------------- base --- */

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

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

/* Lenis drives the scrolling itself — hand the wheel over once it is up */
html.lenis,
html.lenis body { height: auto; }

html.lenis { scroll-behavior: auto; }

.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg-light);
  color: var(--text-on-light);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
/* height: auto обязателен: WordPress подставляет в разметку атрибуты
   width/height, и без него картинка растягивается до значения из атрибута */
img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--page-x) * 2);
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--14 { width: 14px; height: 14px; }
.icon--15 { width: 15px; height: 15px; }
.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--19 { width: 19px; height: 19px; }
.icon--20 { width: 20px; height: 20px; }
.icon--30 { width: 30px; height: 30px; }

/* -------------------------------------------------------- shared bits --- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.4px;
  color: var(--text-muted-light);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--signal-blue);
}

.eyebrow--dark { color: var(--text-muted-dark); }
.eyebrow--dark .eyebrow__dot { background: var(--accent-lime); }

.section-title {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.06;
}

.section-title--light { color: var(--text-on-dark); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section-head__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}

.section-head__text--wide { max-width: 860px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 20px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.btn .icon { transition: transform .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn--white:hover .icon,
.btn[href="#projects"]:hover .icon { transform: translateX(3px); }

.btn--lime {
  background: var(--accent-lime);
  color: var(--text-on-light);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(231, 254, 85, 0);
}

.btn--lime:hover { box-shadow: 0 10px 28px rgba(231, 254, 85, .45); }

.btn--white {
  background: var(--surface-light);
  color: var(--text-on-light);
  box-shadow: 0 4px 18px rgba(5, 5, 5, .04);
}

.btn--white:hover { box-shadow: 0 10px 26px rgba(5, 5, 5, .1); }

.btn--lg {
  padding: 16px 24px;
  font-size: 17px;
}

/* ------------------------------------------------------------- header --- */

.header {
  position: fixed;
  z-index: 60;
  top: 20px;
  left: 0;
  right: 0;
  padding-inline: var(--page-x);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  min-height: var(--header-h);
  margin-inline: auto;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--bg-dark);
  transition: box-shadow .3s ease, background-color .3s ease;
}

.header.is-scrolled .header__inner {
  background: rgba(5, 5, 5, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(5, 5, 5, .22);
}

.header__brand {
  flex: 0 0 auto;
  min-width: 120px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-lime);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header__nav a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg-light);
  transition: color .2s ease;
}

/* Underline sweeps in from the left on hover and keeps travelling right on the
   way out — the origin flips between the two states instead of rewinding. */
.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: currentcolor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .35s;
}

.header__nav a:hover::after,
.header__nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header__nav a:hover { color: var(--accent-lime); }

.header__nav a.is-current { color: var(--accent-lime); }

.header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 120px;
}

.header__contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-dark);
}

.header__contact .icon {
  color: var(--accent-lime);
  transition: transform .25s ease;
}

.header__contact:hover .icon { transform: translate(2px, -2px); }

.header__burger {
  display: none;
  padding: 8px;
  color: var(--text-on-dark);
}

/* ------------------------------------------------- header intro (home) --- */
/* Driven by `data-intro` on the header, which only the home page carries.
   The pill starts at wordmark width, pinned to the left where the logo already
   sits, then stretches out to the right. */

.has-header-intro .header[data-intro] .header__inner {
  width: var(--intro-w, 150px);
  /* start flush with the left edge the pill will settle on: that is the page
     gutter, plus the slack the centred container leaves on wide screens */
  margin-inline-start: max(0px, calc((100% - var(--container)) / 2));
  margin-inline-end: auto;
  overflow: hidden;
  transition:
    width .95s cubic-bezier(.16, 1, .3, 1),
    background-color .3s ease,
    box-shadow .3s ease;
}

.has-header-intro .header[data-intro].is-expanded .header__inner {
  width: var(--intro-full);
}

.has-header-intro .header[data-intro] .header__actions {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .5s ease, transform .5s ease;
}

.has-header-intro .header[data-intro].is-expanded .header__actions {
  opacity: 1;
  transform: none;
  transition-delay: .52s;
}

/* the nav is a dropdown below 1101px, where opacity is its own open/closed
   state — leave it alone there and animate the links only on desktop */
@media (min-width: 1101px) {
  .has-header-intro .header[data-intro] .header__nav a {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .45s ease, transform .45s ease, color .2s ease;
  }

  .has-header-intro .header[data-intro].is-expanded .header__nav a {
    opacity: 1;
    transform: none;
  }

  .has-header-intro .header[data-intro].is-expanded .header__nav a:nth-child(1) { transition-delay: .50s; }
  .has-header-intro .header[data-intro].is-expanded .header__nav a:nth-child(2) { transition-delay: .54s; }
  .has-header-intro .header[data-intro].is-expanded .header__nav a:nth-child(3) { transition-delay: .58s; }
  .has-header-intro .header[data-intro].is-expanded .header__nav a:nth-child(4) { transition-delay: .62s; }
  .has-header-intro .header[data-intro].is-expanded .header__nav a:nth-child(5) { transition-delay: .66s; }
}

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  min-height: 832px;
  padding: 214px 0 40px;
  overflow: hidden;
  background: var(--bg-light);
}

.hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: 578px;
}

.hero__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero__glow--lavender {
  top: -336px;
  left: calc(50% - 720px + 798px);
  width: 742px;
  height: 693px;
  background: var(--accent-lavender);
  opacity: .55;
}

.hero__glow--blue {
  top: 199px;
  left: calc(50% - 720px + 1045px);
  width: 516px;
  height: 468px;
  background: var(--blue-glass);
  opacity: .6;
}

.hero__grid {
  display: grid;
  grid-template-columns: 640px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.hero__title {
  max-width: 640px;
  font-size: clamp(42px, 5.3vw, 76px);
  font-weight: 600;
  line-height: .95;
}

.hero__lead {
  max-width: 470px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--border-dark);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__card-wrap {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 520px;
  margin-top: 26px;
}

.code-card {
  border-radius: var(--radius-card);
  background: var(--surface-light);
  box-shadow: 0 24px 60px rgba(18, 59, 138, .12);
  overflow: hidden;
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid var(--bg-light);
}

.code-card__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-light);
}

.code-card__file {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--text-muted-light);
}

.code-card__body {
  margin: 0;
  padding: 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 29px;
  white-space: pre;
}

.tok-tag  { color: var(--signal-blue); }
.tok-attr { color: var(--blue-deep); }
.tok-val  { color: var(--text-muted-light); }
.tok-text { color: var(--text-on-light); font-weight: 500; }

/* typing: every character keeps its slot from the start, so only opacity
   changes and the card never reflows while the code is being written out */
.code-char {
  position: relative;
  opacity: 0;
  transition: opacity .12s linear;
}

.code-char.is-typed { opacity: 1; }

.code-char.is-cursor::after {
  content: "";
  position: absolute;
  top: .1em;
  right: -2px;
  width: 2px;
  height: 1.05em;
  background: var(--signal-blue);
}

.code-card__body.is-done .code-char.is-cursor::after {
  animation: caret-blink 1.05s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.pixel-badge {
  position: absolute;
  bottom: -20px;
  left: -40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(5, 5, 5, .2);
}

.pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 64px;
}

.pipeline__step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}

.pipeline__index { color: var(--signal-blue); }
.pipeline__label { letter-spacing: 1.2px; color: var(--text-muted-light); }
.pipeline__arrow { color: var(--border-light); }

/* ---------------------------------------------------------- main case --- */

.case {
  padding: 40px 0 100px;
  background: var(--bg-light);
}

.case .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.player {
  position: relative;
  /* пропорции берутся из кода встраивания, если он задан, иначе как в макете */
  aspect-ratio: var(--player-ratio, 1360 / 735);
  border: 3px solid var(--bg-dark);
  border-radius: 24px;
  background: var(--bg-dark);
  overflow: hidden;
}

/* iframe стороннего плеера подставляется по клику и перекрывает обложку */
.player__frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, .8) 100%);
  pointer-events: none;
  transition: opacity .4s ease;
}

.player.is-playing .player__shade { opacity: 0; }

.player__tag {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(5, 5, 5, .5);
  backdrop-filter: blur(6px);
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  transition: opacity .3s ease;
}

.player__rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-lime);
  animation: rec 1.6s ease-in-out infinite;
}

@keyframes rec {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

.player__big {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: var(--text-on-light);
  transform: translate(-50%, -50%);
  transition: transform .3s ease, opacity .3s ease, box-shadow .3s ease;
}

.player__big .icon { fill: currentColor; stroke-width: 1.5; margin-left: 4px; }
.player__big:hover { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 0 0 14px rgba(231, 254, 85, .16); }

.player.is-playing .player__big,
.player.is-playing .player__tag {
  opacity: 0;
  pointer-events: none;
}

.player__controls {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 32px;
}

.player__ctrl {
  display: flex;
  align-items: center;
  color: var(--text-on-dark);
  opacity: .85;
  transition: opacity .2s ease;
}

.player__ctrl:hover { opacity: 1; }
.player__ctrl .icon { fill: none; }
#playToggle .icon { fill: currentColor; stroke-width: 1.5; }

.player__track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
  cursor: pointer;
}

.player__track::after {
  content: "";
  position: absolute;
  inset: -10px 0;
}

.player__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--accent-lime);
  transition: width .1s linear;
}

.implemented {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.implemented__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1.2px;
  color: var(--text-muted-light);
}

.chip {
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--surface-light);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.pains {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
}

.pains__title {
  max-width: 720px;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.14;
}

.pains__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pain {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.pain__index {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--signal-blue);
}

.pain__title {
  font-size: 20px;
  line-height: 1.25;
}

.pain__text {
  font-size: 15px;
  line-height: 1.53;
  color: var(--text-muted-light);
}

/* ---------------------------------------------------------------- faq --- */
/* Две колонки: слева заголовок, справа список. Значения сняты с макета —
   элементы разделяются верхней границей, переключатель 36×36. */

.faq-section {
  padding: 100px 0;
  background: var(--bg-light);
}

.faq-section .container {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.faq-head {
  flex: 0 0 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-title {
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.09;
}

.faq-note {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.53;
  color: var(--text-muted-light);
}

.faq {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.faq__item { border-top: 1px solid var(--border-light); }

.faq__item:last-child { border-bottom: 1px solid var(--border-light); }

.faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 24px 0;
  text-align: left;
}

.faq__q {
  display: flex;
  align-items: center;
  gap: 18px;
}

.faq__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--signal-blue);
}

.faq__question {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--text-on-light);
  transition: color .2s ease;
}

.faq__trigger:hover .faq__question { color: var(--signal-blue); }

.faq__toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--surface-light);
  transition: background-color .25s ease, transform .25s ease;
}

.faq__item.is-open .faq__toggle { background: var(--accent-lime); }
.faq__trigger:hover .faq__toggle { transform: scale(1.06); }

.faq__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.2, .7, .2, 1);
}

.faq__answer {
  /* левый отступ равен колонке с номером плюс её gap — ответ встаёт под вопрос */
  padding: 0 60px 24px 31px;
  font-size: 15px;
  line-height: 1.53;
  color: var(--text-muted-light);
}

@media (max-width: 1100px) {
  .faq-section .container { flex-direction: column; gap: 36px; }
  .faq-head { flex: none; width: 100%; }
  .faq-note { max-width: none; }
  .faq { width: 100%; }
}

@media (max-width: 760px) {
  .faq-section { padding: 56px 0; }
  .faq__trigger { gap: 16px; padding: 20px 0; }
  .faq__q { gap: 12px; }
  .faq__question { font-size: 17px; }
  .faq__toggle { width: 32px; height: 32px; }
  .faq__answer { padding: 0 0 20px 25px; }
}

/* ------------------------------------------------------------ marquee --- */

.marquee {
  display: flex;
  align-items: center;
  height: 96px;
  background: var(--bg-dark);
  overflow: hidden;
}

.marquee__track {
  --marquee-shift: 1334px;
  --marquee-duration: 29s;

  display: flex;
  width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(var(--marquee-shift) * -1)); }
}

.mchip {
  padding: 13px 20px;
  border-radius: 1000px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.2px;
  color: var(--text-on-light);
  white-space: nowrap;
}

.mchip--lime     { background: var(--accent-lime); }
.mchip--lavender { background: var(--accent-lavender); }
.mchip--blue     { background: var(--blue-glass); }

.marquee__sep { color: var(--border-dark); }

/* ----------------------------------------------------------- projects --- */

.projects {
  padding: 100px 0;
  background: var(--bg-light);
}

.projects .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--surface-light);
  transition: transform .35s ease, box-shadow .35s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(18, 59, 138, .12);
}

.project__media {
  display: block;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.project:hover .project__media img { transform: scale(1.04); }

.project__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 10px 10px;
}

.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project__title {
  font-size: 22px;
  line-height: 1.1;
}

.project__theme {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.28;
  color: var(--text-muted-light);
}

.project__link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.project__link:hover {
  border-color: var(--bg-dark);
  background: var(--bg-dark);
  color: var(--accent-lime);
}

.project__role {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.project__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech {
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--bg-light);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .8px;
  color: var(--text-muted-light);
}

.project__case {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.project__case .icon { transition: transform .25s ease; }
.project__case:hover .icon { transform: translate(2px, -2px); }

/* ------------------------------------------------------------ studios --- */

.studios {
  padding: 100px 0;
  background: var(--bg-dark);
}

.studios .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.assurance__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border-radius: var(--radius-card);
  background: var(--bg-light);
  transition: transform .35s ease;
}

.assurance__card:hover { transform: translateY(-4px); }

.assurance__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-dark);
  color: var(--accent-lime);
}

.assurance__title {
  font-size: 19px;
  line-height: 1.26;
}

.assurance__text {
  font-size: 15px;
  line-height: 1.53;
}

/* ------------------------------------------------------------ process --- */

.process {
  padding: 100px 0;
  background: var(--bg-light);
}

.process .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step__num {
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--surface-light);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--signal-blue);
}

.step__line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.step__arrow { color: var(--border-light); }

.step__title {
  font-size: 19px;
  line-height: 1.26;
}

.step__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted-light);
}

/* ---------------------------------------------------------------- cta --- */

.cta {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 720px;
  padding: 100px 0;
  overflow: hidden;
  background: var(--bg-light);
}

.cta__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.cta__glow--lavender {
  top: -220px;
  left: calc(50% - 720px + 180px);
  width: 620px;
  height: 480px;
  background: var(--accent-lavender);
  opacity: .5;
}

.cta__glow--blue {
  top: 460px;
  left: calc(50% - 720px + 760px);
  width: 560px;
  height: 420px;
  background: var(--blue-glass);
  opacity: .55;
}

.cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
}

.cta__title {
  max-width: 940px;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.02;
}

.cta__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-light);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  transition: transform .25s ease, box-shadow .25s ease;
}

.contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(5, 5, 5, .08);
}

.cta__note {
  max-width: 520px;
  font-size: 14px;
  line-height: 1.57;
  color: var(--text-muted-light);
}

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

.footer {
  padding: 64px 0 32px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__wordmark {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-lime);
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1.2px;
  color: var(--text-muted-dark);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.footer__nav a {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted-dark);
  transition: color .2s ease;
}

.footer__nav a:hover { color: var(--text-on-dark); }

.footer__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  transition: color .2s ease;
}

.footer__contact:hover { color: var(--accent-lime); }

.footer__divider {
  height: 1px;
  margin: 40px 0;
  background: var(--border-dark);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__copy,
.footer__stack {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--text-muted-dark);
}

.footer__stack { font-size: 11px; letter-spacing: 1px; }

.footer__top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color .25s ease, color .25s ease;
}

.footer__top-btn:hover {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
}

.footer__top-btn .icon { transition: transform .25s ease; }
.footer__top-btn:hover .icon { transform: translateY(-2px); }

/* ------------------------------------------- headline word reveal (h1/h2) --- */

[data-split] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* the mask is grown past the line box so ascenders and descenders
     are not cut off, then pulled back so the layout stays identical */
  padding: .16em .08em .26em;
  margin: -.16em -.08em -.26em;
}

[data-split] .word__inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(130%) rotate(9deg);
  transform-origin: 0 100%;
  transition:
    transform 1.05s cubic-bezier(.16, 1, .3, 1),
    opacity .75s cubic-bezier(.16, 1, .3, 1);
}

[data-split].is-revealed .word__inner {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------ reveals --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 1280px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
  .hero__content { max-width: 560px; }
  .pixel-badge { left: -24px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step__arrow, .step__line { display: none; }
}

@media (max-width: 1100px) {
  :root { --page-x: 24px; }

  .header__nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background: var(--bg-dark);
    box-shadow: 0 18px 40px rgba(5, 5, 5, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }

  .header__nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .header__nav a {
    width: 100%;
    padding: 12px 10px;
    border-radius: 10px;
  }

  .header__nav a:hover { background: var(--surface-dark); }

  /* in the dropdown the items are full-width padded rows — a sweeping
     underline across the whole row reads as a divider, so drop it here */
  .header__nav a::after { display: none; }

  .header__inner { position: relative; }
  .header__brand { min-width: auto; }
  .header__actions { min-width: auto; gap: 8px; }
  .header__burger { display: inline-flex; }

  .hero {
    min-height: auto;
    padding: 150px 0 60px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .hero__content { max-width: none; }
  .hero__card-wrap { justify-self: stretch; max-width: none; margin-top: 0; }
  .pixel-badge { left: auto; right: 16px; bottom: -18px; }

  .pipeline {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 16px;
    padding-top: 48px;
  }

  .projects__grid,
  .assurance,
  .pains__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head { flex-direction: column; align-items: flex-start; gap: 24px; }
}

@media (max-width: 760px) {
  .case,
  .projects,
  .studios,
  .process { padding: 64px 0; }

  .case { padding-top: 32px; }

  .case .container,
  .projects .container,
  .studios .container,
  .process .container { gap: 36px; }

  .projects__grid,
  .assurance,
  .pains__row,
  .steps { grid-template-columns: minmax(0, 1fr); }

  .header__contact { display: none; }

  .player__controls { gap: 12px; right: 14px; bottom: 14px; left: 14px; }
  .player__tag { top: 14px; left: 14px; font-size: 10px; padding: 8px 10px; }
  .player__big { width: 64px; height: 64px; }
  .player__big .icon { width: 22px; height: 22px; }

  .project__media { height: 220px; }
  .project__foot { flex-direction: column; align-items: flex-start; gap: 12px; }

  .footer__top { flex-direction: column; gap: 32px; }
  .footer__contacts { align-items: flex-start; }
  .footer__nav { gap: 16px 24px; }
  .footer__divider { margin: 32px 0; }
  .footer__bottom { gap: 16px; }

  .cta { min-height: auto; padding: 72px 0; }
  .cta__inner { gap: 28px; }

  .code-card__body { font-size: 12px; line-height: 24px; padding: 18px; }
  .pixel-badge { right: 8px; }

  .marquee { height: 78px; }
  .mchip { font-size: 12px; padding: 11px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }

  [data-split] .word__inner { opacity: 1; transform: none; }
  [data-split] .word { overflow: visible; }

  .code-char { opacity: 1; }
  .code-char.is-cursor::after { display: none; }
}
