@import url("https://fonts.googleapis.com/css2?family=Oxanium:wght@500;700&display=swap");

:root {
  color-scheme: dark;
  --void: #05070b;
  --ink: #080a0d;
  --paper: #f0ead9;
  --gold: #c8a85a;
  --gold-light: #f3d98a;
  --cyan: #00f6ff;
  --magenta: #ff1c8e;
  --blue: #178ee2;
  --red: #ff2938;
  --yellow: #fff51f;
  --green: #18d47a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 39%, rgba(0, 246, 255, 0.15) 0, transparent 23%),
    radial-gradient(circle at 17% 76%, rgba(255, 28, 142, 0.11) 0, transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(200, 168, 90, 0.1) 0, transparent 22%),
    repeating-conic-gradient(from 45deg at 50% 45%, rgba(255, 255, 255, 0.018) 0 1deg, transparent 1deg 12deg),
    linear-gradient(145deg, #0c1720 0, var(--void) 48%, #0c0913 100%);
  font-family: "Oxanium", "Arial Black", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  mix-blend-mode: multiply;
}

body::after {
  position: fixed;
  inset: -25vmax;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: conic-gradient(
    from 90deg,
    transparent 0 24%,
    rgba(0, 246, 255, 0.055) 25%,
    transparent 26% 49%,
    rgba(200, 168, 90, 0.04) 50%,
    transparent 51% 74%,
    rgba(255, 28, 142, 0.05) 75%,
    transparent 76%
  );
  -webkit-mask: radial-gradient(circle, transparent 0 19%, #000 42% 54%, transparent 72%);
  mask: radial-gradient(circle, transparent 0 19%, #000 42% 54%, transparent 72%);
  animation: aura-turn 42s linear infinite;
}

.signal {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-content: center;
  justify-items: center;
  gap: clamp(1.7rem, 5vh, 3.6rem);
  isolation: isolate;
  z-index: 1;
}

.signal::before {
  position: absolute;
  z-index: -2;
  width: min(92vmin, 850px);
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: repeating-conic-gradient(
    from 8deg,
    rgba(200, 168, 90, 0.1) 0 0.5deg,
    transparent 0.5deg 9deg,
    rgba(0, 246, 255, 0.07) 9deg 9.5deg,
    transparent 9.5deg 18deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 38%, #000 38.3% 39%, transparent 39.3% 53%, #000 53.3% 53.7%, transparent 54%);
  mask: radial-gradient(circle, transparent 0 38%, #000 38.3% 39%, transparent 39.3% 53%, #000 53.3% 53.7%, transparent 54%);
  opacity: 0.75;
  animation: ornament-turn 80s linear infinite reverse;
}

.signal::after {
  position: absolute;
  z-index: -1;
  width: min(58vw, 580px);
  height: min(34vh, 260px);
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse, rgba(0, 246, 255, 0.1), rgba(255, 28, 142, 0.04) 42%, transparent 72%);
  filter: blur(24px);
  transform: translateY(-8%);
  animation: glow-breathe 7s ease-in-out infinite alternate;
}

.crest {
  position: relative;
  width: clamp(190px, 28vmin, 300px);
  aspect-ratio: 0.72;
  padding: clamp(6px, 0.85vmin, 9px);
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  filter:
    drop-shadow(-4px 1px 0 rgba(0, 246, 255, 0.65))
    drop-shadow(4px -1px 0 rgba(255, 28, 142, 0.58))
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.72));
  animation: crest-signal 7s steps(1, end) infinite;
}

.crest__gold {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, #7f6429 0, var(--gold-light) 19%, #9a762e 48%, #f0d47e 77%, #74581f 100%);
  clip-path: polygon(0 0, 100% 0, 100% 54%, 96% 68%, 88% 80%, 75% 90%, 50% 100%, 25% 90%, 12% 80%, 4% 68%, 0 54%);
}

.crest::before {
  position: absolute;
  inset: 3px;
  z-index: 0;
  content: "";
  background: var(--ink);
  clip-path: polygon(0.5% 0, 99.5% 0, 99.5% 54%, 95.5% 68%, 87.5% 80%, 74.5% 90%, 50% 99.5%, 25.5% 90%, 12.5% 80%, 4.5% 68%, 0.5% 54%);
}

.crest::after {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 8%;
  width: 84%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold-light) 18% 82%, transparent);
  opacity: 0.9;
}

.crest__field {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--paper) 0 46.7%, var(--ink) 46.7% 49.2%, #187fc6 49.2% 100%);
  clip-path: polygon(1.5% 0, 98.5% 0, 98.5% 54%, 94.5% 67%, 86.5% 79%, 73% 89%, 50% 98.5%, 27% 89%, 13.5% 79%, 5.5% 67%, 1.5% 54%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.crest__field::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 50% 7%, rgba(255, 255, 255, 0.46), transparent 38%),
    linear-gradient(112deg, transparent 16%, rgba(255, 255, 255, 0.2) 33%, transparent 44%),
    repeating-linear-gradient(128deg, transparent 0 8px, rgba(36, 26, 10, 0.035) 9px 10px);
  mix-blend-mode: soft-light;
}

.crest__scanline {
  position: absolute;
  z-index: 4;
  top: -10%;
  left: 0;
  width: 100%;
  height: 5%;
  background: rgba(0, 246, 255, 0.25);
  box-shadow: 0 0 15px var(--cyan);
  animation: scan 4.5s linear infinite;
}

.rose {
  --petal: var(--red);
  --heart: var(--yellow);
  --rose-stroke: clamp(2.5px, 0.5vmin, 4.5px);
  position: absolute;
  z-index: 2;
  width: 27%;
  aspect-ratio: 1;
  isolation: isolate;
}

.rose i {
  position: absolute;
  z-index: 1;
  top: -1%;
  left: 26%;
  width: 48%;
  height: 56%;
  background: var(--ink);
  border-radius: 46% 46% 22% 22% / 40% 40% 60% 60%;
  clip-path: polygon(50% 100%, 4% 46%, 40% 11%, 50% 19%, 60% 11%, 96% 46%);
  clip-path: shape(
    from 50% 100%,
    curve to 60% 11% with 90% 88% / 102% 42%,
    curve to 50% 19% with 56% 4% / 50% 10%,
    curve to 40% 11% with 50% 10% / 44% 4%,
    curve to 50% 100% with -2% 42% / 10% 88%,
    close
  );
  transform: rotate(var(--turn));
  transform-origin: 50% 91%;
}

.rose i::before {
  position: absolute;
  inset: var(--rose-stroke);
  content: "";
  background: var(--petal);
  border-radius: inherit;
  clip-path: inherit;
}

.rose em {
  position: absolute;
  z-index: 0;
  top: -13%;
  left: 38%;
  width: 24%;
  height: 33%;
  background: var(--ink);
  clip-path: polygon(50% 0, 78% 30%, 100% 56%, 68% 100%, 32% 100%, 0 56%, 22% 30%);
  transform: rotate(var(--turn));
  transform-origin: 50% 191%;
}

.rose em::before {
  position: absolute;
  inset: var(--rose-stroke);
  content: "";
  background: var(--green);
  clip-path: inherit;
}

.rose b {
  position: absolute;
  z-index: 2;
  top: 36.5%;
  left: 36.5%;
  width: 27%;
  aspect-ratio: 1;
  border: var(--rose-stroke) solid var(--ink);
  border-radius: 50%;
  background: var(--heart);
}

.rose--yellow {
  --petal: var(--yellow);
  --heart: var(--red);
}

.rose--top-left { top: 8%; left: 6%; }
.rose--top-center { top: 8%; left: 36.5%; }
.rose--top-right { top: 8%; right: 6%; }
.rose--bottom-left { top: 51%; left: 8%; }
.rose--bottom-right { top: 51%; right: 8%; }
.rose--bottom-center { top: 70%; left: 36.5%; }

.glitch {
  position: relative;
  margin: 0;
  color: transparent;
  background: linear-gradient(104deg, var(--gold-light) 0%, var(--yellow) 24%, var(--paper) 42%, var(--cyan) 68%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Oxanium", "Arial Black", sans-serif;
  font-size: clamp(1.8rem, 5.3vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 0.9;
  text-transform: lowercase;
  text-shadow:
    2px 0 0 rgba(255, 41, 56, 0.7),
    -2px 0 0 rgba(23, 142, 226, 0.72),
    0 0 14px rgba(255, 245, 31, 0.4),
    0 0 34px rgba(0, 246, 255, 0.28),
    0 0 52px rgba(255, 28, 142, 0.2);
  animation: text-flicker 5s steps(1, end) infinite;
}

.glitch::before,
.glitch::after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  content: attr(data-text);
  pointer-events: none;
}

.glitch::before {
  left: 3px;
  color: var(--blue);
  clip-path: inset(15% 0 57% 0);
  animation: glitch-top 2.7s steps(1, end) infinite;
}

.glitch::after {
  left: -3px;
  color: var(--red);
  clip-path: inset(62% 0 14% 0);
  animation: glitch-bottom 2.1s steps(1, end) infinite;
}

@keyframes scan {
  to { transform: translateY(2200%); }
}

@keyframes aura-turn {
  to { transform: rotate(360deg); }
}

@keyframes ornament-turn {
  to { transform: rotate(360deg); }
}

@keyframes glow-breathe {
  to { opacity: 0.55; transform: translateY(-8%) scale(1.12); }
}

@keyframes crest-signal {
  0%, 88%, 92%, 100% { transform: translate(0); }
  89% { transform: translate(-3px, 1px) skewX(1deg); }
  90% { transform: translate(4px, -1px) skewX(-1deg); }
  91% { transform: translate(-1px, 2px); }
}

@keyframes text-flicker {
  0%, 9%, 11%, 48%, 50%, 100% { opacity: 1; }
  10%, 49% { opacity: 0.75; }
}

@keyframes glitch-top {
  0%, 89%, 93%, 100% { transform: translate(0); }
  90% { transform: translate(-10px, -2px); }
  91% { transform: translate(13px, 1px); }
  92% { transform: translate(-5px, 2px); }
}

@keyframes glitch-bottom {
  0%, 73%, 78%, 100% { transform: translate(0); }
  74% { transform: translate(11px, 2px); }
  75% { transform: translate(-8px, -1px); }
  76% { transform: translate(4px, 2px); }
  77% { transform: translate(-2px); }
}

@media (max-width: 520px) {
  .signal {
    gap: 2.4rem;
  }

  .crest {
    width: min(62vw, 255px);
  }

  .glitch {
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
