:root {
  --bg: #070707;
  --surface: #111111;
  --text: #f3f3f3;
  --muted: #a8a8a8;
  --line: #2a2a2a;
  --accent: #ffffff;
  --mx: 50%;
  --my: 50%;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "YFFRARETRIAL Power ExtraLight", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
}

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

.header {
  padding: 30px 0 22px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-family: "Manasco", "YFFRARETRIAL Power Regular", "Bulatov SP Demo", Arial, sans-serif;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.12));
}

.logo-main {
  font-size: clamp(1.4rem, 3.1vw, 2.3rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  color: #f6f6f6;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(255, 255, 255, 0.18),
    0 0 34px rgba(255, 255, 255, 0.12);
  animation:
    logoNeonPulse 3.8s ease-in-out infinite,
    logoNeonFlicker 8.2s linear infinite;
}

.logo-sub {
  margin-top: 4px;
  font-size: clamp(0.52rem, 1vw, 0.68rem);
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--muted);
}

.hero {
  min-height: calc(100vh - 120px);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #121212, #090909 42%, #141414);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: none;
  animation: glowDrift 14s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
}

.hero-content {
  max-width: 840px;
  padding: 72px 0;
  position: relative;
  z-index: 2;
}

.hero-floating {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-badge {
  position: absolute;
  width: 138px;
  height: 148px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(162deg, rgba(26, 26, 26, 0.94), rgba(10, 10, 10, 0.96));
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.floating-badge::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 30px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.floating-badge::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  opacity: 0.55;
}

.floating-badge-icon-image {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
}

.floating-badge-icon-image-telegram {
  filter: grayscale(1) contrast(1.18) brightness(1.02);
}

.floating-badge-icon-image-max {
  filter: saturate(0.45) contrast(1.1) brightness(0.95);
}

.floating-badge-label {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.floating-badge-telegram {
  left: clamp(3%, 8vw, 10%);
  top: clamp(14%, 18vh, 22%);
  animation: orbitTelegram 10.5s linear infinite;
}

.floating-badge-max {
  right: clamp(2%, 7vw, 9%);
  bottom: clamp(8%, 12vh, 16%);
  animation: orbitMax 12.2s linear infinite reverse;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  display: inline-block;
  border-left: 2px solid rgba(255, 255, 255, 0.7);
  padding-left: 10px;
}

h1,
h2,
h3 {
  font-family: "YFFRARETRIAL Power ExtraLight", Arial, sans-serif;
  margin: 0;
  font-weight: 500;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  max-width: 17ch;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: "YFFRARETRIAL Power Regular", "Bulatov SP Demo", Arial, sans-serif;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translate3d(0, 20px, 0) skewY(4deg);
  filter: blur(6px);
  animation: titleLineIn 900ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.hero-char {
  display: inline-block;
  will-change: transform;
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.hero-word {
  display: inline-block;
  white-space: nowrap;
}

.reveal-line-1 {
  animation-delay: 180ms;
}

.reveal-line-2 {
  animation-delay: 320ms;
}

.hero-description {
  margin: 20px 0 34px;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.45;
}

.button {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 12px 22px;
  font-family: "YFFRARETRIAL Power ExtraLight", Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 24px;
}

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

.panel {
  background: linear-gradient(160deg, rgba(24, 24, 24, 0.94), rgba(14, 14, 14, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-soft {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.86), rgba(9, 9, 9, 0.96));
}

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

.card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 24px;
  background: linear-gradient(165deg, rgba(21, 21, 21, 0.93), rgba(13, 13, 13, 0.9));
  border-radius: 14px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.52);
}

.card h3 {
  font-size: 1.55rem;
  margin-bottom: 10px;
}

.footer {
  padding: 28px 0 52px;
}

.footer-content {
  width: 100%;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.footer-row .footer-col {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.footer-content .footer-line {
  margin: 0;
  line-height: 1.45;
}

.footer-col-instagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.footer-label {
  display: block;
  line-height: 1.3;
}

.footer-handle {
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}

.footer-col-email {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-col-email a {
  line-height: 1.45;
}

.footer a {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 640px) {
  .footer-row {
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
  }

  .footer-row .footer-col {
    flex: none;
    width: 100%;
  }

  .footer-col-instagram {
    gap: 0.5rem;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms ease, visibility 320ms ease;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  transition:
    opacity 480ms cubic-bezier(0.33, 1, 0.68, 1),
    backdrop-filter 620ms cubic-bezier(0.33, 1, 0.68, 1),
    -webkit-backdrop-filter 620ms cubic-bezier(0.33, 1, 0.68, 1);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: min(680px, 92%);
  margin: 8vh auto 0;
  background: linear-gradient(165deg, rgba(21, 21, 21, 0.98), rgba(13, 13, 13, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 24px 22px 18px;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 340ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.modal-dialog h3 {
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.qr-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms ease, transform 360ms ease;
}

.modal.is-open .qr-card {
  opacity: 1;
  transform: translateY(0);
}

.modal.is-open .qr-card:nth-child(2) {
  transition-delay: 90ms;
}

.qr-card p {
  margin: 0 0 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-card img {
  width: 180px;
  height: 180px;
  display: block;
  margin: 0 auto 8px;
  background: #fff;
}

.qr-image-themed {
  filter: grayscale(1) contrast(1.35) brightness(1.05);
}

.qr-card small {
  color: var(--muted);
}

.contact-form {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: linear-gradient(165deg, rgba(24, 24, 24, 0.86), rgba(12, 12, 12, 0.9));
}

.contact-label {
  margin: 0 0 8px;
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-family: "YFFRARETRIAL Power ExtraLight", Arial, sans-serif;
  outline: none;
  margin-bottom: 12px;
}

.contact-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.contact-socials {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.social-option {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 10px 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.social-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.48);
}

.social-option.is-active {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
}

.contact-submit {
  width: 100%;
}

.contact-status {
  min-height: 1.25rem;
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-status.is-error {
  color: #f1b5b5;
}

.contact-status.is-success {
  color: #c8e6c1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 800ms ease forwards;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 240ms;
}

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

@keyframes orbitTelegram {
  0% {
    transform: translate3d(0, 0, 0) rotate(-7deg) scale(1);
  }
  25% {
    transform: translate3d(14px, -10px, 0) rotate(0deg) scale(1.04);
  }
  50% {
    transform: translate3d(0, -20px, 0) rotate(7deg) scale(1.01);
  }
  75% {
    transform: translate3d(-14px, -10px, 0) rotate(0deg) scale(0.97);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-7deg) scale(1);
  }
}

@keyframes orbitMax {
  0% {
    transform: translate3d(0, 0, 0) rotate(6deg) scale(1);
  }
  25% {
    transform: translate3d(16px, -8px, 0) rotate(0deg) scale(1.05);
  }
  50% {
    transform: translate3d(0, -19px, 0) rotate(-7deg) scale(1.01);
  }
  75% {
    transform: translate3d(-16px, -8px, 0) rotate(0deg) scale(0.96);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(6deg) scale(1);
  }
}

@keyframes titleLineIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) skewY(4deg);
    filter: blur(6px);
  }
  65% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) skewY(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewY(0deg);
    filter: blur(0);
  }
}

@keyframes glowDrift {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.08) translate3d(8px, -12px, 0);
    opacity: 0.38;
  }
}

@keyframes logoNeonPulse {
  0%,
  100% {
    opacity: 0.9;
    text-shadow:
      0 0 1px rgba(255, 255, 255, 0.88),
      0 0 7px rgba(255, 255, 255, 0.24),
      0 0 16px rgba(255, 255, 255, 0.14),
      0 0 28px rgba(255, 255, 255, 0.1);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 1px rgba(255, 255, 255, 0.96),
      0 0 11px rgba(255, 255, 255, 0.34),
      0 0 24px rgba(255, 255, 255, 0.2),
      0 0 40px rgba(255, 255, 255, 0.15);
  }
}

@keyframes logoNeonFlicker {
  0%,
  89%,
  100% {
    opacity: 1;
  }
  90% {
    opacity: 0.74;
  }
  91.5% {
    opacity: 1;
  }
  93% {
    opacity: 0.82;
  }
  94% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .logo-main,
  .hero-title-line,
  .floating-badge-telegram,
  .floating-badge-max,
  .hero::before {
    animation: none !important;
  }

  .hero::after {
    opacity: 0.08;
    background:
      radial-gradient(220px circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 72%);
  }

  .hero-title-line {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero-char {
    transition: none;
  }
}

@font-face {
  font-family: "Manasco";
  src: url("fonts/Manasco (sherbackoffalex).otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Bulatov SP Demo";
  src: url("fonts/BulatovSPDemo.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "YFFRARETRIAL Power Regular";
  src: url("fonts/YFFRARETRIAL-PowerRegular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "YFFRARETRIAL Power ExtraLight";
  src: url("fonts/YFFRARETRIAL-PowerExtraLight.otf") format("opentype");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@media (max-width: 900px) {
  .grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-floating {
    opacity: 0.68;
  }

  .floating-badge {
    width: 108px;
    height: 122px;
    border-radius: 20px;
  }

  .floating-badge::before {
    border-radius: 24px;
  }

  .floating-badge-icon-image {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .floating-badge-telegram {
    left: 3%;
    top: 10%;
  }

  .floating-badge-max {
    right: 3%;
    bottom: 8%;
  }

  .qr-grid {
    grid-template-columns: 1fr;
  }
}

/* Телефоны: иконки Telegram/MAX под текстом, без наложения на заголовок */
@media (max-width: 640px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .hero-content {
    order: 1;
    padding: 40px 0 28px;
  }

  .hero-floating {
    position: static;
    inset: auto;
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 14px;
    padding: 0 4% 36px;
    opacity: 1;
    z-index: 2;
  }

  .floating-badge-telegram,
  .floating-badge-max {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    animation: none;
  }
}
