:root {
  --bg-dark: #101d17;
  --bg-grid: #294233;
  --primary: #9dffd1;
  --primary-strong: #78ffc1;
  --secondary: #ffd2dd;
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.85);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-hover: rgba(255, 255, 255, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
html,
body {
  overflow-x: hidden;
}

body {
  font-family: "Nunito", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(
      circle at 50% 20%,
      rgba(120, 255, 193, 0.08),
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 65%,
      rgba(255, 194, 211, 0.05),
      transparent 30%
    ),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    48px 48px,
    48px 48px;
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
}

h1,
h2,
h3,
.logo,
.btn {
  font-family: "Comfortaa", cursive;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(157, 255, 209, 0.4) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 210, 221, 0.25) 1px, transparent 1px);
  background-size:
    90px 90px,
    130px 130px;
  opacity: 0.22;
  z-index: -1;
  animation: starShift 25s linear infinite;
}

@keyframes starShift {
  to {
    background-position:
      0 90px,
      35px 175px;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes scanline {
  0% {
    transform: translateY(-100%);
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100%);
    opacity: 0.3;
  }
}
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(157, 255, 209, 0.35);
  }
  50% {
    box-shadow: 0 0 24px rgba(157, 255, 209, 0.6);
  }
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 46px;
  background: rgba(16, 29, 23, 0.85);
  border-bottom: 1px solid rgba(157, 255, 209, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: padding 0.3s ease;
}

/* Logo */
.logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.logo::before,
.logo::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  opacity: 0.8;
}
.logo::before {
  color: #ff00c1;
  z-index: -1;
}
.logo::after {
  color: #00fff9;
  z-index: -2;
}
.logo:hover::before {
  animation: glitch-anim-1 0.4s infinite linear alternate-reverse;
}
.logo:hover::after {
  animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: inset(20% 0 80% 0);
    transform: translate(-2px, 0);
  }
  100% {
    clip-path: inset(60% 0 10% 0);
    transform: translate(2px, 0);
  }
}
@keyframes glitch-anim-2 {
  0% {
    clip-path: inset(10% 0 60% 0);
    transform: translate(2px, 0);
  }
  100% {
    clip-path: inset(80% 0 5% 0);
    transform: translate(-2px, 0);
  }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}
nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.25rem;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}
nav a:hover {
  color: var(--primary);
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
nav a:hover::after {
  width: 100%;
}

/* Burger */
.burger-menu {
  display: none;
  width: 32px;
  height: 24px;
  border: none;
  background: transparent;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 6101;
  padding: 0;
}
.burger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: #fff;
  transition: all 0.3s ease;
}
.burger-menu.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.burger-menu.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 5900;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  backdrop-filter: blur(4px);
}
.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Sections */
section {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 120px 20px 100px;
  position: relative;
}
.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}
.section-star {
  color: var(--primary);
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
}
.section-star.right {
  animation-delay: 1.5s;
}
h2 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--secondary);
  text-shadow: 0 0 20px rgba(255, 194, 211, 0.4);
}

/* Добавил отступ под простым заголовком (портфолио и т.п.) */
.section-title {
  margin-bottom: 56px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
}
.hero-text {
  flex: 1;
  max-width: 600px;
}
.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(157, 255, 209, 0.1);
  border: 1px solid rgba(157, 255, 209, 0.3);
  border-radius: 99px;
  padding: 8px 16px;
  margin-bottom: 24px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 700;
}
.highlight {
  color: var(--primary-strong);
  text-shadow: 0 0 15px rgba(157, 255, 209, 0.6);
}
.hero-text p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-soft);
  margin-bottom: 36px;
  max-width: 90%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 16px 48px;
  border-radius: 99px;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  background: rgba(157, 255, 209, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.pulse-btn {
  animation: pulseGlow 3s infinite;
}
.btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
  box-shadow: 0 0 30px rgba(157, 255, 209, 0.5);
  transform: translateY(-3px);
}
.small-btn {
  padding: 12px 28px;
  font-size: 1rem;
}
.accent-btn {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #2b1d22;
}
.accent-btn:hover {
  background: #ffe3ea;
  box-shadow: 0 0 30px rgba(255, 210, 221, 0.5);
}

.hologram-container {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  perspective: 1000px;
}
.hologram-pedestal {
  position: absolute;
  bottom: 0;
  width: 60%;
  height: 30px;
  background: radial-gradient(
    ellipse,
    rgba(157, 255, 209, 0.6) 0%,
    transparent 70%
  );
  filter: blur(15px);
  animation: pulseGlow 4s infinite;
}
.printer-model-wrapper {
  width: min(500px, 100%);
  height: auto;
  aspect-ratio: 4/5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
  border-radius: 30px;
  border: 1px solid rgba(157, 255, 209, 0.1);
  background: rgba(157, 255, 209, 0.02);
}
.printer-model-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(157, 255, 209, 0.12) 50%,
    transparent 60%
  );
  background-size: 100% 300%;
  animation: scanline 5s linear infinite;
  border-radius: 30px;
}

/* Настройки для четкости картинки */
.hero-image {
  width: 90%;
  height: 90%;
  object-fit: contain;
  z-index: 3;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
  transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
}

/* Process */
.process-subtitle,
.portfolio-subtitle {
  text-align: center;
  color: var(--text-soft);
  margin-top: -40px;
  margin-bottom: 50px;
  font-size: 1.1rem;
}
.process-steps {
  display: flex;
  gap: 24px;
}
.step-card {
  flex: 1;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 20px;
  padding: 32px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  position: relative;
  transition: 0.3s;
}
.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(157, 255, 209, 0.4);
  background: var(--glass-hover);
}
.step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  font-size: 1.5rem;
  opacity: 0.6;
}

.step-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
  padding: 10px;
  background: rgba(157, 255, 209, 0.1);
  border-radius: 12px;
}
.step-icon.secondary {
  color: var(--secondary);
  background: rgba(255, 210, 221, 0.1);
}
.step-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.step-card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}
.step-card p {
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.portfolio-item {
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a2b22;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portfolio-item:hover img {
  transform: scale(1.04);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(16, 29, 23, 0.96),
    rgba(16, 29, 23, 0.78)
  );
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay {
  opacity: 1;
}
.overlay-content {
  transform: translateY(18px);
  transition: transform 0.3s ease;
  max-width: 260px;
}
.portfolio-item:hover .overlay-content,
.portfolio-item:focus-within .overlay-content {
  transform: translateY(0);
}
.overlay-content h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.35;
}
.overlay-content p {
  color: var(--text-soft);
  font-size: 1rem;
}

/* Pricing */
.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.price-card {
  flex: 1;
  min-width: 300px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 255, 209, 0.2);
  border-radius: 28px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: rgba(255, 210, 221, 0.05);
  border-color: var(--secondary);
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.popular-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: #2b1d22;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}
.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 15px 0 25px;
}
.secondary-price {
  color: var(--secondary);
}
.features {
  list-style: none;
  text-align: left;
  margin-bottom: 30px;
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.features li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
}
.features li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.1em;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 60px 20px 40px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}
.socials {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}
.social-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 2px solid rgba(157, 255, 209, 0.3);
  background: rgba(157, 255, 209, 0.05);
  transition: 0.3s;
  overflow: hidden;
}
.social-btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--primary);
  transform: scale(1.1) rotate(10deg);
}
.social-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.footer-note {
  font-size: 0.9rem;
  opacity: 0.6;
  margin-top: 30px;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}
.reveal.active-reveal {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 {
  transition-delay: 0.1s;
}
.delay-200 {
  transition-delay: 0.2s;
}
.delay-300 {
  transition-delay: 0.3s;
}
.delay-400 {
  transition-delay: 0.4s;
}


@media (hover: none) {
  .portfolio-overlay {
    opacity: 1;
    inset: auto 0 0 0;
    min-height: 88px;
    background: linear-gradient(
      to top,
      rgba(16, 29, 23, 0.96),
      rgba(16, 29, 23, 0.15)
    );
    align-items: end;
    padding: 16px;
  }

  .overlay-content {
    transform: translateY(0);
    max-width: 100%;
  }

  .overlay-content h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  .overlay-content p {
    font-size: 0.92rem;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  .hero-text {
    margin: 0 auto;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .pricing-grid {
    gap: 20px;
  }
  .price-card.featured {
    transform: scale(1);
  }
  .step-card:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .burger-menu {
    display: flex;
  }
  nav#mobile-nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 6000;
    background: #101d17;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  nav#mobile-nav.active {
    transform: translateX(0);
  }
  nav#mobile-nav ul {
    flex-direction: column;
    gap: 40px;
    text-align: center;
    width: 100%;
  }
  nav#mobile-nav a {
    font-size: 2rem;
    color: #ffffff;
    font-weight: 700;
  }
  nav#mobile-nav a:hover {
    color: var(--primary);
  }
  nav#mobile-nav a::after {
    display: none;
  }
  .process-steps {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 20px;
  }
  .logo {
    font-size: 1.8rem;
  }
  .hero {
    padding-top: 90px;
  }
  .hero-text h1 {
    font-size: 2.2rem;
  }
  .btn {
    padding: 14px 30px;
    width: 100%;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
