/* ==========================================================================
   Portfolio — based on fsportfolio design
   Fonts: Poiret One, Roboto Flex (Google Fonts)
   Colors: rgba(67, 72, 79, 0.95) blocks, #e8e8e9 text, gradient accent cyan → purple
   ========================================================================== */

:root {
  --site-bg: rgba(67, 72, 79, 0.95);
  --block-bg: rgba(67, 72, 79, 0.95);
  --site-text: #e8e8e9;
  --font-display: 'Poiret One', cursive;
  --font-body: 'Roboto Flex', sans-serif;
  --gradient-text: linear-gradient(
    120deg,
    #22d3ee 0%,
    #38bdf8 22%,
    #60a5fa 42%,
    #818cf8 62%,
    #a78bfa 82%,
    #c084fc 100%
  );
  --gradient-cyan: #22d3ee;
  --gradient-blue: #38bdf8;
  --gradient-indigo: #818cf8;
  --gradient-purple: #c084fc;
  --gradient-underline: linear-gradient(
    0deg,
    #22d3ee 8%,
    #818cf8 24%,
    transparent 34%
  );
  --gradient-shadow: rgba(129, 140, 248, 0.45);
  --gradient-accent-soft: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.3) 0%,
    rgba(129, 140, 248, 0.25) 50%,
    rgba(192, 132, 252, 0.3) 100%
  );
}

.gradient-marker::before {
  background-image: var(--gradient-text);
  background-size: 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient {
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  background-color: #43484f;
  color: var(--site-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  vertical-align: middle;
}

a {
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.navigation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
  background-image: linear-gradient(180deg, rgb(67, 72, 79), transparent);
  transition: transform 0.2s ease-out, background-color 0.2s;
}

.navigation.is-hidden {
  transform: translateY(-100%);
}

.hero__bus-mobile {
  display: none;
}

.logo {
  padding-top: 2rem;
  padding-left: 3rem;
  text-decoration: none;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 2rem;
  color: #e8e8e9;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  flex-wrap: nowrap;
  padding-right: 3rem;
  list-style: none;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin: 1rem 2rem;
  position: relative;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-menu a:hover::after {
  width: 95%;
  left: 0;
}

.menu-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  z-index: 110;
}

.menu-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gradient-text);
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Social sidebar
   -------------------------------------------------------------------------- */

.social-sidebar {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 2.8rem;
  pointer-events: none;
}

.social-sidebar__link {
  pointer-events: auto;
  position: fixed;
  left: 2.8rem;
  color: #e8e8e9;
  transition: transform 0.2s ease-in-out;
}

.social-sidebar__link:nth-child(1) { bottom: 11rem; }
.social-sidebar__link:nth-child(2) { bottom: 8.5rem; }
.social-sidebar__link:nth-child(3) { bottom: 6rem; }
.social-sidebar__link:nth-child(4) { bottom: 3.5rem; }

.social-sidebar__link:hover {
  transform: scale(1.3);
}

.social-sidebar__line {
  position: fixed;
  left: 3.4rem;
  bottom: 0;
  width: 0;
  height: 3rem;
  border-left: 2px solid #c1c0c0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 75vh;
  width: 100%;
  color: #e8e8e9;
  /* Transparent so shared parallax blobs show through (code-cloth is also clear) */
  background: transparent;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  min-height: 75vh;
  width: 100%;
}

.hero__content {
  padding-top: 8rem;
  margin-left: 2rem;
  min-height: 0;
  flex: 1;
  z-index: 1;
}

.hero__visual {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 36vh;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  touch-action: none;
  overflow: hidden;
}

#code-cloth-container {
  width: 100%;
  height: 100%;
  min-height: inherit;
  position: relative;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

#code-cloth-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__greeting,
.hero__name {
  font-family: var(--font-display);
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__greeting {
  font-size: 1.1rem;
}

.hero__name {
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
}

.hero__offer {
  margin: 1rem 0 0;
  max-width: 28rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: color-mix(in srgb, var(--site-text) 90%, transparent);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero__cta-primary,
.hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero__cta-primary {
  color: #1a1c24;
  background: var(--gradient-text);
}

.hero__cta-primary:hover {
  transform: translateY(-2px);
}

.hero__cta-secondary {
  color: var(--gradient-blue);
  border: 1px solid color-mix(in srgb, var(--gradient-blue) 55%, transparent);
  background: transparent;
}

.hero__cta-secondary:hover {
  background: color-mix(in srgb, var(--gradient-blue) 12%, transparent);
  color: var(--site-text);
}

/* --------------------------------------------------------------------------
   Section titles (About Me, etc.)
   -------------------------------------------------------------------------- */

.section-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border: 0;
  min-height: 4rem;
  height: auto;
  font-family: var(--font-display);
  font-size: 0;
  color: transparent;
}

.section-title::before {
  content: '';
  order: 2;
  flex: 1 1 auto;
  max-width: 30%;
  min-width: 2rem;
  height: 2px;
  background: linear-gradient(to right, #b2b2b2, transparent);
}

.section-title::after {
  content: attr(data-content);
  order: 1;
  flex: 0 0 auto;
  position: relative;
  display: inline-block;
  line-height: 4.5rem;
  font-size: 1.3rem;
  font-family: var(--font-display);
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-title--right {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
  padding-right: 0;
  margin-left: 0;
  box-sizing: border-box;
}

.section-title--right::before {
  order: 1;
  background: linear-gradient(to left, #b2b2b2, transparent);
}

.section-title--right::after {
  order: 2;
  position: relative;
  display: inline-block;
  line-height: 4.5rem;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about {
  margin-top: 1rem;
  padding-top: 1rem;
  margin-right: 1.5rem;
  font-size: 0.8rem;
}

.about__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.about__photo-wrap {
  display: inline-block;
  padding: 3px;
  background: var(--gradient-text);
  border-radius: 3%;
  line-height: 0;
}

.about__photo {
  border: none;
  border-radius: 2%;
  height: 8rem;
  width: 8rem;
  object-fit: cover;
  display: block;
  transition: 0.3s ease-in-out;
  filter: grayscale(19%);
  cursor: pointer;
}

.about__photo--placeholder {
  background: linear-gradient(145deg, #2a2d38, #3a3f4d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__photo:hover {
  filter: grayscale(0);
  transform: scale(1.1);
}

.about__text p {
  margin-bottom: 1rem;
}

.text-highlight {
  background-image: var(--gradient-underline);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* --------------------------------------------------------------------------
   Pain / Services / Process (selling blocks)
   -------------------------------------------------------------------------- */

.pain,
.services,
.process {
  position: relative;
  z-index: 25;
  margin: 3rem 1.5rem 4rem;
}

.pain__lead,
.services__lead,
.process__lead,
.projects__lead,
.projects-sites__lead {
  margin: 0 auto 2rem;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--site-text) 86%, transparent);
}

.projects__lead {
  text-align: right;
  margin-right: 0;
  margin-left: auto;
}

.pain__lead {
  text-align: left;
}

.services__lead {
  text-align: right;
  margin-left: auto;
  margin-right: 0;
}

.process__lead {
  text-align: left;
}

.pain__grid,
.services__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.services__grid {
  overflow: visible;
}

.pain-card,
.service-card,
.process__step {
  padding: 1.25rem 1.15rem 1.35rem;
  background:
    linear-gradient(var(--block-bg), var(--block-bg)) padding-box,
    var(--gradient-text) border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow: 2px 2px var(--gradient-shadow);
}

.pain-card__title,
.service-card__title,
.process__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.process__title {
  margin: 0 0 0.65rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.service-card:has(.service-card__info[aria-expanded="true"]) {
  z-index: 8;
}

.service-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.service-card__info {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--gradient-blue) 55%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--gradient-blue);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.service-card__info:hover,
.service-card__info[aria-expanded="true"] {
  background: color-mix(in srgb, var(--gradient-blue) 16%, transparent);
  color: var(--site-text);
  border-color: var(--gradient-blue);
}

.service-card__info-icon {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.7rem;
  text-align: center;
}

.service-card__price {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.service-card__includes {
  position: absolute;
  top: 3.15rem;
  right: 0.85rem;
  z-index: 30;
  width: min(17.5rem, calc(100% - 1.7rem));
  margin: 0;
  padding: 0.95rem 1rem 1rem;
  border-radius: 8px;
  background:
    linear-gradient(var(--block-bg), var(--block-bg)) padding-box,
    var(--gradient-text) border-box;
  border: 2px solid transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.service-card__includes::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 0.7rem;
  width: 10px;
  height: 10px;
  background: var(--block-bg);
  border-top: 2px solid color-mix(in srgb, var(--gradient-blue) 55%, transparent);
  border-right: 2px solid color-mix(in srgb, var(--gradient-blue) 55%, transparent);
  transform: rotate(-45deg);
}

.service-card__includes[hidden] {
  display: none;
}

.service-card__includes-title {
  margin: 0 0 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gradient-blue);
}

.service-card__includes-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.78rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--site-text) 90%, transparent);
}

.service-card__includes-list li + li {
  margin-top: 0.25rem;
}

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

.pain-card__text,
.service-card__for,
.service-card__result,
.process__text {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  line-height: 1.75;
  color: color-mix(in srgb, var(--site-text) 84%, transparent);
}

.service-card__for span,
.service-card__result span {
  color: var(--gradient-blue);
  letter-spacing: 0.04em;
}

.pain-card__cta,
.service-card__cta,
.service-card__link,
.process__cta,
.about__cta,
.projects-advantages__cta,
.project-bento__cta {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gradient-blue);
  transition: color 0.2s ease;
}

.pain-card__cta:hover,
.service-card__cta:hover,
.service-card__link:hover,
.process__cta:hover,
.about__cta:hover,
.projects-advantages__cta:hover,
.project-bento__cta:hover {
  color: var(--site-text);
}

.service-card__link {
  display: block;
  margin-bottom: 0.35rem;
  margin-top: auto;
}

.service-card__cta,
.process__cta,
.about__cta,
.projects-advantages__cta,
.project-bento__cta {
  margin-top: 0.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid color-mix(in srgb, var(--gradient-blue) 55%, transparent);
  border-radius: 4px;
}

.projects-sites {
  margin: 3rem 0 2rem;
}

.projects-sites__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.process__steps {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  grid-template-columns: 1fr;
}

.process__num {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gradient-blue);
}

.projects-advantages__footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.contact__action--preferred {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gradient-blue) 45%, transparent);
}

.about__cta {
  margin-top: 1rem;
}

@media only screen and (min-width: 640px) {
  .pain__grid,
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pain-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
    justify-self: center;
  }

  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (min-width: 1024px) {
  .pain__grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .pain-card:nth-child(1),
  .pain-card:nth-child(2),
  .pain-card:nth-child(3) {
    grid-column: span 2;
  }

  .pain-card:nth-child(4),
  .pain-card:nth-child(5) {
    grid-column: span 3;
    max-width: none;
    justify-self: stretch;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (min-width: 1100px) {
  .services__grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .process__steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Projects — featured
   -------------------------------------------------------------------------- */

.projects {
  padding-top: 4rem;
  overflow: visible;
  margin-top: 4rem;
  margin-right: 2rem;
  margin-left: 1.5rem;
}

/* Advantages block (бывш. «Другие проекты») */
.projects-advantages {
  position: relative;
  z-index: 25;
  max-width: 72rem;
  margin: 0 auto 4rem;
  padding: 0 0.5rem 1rem;
}

.projects-advantages__eyebrow {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gradient-blue);
}

.projects-advantages__title {
  margin: 0 0 1.25rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.65rem, 5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.projects-advantages__lead {
  margin: 0 auto 2.5rem;
  max-width: 40rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.75;
  color: color-mix(in srgb, var(--site-text) 86%, transparent);
}

.projects-advantages__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.projects-advantage-card {
  padding: 1.25rem 1.15rem 1.35rem;
  background:
    linear-gradient(var(--block-bg), var(--block-bg)) padding-box,
    var(--gradient-text) border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow: 2px 2px var(--gradient-shadow);
  transition: transform 0.25s ease;
}

.projects-advantage-card:hover {
  transform: translateY(-2px);
}

.projects-advantage-card__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--site-text);
}

.projects-advantage-card__text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.75;
  color: color-mix(in srgb, var(--site-text) 84%, transparent);
}

.project {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(8, 2rem);
  min-height: 30vh;
  margin-bottom: 4rem;
  position: relative;
}

.project__photo-wrap {
  grid-column: 1 / 11;
  grid-row: 1 / 8;
  border-radius: 2%;
  background: var(--gradient-accent-soft);
  transition: all ease-in-out 0.3s;
  overflow: hidden;
}

.project__photo {
  width: 100%;
  height: 13rem;
  border-radius: 2%;
  transition: all ease-in-out 0.3s;
  filter: grayscale(90%) contrast(1);
  mix-blend-mode: multiply;
  object-fit: cover;
}

.project__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c9a8a7;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1c24;
}

.project__photo--placeholder::before {
  content: attr(data-label);
}

.project__photo-wrap:hover .project__photo {
  filter: none;
  mix-blend-mode: unset;
}

.project__info {
  grid-column: 1 / 11;
  grid-row: 2 / 7;
  z-index: 2;
  font-size: 0.5rem;
  background-color: rgba(248, 248, 249, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 2%;
  color: #1a1c24;
  text-align: right;
  align-self: center;
}

.project__name {
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: 700;
}

.project__desc {
  margin-top: 0.25rem;
}

.project__tech {
  grid-column: 1 / 11;
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
  padding-top: 1.5rem;
  padding-right: 0.5rem;
  font-size: 0.5rem;
  color: #1a1c24;
  z-index: 3;
}

.project__tech li::before {
  content: '▹ ';
  background-image: var(--gradient-text);
  background-size: 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.project__links {
  grid-column: 1 / 11;
  grid-row: 6 / 7;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-right: 0.8rem;
  z-index: 3;
}

.project__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  background-color: #1a1c24;
  border-radius: 50%;
  color: #e8e8e9;
  transition: transform 0.2s ease-in-out;
}

.project__links a:hover {
  transform: scale(1.3);
}

.project__links svg {
  width: 0.9rem;
  height: 0.9rem;
}

@media only screen and (min-width: 640px) {
  .projects-advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-advantage-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
    justify-self: center;
  }
}

@media only screen and (min-width: 1024px) {
  .projects-advantages__grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .projects-advantage-card:nth-child(1),
  .projects-advantage-card:nth-child(2),
  .projects-advantage-card:nth-child(3) {
    grid-column: span 2;
  }

  .projects-advantage-card:nth-child(4) {
    grid-column: 1 / span 3;
  }

  .projects-advantage-card:nth-child(5) {
    grid-column: 4 / span 3;
    max-width: none;
    justify-self: stretch;
  }

  .projects-advantage-card:last-child {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  position: relative;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 2rem 2rem 0;
  padding-top: 3rem;
}

.contact__inner {
  max-width: 50rem;
}

.contact__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.contact__text {
  font-size: 1rem;
  line-height: 1.7;
  padding: 2rem 0 1.25rem;
}

.contact__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.contact__actions > li {
  display: flex;
  min-width: 0;
}

.contact__action {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 4.25rem;
  padding: 0.85rem 1rem;
  box-sizing: border-box;
  text-decoration: none;
  text-align: left;
  color: var(--site-text);
  background:
    linear-gradient(var(--block-bg), var(--block-bg)) padding-box,
    var(--gradient-text) border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow: 2px 2px var(--gradient-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact__action:hover {
  transform: translateY(-2px);
}

.contact__action--static {
  cursor: default;
}

.contact__action--static:hover {
  transform: none;
}

.contact__action--static.is-copied {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gradient-blue) 55%, transparent);
}

.contact__action-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.contact__action-email {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--site-text) 88%, transparent);
  text-decoration: none;
  word-break: break-all;
}

.contact__action-email:hover {
  color: var(--gradient-blue);
  text-decoration: underline;
}

@media only screen and (max-width: 899px) {
  .contact__action--static {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .contact__action--static:hover {
    transform: translateY(-2px);
  }

  .contact__action--static .contact__action-email {
    pointer-events: none;
    text-decoration: none;
  }

  .contact__action--static .contact__copy {
    pointer-events: none;
  }
}

.contact__copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--site-text) 18%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--site-bg) 88%, transparent);
  color: var(--gradient-blue);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact__copy:hover {
  border-color: var(--gradient-blue);
  background: color-mix(in srgb, var(--gradient-blue) 12%, transparent);
}

.contact__copy:focus-visible {
  outline: 2px solid var(--gradient-indigo);
  outline-offset: 2px;
}

.contact__copy.is-copied {
  color: var(--site-text);
  border-color: color-mix(in srgb, var(--gradient-blue) 55%, transparent);
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 200;
  transform: translateX(-50%) translateY(0.75rem);
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--site-text);
  background:
    linear-gradient(var(--block-bg), var(--block-bg)) padding-box,
    var(--gradient-text) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.copy-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media only screen and (max-width: 899px) {
  .copy-toast {
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 2rem);
    text-align: center;
  }
}

.contact__action:focus-visible {
  outline: 2px solid var(--gradient-indigo);
  outline-offset: 2px;
}

.contact__action-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gradient-blue);
}

.contact__action-value {
  font-size: 0.88rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--site-text) 88%, transparent);
}

@media only screen and (min-width: 520px) {
  .contact__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 36rem;
  }
}

.contact__link {
  font-size: 1.1rem;
  text-decoration: none;
  color: #e8e8e9;
  background-image: var(--gradient-underline);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transition: opacity 0.2s;
}

.contact__link:hover {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: 2rem;
  text-align: center;
}

@keyframes footer-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.18);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.12);
  }

  70% {
    transform: scale(1);
  }
}

.footer__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.footer__heart {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  background-image: var(--gradient-text);
  background-size: 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: footer-heartbeat 1.15s ease-in-out infinite;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  .footer__heart {
    animation: none;
  }
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer__social a {
  color: var(--gradient-cyan);
  transition: transform 0.2s, color 0.2s;
}

.footer__social a svg {
  fill: currentColor;
}

.footer__social a:hover {
  color: var(--gradient-purple);
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media only screen and (min-width: 400px) {
  .section-title::after {
    font-size: 1.8rem;
  }

  .section-title--right::after {
    font-size: 1.8rem;
  }
}

@media only screen and (min-width: 600px) {
  .hero__content {
    margin-left: 8rem;
  }

  .hero__name {
    font-size: 3.5rem;
  }

  .hero__greeting {
    font-size: 1.1rem;
  }

  .about {
    font-size: 0.9rem;
  }

  .about__photo {
    height: 10rem;
    width: 10rem;
  }

  .section-title::after {
    font-size: 1.8rem;
  }

  .section-title--right::after {
    font-size: 1.8rem;
  }

  .projects-advantages__title {
    font-size: 2.5rem;
  }

  .projects-advantages__lead {
    font-size: 1rem;
  }

  .project {
    min-height: 45vh;
  }

  .project__info {
    font-size: 0.6rem;
    opacity: 1;
    grid-column: 5 / 11;
    grid-row: 2 / 6;
    padding-right: 0.8rem;
  }

  .project--reverse .project__info {
    grid-column: 1 / 8;
    text-align: left;
    padding-left: 1.5rem;
  }

  .project__photo-wrap {
    grid-column: 1 / 8;
  }

  .project__photo {
    height: 15rem;
  }

  .project--reverse .project__photo-wrap {
    grid-column: 4 / 11;
  }

  .project__tech {
    font-size: 0.6rem;
    grid-column: 1 / 5;
    grid-row: 6 / 7;
    justify-content: flex-start;
    padding-top: 0.4rem;
    color: #e8e8e9;
  }

  .project:not(.project--reverse) .project__tech {
    grid-column: 8 / 11;
    justify-content: flex-end;
  }

  .project__links {
    grid-row: 8;
  }

  .project--reverse .project__links {
    justify-content: flex-start;
  }

  .project__links a {
    width: 1.7rem;
    height: 1.7rem;
  }

  .projects-advantage-card__text {
    font-size: 0.85rem;
  }

  .contact__title {
    font-size: 2.2rem;
  }

  .contact__text {
    font-size: 1.2rem;
  }

  .contact__link {
    font-size: 1.2rem;
  }

  .footer__social--mobile {
    display: none;
  }
}

@media only screen and (min-width: 900px) {
  .hero__bus-strip,
  .hero__bus-vertical {
    display: none !important;
  }

  .hero__inner {
    flex-direction: row;
    align-items: stretch;
  }

  .hero__content {
    order: 1;
    flex: 0 0 48%;
    max-width: 48%;
  }

  .hero__visual {
    order: 2;
    display: flex;
    position: relative;
    flex: 1 1 52%;
    min-height: 75vh;
    height: 100%;
    min-width: 0;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-width: none;
    max-height: none;
    contain: layout paint;
  }

  .hero__content {
    margin-left: 10rem;
    min-height: 75vh;
  }

  .hero__name {
    font-size: 4rem;
  }

  .hero__greeting {
    font-size: 1.5rem;
  }

  .about {
    font-size: 1rem;
    padding-top: 1rem;
  }

  .about__inner {
    flex-direction: row;
    align-items: flex-start;
    padding-right: 5rem;
    padding-left: 5rem;
  }

  .about__text {
    max-width: 50rem;
  }

  .about__photo {
    height: 12rem;
    width: 12rem;
    flex-shrink: 0;
  }

  .section-title {
    margin-top: 1rem;
    min-height: 7.7rem;
  }

  .section-title::after {
    font-size: 2.8rem;
    line-height: 7.7rem;
  }

  .section-title--right {
    margin-top: 1rem;
    min-height: 7.7rem;
  }

  .section-title--right::after {
    font-size: 2.8rem;
    line-height: 7.7rem;
  }

  .projects {
    margin-right: 5rem;
    padding-top: 2rem;
  }

  .project {
    min-height: 70vh;
    padding-top: 2rem;
    grid-template-rows: repeat(10, 1fr);
  }

  .project__info {
    font-size: 0.8rem;
    grid-column: 6 / 11;
    grid-row: 2 / 5;
    padding: 0 1.5rem;
  }

  .project--reverse .project__info {
    grid-column: 1 / 6;
  }

  .project__photo-wrap {
    grid-column: 1 / 7;
    grid-row: 1 / 6;
  }

  .project__photo {
    height: 22rem;
  }

  .project--reverse .project__photo-wrap {
    grid-column: 5 / 11;
  }

  .project__tech {
    font-size: 0.8rem;
    grid-column: 1 / 6;
    grid-row: 5 / 7;
  }

  .project:not(.project--reverse) .project__tech {
    grid-column: 6 / 11;
    grid-row: 5 / 7;
  }

  .project__links {
    grid-column: 9 / -1;
    grid-row: 6;
  }

  .project--reverse .project__links {
    grid-column: 1 / 3;
  }

  .project__links a {
    width: 2.1rem;
    height: 2.1rem;
  }

  .contact__title {
    font-size: 3rem;
  }

  .contact__text {
    font-size: 1.5rem;
  }

  .contact__link {
    font-size: 1.6rem;
  }
}

@media only screen and (max-width: 899px) {
  .hero {
    position: relative;
    min-height: 50vh;
  }

  .hero__inner {
    position: relative;
    min-height: auto;
  }

  .hero__visual,
  #code-cloth-container {
    display: none !important;
  }

  .navigation {
    flex-wrap: wrap;
    height: auto;
    min-height: calc(4rem + env(safe-area-inset-top, 0px));
    align-content: flex-start;
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* [TG] … [≡] */
  /* ═══════════════ [core] */
  .navigation .hero__bus-strip {
    display: block;
    flex: 0 0 100%;
    order: 99;
    width: 100%;
    height: 52px;
    position: relative;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    touch-action: none;
    background: var(--block-bg);
  }

  .hero__bus-strip canvas {
    width: 100%;
    height: 100%;
    display: block;
  }

  .hero__content {
    position: relative;
    z-index: 1;
    min-height: 50vh;
    overflow: visible;
    padding-top: calc(var(--header-stack-height, calc(4rem + 52px + env(safe-area-inset-top, 0px))) + 12px);
    padding-left: 28px;
    /* Reserve space for vertical bus rail so text/CTA never sit under lines */
    padding-right: 3.25rem;
    margin-left: 24px;
    margin-right: 16px;
  }

  .hero__offer {
    max-width: min(28rem, calc(100% - 0.25rem));
  }

  .hero__cta {
    max-width: calc(100% - 0.25rem);
  }

  .hero__cta-primary,
  .hero__cta-secondary {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
  }

  /* || вдоль текстового блока под core */
  .hero__bus-vertical {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    touch-action: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }

  .hero__bus-vertical canvas {
    width: 100%;
    height: 100%;
    display: block;
  }

  .hero__greeting {
    margin: 0;
  }

  .hero__name {
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .about {
    margin-left: 16px;
    margin-right: 16px;
  }

  .pain,
  .services,
  .process {
    margin-left: 16px;
    margin-right: 16px;
  }

  .hero__offer {
    font-size: 0.88rem;
  }
}

@media only screen and (max-width: 420px) {
  .hero__content {
    padding-left: 20px;
    padding-right: 2.75rem;
    margin-left: 12px;
    margin-right: 10px;
  }

  .hero__name {
    font-size: 1.65rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta-primary,
  .hero__cta-secondary {
    width: 100%;
  }
}

@media only screen and (max-width: 800px) {
  .navigation {
    flex-wrap: wrap;
    height: auto;
    min-height: 4rem;
    background-color: var(--block-bg);
  }

  .navigation.is-scrolled {
    background-color: var(--block-bg);
  }

  .logo {
    padding-top: 1rem;
    padding-left: 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    width: 100%;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .nav-menu.is-open {
    max-height: 20rem;
    padding-bottom: 1rem;
  }

  .nav-menu a {
    margin: 0.5rem 1.5rem;
  }
}

@media only screen and (max-width: 600px) {
  .social-sidebar {
    display: none;
  }
}

@media print {
  .navigation,
  .social-sidebar,
  .menu-toggle {
    display: none;
  }
}
