/* ==========================================================================
   Prelude – Coming Soon Theme
   ========================================================================== */

/* ── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --prelude-accent:   #6C63FF;
  --prelude-bg:       #09090f;
  --prelude-surface:  rgba(255, 255, 255, 0.04);
  --prelude-border:   rgba(255, 255, 255, 0.08);
  --prelude-text:     #f0f0f5;
  --prelude-muted:    rgba(240, 240, 245, 0.50);
  --prelude-radius:   1rem;
  --font-sans:        'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

/* ── Google Font ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Base ──────────────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body.prelude-body {
  font-family: var(--font-sans);
  background-color: var(--prelude-bg);
  color: var(--prelude-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Canvas ────────────────────────────────────────────────────────────── */
.prelude-canvas {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  isolation: isolate;
}

/* ── Animated Orbs ─────────────────────────────────────────────────────── */
.prelude-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-drift 18s ease-in-out infinite;
}

.orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--prelude-accent), transparent 70%);
  top: -15%;
  left: -10%;
  animation-duration: 20s;
}

.orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ff6b9d, transparent 70%);
  bottom: -10%;
  right: -8%;
  animation-duration: 25s;
  animation-delay: -8s;
}

.orb--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #00d4aa, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 15s;
  animation-delay: -4s;
  opacity: 0.2;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 40px) scale(0.95); }
}

/* ── Noise Texture ─────────────────────────────────────────────────────── */
.prelude-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ── Main ──────────────────────────────────────────────────────────────── */
.prelude-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  max-width: 720px;
  width: 100%;
  animation: fade-up 0.8s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ──────────────────────────────────────────────────────────────── */
.prelude-logo img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.prelude-logo__text {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 40%, var(--prelude-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Status Pill ───────────────────────────────────────────────────────── */
.prelude-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  background: var(--prelude-surface);
  border: 1px solid var(--prelude-border);
  backdrop-filter: blur(12px);
}

.prelude-pill span:not(.prelude-pill__label) {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--prelude-border);
}

.prelude-pill__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prelude-accent);
}

/* ── Headline ──────────────────────────────────────────────────────────── */
.prelude-headline {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  padding-bottom: 0.15em;
  background: linear-gradient(160deg, #ffffff 0%, rgba(255,255,255,0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subheadline ───────────────────────────────────────────────────────── */
.prelude-subheadline {
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--prelude-muted);
  max-width: 540px;
}

/* ── Countdown ─────────────────────────────────────────────────────────── */
.prelude-countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  background: var(--prelude-surface);
  border: 1px solid var(--prelude-border);
  border-radius: var(--prelude-radius);
  backdrop-filter: blur(16px);
  animation: fade-up 0.8s 0.2s ease both;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 68px;
}

.countdown__value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(135deg, #fff, var(--prelude-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.15s ease;
}

.countdown__value.tick {
  transform: scale(1.08);
}

.countdown__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prelude-muted);
}

.countdown__separator {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 300;
  color: var(--prelude-border);
  line-height: 1;
  margin-bottom: 1.25rem;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ── Social Links ──────────────────────────────────────────────────────── */
.prelude-socials {
  display: flex;
  gap: 0.75rem;
  animation: fade-up 0.8s 0.35s ease both;
}

.prelude-socials__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--prelude-surface);
  border: 1px solid var(--prelude-border);
  color: var(--prelude-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.prelude-socials__link svg {
  width: 18px;
  height: 18px;
}

.prelude-socials__link:hover,
.prelude-socials__link:focus-visible {
  color: #fff;
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--prelude-accent);
  transform: translateY(-2px);
  outline: none;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.prelude-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
}

.prelude-footer p {
  font-size: 0.8125rem;
  color: var(--prelude-muted);
  opacity: 0.6;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .prelude-countdown {
    gap: 0.25rem;
    padding: 1.25rem 1rem;
  }

  .countdown__unit {
    min-width: 52px;
  }

  .countdown__separator {
    margin-bottom: 1rem;
  }
}

@media (max-width: 400px) {
  .prelude-countdown {
    flex-wrap: wrap;
    justify-content: center;
  }

  .countdown__separator {
    display: none;
  }
}

/* ── Focus visible ─────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--prelude-accent);
  outline-offset: 3px;
}
