:root {
  --bg-0: #05030a;
  --bg-1: #120818;
  --pink: #ff2d8a;
  --pink-soft: #ff7ab8;
  --cyan: #7af0ff;
  --chrome-hi: #f5f7fa;
  --chrome-mid: #9aa3b2;
  --chrome-lo: #5c6573;
  --text: #f6eef5;
  --muted: #b9a8b8;
  --font-display: "Dela Gothic One", system-ui, sans-serif;
  --font-kawaii: "Mochiy Pop One", system-ui, sans-serif;
  --font-pixel: "DotGothic16", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg-0);
}

html {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #3a1030 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, #0a2a35 0%, transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 80%, #2a0a28 0%, transparent 45%),
    linear-gradient(180deg, #0c0612 0%, var(--bg-0) 40%, #07040e 100%);
  background-attachment: fixed;
}

body {
  font-family: var(--font-pixel);
  color: var(--text);
  background: transparent;
  overflow-x: clip;
  position: relative;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.noise,
.scanlines,
.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.noise {
  opacity: 0.07;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scanlines {
  opacity: 0.08;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 3px
  );
}

.bg-glow {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 45, 138, 0.18), transparent 35%),
    radial-gradient(circle at 70% 60%, rgba(122, 240, 255, 0.12), transparent 40%);
  animation: glowPulse 8s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}

.tribal-field {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: 0;
  bottom: 0;
  width: min(28vw, 210px);
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 100% auto;
  animation: tribalPulse 10s ease-in-out infinite alternate;
}

.tribal-field--tl {
  left: -3%;
  background-image: url("assets/tribal-side-l.png?v=8");
  opacity: 0.85;
}

.tribal-field--tr {
  right: -3%;
  width: min(26vw, 200px);
  background-image: url("assets/tribal-side-r-pink.png?v=8");
  opacity: 0.8;
  transform: scaleX(-1);
  animation-delay: -4s;
}

@keyframes tribalPulse {
  from { opacity: 0.7; }
  to { opacity: 0.92; }
}

.brand__wings {
  width: min(78vw, 420px);
  margin: 0 auto 0.35rem;
  opacity: 0.95;
  height: auto;
}

/* unused tint helpers removed — tattoos are precolored transparent PNGs */

.brand {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
  position: relative;
}

@keyframes floaty {
  from { translate: 0 0; }
  to { translate: 0 -12px; }
}

.page {
  position: relative;
  z-index: 2;
  width: min(720px, 94vw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(5.5rem, 11vw, 8rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
  overflow: visible;
}

.brand__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6.5vw, 3rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-inline: 1rem;
}

.brand__star {
  color: var(--pink);
  font-size: 0.55em;
  animation: twinkle 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 8px var(--pink));
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.55; transform: scale(0.85) rotate(12deg); }
}

.chrome-text {
  background: linear-gradient(
    125deg,
    #ffffff 0%,
    #c8cdd6 18%,
    #8a919e 35%,
    #ffffff 48%,
    #6b7280 62%,
    #e8ecf2 78%,
    #a0a8b5 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: chromeShift 5s linear infinite;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45));
}

.chrome-text--pink {
  background: linear-gradient(
    125deg,
    #fff5fb 0%,
    #ff9ecc 20%,
    #ff2d8a 40%,
    #ffffff 55%,
    #ff7ab8 72%,
    #c8cdd6 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: chromeShift 5s linear infinite reverse;
}

.chrome-text--btn {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.2vw, 2.25rem);
  letter-spacing: 0.1em;
}

@keyframes chromeShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* story window — no metal frame */
.story-wrap {
  position: relative;
  overflow: visible;
}

/* photo inside story.exe — same wire frame as telegram CTA */
.story__body {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem 1.25rem;
}

.photo-unit {
  position: relative;
  flex: 0 0 auto;
  width: min(42%, 200px);
  margin: 0;
  isolation: isolate;
  animation: ctaAlive 3.2s ease-in-out infinite;
}

.photo-unit__face {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 6, 14, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.4);
  line-height: 0;
}

.photo-unit__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

/* telegram CTA — button + wire as one animated unit */
.cta-unit {
  position: relative;
  display: block;
  width: min(100%, 520px);
  margin-inline: auto;
  /* reserve room under the face for absolute wire + barbs */
  margin-bottom: 2.75rem;
  padding-bottom: 0.25rem;
  text-decoration: none;
  color: var(--text);
  isolation: isolate;
  animation: ctaAlive 3.2s ease-in-out infinite;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.cta-unit:hover,
.cta-unit:focus-visible {
  transform: translateY(-4px) scale(1.02);
  outline: none;
  animation: ctaAliveHover 1.6s ease-in-out infinite;
}

.cta-unit:active {
  transform: translateY(0) scale(0.99);
}

.cta-unit__face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: clamp(1rem, 2.8vw, 1.35rem) 1.25rem clamp(1.1rem, 3vw, 1.45rem);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(32, 14, 40, 0.96), rgba(10, 6, 16, 0.98) 55%, rgba(8, 18, 28, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -28px 48px rgba(255, 45, 138, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.45);
}

.cta-unit__bar {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.cta-unit__bar-label {
  margin-left: 0.45rem;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.cta-unit__icon {
  color: var(--chrome-hi);
  filter:
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.35))
    drop-shadow(0 0 10px rgba(122, 240, 255, 0.35));
  line-height: 0;
  opacity: 0.95;
}

.cta-unit__label {
  line-height: 1;
}

.cta-unit__sub {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 45, 138, 0.55);
}

.cta-wire {
  position: absolute;
  top: -14px;
  left: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.45))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.cta-wire__shine {
  animation: wireCrawl 4s linear infinite;
}

.cta-wire__glint {
  animation: wireCrawl 2.4s linear infinite reverse;
}

.cta-wire__barbs {
  animation: barbGlint 3.2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes ctaAlive {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(255, 45, 138, 0));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(255, 45, 138, 0.35));
  }
}

@keyframes ctaAliveHover {
  0%, 100% {
    filter: brightness(1.06) drop-shadow(0 0 8px rgba(122, 240, 255, 0.25));
  }
  50% {
    filter: brightness(1.1) drop-shadow(0 0 18px rgba(255, 45, 138, 0.45));
  }
}

@keyframes wireCrawl {
  to { stroke-dashoffset: -100; }
}

@keyframes barbGlint {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; filter: brightness(1.25); }
}

.cta-unit .sigil--cta-l {
  left: -18px;
  top: 50%;
  width: clamp(36px, 9vw, 58px);
  max-height: 70%;
  object-fit: contain;
  opacity: 0.7;
  z-index: 3;
  transform: translateY(-50%);
  animation: floatyCta 7s ease-in-out infinite alternate;
}

.cta-unit .sigil--cta-r {
  right: -18px;
  top: 50%;
  width: clamp(36px, 9vw, 58px);
  max-height: 70%;
  object-fit: contain;
  opacity: 0.7;
  z-index: 3;
  transform: translateY(-50%) scaleX(-1);
  animation: floatyCta 7s ease-in-out infinite alternate;
  animation-delay: -2.5s;
}

@keyframes floatyCta {
  from { translate: 0 0; }
  to { translate: 0 -8px; }
}

.sigil--tl {
  top: -18px;
  left: -12px;
  width: clamp(100px, 26vw, 180px);
  aspect-ratio: 736 / 526;
  z-index: 4;
}

.sigil--tr {
  top: -18px;
  right: -12px;
  width: clamp(100px, 26vw, 180px);
  aspect-ratio: 736 / 526;
  animation-delay: -2s;
  transform: scaleX(-1);
  z-index: 4;
}

.sigil {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  animation: floaty 7s ease-in-out infinite alternate;
  opacity: 0.95;
  height: auto;
  background: transparent;
}

.window-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: visible;
  background: linear-gradient(160deg, rgba(28, 12, 36, 0.94), rgba(10, 6, 16, 0.98));
  border: none;
  border-radius: 14px;
  padding: 0.7rem clamp(1.1rem, 3.5vw, 1.6rem) clamp(1.1rem, 3vw, 1.45rem);
  box-shadow: inset 0 -24px 40px rgba(255, 45, 138, 0.05);
}

.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.35rem;
  margin-bottom: 0.75rem;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.dot--pink { background: var(--pink); color: var(--pink); }
.dot--cyan { background: var(--cyan); color: var(--cyan); }
.dot--chrome {
  background: linear-gradient(135deg, #fff, #889);
  color: #ccc;
}

.window-bar__label {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.story__title {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--font-pixel);
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-soft);
  text-shadow: 0 0 16px rgba(255, 45, 138, 0.45);
  pointer-events: none;
}

.story__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-top: 0;
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}

@media (max-width: 520px) {
  .sigil--tl,
  .sigil--tr {
    width: 56px;
  }

  .story__body {
    flex-direction: column;
  }

  .photo-unit {
    width: min(100%, 200px);
  }

  .cta-unit .sigil--cta-l,
  .cta-unit .sigil--cta-r {
    width: 40px;
    opacity: 0.85;
  }

  .cta-wire {
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
  }

  .tribal-field--tl,
  .tribal-field--tr {
    opacity: 0.55;
    width: min(22vw, 120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
