:root {
  --bg: #0a0a0c;
  --bg-elevated: #12121a;
  --bg-deep: #060608;
  --tint: rgba(124, 92, 255, 0.06);
  --text: #f4f2ff;
  --muted: #9b96b0;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #c4ff4d;
  --accent-2: #7c5cff;
  --photo-accent: #9bb84a;
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, rgba(124, 92, 255, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 70% 50% at 92% 8%, rgba(196, 255, 77, 0.06) 0%, transparent 48%),
    radial-gradient(ellipse 55% 40% at 70% 100%, rgba(155, 184, 74, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 38%, var(--bg) 100%);
}

/* WebGL «галактика» (OGL), под контентом, без перехвата кликов */
body > .galaxy-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: screen;
}

body > .galaxy-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: top;
}

body > * {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(196, 255, 77, 0.28);
  color: var(--text);
}

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

:focus:not(:focus-visible) {
  outline: none;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(124, 92, 255, 0.45) 38%,
    rgba(196, 255, 77, 0.35) 62%,
    transparent 100%
  );
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: letter-spacing 0.35s var(--ease-out-expo), color 0.25s ease;
}

.logo:hover {
  letter-spacing: 0.02em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.nav a:not(.nav-cta) {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease-out-expo);
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out-expo);
}

.nav a:not(.nav-cta):hover {
  color: var(--text);
}

.nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0c !important;
  font-weight: 600 !important;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1.4;
}

.nav-cta:hover {
  filter: brightness(1.08);
}

button.btn {
  cursor: pointer;
  font-family: inherit;
}

.section {
  padding: clamp(72px, 12vw, 120px) 0;
}

.section-tint {
  position: relative;
  background: linear-gradient(
      165deg,
      rgba(124, 92, 255, 0.07) 0%,
      rgba(10, 10, 12, 0.4) 42%,
      transparent 72%
    ),
    linear-gradient(180deg, var(--tint) 0%, transparent 100%);
}

.section-tint::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
}

.section-tint > .container {
  position: relative;
  z-index: 1;
}

.hero {
  padding-top: clamp(48px, 8vw, 88px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -15%;
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  background: radial-gradient(circle, rgba(196, 255, 77, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.4fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
  animation: heroFadeUp 0.85s var(--ease-out-expo) 0.1s both;
}

.hero-photo {
  position: relative;
  margin: 0;
  border-radius: calc(var(--radius) + 4px);
  max-width: 380px;
  width: 100%;
  justify-self: end;
  animation: heroFadeUp 0.95s var(--ease-out-expo) 0.22s both;
}

.hero-photo-frame {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(196, 255, 77, 0.45) 0%,
    rgba(155, 184, 74, 0.35) 35%,
    rgba(124, 92, 255, 0.5) 100%
  );
  opacity: 0.85;
  z-index: 0;
  filter: blur(0.5px);
}

.hero-photo-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: heroPhotoFloat 7s ease-in-out 1.15s infinite;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(10, 10, 12, 0.35) 100%
  );
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPhotoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: min(100%, 22ch);
}

@media (min-width: 960px) {
  .hero-title {
    max-width: min(100%, 18ch);
  }
}

.hero-title .text-type {
  display: inline;
}

.text-type {
  display: inline;
  white-space: normal;
}

.text-type__content {
  display: inline;
}

.text-type__content em {
  font-style: normal;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.text-type__cursor {
  margin-left: 0.15em;
  display: inline-block;
  font-weight: 400;
  color: var(--accent);
  animation: cursorBlink 0.5s ease-in-out infinite alternate;
}

.text-type__cursor--hidden {
  visibility: hidden;
}

@keyframes cursorBlink {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-photo {
    justify-self: center;
    max-width: min(300px, 82vw);
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .hero-title {
    max-width: min(100%, 40ch);
  }
}

.hero-lead {
  margin: 0 0 32px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  position: relative;
  background: linear-gradient(
    105deg,
    var(--accent) 0%,
    #dfff9a 42%,
    #c4ff4d 55%,
    #b8f06e 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  color: #0a0a0c;
  box-shadow: 0 0 0 0 rgba(196, 255, 77, 0.4);
  transition:
    background-position 0.55s var(--ease-out-expo),
    box-shadow 0.35s ease,
    transform 0.2s ease;
}

.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 32px rgba(196, 255, 77, 0.25);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(124, 92, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  line-height: 1.15;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.section-title::before {
  content: "";
  width: 5px;
  margin-top: 0.35em;
  height: 1.15em;
  flex-shrink: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

.section-lead {
  margin: -8px 0 28px;
  color: var(--muted);
  max-width: 52ch;
}

.prose p {
  margin: 0 0 16px;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.label {
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
}

.tag-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s var(--ease-out-expo), background 0.25s var(--ease-out-expo),
    transform 0.25s var(--ease-out-expo);
}

.tag-list li:hover {
  border-color: rgba(155, 184, 74, 0.35);
  background: rgba(155, 184, 74, 0.06);
  transform: translateY(-1px);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04) 0%, var(--bg-elevated) 48%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition:
    border-color 0.35s var(--ease-out-expo),
    transform 0.35s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-expo);
}

.card:hover {
  border-color: rgba(124, 92, 255, 0.45);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 0 48px rgba(124, 92, 255, 0.12),
    0 0 0 1px rgba(196, 255, 77, 0.08) inset;
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-2);
  display: block;
  margin-bottom: 12px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 10px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}

.process-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 28px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  transition: border-left-color 0.3s var(--ease-out-expo), background 0.3s var(--ease-out-expo);
}

.process-list li:nth-child(odd) {
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.04) 0%, var(--bg-elevated) 40%);
}

.process-list li:hover {
  border-left-color: rgba(196, 255, 77, 0.55);
  background: linear-gradient(90deg, rgba(196, 255, 77, 0.05) 0%, var(--bg-elevated) 45%);
}

.process-list li:last-child {
  border-bottom: none;
}

.process-step {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}

.process-list h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.process-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* --- ChromaGrid (React Bits port) --- */
.chroma-grid.projects-chroma {
  position: relative;
  --x: 50%;
  --y: 50%;
  --r: 300px;
  border-radius: calc(var(--radius) + 4px);
}

.chroma-grid .projects-showcase {
  position: relative;
  z-index: 1;
}

.chroma-overlay,
.chroma-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  backdrop-filter: grayscale(0.85) brightness(0.82) saturate(0.75);
  -webkit-backdrop-filter: grayscale(0.85) brightness(0.82) saturate(0.75);
  background: rgba(0, 0, 0, 0.001);
}

.chroma-overlay {
  z-index: 2;
  mask-image: radial-gradient(
    circle var(--r) at var(--x) var(--y),
    transparent 0%,
    transparent 15%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.22) 45%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0.68) 88%,
    white 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--r) at var(--x) var(--y),
    transparent 0%,
    transparent 15%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.22) 45%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0.68) 88%,
    white 100%
  );
}

.chroma-fade {
  z-index: 3;
  opacity: 1;
  transition: opacity 0.25s ease;
  mask-image: radial-gradient(
    circle var(--r) at var(--x) var(--y),
    white 0%,
    white 15%,
    rgba(255, 255, 255, 0.9) 30%,
    rgba(255, 255, 255, 0.78) 45%,
    rgba(255, 255, 255, 0.65) 60%,
    rgba(255, 255, 255, 0.5) 75%,
    rgba(255, 255, 255, 0.32) 88%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--r) at var(--x) var(--y),
    white 0%,
    white 15%,
    rgba(255, 255, 255, 0.9) 30%,
    rgba(255, 255, 255, 0.78) 45%,
    rgba(255, 255, 255, 0.65) 60%,
    rgba(255, 255, 255, 0.5) 75%,
    rgba(255, 255, 255, 0.32) 88%,
    transparent 100%
  );
}

.chroma-grid--static .chroma-overlay,
.chroma-grid--static .chroma-fade {
  display: none;
}

.project-showcase-card.chroma-card {
  position: relative;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(196, 255, 77, 0.16);
  background: var(--card-gradient, linear-gradient(155deg, rgba(124, 92, 255, 0.09), var(--bg-elevated)));
}

.project-showcase-card.chroma-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mouse-x) var(--mouse-y),
    var(--spotlight-color),
    transparent 72%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out-expo);
  z-index: 4;
}

.project-showcase-card.chroma-card:hover::before {
  opacity: 1;
}

.project-showcase-card.chroma-card:hover {
  border-color: var(--card-border, rgba(196, 255, 77, 0.22));
}

.chroma-grid:not(.chroma-grid--static) .project-showcase-card.chroma-card:hover .project-showcase-card__frame img {
  filter: saturate(1) brightness(1) contrast(1.04);
}

.chroma-grid:not(.chroma-grid--static) .project-showcase-card--warm.chroma-card:hover .project-showcase-card__frame img {
  filter: saturate(0.96) brightness(0.98) contrast(1.05) sepia(0.04);
}

.chroma-grid:not(.chroma-grid--static) .project-showcase-card--app.chroma-card:hover .project-showcase-card__frame img {
  filter: saturate(0.92) brightness(0.94) contrast(1.08) hue-rotate(-4deg);
}

@media (max-width: 960px) {
  .chroma-grid.projects-chroma {
    --r: 220px;
  }
}

@media (pointer: coarse) {
  .chroma-overlay,
  .chroma-fade {
    opacity: 0.35;
  }

  .chroma-fade {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* --- / ChromaGrid --- */

.projects-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-showcase-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(124, 92, 255, 0.09), var(--bg-elevated));
  transition:
    border-color 0.35s var(--ease-out-expo),
    transform 0.35s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-expo);
}

.project-showcase-card:hover {
  border-color: rgba(196, 255, 77, 0.22);
  transform: translateY(-4px);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(124, 92, 255, 0.14);
}

.project-showcase-card--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: stretch;
}

.project-showcase-card--lead-reverse {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

.project-showcase-card--lead-reverse .project-showcase-card__frame {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--line);
}

.project-showcase-card--lead-reverse .project-showcase-card__body {
  order: 1;
}

.project-showcase-card--warm {
  background: linear-gradient(155deg, rgba(212, 175, 95, 0.08), var(--bg-elevated));
}

.project-showcase-card--warm:hover {
  border-color: rgba(212, 175, 95, 0.28);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(212, 175, 95, 0.1);
}

.project-showcase-card--warm .project-showcase-card__frame {
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(212, 175, 95, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.12));
}

.project-showcase-card--warm .project-tag {
  color: #d4af5f;
}

.project-showcase-card--warm.chroma-card {
  --spotlight-color: rgba(212, 175, 95, 0.2);
  background: var(--card-gradient);
}

.project-showcase-card--app {
  background: linear-gradient(155deg, rgba(124, 92, 255, 0.07), rgba(155, 184, 74, 0.05), var(--bg-elevated));
}

.project-showcase-card--app:hover {
  border-color: rgba(155, 184, 74, 0.28);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(124, 92, 255, 0.12);
}

.project-showcase-card--app .project-tag {
  color: #9ed4a0;
}

.project-showcase-card--app.chroma-card {
  --spotlight-color: rgba(158, 212, 160, 0.18);
  background: var(--card-gradient);
}

.project-showcase-card--fintech {
  background: linear-gradient(155deg, rgba(124, 58, 237, 0.08), rgba(155, 184, 74, 0.04), var(--bg-elevated));
}

.project-showcase-card--fintech:hover {
  border-color: rgba(168, 85, 247, 0.32);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 44px rgba(124, 58, 237, 0.16);
}

.project-showcase-card--fintech .project-tag {
  color: #c4b5fd;
}

.project-showcase-card--fintech.chroma-card {
  --spotlight-color: rgba(168, 85, 247, 0.2);
  background: var(--card-gradient);
}

.project-showcase-card--fintech .project-showcase-card__frame {
  background:
    radial-gradient(ellipse 90% 80% at 20% 0%, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(ellipse 70% 60% at 90% 100%, rgba(155, 184, 74, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.14));
}

.project-showcase-card--fintech .project-showcase-card__frame::after {
  background:
    linear-gradient(
      155deg,
      rgba(124, 58, 237, 0.12) 0%,
      rgba(10, 10, 12, 0.04) 45%,
      rgba(10, 10, 12, 0.16) 100%
    );
  mix-blend-mode: soft-light;
  opacity: 0.72;
}

.project-showcase-card--fintech .project-showcase-card__frame img {
  max-height: 320px;
  filter: saturate(0.94) brightness(0.95) contrast(1.04);
}

.project-showcase-card--fintech:hover .project-showcase-card__frame img {
  filter: saturate(0.98) brightness(0.97) contrast(1.04);
}

.chroma-grid:not(.chroma-grid--static) .project-showcase-card--fintech.chroma-card:hover .project-showcase-card__frame img {
  transform: scale(1.02);
}

.project-showcase-card__frame {
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 14px;
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(124, 92, 255, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.12));
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.project-showcase-card__frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(
      155deg,
      rgba(124, 92, 255, 0.1) 0%,
      rgba(10, 10, 12, 0.02) 42%,
      rgba(10, 10, 12, 0.16) 100%
    );
  mix-blend-mode: soft-light;
  opacity: 0.85;
  transition: opacity 0.35s var(--ease-out-expo);
}

.project-showcase-card--warm .project-showcase-card__frame::after {
  background:
    linear-gradient(
      155deg,
      rgba(212, 175, 95, 0.14) 0%,
      rgba(10, 10, 12, 0.04) 45%,
      rgba(10, 10, 12, 0.14) 100%
    );
}

.project-showcase-card--app .project-showcase-card__frame {
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(124, 92, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(155, 184, 74, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.14));
}

.project-showcase-card--app .project-showcase-card__frame::after {
  background:
    linear-gradient(
      155deg,
      rgba(124, 92, 255, 0.12) 0%,
      rgba(10, 10, 12, 0.06) 50%,
      rgba(10, 10, 12, 0.18) 100%
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.project-showcase-card__frame--portrait {
  min-height: 240px;
}

.project-showcase-card--lead .project-showcase-card__frame {
  min-height: 260px;
  padding: 18px;
  border-bottom: none;
  border-right: 1px solid var(--line);
}

.project-showcase-card--lead .project-showcase-card__frame::after {
  inset: 18px;
}

.project-showcase-card__frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  filter: saturate(0.9) brightness(0.94) contrast(1.05);
  transition:
    transform 0.5s var(--ease-out-expo),
    filter 0.35s var(--ease-out-expo);
}

.project-showcase-card--warm .project-showcase-card__frame img {
  filter: saturate(0.86) brightness(0.93) contrast(1.06) sepia(0.08);
}

.project-showcase-card--app .project-showcase-card__frame img {
  max-height: 260px;
  filter: saturate(0.8) brightness(0.88) contrast(1.1) hue-rotate(-6deg);
}

.project-showcase-card:hover .project-showcase-card__frame::after {
  opacity: 0.65;
}

.project-showcase-card--lead .project-showcase-card__frame img {
  max-height: 300px;
}

.project-showcase-card--warm.project-showcase-card--lead .project-showcase-card__frame img {
  max-height: 340px;
}

.project-showcase-card:hover .project-showcase-card__frame img {
  transform: scale(1.02);
  filter: saturate(0.94) brightness(0.96) contrast(1.05);
}

.project-showcase-card--warm:hover .project-showcase-card__frame img {
  filter: saturate(0.9) brightness(0.95) contrast(1.06) sepia(0.06);
}

.project-showcase-card--app:hover .project-showcase-card__frame img {
  filter: saturate(0.86) brightness(0.9) contrast(1.1) hue-rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) {
  .project-showcase-card__frame img,
  .project-showcase-card:hover .project-showcase-card__frame img {
    transition: none;
    transform: none;
  }
}

.project-showcase-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 26px;
}

.project-showcase-card--lead .project-showcase-card__body {
  justify-content: center;
  padding: 28px 32px;
}

.project-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-showcase-card h3 {
  font-family: var(--font-display);
  margin: 12px 0 10px;
  font-size: 1.2rem;
}

.project-showcase-card__body > p:first-of-type {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-meta {
  margin: auto 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.9;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

@media (max-width: 960px) {
  .projects-showcase {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-showcase-card--lead {
    grid-template-columns: 1fr;
  }

  .project-showcase-card--lead .project-showcase-card__frame {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .project-showcase-card--lead-reverse .project-showcase-card__frame {
    order: 0;
    border-left: none;
    border-bottom: 1px solid var(--line);
  }

  .project-showcase-card--lead-reverse .project-showcase-card__body {
    order: 0;
  }
}

@media (max-width: 640px) {
  .projects-showcase {
    grid-template-columns: 1fr;
  }
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  margin: 24px 0;
}

@media (max-width: 640px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.plain-list {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.plain-list li {
  margin: 6px 0;
}

.highlight-line {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 255, 77, 0.25);
  background: rgba(196, 255, 77, 0.06);
  font-weight: 600;
  color: var(--text);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.badges span {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s var(--ease-out-expo), transform 0.25s var(--ease-out-expo),
    box-shadow 0.25s var(--ease-out-expo);
}

.badges span:hover {
  border-color: rgba(124, 92, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.12);
}

.stack-note {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.audience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.audience-list li {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding-left: 44px;
  position: relative;
  transition: border-color 0.25s var(--ease-out-expo), background 0.25s var(--ease-out-expo);
}

.audience-list li:hover {
  border-color: rgba(124, 92, 255, 0.25);
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.06) 0%, var(--bg-elevated) 55%);
}

.audience-list li::before {
  content: "→";
  position: absolute;
  left: 18px;
  color: var(--accent-2);
  font-weight: 700;
}

.manifest {
  padding: clamp(80px, 14vw, 140px) 0;
  position: relative;
}

.manifest .container {
  position: relative;
}

.manifest .container::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: min(70%, 200px);
  border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--photo-accent), var(--accent), transparent);
  opacity: 0.75;
}

.manifest-quote {
  margin: 0;
  padding-left: clamp(20px, 4vw, 36px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.8vw, 2.1rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  border: none;
  color: var(--text);
  max-width: 24ch;
  text-wrap: balance;
}

/* --- Отзывы: колода карт (одна сверху, свайп влево — верхняя вниз под стопку) --- */
.testimonials-layout {
  margin-top: clamp(28px, 5vw, 48px);
}

.testimonials-viewport.testimonials-deck {
  position: relative;
  width: min(380px, 92vw);
  height: clamp(400px, 58vw, 480px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-y;
  perspective: 1000px;
}

.testimonials-deck .testimonial-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: clamp(20px, 4vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 24px);
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 18, 26, 0.96) 0%, rgba(10, 10, 14, 0.88) 100%);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.testimonials-deck .testimonial-card--top {
  cursor: grab;
}

.testimonials-deck .testimonial-card--top:active {
  cursor: grabbing;
}

.testimonial-card__avatar {
  width: clamp(96px, 22vw, 128px);
  height: clamp(96px, 22vw, 128px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 92, 255, 0.35);
  background: var(--bg-elevated);
  pointer-events: none;
}

.testimonial-card__quote {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.55;
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
}

.testimonial-card__author {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

.testimonials-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(18px, 3vw, 24px);
}

.testimonials-nav {
  cursor: pointer;
}

.testimonials-hint {
  margin: clamp(16px, 3vw, 22px) auto 0;
  max-width: 420px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .testimonials-hint {
    font-size: 0.85rem;
  }
}

.cta-block {
  position: relative;
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: 10% 15% auto;
  height: 45%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 92, 255, 0.12) 0%, transparent 65%);
}

.cta-block .container {
  position: relative;
  z-index: 1;
}

.cta-block .section-title {
  max-width: 28ch;
}

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contacts li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.contacts li:last-child {
  border-bottom: none;
}

.contacts a:not(.contacts-application-btn) {
  color: var(--accent);
  text-decoration: none;
}

.contacts a:not(.contacts-application-btn):hover {
  text-decoration: underline;
}

.contacts-item--application {
  padding-top: 20px;
  border-bottom: none;
}

.contacts-application-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  color: #0a0a0c;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(196, 255, 77, 0.2);
  touch-action: manipulation;
}

.contacts-application-btn:hover {
  text-decoration: none;
  color: #0a0a0c;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-policy {
  padding-top: clamp(40px, 6vw, 56px);
  padding-bottom: clamp(48px, 7vw, 72px);
}

.privacy-policy__title {
  margin: 0 0 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.privacy-policy__text p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
  max-width: none;
}

.privacy-policy__text p:last-child {
  margin-bottom: 0;
}

.privacy-policy__text strong {
  color: rgba(244, 242, 255, 0.82);
  font-weight: 500;
}

.privacy-policy__text a {
  color: rgba(196, 255, 77, 0.75);
  text-decoration: none;
}

.privacy-policy__text a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.privacy-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.to-top {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.to-top:hover {
  color: var(--accent);
}

.reveal {
  opacity: 1;
  transform: translateY(32px);
  transition: transform 0.65s var(--ease-out-expo);
}

.reveal.is-visible {
  transform: translateY(0);
}

.reveal .section-title,
.reveal .section-lead {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s var(--ease-out-expo),
    transform 0.55s var(--ease-out-expo);
}

.reveal.is-visible .section-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.reveal.is-visible .section-lead {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.reveal .cards-grid > .card,
.reveal .projects-showcase > .project-showcase-card,
.reveal .process-list > li,
.reveal .badges > span,
.reveal .audience-list > li,
.reveal .tag-list > li,
.reveal .why-grid > div,
.reveal .highlight-line,
.reveal .prose,
.reveal .hero-actions,
.reveal .contacts li,
.reveal .manifest-quote,
.reveal .testimonials-viewport,
.reveal .testimonials-controls,
.reveal .testimonials-hint,
.reveal .testimonial-card {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.48s var(--ease-out-expo),
    transform 0.48s var(--ease-out-expo);
}

.reveal.is-visible .cards-grid > .card,
.reveal.is-visible .projects-showcase > .project-showcase-card,
.reveal.is-visible .process-list > li,
.reveal.is-visible .badges > span,
.reveal.is-visible .audience-list > li,
.reveal.is-visible .tag-list > li,
.reveal.is-visible .why-grid > div,
.reveal.is-visible .highlight-line,
.reveal.is-visible .prose,
.reveal.is-visible .hero-actions,
.reveal.is-visible .contacts li,
.reveal.is-visible .manifest-quote,
.reveal.is-visible .testimonials-viewport,
.reveal.is-visible .testimonials-controls,
.reveal.is-visible .testimonials-hint,
.reveal.is-visible .testimonial-card {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-visible .hero-actions {
  transition-delay: 0.22s;
}

.reveal.is-visible .cards-grid > .card:nth-child(1),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(1),
.reveal.is-visible .process-list > li:nth-child(1),
.reveal.is-visible .badges > span:nth-child(1),
.reveal.is-visible .audience-list > li:nth-child(1),
.reveal.is-visible .tag-list > li:nth-child(1),
.reveal.is-visible .why-grid > div:nth-child(1) {
  transition-delay: 0.08s;
}

.reveal.is-visible .cards-grid > .card:nth-child(2),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(2),
.reveal.is-visible .process-list > li:nth-child(2),
.reveal.is-visible .badges > span:nth-child(2),
.reveal.is-visible .audience-list > li:nth-child(2),
.reveal.is-visible .tag-list > li:nth-child(2),
.reveal.is-visible .why-grid > div:nth-child(2) {
  transition-delay: 0.14s;
}

.reveal.is-visible .cards-grid > .card:nth-child(3),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(3),
.reveal.is-visible .process-list > li:nth-child(3),
.reveal.is-visible .badges > span:nth-child(3),
.reveal.is-visible .audience-list > li:nth-child(3),
.reveal.is-visible .tag-list > li:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal.is-visible .cards-grid > .card:nth-child(4),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(4),
.reveal.is-visible .process-list > li:nth-child(4),
.reveal.is-visible .badges > span:nth-child(4),
.reveal.is-visible .audience-list > li:nth-child(4),
.reveal.is-visible .tag-list > li:nth-child(4) {
  transition-delay: 0.26s;
}

.reveal.is-visible .cards-grid > .card:nth-child(5),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(5),
.reveal.is-visible .process-list > li:nth-child(5),
.reveal.is-visible .badges > span:nth-child(5),
.reveal.is-visible .audience-list > li:nth-child(5),
.reveal.is-visible .tag-list > li:nth-child(5) {
  transition-delay: 0.32s;
}

.reveal.is-visible .cards-grid > .card:nth-child(6),
.reveal.is-visible .projects-showcase > .project-showcase-card:nth-child(6),
.reveal.is-visible .process-list > li:nth-child(6),
.reveal.is-visible .badges > span:nth-child(6),
.reveal.is-visible .audience-list > li:nth-child(6),
.reveal.is-visible .tag-list > li:nth-child(6) {
  transition-delay: 0.38s;
}


.reveal.is-visible .cards-grid > .card:nth-child(7),
.reveal.is-visible .badges > span:nth-child(7),
.reveal.is-visible .audience-list > li:nth-child(7),
.reveal.is-visible .tag-list > li:nth-child(7) {
  transition-delay: 0.44s;
}

.reveal.is-visible .cards-grid > .card:nth-child(8),
.reveal.is-visible .badges > span:nth-child(8),
.reveal.is-visible .audience-list > li:nth-child(8),
.reveal.is-visible .tag-list > li:nth-child(8) {
  transition-delay: 0.5s;
}

.reveal.is-visible .cards-grid > .card:nth-child(n + 9),
.reveal.is-visible .badges > span:nth-child(n + 9),
.reveal.is-visible .audience-list > li:nth-child(n + 9),
.reveal.is-visible .tag-list > li:nth-child(n + 9) {
  transition-delay: 0.56s;
}

.reveal.is-visible .prose {
  transition-delay: 0.14s;
}

.reveal.is-visible .highlight-line {
  transition-delay: 0.18s;
}

.reveal.is-visible .manifest-quote {
  transition-delay: 0.12s;
}

.reveal.is-visible .contacts li:nth-child(1) {
  transition-delay: 0.08s;
}

.reveal.is-visible .contacts li:nth-child(2) {
  transition-delay: 0.14s;
}

.reveal.is-visible .contacts li:nth-child(3) {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: none;
    transition: none;
  }

  .hero-copy,
  .hero-photo {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-photo-img {
    animation: none;
  }

  .card:hover,
  .project-showcase-card:hover,
  .tag-list li:hover,
  .badges span:hover {
    transform: none;
  }

  .text-type__cursor {
    animation: none;
    opacity: 1;
  }

  .reveal .section-title,
  .reveal .section-lead,
  .reveal .cards-grid > .card,
  .reveal .projects-showcase > .project-showcase-card,
  .reveal .process-list > li,
  .reveal .badges > span,
  .reveal .audience-list > li,
  .reveal .tag-list > li,
  .reveal .why-grid > div,
  .reveal .highlight-line,
  .reveal .prose,
  .reveal .contacts li,
  .reveal .manifest-quote,
  .reveal .testimonials-viewport,
  .reveal .testimonials-controls,
  .reveal .testimonials-hint,
  .reveal .testimonial-card,
  .reveal .hero-actions {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .testimonials-deck .testimonial-card {
    transition: none !important;
  }

  .btn-primary {
    background: var(--accent);
    background-position: 0% 50%;
  }
}

@media (max-width: 560px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }
}

/* Target-style курсор (GSAP), выше .noise и прочих оверлеев */
.target-cursor-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10050;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}

.target-cursor-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.target-cursor-corner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  will-change: transform;
}

.corner-tl {
  transform: translate(-150%, -150%);
  border-right: none;
  border-bottom: none;
}

.corner-tr {
  transform: translate(50%, -150%);
  border-left: none;
  border-bottom: none;
}

.corner-br {
  transform: translate(50%, 50%);
  border-left: none;
  border-top: none;
}

.corner-bl {
  transform: translate(-150%, 50%);
  border-right: none;
  border-top: none;
}

/* Модальное окно «Написать мне» */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 32px);
  overflow: hidden;
  overscroll-behavior: contain;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease-out-expo),
    visibility 0.35s;
}

.contact-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.contact-modal[hidden] {
  display: none !important;
}

.contact-modal.is-open[hidden] {
  display: grid !important;
}

.contact-modal__backdrop {
  grid-area: 1 / 1;
  place-self: stretch;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-modal__panel {
  grid-area: 1 / 1;
  place-self: center;
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(90vh, 680px);
  overflow-y: auto;
  padding: clamp(28px, 5vw, 40px);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background: linear-gradient(
    165deg,
    rgba(18, 18, 26, 0.99) 0%,
    rgba(10, 10, 12, 0.99) 100%
  );
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(124, 92, 255, 0.14) inset;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.4s var(--ease-out-expo);
}

.contact-modal.is-open .contact-modal__panel {
  transform: translateY(0) scale(1);
}

.contact-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.contact-modal__close:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.contact-modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 700;
  margin: 0 44px 10px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: block;
}

.contact-modal__title::before {
  display: none !important;
  content: none !important;
}

.contact-modal__lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: 100%;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.contact-form__field label {
  display: block;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.contact-form__field input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form__field input::placeholder {
  color: rgba(155, 150, 176, 0.65);
}

.contact-form__field input:hover {
  border-color: rgba(124, 92, 255, 0.25);
}

.contact-form__field input:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.contact-form__field input.is-invalid {
  border-color: rgba(255, 100, 100, 0.55);
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact-form__consent input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.contact-form__consent:has(input:focus-visible) {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-form__error {
  margin: 0;
  font-size: 0.88rem;
  color: #ff8a8a;
}

.contact-form__submit {
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
}

.contact-modal__success {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: rgba(196, 255, 77, 0.1);
  border: 1px solid rgba(196, 255, 77, 0.25);
  color: var(--text);
  font-weight: 500;
}

.contact-modal--success .contact-form {
  display: none;
}

.contact-modal--success .contact-modal__lead {
  display: none;
}

body.contact-modal-open {
  overflow: hidden;
}

body.contact-modal-open .target-cursor-wrapper {
  opacity: 0;
  visibility: hidden;
}
