/* ============================================================
   thankyou.css  —  TNT Studio · Thank-You / Welcome Overlay
   Premium AAA cinematic post-signup experience
   ============================================================ */

/* ── Design tokens (scoped) ─────────────────────────────── */
.ty-page {
  --accent:        #ff6b1a;
  --accent-pink:   #ff4d8e;
  --accent-cyan:   #5cf3ff;
  --accent-violet: #7a55ff;
  --bg:            #04040b;
  --bg-1:          #07070f;
  --bg-2:          #0b0b16;
  --text:          #ffffff;
  --text-dim:      #a0a3c0;
  --text-mute:     #6b6d82;
  --grad-hot:      linear-gradient(135deg, #ff6b1a 0%, #ff4d8e 100%);
  --ease-out:      cubic-bezier(.2, .8, .2, 1);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
  --radius-pill:   999px;
  --radius-lg:     20px;
  --glow-orange:   0 0 24px rgba(255, 107, 26, .45);
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes ty-fadein {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes ty-page-enter {
  0%   { opacity: 0; transform: scale(.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes ty-pulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 107, 26, .35)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 28px rgba(255, 107, 26, .55)); transform: scale(1.04); }
}

@keyframes ty-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

@keyframes ty-spin {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ty-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes ty-glow-breathe {
  0%, 100% { opacity: .08; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: .12; transform: translate(-50%, -50%) scale(1.05); }
}

/* ── Full-viewport overlay ──────────────────────────────── */
.ty-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    /* faint grid pattern */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(255, 255, 255, .018) 59px,
      rgba(255, 255, 255, .018) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(255, 255, 255, .018) 59px,
      rgba(255, 255, 255, .018) 60px
    ),
    /* radial cinematic vignette */
    radial-gradient(ellipse 80% 70% at 50% 45%, var(--bg-2) 0%, var(--bg-1) 50%, var(--bg) 100%);
  background-color: var(--bg);
  animation: ty-page-enter .6s var(--ease-out) both;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  text-align: center;
}

/* ── Staggered entrance helper ──────────────────────────── */
.ty-logo,
.ty-badge,
.ty-heading,
.ty-sub,
.ty-user,
.ty-msg,
.ty-cta,
.ty-hint {
  opacity: 0;
  animation: ty-fadein .65s var(--ease-out) both;
}

.ty-logo    { animation-delay:   0ms; }
.ty-badge   { animation-delay: 200ms; }
.ty-heading { animation-delay: 400ms; }
.ty-sub     { animation-delay: 500ms; }
.ty-user    { animation-delay: 600ms; }
.ty-msg     { animation-delay: 700ms; }
.ty-cta     { animation-delay: 800ms; }
.ty-hint    { animation-delay: 900ms; }

/* ── Close button ───────────────────────────────────────── */
.ty-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    background .25s var(--ease-out),
    color .25s var(--ease-out),
    border-color .25s var(--ease-out),
    box-shadow .25s var(--ease-out),
    transform .25s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.ty-close:hover {
  background: rgba(255, 107, 26, .1);
  border-color: rgba(255, 107, 26, .3);
  color: var(--accent);
  box-shadow: var(--glow-orange);
  transform: scale(1.08);
}

.ty-close:active {
  transform: scale(.95);
}

.ty-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: var(--glow-orange);
}

/* ── Background atmospheric glow ────────────────────────── */
.ty-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 107, 26, .1) 0%,
    rgba(255, 77, 142, .06) 40%,
    transparent 70%
  );
  opacity: .1;
  pointer-events: none;
  animation: ty-glow-breathe 8s ease-in-out infinite;
}

/* ── Decorative ring ────────────────────────────────────── */
.ty-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 26, .12);
  box-shadow:
    0 0 40px rgba(255, 107, 26, .04),
    inset 0 0 40px rgba(255, 107, 26, .02);
  pointer-events: none;
  animation: ty-spin 40s linear infinite;
}

/* dashed second ring for depth */
.ty-ring::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 107, 26, .06);
  animation: ty-spin 60s linear infinite reverse;
}

/* ── Particles container ────────────────────────────────── */
.ty-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ty-particles span {
  position: absolute;
  bottom: -10px;
  display: block;
  border-radius: 50%;
  animation: ty-float linear infinite;
  opacity: 0;
}

/* Particle 1 — orange, small, fast */
.ty-particles span:nth-child(1) {
  left: 10%;
  width: 2px;
  height: 2px;
  background: var(--accent);
  opacity: .2;
  animation-duration: 10s;
  animation-delay: 0s;
}

/* Particle 2 — cyan, medium */
.ty-particles span:nth-child(2) {
  left: 25%;
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  opacity: .15;
  animation-duration: 14s;
  animation-delay: 2s;
}

/* Particle 3 — white, small */
.ty-particles span:nth-child(3) {
  left: 40%;
  width: 2px;
  height: 2px;
  background: var(--text);
  opacity: .1;
  animation-duration: 18s;
  animation-delay: 4s;
}

/* Particle 4 — orange, larger */
.ty-particles span:nth-child(4) {
  left: 55%;
  width: 4px;
  height: 4px;
  background: var(--accent);
  opacity: .18;
  animation-duration: 12s;
  animation-delay: 1s;
}

/* Particle 5 — cyan, small */
.ty-particles span:nth-child(5) {
  left: 70%;
  width: 2px;
  height: 2px;
  background: var(--accent-cyan);
  opacity: .12;
  animation-duration: 20s;
  animation-delay: 6s;
}

/* Particle 6 — white, medium */
.ty-particles span:nth-child(6) {
  left: 82%;
  width: 3px;
  height: 3px;
  background: var(--text);
  opacity: .14;
  animation-duration: 16s;
  animation-delay: 3s;
}

/* Particle 7 — orange, tiny */
.ty-particles span:nth-child(7) {
  left: 92%;
  width: 2px;
  height: 2px;
  background: var(--accent);
  opacity: .25;
  animation-duration: 8s;
  animation-delay: 5s;
}

/* Particle 8 — cyan, larger, slow */
.ty-particles span:nth-child(8) {
  left: 5%;
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  opacity: .1;
  animation-duration: 19s;
  animation-delay: 7s;
}

/* ── Logo ───────────────────────────────────────────────── */
.ty-logo {
  position: relative;
  z-index: 1;
  width: 80px;
  height: auto;
  margin-bottom: 24px;
  animation: ty-fadein .65s var(--ease-out) both,
             ty-pulse 3s ease-in-out 1s infinite;
}

/* ── Badge ──────────────────────────────────────────────── */
.ty-badge {
  display: inline-block;
  padding: 5px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: var(--grad-hot);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  box-shadow: 0 0 20px rgba(255, 107, 26, .3),
              0 0 60px rgba(255, 77, 142, .12);
}

/* ── Heading ────────────────────────────────────────────── */
.ty-heading {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: .04em;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--text);
  text-shadow:
    0 0 30px rgba(255, 107, 26, .25),
    0 0 80px rgba(255, 107, 26, .08);
}

/* ── Subheading ─────────────────────────────────────────── */
.ty-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-dim);
  margin: 0 0 6px;
}

/* ── Username ───────────────────────────────────────────── */
.ty-user {
  font-family: 'Orbitron', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 16px;
}

/* ── Description message ────────────────────────────────── */
.ty-msg {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-mute);
  max-width: 400px;
  margin: 0 auto 28px;
}

/* ── CTA button ─────────────────────────────────────────── */
.ty-cta {
  position: relative;
  display: inline-block;
  padding: 16px 48px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--grad-hot);
  background-size: 200% auto;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  box-shadow:
    0 0 24px rgba(255, 107, 26, .4),
    0 4px 16px rgba(0, 0, 0, .4);
  transition:
    box-shadow .3s var(--ease-out),
    transform .25s var(--ease-spring),
    filter .3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

/* shimmer sweep */
.ty-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, .18) 48%,
    rgba(255, 255, 255, .18) 52%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: ty-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.ty-cta:hover {
  filter: brightness(1.15);
  box-shadow:
    0 0 36px rgba(255, 107, 26, .55),
    0 0 80px rgba(255, 77, 142, .2),
    0 6px 24px rgba(0, 0, 0, .5);
  transform: scale(1.04);
}

.ty-cta:active {
  transform: scale(.97);
  filter: brightness(1.05);
}

.ty-cta:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  box-shadow:
    0 0 36px rgba(255, 107, 26, .55),
    0 0 0 6px rgba(255, 107, 26, .15);
}

/* ── Hint ───────────────────────────────────────────────── */
.ty-hint {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-style: italic;
  color: var(--text-mute);
  margin-top: 16px;
}

/* ── Desktop breakpoint ─────────────────────────────────── */
@media (min-width: 600px) {
  .ty-logo {
    width: 100px;
    margin-bottom: 32px;
  }

  .ty-badge {
    font-size: 11px;
    padding: 6px 20px;
    margin-bottom: 20px;
  }

  .ty-heading {
    font-size: 56px;
    margin-bottom: 10px;
  }

  .ty-sub {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .ty-msg {
    margin-bottom: 36px;
  }

  .ty-ring {
    width: 260px;
    height: 260px;
  }

  .ty-glow {
    width: 800px;
    height: 800px;
  }

  .ty-close {
    top: 24px;
    right: 24px;
  }
}

/* ── Large screens ──────────────────────────────────────── */
@media (min-width: 900px) {
  .ty-heading {
    font-size: 64px;
    text-shadow:
      0 0 40px rgba(255, 107, 26, .3),
      0 0 120px rgba(255, 107, 26, .08);
  }

  .ty-glow {
    width: 1000px;
    height: 1000px;
  }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ty-page,
  .ty-logo,
  .ty-badge,
  .ty-heading,
  .ty-sub,
  .ty-user,
  .ty-msg,
  .ty-cta,
  .ty-hint {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .ty-ring {
    animation: none !important;
  }

  .ty-ring::after {
    animation: none !important;
  }

  .ty-particles span {
    animation: none !important;
    display: none;
  }

  .ty-cta::before {
    animation: none !important;
  }

  .ty-glow {
    animation: none !important;
    opacity: .1;
  }

  .ty-close {
    transition: none !important;
  }
}
