/* ===== Design tokens ===== */
:root {
  --black: #050505;
  --graphite: #0b0b0d;
  --surface: #0c0c0e;
  --neon: #71ff4f;
  --neon-bright: #a8ff6e;
  --acid: #c4ff00;
  --violet: #9b5cff;
  --text: #f2f2f4;
  --text-muted: #9a9aa8;
  --glass: rgba(12, 12, 14, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-btn: 17px;
  --max: 440px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--black);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Atmospheric background ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(113, 255, 79, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(155, 92, 255, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, var(--graphite) 0%, var(--black) 45%, var(--black) 100%);
}

.bg__texture {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.bg__fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(5, 5, 5, 0.9) 0%, transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(5, 5, 5, 0.4) 100%);
}

.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.bg__glow--green {
  width: 280px;
  height: 280px;
  top: 8%;
  left: -60px;
  background: rgba(113, 255, 79, 0.12);
}

.bg__glow--violet {
  width: 220px;
  height: 220px;
  top: 35%;
  right: -50px;
  background: rgba(155, 92, 255, 0.1);
}

.bg__line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0.15;
  box-shadow: 0 0 8px rgba(113, 255, 79, 0.3);
}

.bg__line--1 {
  top: 22%;
  left: 5%;
  width: 35%;
  transform: rotate(-8deg);
}

.bg__line--2 {
  top: 48%;
  right: 8%;
  width: 28%;
  transform: rotate(12deg);
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  box-shadow: 0 0 8px rgba(155, 92, 255, 0.25);
}

.bg__line--3 {
  bottom: 30%;
  left: 15%;
  width: 40%;
  transform: rotate(-3deg);
  opacity: 0.1;
}

/* Graffiti tags */
.bg__graffiti {
  position: absolute;
  inset: 0;
}

.bg__tag {
  position: absolute;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon);
  opacity: 0.07;
  filter: blur(0.8px);
  user-select: none;
  white-space: nowrap;
}

.bg__tag--404 {
  top: 12%;
  left: 6%;
  font-size: clamp(48px, 14vw, 72px);
  transform: rotate(-14deg);
  color: var(--violet);
  opacity: 0.06;
}

.bg__tag--night {
  top: 28%;
  right: 4%;
  font-size: clamp(32px, 10vw, 52px);
  transform: rotate(8deg);
}

.bg__tag--void {
  bottom: 38%;
  left: 2%;
  font-size: clamp(28px, 8vw, 44px);
  transform: rotate(-6deg);
  color: #fff;
  opacity: 0.05;
}

.bg__tag--city {
  top: 52%;
  left: 50%;
  transform: translateX(-50%) rotate(3deg);
  font-size: clamp(36px, 11vw, 58px);
  color: var(--neon);
}

.bg__tag--nosleep {
  bottom: 18%;
  right: 6%;
  font-size: clamp(22px, 6vw, 34px);
  transform: rotate(-10deg);
  color: var(--violet);
  opacity: 0.06;
}

/* ===== Layout ===== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding:
    max(12px, var(--safe-top))
    max(18px, env(safe-area-inset-left, 18px))
    max(28px, calc(20px + var(--safe-bottom)))
    max(18px, env(safe-area-inset-right, 18px));
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ===== Hero / character ===== */
.hero {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: clamp(240px, 42vh, 320px);
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
  padding-top: 0;
}

.hero-character {
  position: relative;
  width: min(290px, 82vw);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-character::before {
  content: "";
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 75%;
  background: radial-gradient(
    ellipse at center,
    rgba(65, 255, 70, 0.2) 0%,
    rgba(113, 255, 79, 0.08) 40%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-character-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 290px;
  height: auto;
  max-height: clamp(240px, 42vh, 320px);
  object-fit: contain;
  object-position: bottom center;
  margin: 0 auto;
  filter:
    brightness(1.08)
    contrast(1.05)
    drop-shadow(0 0 25px rgba(72, 255, 72, 0.2))
    drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

/* ===== Content ===== */
.content {
  position: relative;
  z-index: 3;
  text-align: center;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(113, 255, 79, 0.08);
  border: 1px solid rgba(113, 255, 79, 0.25);
  color: var(--neon);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(113, 255, 79, 0.12);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Typography */
.title {
  font-size: clamp(28px, 8.5vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.title__accent {
  color: var(--neon);
  text-shadow:
    0 0 20px rgba(113, 255, 79, 0.5),
    0 0 40px rgba(113, 255, 79, 0.2);
}

.lead {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 280px;
}

/* Glass CTA panel */
.cta-panel {
  width: 100%;
  padding: 20px 18px;
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.guarantee-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.guarantee-text .icon {
  flex-shrink: 0;
  color: #62ff45;
  filter: drop-shadow(0 0 6px rgba(98, 255, 69, 0.35));
}

/* ===== Buttons ===== */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 14px 20px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cta__row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cta__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.cta__text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cta:active {
  transform: scale(0.98);
}

.cta:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* Primary — З@РАБОТОК */
.cta--primary {
  background: linear-gradient(135deg, var(--neon-bright) 0%, var(--neon) 45%, #4dcc2e 100%);
  color: var(--black);
  border: none;
  box-shadow:
    0 0 20px rgba(113, 255, 79, 0.25),
    0 10px 30px rgba(0, 0, 0, 0.35);
  animation: glow-breathe 4s ease-in-out infinite;
}

.cta--primary .cta__icon--dark {
  color: var(--black);
  opacity: 0.85;
}

.cta--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 32px rgba(113, 255, 79, 0.4),
    0 14px 36px rgba(0, 0, 0, 0.4);
}

.cta--primary:active {
  transform: scale(0.98) translateY(0);
}

@keyframes glow-breathe {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(113, 255, 79, 0.22),
      0 10px 30px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow:
      0 0 28px rgba(113, 255, 79, 0.38),
      0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

/* Secondary — Написать менеджеру */
.cta--secondary {
  min-height: 62px;
  background: rgba(5, 5, 5, 0.55);
  color: var(--text);
  border: 1px solid rgba(113, 255, 79, 0.35);
  box-shadow:
    inset 0 0 20px rgba(113, 255, 79, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

.cta--secondary .cta__icon--neon {
  color: var(--neon);
  filter: drop-shadow(0 0 4px rgba(113, 255, 79, 0.5));
}

.cta--secondary:hover {
  border-color: rgba(113, 255, 79, 0.7);
  box-shadow:
    inset 0 0 24px rgba(113, 255, 79, 0.08),
    0 0 16px rgba(113, 255, 79, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.cta--secondary:active {
  transform: scale(0.98);
}

/* ===== Entrance animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal--hero {
  animation-delay: 0ms;
  animation-duration: 700ms;
}

.reveal--badge {
  animation-delay: 180ms;
}

.reveal--title {
  animation-delay: 280ms;
}

.reveal--lead {
  animation-delay: 360ms;
}

.reveal--cta {
  animation-delay: 460ms;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .cta--primary {
    animation: none;
  }

  .badge__dot {
    animation: none;
  }

  .cta:hover {
    transform: none;
  }
}

/* ===== Small screens ===== */
@media (max-width: 360px) {
  .title {
    font-size: 26px;
  }

  .cta-panel {
    padding: 16px 14px;
  }

  .cta__text {
    font-size: 16px;
  }
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .shell {
    justify-content: center;
    padding-top: max(24px, var(--safe-top));
    padding-bottom: max(32px, calc(24px + var(--safe-bottom)));
  }

  .hero {
    min-height: clamp(260px, 38vh, 320px);
    padding-top: 0;
  }

  .hero-character {
    width: min(300px, 85vw);
  }

  .hero-character-image {
    max-width: 300px;
    max-height: 320px;
  }

  .title {
    font-size: 38px;
  }

  .lead {
    font-size: 15px;
  }

  .cta {
    min-height: 64px;
  }

  .cta__text {
    font-size: 18px;
  }
}
