:root {
  --bg-0: #f2f8ff;
  --bg-1: #e3f0ff;
  --bg-2: #d8e8ff;
  --text: #0a1e3a;
  --muted: #3d5a80;
  --primary: #1185ff;
  --primary-strong: #0062c4;
  --line: rgba(17, 133, 255, 0.22);
  --card: rgba(255, 255, 255, 0.72);
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2?v=20260410-1") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-SemiBold.woff2?v=20260410-1") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  background: linear-gradient(170deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
  overflow-x: hidden;
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(170deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
  color: var(--text);
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  min-height: 100dvh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-layer {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.bg-layer-1 {
  width: min(60vw, 620px);
  height: min(60vw, 620px);
  top: -120px;
  left: -140px;
  background: radial-gradient(circle, rgba(91, 177, 255, 0.5), rgba(91, 177, 255, 0.04));
  animation: floatA 11s ease-in-out infinite alternate;
}

.bg-layer-2 {
  width: min(40vw, 460px);
  height: min(40vw, 460px);
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(29, 145, 255, 0.48), rgba(29, 145, 255, 0.06));
  animation: floatB 13s ease-in-out infinite alternate;
}

.header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  width: min(1140px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(245, 251, 255, 0.7);
  backdrop-filter: blur(16px);
  isolation: isolate;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.logo,
.nav a,
.nav-cta,
.tg-link {
  text-decoration: none;
  color: var(--text);
  transition: 0.25s ease;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
}

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

.nav a,
.nav-cta,
.tg-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-cta {
  border: 0;
  background: linear-gradient(135deg, #1393ff, #0056b0);
  color: #fff;
  background-clip: padding-box;
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.22);
}

.nav a:hover,
.nav-cta:hover,
.tg-link:hover,
.logo:hover {
  color: var(--primary-strong);
}

.nav-cta:hover {
  color: #fff;
  filter: brightness(1.05);
}

main {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 100px 12px 0;
}

.section {
  margin: 0 0 18px;
  padding: 30px 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  overflow: hidden;
}

section[id] {
  scroll-margin-top: 114px;
}

.hero {
  min-height: 58vh;
  display: grid;
  align-items: center;
}

.hero-card h1,
.section-head h2,
.card h3,
.project-card h3,
.timeline-item span {
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-card {
  max-width: 780px;
}

.hero-card h1 {
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  line-height: 1.1;
  margin: 8px 0 12px;
}

.hero-card p {
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
}

.tag {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease, border-color 0.28s ease;
}

.btn::after {
  content: "";
  position: absolute;
  top: -110%;
  left: -35%;
  width: 48%;
  height: 320%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  transition: left 0.5s ease;
  pointer-events: none;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #1393ff, #0056b0);
  background-clip: padding-box;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 119, 255, 0.25), 0 0 0 rgba(19, 147, 255, 0);
}

.btn-ghost {
  border-color: rgba(0, 89, 176, 0.22);
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.82);
}

.hero-actions .btn:hover {
  transform: translateY(-2px);
}

.hero-actions .btn:active {
  transform: translateY(0) scale(0.985);
}

.hero-actions .btn:hover::after {
  left: 115%;
}

.hero-actions .btn-primary:hover {
  box-shadow: 0 18px 42px rgba(0, 119, 255, 0.45), 0 0 28px rgba(19, 147, 255, 0.48);
  filter: saturate(1.05);
}

.hero-actions .btn-ghost:hover {
  box-shadow: 0 14px 26px rgba(0, 89, 176, 0.2), 0 0 14px rgba(72, 167, 255, 0.26);
  border-color: rgba(0, 89, 176, 0.38);
  background: rgba(255, 255, 255, 0.92);
}

.hero-actions .btn-primary:active {
  box-shadow: 0 8px 20px rgba(0, 119, 255, 0.32), 0 0 10px rgba(19, 147, 255, 0.28);
}

.hero-actions .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 147, 255, 0.24), 0 14px 28px rgba(0, 119, 255, 0.28);
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.1rem, 2.4vw, 2rem);
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

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

.card,
.project-card,
.timeline-item,
.form-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 133, 255, 0.18);
  border-radius: 18px;
}

.card,
.project-card {
  padding: 18px 16px;
}

.service-title {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.service-title h3 {
  margin: 0;
}

.info-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(17, 133, 255, 0.12);
  color: var(--primary-strong);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
}

.service-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: min(320px, calc(100vw - 72px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.2s ease;
}

.service-title:hover .service-tooltip,
.service-title:focus-within .service-tooltip,
.service-title.is-open .service-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.card p,
.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.portfolio-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.portfolio-item {
  border: 1px solid rgba(17, 133, 255, 0.2);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  overflow: clip;
}

.portfolio-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.portfolio-summary::-webkit-details-marker {
  display: none;
}

.portfolio-summary::after {
  content: "\2304";
  color: var(--primary-strong);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.portfolio-item[open] .portfolio-summary::after {
  transform: rotate(180deg);
}

.portfolio-summary strong {
  display: block;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.portfolio-summary em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
}

.portfolio-expanded {
  border-top: 1px solid rgba(17, 133, 255, 0.14);
  padding: 14px 16px 16px;
}

.portfolio-expanded p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.portfolio-gallery {
  display: grid;
  gap: 10px;
}

.portfolio-gallery-yagoda {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portfolio-gallery-eazynet {
  grid-template-columns: 1fr;
}

.portfolio-image-card {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(17, 133, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(0, 85, 170, 0.1);
}

.portfolio-image-card img {
  width: 100%;
  height: auto;
  max-height: 780px;
  object-fit: contain;
  display: block;
  background: rgba(242, 248, 255, 0.92);
}

.portfolio-image-card figcaption {
  padding: 8px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-strong);
  border-top: 1px solid rgba(17, 133, 255, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.price {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--primary-strong);
  background: rgba(17, 133, 255, 0.1);
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: center;
}

.timeline-item span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(17, 133, 255, 0.16), rgba(17, 133, 255, 0.03));
  color: var(--primary-strong);
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.form-card {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid rgba(16, 97, 185, 0.25);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 133, 255, 0.12);
  outline: none;
}

input.has-error {
  border-color: #d93a3a;
  box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.14);
}

.field-error {
  min-height: 16px;
  color: #d93a3a;
  font-size: 0.74rem;
  text-transform: none;
  letter-spacing: 0.01em;
}

.form-status {
  min-height: 20px;
  margin: 0;
  font-size: 0.9rem;
}

.footer {
  width: min(1140px, 100%);
  margin: 0 auto 24px;
  padding: 0 12px;
  text-align: center;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.depth {
  transition: transform 0.3s linear;
}

@keyframes floatA {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(32px, 40px) scale(1.08);
  }
}

@keyframes floatB {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-24px, -30px) scale(1.06);
  }
}

@media (max-width: 1024px) {
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header {
    top: 8px;
    left: 6px;
    transform: none;
    right: 6px;
    width: auto;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item,
  .nav-cta,
  .tg-link {
    font-size: 0.61rem;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 7px 6px;
  }

  .nav-item {
    display: grid;
    gap: 3px;
    justify-items: center;
    align-content: center;
    line-height: 1.05;
  }

  .nav-item::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.96;
  }

  .nav-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230062c4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.8 12 3l9 7.8'/%3E%3Cpath d='M5.2 9.9V21h13.6V9.9'/%3E%3Cpath d='M9.5 21v-6h5v6'/%3E%3C/svg%3E");
  }

  .nav-services::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230062c4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5.8A1.8 1.8 0 0 1 10.8 4h2.4A1.8 1.8 0 0 1 15 5.8V7'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E");
  }

  .nav-portfolio::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230062c4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8' cy='9' r='1.2'/%3E%3Cpath d='m21 16-5.2-5.2L8.5 18'/%3E%3C/svg%3E");
  }

  .nav-steps::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230062c4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Ccircle cx='4' cy='6' r='1' fill='%230062c4'/%3E%3Ccircle cx='4' cy='12' r='1' fill='%230062c4'/%3E%3Ccircle cx='4' cy='18' r='1' fill='%230062c4'/%3E%3C/svg%3E");
  }

  .logo {
    font-size: 0.78rem;
  }

  .nav-cta {
    order: 4;
    width: 100%;
  }

  .section {
    padding: 24px 14px;
    border-radius: 18px;
  }

  section[id] {
    scroll-margin-top: 198px;
  }

  main {
    margin-top: 0;
    padding: 188px 12px 0;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .service-tooltip {
    width: min(280px, calc(100vw - 52px));
  }

  .portfolio-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .portfolio-gallery-yagoda {
    grid-template-columns: 1fr;
  }

  .footer {
    margin-bottom: 14px;
  }

}
