/* Yeetiz: glass depth, sky signal, Syne / Outfit */

:root {
  --yeetiz-bg: #06090f;
  --yeetiz-ink: #f4f7fb;
  --yeetiz-mute: #8b9bb0;
  --yeetiz-signal: #38bdf8;
  --yeetiz-signal-dim: #0ea5e9;
  --yeetiz-kill: #fb7185;
  --yeetiz-line: rgba(148, 163, 184, 0.14);
  --yeetiz-glass: rgba(15, 22, 36, 0.62);
  --yeetiz-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --yeetiz-dur: 280ms;
}

/* === Atmosphere === */

.bg-monolith {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 42% at 50% 28%, rgba(56, 189, 248, 0.14), transparent 62%),
    linear-gradient(165deg, #06090f 0%, #0a1220 48%, #06090f 100%);
  pointer-events: none;
}

.bg-monolith::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.bg-monolith::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* === Chrome === */

.site-header {
  border-bottom: 1px solid var(--yeetiz-line);
  background: rgba(6, 9, 15, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.site-footer {
  border-top: 1px solid var(--yeetiz-line);
  background: rgba(6, 9, 15, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page-chip {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yeetiz-mute);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--yeetiz-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-quiet {
  position: relative;
  transition: color var(--yeetiz-dur) ease;
  cursor: pointer;
}

.nav-quiet::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: var(--yeetiz-signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--yeetiz-dur) var(--yeetiz-ease);
}

.nav-quiet:hover {
  color: var(--yeetiz-signal);
}

.nav-quiet:hover::after {
  transform: scaleX(1);
}

/* === Home monolith === */

.home-monolith {
  isolation: isolate;
}

.home-column {
  max-width: 32rem;
  margin-inline: auto;
  text-align: center;
}

.brand-display {
  margin: 0;
  font-family: "Syne", system-ui, sans-serif;
  font-size: clamp(3.75rem, 12vw, 7.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
  color: var(--yeetiz-ink);
  text-shadow: 0 0 80px rgba(56, 189, 248, 0.18);
}

/* Intermittent static / crackle on brand — bursts only while .is-crackling */
.brand-glitch {
  position: relative;
  display: inline-block;
}

.brand-glitch__steady {
  position: relative;
  z-index: 1;
}

.brand-glitch[data-text]::before,
.brand-glitch[data-text]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.brand-glitch.is-crackling::before,
.brand-glitch.is-crackling::after {
  opacity: 0.85;
}

.brand-glitch.is-crackling::before {
  color: var(--yeetiz-bg);
  text-shadow: -1px 0 rgba(6, 9, 15, 0.95);
  animation: brand-crackle-a 88ms steps(2, end) infinite;
}

.brand-glitch.is-crackling::after {
  color: var(--yeetiz-mute);
  text-shadow: 1px 0 rgba(139, 155, 176, 0.65);
  animation: brand-crackle-b 72ms steps(2, end) infinite;
}

.brand-glitch.is-crackling .brand-glitch__steady {
  animation: brand-crackle-core 64ms steps(2, end) infinite;
}

/* Partial crackle: only a letter span with .brand-glitch--slice */
.brand-glitch--slice {
  position: relative;
  display: inline-block;
}

.brand-glitch--slice[data-text]::before,
.brand-glitch--slice[data-text]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.brand-glitch--slice.is-crackling::before,
.brand-glitch--slice.is-crackling::after {
  opacity: 0.9;
}

.brand-glitch--slice.is-crackling::before {
  color: var(--yeetiz-bg);
  animation: brand-crackle-a 88ms steps(2, end) infinite;
}

.brand-glitch--slice.is-crackling::after {
  color: var(--yeetiz-mute);
  animation: brand-crackle-b 72ms steps(2, end) infinite;
}

@keyframes brand-crackle-a {
  0% {
    clip-path: inset(0 0 62% 0);
    transform: translate(-2px, 1px);
  }
  35% {
    clip-path: inset(28% 12% 18% 0);
    transform: translate(2px, -1px);
  }
  70% {
    clip-path: inset(55% 0 8% 18%);
    transform: translate(-1px, 0);
  }
  100% {
    clip-path: inset(12% 0 48% 0);
    transform: translate(1px, 1px);
  }
}

@keyframes brand-crackle-b {
  0% {
    clip-path: inset(48% 0 10% 0);
    transform: translate(2px, -1px);
  }
  40% {
    clip-path: inset(8% 0 55% 8%);
    transform: translate(-2px, 1px);
  }
  100% {
    clip-path: inset(35% 20% 22% 0);
    transform: translate(1px, 0);
  }
}

@keyframes brand-crackle-core {
  0%,
  100% {
    opacity: 1;
    filter: none;
  }
  40% {
    opacity: 0.82;
    filter: contrast(1.15) brightness(1.08);
  }
  70% {
    opacity: 1;
    filter: none;
  }
}

.accent-rule {
  width: 2.75rem;
  height: 2px;
  margin: 1.75rem auto 1.35rem;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--yeetiz-signal), transparent);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
  transform-origin: center;
}

.brand-whisper {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--yeetiz-mute);
}

/* === Page intro === */

.page-intro h1 {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* === Surfaces === */

.panel {
  background: var(--yeetiz-glass);
  border: 1px solid var(--yeetiz-line);
  border-radius: 1rem;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 48px rgba(0, 0, 0, 0.22);
}

.panel-cta {
  border-radius: 0.875rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(15, 22, 36, 0.4));
}

.alert-ok {
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
}

.alert-err {
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  color: var(--yeetiz-kill);
}

/* === Form === */

.field {
  width: 100%;
  border-radius: 0.625rem;
  border: 1px solid var(--yeetiz-line);
  background: rgba(4, 7, 12, 0.72);
  padding: 0.8rem 0.95rem;
  color: var(--yeetiz-ink);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.9375rem;
  outline: none;
  transition:
    border-color var(--yeetiz-dur) ease,
    box-shadow var(--yeetiz-dur) ease,
    background var(--yeetiz-dur) ease;
}

.field::placeholder {
  color: rgba(139, 155, 176, 0.55);
}

.field:hover {
  border-color: rgba(148, 163, 184, 0.28);
}

.field:focus {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(4, 7, 12, 0.9);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.field.is-invalid {
  border-color: rgba(251, 113, 133, 0.65);
}

.btn-signal {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: var(--yeetiz-signal);
  padding: 0.7rem 1.5rem;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #041018;
  border: none;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.25);
  transition:
    background var(--yeetiz-dur) ease,
    transform var(--yeetiz-dur) var(--yeetiz-ease),
    box-shadow var(--yeetiz-dur) ease;
}

.btn-signal:hover {
  background: var(--yeetiz-signal-dim);
  box-shadow: 0 0 36px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

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

/* === Motion === */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s var(--yeetiz-ease),
    transform 0.65s var(--yeetiz-ease);
}

.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.accent-rule.reveal {
  opacity: 0;
  transform: scaleX(0);
}

.accent-rule.reveal.is-visible {
  opacity: 1;
  transform: scaleX(1);
  transition:
    opacity 0.55s ease 0.12s,
    transform 0.7s var(--yeetiz-ease) 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.delay-1,
  .reveal.delay-2,
  .accent-rule.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-quiet::after,
  .btn-signal {
    transition: none;
  }

  .btn-signal:hover {
    transform: none;
  }

  .brand-glitch.is-crackling::before,
  .brand-glitch.is-crackling::after,
  .brand-glitch.is-crackling .brand-glitch__steady,
  .brand-glitch--slice.is-crackling::before,
  .brand-glitch--slice.is-crackling::after {
    animation: none !important;
    opacity: 0;
  }

  .brand-glitch.is-crackling .brand-glitch__steady {
    opacity: 1;
    filter: none;
  }
}

:focus-visible {
  outline: 2px solid var(--yeetiz-signal);
  outline-offset: 3px;
}

::selection {
  background: rgba(56, 189, 248, 0.28);
  color: var(--yeetiz-ink);
}

/* Cap CAPTCHA: match dark Yeetiz panel */
.cap-widget-yeetiz {
  --cap-background: rgba(4, 7, 12, 0.72);
  --cap-border-color: rgba(148, 163, 184, 0.18);
  --cap-border-radius: 12px;
  --cap-color: #f4f7fb;
  --cap-checkbox-border: 1px solid rgba(148, 163, 184, 0.35);
  --cap-checkbox-background: rgba(255, 255, 255, 0.04);
  --cap-checkbox-border-radius: 6px;
  --cap-font: "Outfit", system-ui, sans-serif;
  --cap-spinner-color: #38bdf8;
  --cap-spinner-background-color: rgba(56, 189, 248, 0.15);
  display: block;
  width: fit-content;
  max-width: 100%;
}
