/* ============================================================
   TIME CAPSULE — STAY TUNED PAGE
   style.css
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dark:    #D2C7FF;
  --accent:  #31304B;
  --accent2: #4a4870;
  --dim:     rgba(49,48,75,0.5);
  --dimmer:  rgba(49,48,75,0.25);
  --dimmest: rgba(49,48,75,0.1);
  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--dark);
  color: var(--accent);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* --- Particle Canvas -------------------------------------- */
#canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- Glow Orb --------------------------------------------- */
.glow-orb {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(49,48,75,0.09) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.12); }
}

/* --- Scanlines -------------------------------------------- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
}

/* --- HUD Corner Brackets ---------------------------------- */
.hud {
  position: fixed;
  width: 32px;
  height: 32px;
  z-index: 2;
  opacity: 0.3;
  transition: opacity 0.4s;
}
.hud:hover { opacity: 0.7; }

.hud-tl { top: 20px; left: 20px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  border-radius: 4px 0 0 0;
}
.hud-tr { top: 20px; right: 20px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  border-radius: 0 4px 0 0;
}
.hud-bl { bottom: 20px; left: 20px;
  border-bottom: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  border-radius: 0 0 0 4px;
}
.hud-br { bottom: 20px; right: 20px;
  border-bottom: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  border-radius: 0 0 4px 0;
}

/* --- Main Stage ------------------------------------------- */
.stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 3rem 1.5rem 2rem;
  max-width: 640px;
  width: 100%;
  text-align: center;
}

/* --- Logo ------------------------------------------------- */
.logo-wrap {
  width: 405px;
  height: 405px;
  border-radius: 0;
  border: none;
  background: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: transform 0.3s;
  animation: floatLogo 5s ease-in-out infinite;
  position: relative;
}

.logo-wrap:hover {
  transform: translateY(-4px) scale(1.04);
}

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

.logo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform: scale(1.43);
  transform-origin: center center;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--dim);
}

/* --- Tagline ---------------------------------------------- */
.tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.1rem;
  margin-top: 0.8rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.3s forwards;
}
.tagline-line {
  display: block;
  width: 30px;
  height: 1px;
  background: var(--dimmer);
  flex-shrink: 0;
}

/* --- Headline --------------------------------------------- */
.headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.28em;
  flex-wrap: wrap;
  justify-content: center;
}

.headline-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: wordReveal 0.8s var(--ease-out-expo) forwards;
}
.headline-word:nth-child(1) { animation-delay: 0.55s; }
.headline-word:nth-child(2) { animation-delay: 0.75s; }

.headline-word.accent {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.headline-word.accent::before {
  content: attr(data-word);
  position: absolute;
  inset: 0;
  color: var(--accent);
  clip-path: inset(0 100% 0 0);
  animation: textFill 1.4s var(--ease-out-expo) 1.1s forwards;
}

@keyframes textFill {
  to { clip-path: inset(0 0% 0 0); }
}

@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Sub --------------------------------------------------- */
.sub {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--dim);
  margin-bottom: 2.2rem;
  max-width: 380px;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 1s forwards;
}

/* --- Countdown -------------------------------------------- */
.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 1.15s forwards;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 62px;
  background: rgba(49,48,75,0.05);
  border: 1px solid var(--dimmer);
  border-radius: 10px;
  padding: 10px 6px 8px;
}

.countdown-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  transition: transform 0.15s, color 0.15s;
}
.countdown-val.flip {
  transform: scaleY(0.85);
  color: #4a4870;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.countdown-sep {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--dimmer);
  margin-bottom: 14px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* --- Form -------------------------------------------------- */
.notify-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--dimmer);
  background: rgba(49,48,75,0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out-expo) 1.3s forwards;
}
.notify-form:focus-within {
  border-color: rgba(49,48,75,0.55);
  box-shadow: 0 0 0 3px rgba(49,48,75,0.08);
}

.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 14px;
  min-width: 0;
}

.input-icon {
  width: 16px;
  height: 16px;
  color: var(--dimmer);
  flex-shrink: 0;
  margin-right: 10px;
}

.email-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 15px 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
  min-width: 0;
}
.email-input::placeholder {
  color: rgba(49,48,75,0.3);
}
.email-input.error {
  color: #ff9090;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(3px); }
}

.notify-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 15px 22px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, gap 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.notify-btn:hover {
  background: #4a4870;
  gap: 12px;
}
.notify-btn:active {
  transform: scale(0.97);
}
.notify-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.notify-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* --- Success ---------------------------------------------- */
.success-msg {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  padding: 14px 0;
  max-width: 420px;
}
.success-msg svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.success-msg.visible {
  display: flex;
  animation: fadeSlideUp 0.4s var(--ease-out-expo) forwards;
}

/* --- Pulse Dots ------------------------------------------- */
.pulse-dots {
  display: flex;
  gap: 8px;
  margin-top: 2.4rem;
  opacity: 0;
  animation: fadeSlideUp 0.5s var(--ease-out-expo) 1.5s forwards;
}
.dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dimmer);
  animation: dotBlink 2.4s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 0.4s; }
.dot:nth-child(3) { animation-delay: 0.8s; }

@keyframes dotBlink {
  0%, 100% { background: var(--dimmer); transform: scale(1); }
  50%       { background: var(--accent); transform: scale(1.5); }
}

/* --- Footer ----------------------------------------------- */
.footer {
  position: relative;
  z-index: 3;
  padding: 1.2rem;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(210,199,255,0.2);
  text-align: center;
}

/* --- Shared animation ------------------------------------- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 480px) {
  .headline { font-size: clamp(3rem, 14vw, 4.5rem); }
  .notify-form { flex-direction: column; border-radius: 12px; }
  .notify-btn { justify-content: center; padding: 14px; }
  .countdown-unit { min-width: 54px; padding: 8px 4px 6px; }
  .countdown-val { font-size: 22px; }
  .hud { width: 22px; height: 22px; }
  .logo-wrap { margin-bottom: 2.6rem; }
}
