/* BUILD v4 - shiny button glow fix */
/* App Tester Club - landing page */

:root {
  --navy-950: #040920;
  --navy-800: #0a1a5c;
  --blue-600: #1450f0;
  --blue-400: #4d86ff;
  --sky-200: #bcd4ff;
  --ink: #f4f7ff;
  --ink-soft: rgba(232, 240, 255, 0.78);
}

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

html, body { height: 100%; margin: 0; }

body {
  background: var(--navy-950);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Moving underlayer ---------- */
.underlayer {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #0b1d6b 0%, var(--navy-950) 70%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  will-change: transform;
  opacity: 0.9;
}

.blob-1 {
  width: 60vmax; height: 60vmax;
  left: -15vmax; top: -20vmax;
  background: radial-gradient(circle at 40% 40%, var(--blue-600), transparent 68%);
  animation: drift-1 22s ease-in-out infinite alternate;
}
.blob-2 {
  width: 50vmax; height: 50vmax;
  right: -15vmax; top: 10vh;
  background: radial-gradient(circle at 50% 50%, var(--sky-200), transparent 66%);
  opacity: 0.55;
  animation: drift-2 28s ease-in-out infinite alternate;
}
.blob-3 {
  width: 55vmax; height: 55vmax;
  left: 5vw; bottom: -25vmax;
  background: radial-gradient(circle at 50% 50%, var(--navy-800), transparent 70%);
  animation: drift-3 25s ease-in-out infinite alternate;
}
.blob-4 {
  width: 38vmax; height: 38vmax;
  left: 40vw; top: 30vh;
  background: radial-gradient(circle at 50% 50%, var(--blue-400), transparent 65%);
  opacity: 0.6;
  animation: drift-4 19s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30vw, 22vh) scale(1.25); }
}
@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-35vw, 18vh) scale(0.85); }
}
@keyframes drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35vw, -25vh) scale(1.2); }
}
@keyframes drift-4 {
  0%   { transform: translate(-20vw, -10vh) scale(0.9); }
  100% { transform: translate(20vw, 20vh) scale(1.3); }
}

/* ---------- Frosted blur sheet ---------- */
.frost {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(70px) saturate(140%);
  backdrop-filter: blur(70px) saturate(140%);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(40px, 9vh, 110px) 24px 48px;
}

.logo {
  width: clamp(110px, 20vw, 190px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(20, 80, 240, 0.55));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

h1 {
  margin: clamp(24px, 4vh, 40px) 0 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 30px rgba(4, 9, 32, 0.5);
}

.sub {
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ---------- Shiny CTA button ---------- */
:root {
  --shiny-cta-bg: #000000;
  --shiny-cta-bg-subtle: #1a1818;
  --shiny-cta-fg: #ffffff;
  --shiny-cta-highlight: #1a1aff;
  --shiny-cta-highlight-subtle: #8484ff;
}

@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@property --gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@property --gradient-percent {
  syntax: "<percentage>";
  initial-value: 5%;
  inherits: false;
}
@property --gradient-shine {
  syntax: "<color>";
  initial-value: white;
  inherits: false;
}

/* Base look: always visible, even if fancy effects are unsupported */
.shiny-cta {
  --animation: gradient-angle linear infinite;
  --duration: 3s;
  --shadow-size: 2px;
  --transition: 800ms cubic-bezier(0.25, 1, 0.5, 1);
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin-top: clamp(28px, 5vh, 44px);
  cursor: pointer;
  outline-offset: 4px;
  padding: 1.25rem 2.5rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--shiny-cta-fg);
  background-color: var(--shiny-cta-bg);
  border: 1px solid rgba(132, 132, 255, 0.55);
  border-radius: 360px;
  box-shadow: inset 0 0 0 1px var(--shiny-cta-bg-subtle);
}

.shiny-cta span {
  z-index: 1;
}

/* Animated gradient border (modern browsers only) */
@supports (background: conic-gradient(from 0deg, red, blue)) {
  .shiny-cta {
    border: 1px solid transparent;
    background:
      linear-gradient(var(--shiny-cta-bg), var(--shiny-cta-bg)) padding-box,
      conic-gradient(
        from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
        transparent,
        var(--shiny-cta-highlight) var(--gradient-percent),
        var(--gradient-shine) calc(var(--gradient-percent) * 2),
        var(--shiny-cta-highlight) calc(var(--gradient-percent) * 3),
        transparent calc(var(--gradient-percent) * 4)
      ) border-box;
    transition: var(--transition);
    transition-property: --gradient-angle-offset, --gradient-percent, --gradient-shine;
    animation:
      var(--animation) var(--duration),
      var(--animation) calc(var(--duration) / 0.4) reverse paused;
    animation-composition: add;
  }
}

.shiny-cta::before,
.shiny-cta::after,
.shiny-cta span::before {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  z-index: -1;
}

.shiny-cta::before,
.shiny-cta::after {
  animation:
    var(--animation) var(--duration),
    var(--animation) calc(var(--duration) / 0.4) reverse paused;
  animation-composition: add;
}

/* Dots pattern */
.shiny-cta::before {
  --size: calc(100% - var(--shadow-size) * 3);
  --position: 2px;
  --space: calc(var(--position) * 2);
  width: var(--size);
  height: var(--size);
  background: radial-gradient(
    circle at var(--position) var(--position),
    white calc(var(--position) / 4),
    transparent 0
  ) padding-box;
  background-size: var(--space) var(--space);
  background-repeat: space;
  -webkit-mask-image: conic-gradient(from calc(var(--gradient-angle) + 45deg), black, transparent 10% 90%, black);
  mask-image: conic-gradient(from calc(var(--gradient-angle) + 45deg), black, transparent 10% 90%, black);
  border-radius: inherit;
  opacity: 0.4;
}

/* Inner shimmer */
.shiny-cta::after {
  --animation: shimmer linear infinite;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(-50deg, transparent, var(--shiny-cta-highlight), transparent);
  -webkit-mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.6;
}

/* Breathing glow behind the text */
.shiny-cta span::before {
  --size: calc(100% + 1rem);
  width: var(--size);
  height: var(--size);
  box-shadow: inset 0 -1ex 2rem 4px var(--shiny-cta-highlight);
  opacity: 0;
  transition: opacity var(--transition);
  animation: calc(var(--duration) * 1.5) breathe linear infinite;
}

.shiny-cta:hover,
.shiny-cta:focus-visible {
  --gradient-percent: 20%;
  --gradient-angle-offset: 95deg;
  --gradient-shine: var(--shiny-cta-highlight-subtle);
}

.shiny-cta:hover,
.shiny-cta:hover::before,
.shiny-cta:hover::after,
.shiny-cta:focus-visible,
.shiny-cta:focus-visible::before,
.shiny-cta:focus-visible::after {
  animation-play-state: running;
}

.shiny-cta:hover span::before,
.shiny-cta:focus-visible span::before {
  opacity: 1;
}

.shiny-cta:active {
  translate: 0 1px;
}

@keyframes gradient-angle {
  to { --gradient-angle: 360deg; }
}
@keyframes shimmer {
  to { rotate: 360deg; }
}
@keyframes breathe {
  from, to { scale: 1; }
  50% { scale: 1.2; }
}

/* ---------- Fallbacks / a11y ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .frost { background: rgba(10, 26, 92, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .logo { animation: none; }
  .shiny-cta, .shiny-cta::before, .shiny-cta::after, .shiny-cta span::before { animation: none; transition: none; }
}

@media (max-width: 480px) {
  .shiny-cta { width: 100%; max-width: 320px; text-align: center; }
}
