html {
  visibility: hidden;
}

@font-face {
  font-family: "Bambi";
  src: url("/fonts/Brittany%20Signature%20400.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #fff;
  --pink: #FF9ECF;
  --dark-pink: #ff4fa3;
}

body {
  background: var(--bg);
  font-family: 'Bambi', cursive;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  text-align: center;
  font-size: 2rem;
}

.glitch {
  position: relative;
  z-index: 2;
  font-size: 18vw;
  font-weight: 400;
  color: var(--pink);
  line-height: 1;
  background: var(--bg);
  animation: glitch 5s infinite;
}

.glitch::before,
.glitch::after {
  pointer-events: none;
  line-height: 1;
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}

.glitch::before {
  display: none;
}

.glitch::after {
  left: 2px;
  text-shadow: -5px 0 var(--dark-pink);
  animation: noise-2 3s infinite linear alternate-reverse,
             glitch 5s infinite;
}

@keyframes glitch {
  1% { transform: skewX(80deg); }
  2% { transform: none; }
}

@keyframes noise-1 {
  0%   { clip-path: inset(10% 0 85% 0); }
  10%  { clip-path: inset(80% 0 5% 0); }
  20%  { clip-path: inset(50% 0 30% 0); }
  30%  { clip-path: inset(20% 0 60% 0); }
  40%  { clip-path: inset(70% 0 10% 0); }
  50%  { clip-path: inset(40% 0 40% 0); }
  60%  { clip-path: inset(90% 0 2% 0); }
  70%  { clip-path: inset(25% 0 55% 0); }
  80%  { clip-path: inset(65% 0 20% 0); }
  90%  { clip-path: inset(15% 0 70% 0); }
  100% { clip-path: inset(10% 0 85% 0); }
}

.soft-glitch {
  margin-top: 1.2rem;
  font-family: 'Bambi', cursive;
  font-size: 3rem;
  color: #ff74a3;
  position: relative;
  animation: softFlicker 4s infinite;
}

/* extremely subtle shimmer */
@keyframes softFlicker {
  0%, 100% { opacity: 1; transform: translate(0); }
  50% { opacity: 0.96; transform: translateX(0.3px); }
}

.container { position: relative; z-index: 1; }
.optin { position: relative; z-index: 5; }
.scanlines { z-index: 0; }

.optin {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.optin input {
  width: 260px;              /* makes it longer */
  background: #ffffff;
  border: 1px solid #FF9ECF;
  border-radius: 999px;      /* fully rounded */
  color: #000;
  padding: 0.75rem 1.2rem;
  font-family: inherit;
  font-size: 1.5rem;
  outline: none;
  text-align: center;
}

.optin input::placeholder {
  color: #777;
  text-align: center;
}

.optin button {
  background: #ffffff;
  border: 1px solid #FF9ECF;
  border-radius: 999px;      /* match input */
  padding: 0.75rem 1.4rem;
  font-size: 1.5rem;
  min-width: 180px;
  cursor: pointer;
}

.optin input,
.optin button {
  font-family: "Bambi", cursive;
  transition: box-shadow 0.25s ease;
}

.optin input:focus,
.optin button:hover {
  box-shadow:
    0 0 0 1px #ff9ecf,
     0 0 45px rgba(255, 158, 207, 0.95),
     0 0 90px rgba(255, 158, 207, 0.95),
     0 0 140px rgba(255, 158, 207, 0.95);
}

html.fonts-loaded {
  visibility: visible;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 1px,
    transparent 2px
  );
}
