:root {
  --red: #cc2222;
  --red-bright: #e12b2b;
  --red-deep: #8f1010;
  --cream: #f2e8d5;
  --ink: #0a0a0a;
  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font-body: "Oswald", "Arial Narrow", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  overflow-x: hidden;
}

body {
  min-height: 100svh;
}

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

.page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(204, 34, 34, 0.18), transparent 70%),
    #0a0a0a;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  transform: scale(1.02);
  animation: hero-breathe 12s ease-in-out infinite;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.28) 0%,
      transparent 28%,
      transparent 52%,
      rgba(0, 0, 0, 0.55) 78%,
      rgba(0, 0, 0, 0.82) 100%
    ),
    radial-gradient(circle at 50% 40%, transparent 0%, transparent 34%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 0.8s steps(2) infinite;
}

.circuit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(204, 34, 34, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204, 34, 34, 0.28) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 45%, black 10%, transparent 68%);
  animation: circuit-pulse 4.5s ease-in-out infinite;
}

.core-glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 43, 43, 0.45) 0%, rgba(204, 34, 34, 0.15) 35%, transparent 70%);
  filter: blur(8px);
  animation: core-pulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 2rem));
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 0 7vh;
  text-align: center;
}

.brand-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}

.brand-mark {
  margin: 0;
  color: var(--red);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 11vw, 6.5rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: scaleY(1.2);
  text-shadow:
    0 0 24px rgba(204, 34, 34, 0.35),
    0 2px 0 rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation: brand-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}

.brand-plate {
  display: none;
  position: relative;
  padding: 0.95rem 1.8rem 0.75rem;
  color: var(--red);
  background: var(--cream);
  border: 5px solid var(--red);
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.55),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.brand-plate .brand-mark {
  opacity: 1;
  animation: none;
  text-shadow: none;
  transform: scaleY(1.28);
}

.page.has-hero .brand-slot .brand-plate {
  display: none;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  width: 100%;
  max-width: 28rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
}

.coming-soon {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  transform: scaleY(1.08);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.subline {
  margin: -0.45rem 0 0.15rem;
  max-width: 22rem;
  color: rgba(242, 232, 213, 0.78);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.8rem, 2.1vw, 0.95rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.45;
}

.telegram-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: min(100%, 20rem);
  padding: 1.05rem 1.6rem 0.9rem;
  color: var(--red);
  background: var(--cream);
  border: 4px solid var(--red);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.6vw, 1.7rem);
  line-height: 1;
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px),
    0 14px
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 14px 36px rgba(0, 0, 0, 0.45);
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.telegram-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(204, 34, 34, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 500ms ease;
}

.telegram-btn:hover,
.telegram-btn:focus-visible {
  color: var(--cream);
  background: var(--red);
  border-color: var(--cream);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(242, 232, 213, 0.35),
    0 0 28px rgba(204, 34, 34, 0.45),
    0 16px 40px rgba(0, 0, 0, 0.5);
  outline: none;
}

.telegram-btn:hover::before,
.telegram-btn:focus-visible::before {
  transform: translateX(120%);
}

.telegram-btn:active {
  transform: translateY(0);
}

.telegram-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--red-bright);
  box-shadow: 0 0 8px rgba(225, 43, 43, 0.9);
  opacity: 0;
  animation: particle-travel var(--dur, 7s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.footer-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.1rem;
  z-index: 3;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(242, 232, 213, 0.42);
}

@keyframes hero-breathe {
  0%,
  100% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes core-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes circuit-pulse {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.42;
  }
}

@keyframes grain-shift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-2%, 1%);
  }
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: scaleY(1.2) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scaleY(1.2) translateY(0);
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes particle-travel {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  12% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx, 40px), var(--ty, -180px), 0) scale(1.2);
  }
}

@media (max-width: 640px) {
  .content {
    padding-bottom: 9vh;
  }

  .telegram-btn {
    min-width: 100%;
    letter-spacing: 0.1em;
  }

  .coming-soon {
    letter-spacing: 0.14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual img,
  .core-glow,
  .circuit,
  .grain,
  .particle,
  .brand-mark,
  .cta-stack {
    animation: none !important;
  }

  .cta-stack,
  .brand-mark {
    opacity: 1;
    transform: none;
  }

  .brand-mark {
    transform: scaleY(1.2);
  }
}

.page.no-hero .brand-plate {
  display: block;
}

.page.no-hero .brand-slot .sr-only {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.page.no-hero .brand-slot .brand-plate + .sr-only {
  display: none;
}

.page.no-hero .hero-visual {
  background: conic-gradient(
    from 210deg at 50% 42%,
    #111 0deg,
    #cc2222 28deg,
    #1a1a1a 52deg,
    #6b6b6b 78deg,
    #cc2222 110deg,
    #0a0a0a 150deg,
    #3a3a3a 190deg,
    #cc2222 230deg,
    #151515 280deg,
    #8a8a8a 320deg,
    #111 360deg
  );
}

.page.no-hero .hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-32deg, rgba(242, 232, 213, 0.05) 0 10px, transparent 10px 22px),
    radial-gradient(circle at 50% 42%, rgba(204, 34, 34, 0.55), transparent 28%);
}

.page.no-hero .hero-visual img {
  display: none;
}
