/* ZENTIQ Welcome — Coming Soon (DE, premium polish)
   --------------------------------------------------------------- */

:root {
  --g-from: #2563eb;
  --g-to:   #06b6d4;
  --amber:  #f59e0b;

  --bg-0:   #06060a;
  --bg-1:   #0a0a12;

  --fg:     #f8fafc;
  --fg-mut: #94a3b8;
  --fg-dim: #64748b;

  --line:   rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-quint: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

::selection {
  background: rgba(37, 99, 235, 0.45);
  color: #fff;
  text-shadow: none;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11", "cv09", "calt";
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

body {
  position: relative;
  background:
    radial-gradient(1100px 900px at 18% 12%, rgba(37, 99, 235, 0.10), transparent 65%),
    radial-gradient( 900px 700px at 88% 82%, rgba(6, 182, 212, 0.08),  transparent 65%),
    radial-gradient( 700px 600px at 70% 18%, rgba(124, 58, 237, 0.06), transparent 65%),
    radial-gradient( 800px 700px at 12% 88%, rgba(245, 158, 11, 0.04), transparent 65%),
    linear-gradient(180deg, #060914 0%, #03030a 60%, #020207 100%);
  min-height: 100dvh;
}

/* Canvas-Orb */
#orb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Subtle grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* Vignette — focal pull, premium edge falloff */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,0.35) 90%, rgba(0,0,0,0.55) 100%);
}

/* Aurora — subtle moving light at top + bottom edges */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  left: -20%;
  width: 140%;
  height: 240px;
  background: radial-gradient(60% 100% at 50% 50%, rgba(37, 99, 235, 0.10), transparent 70%);
  filter: blur(40px);
  animation: aurora-drift 28s ease-in-out infinite alternate;
}
.aurora::before { top: -120px; }
.aurora::after  {
  bottom: -120px;
  background: radial-gradient(60% 100% at 50% 50%, rgba(6, 182, 212, 0.08), transparent 70%);
  animation-duration: 36s;
  animation-direction: alternate-reverse;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-3%, 0, 0); }
  100% { transform: translate3d( 3%, 0, 0); }
}

/* Stage — fully centered, single column */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  padding: clamp(32px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 48px);
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2vw, 22px);
  transform: translate3d(var(--brand-tx, 0), var(--brand-ty, 0), 0);
  will-change: transform;
}

.logo {
  height: clamp(160px, 26vw, 320px);
  width: auto;
  display: block;
  filter: drop-shadow(0 18px 60px rgba(37, 99, 235, 0.18))
          drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.tagline {
  margin: 0;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 2px 24px rgba(37, 99, 235, 0.25);
}

.capture-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}
.capture-wrap {
  position: relative;
  width: min(440px, 100%);
}

/* Email field — pill with refined focus glow */
.capture {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  transition: border-color 320ms var(--ease), box-shadow 320ms var(--ease), background-color 320ms var(--ease);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 28px -12px rgba(0, 0, 0, 0.6);
}
.capture:focus-within {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 4px rgba(37, 99, 235, 0.18),
    0 18px 40px -16px rgba(37, 99, 235, 0.5);
}
.capture input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  padding: 12px 16px;
  text-align: center;
  letter-spacing: 0.01em;
}
.capture input::placeholder { color: var(--fg-dim); }
.capture input:-webkit-autofill {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 600000s 0s, color 600000s 0s;
}

/* Button — gradient, shimmer, refined shadow, magnetic */
.capture button {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  color: var(--fg);
  background: linear-gradient(135deg, #2f6ef0 0%, var(--g-from) 35%, var(--g-to) 100%);
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  isolation: isolate;
  letter-spacing: 0.005em;
  transform: translate3d(var(--btn-mx, 0), var(--btn-my, 0), 0);
  transition:
    transform 360ms var(--ease-quint),
    filter 240ms var(--ease),
    box-shadow 360ms var(--ease);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 1px 0 rgba(255,255,255,0.06),
    0 8px 24px -8px rgba(37, 99, 235, 0.55),
    0 18px 40px -20px rgba(6, 182, 212, 0.4);
  white-space: nowrap;
}
.capture button:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 1px 0 rgba(255,255,255,0.08),
    0 14px 36px -10px rgba(37, 99, 235, 0.7),
    0 28px 60px -22px rgba(6, 182, 212, 0.55);
}
.capture button:active { filter: brightness(0.95); }
.capture button .btn-arrow { transition: transform 360ms var(--ease-quint); display: inline-block; }
.capture button:hover .btn-arrow { transform: translateX(4px); }
.capture button[disabled] { opacity: 0.7; cursor: progress; }

.btn-shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg,
    transparent 35%,
    rgba(255,255,255,0.32) 50%,
    transparent 65%);
  transform: translateX(-110%);
  transition: transform 900ms var(--ease-quint);
  pointer-events: none;
}
.capture button:hover .btn-shine { transform: translateX(110%); }

/* Submit-success state — pill morphs into check */
.capture, .capture-success {
  transition: opacity 380ms var(--ease-quint), transform 380ms var(--ease-quint),
              border-color 480ms var(--ease), background 480ms var(--ease),
              box-shadow 480ms var(--ease);
}
.capture-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.32);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.05));
  color: #d1fae5;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 4px rgba(34, 197, 94, 0.12),
    0 18px 40px -16px rgba(34, 197, 94, 0.45);
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.capture-success .check {
  width: 22px;
  height: 22px;
  color: #6ee7b7;
}
.capture-success .check path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 600ms 200ms var(--ease-quint);
}
.capture-block.is-success .capture {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.capture-block.is-success .capture-success {
  opacity: 1;
  transform: none;
}
.capture-block.is-success .capture-success .check path {
  stroke-dashoffset: 0;
}

.status {
  margin: 0;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--fg-mut);
  text-align: center;
  letter-spacing: 0.005em;
  transition: color 240ms var(--ease);
}
.status.is-ok    { color: #6ee7b7; }
.status.is-error { color: #fca5a5; }

/* Footer */
.foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  text-align: center;
  padding: 20px 24px 24px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- Cinematic Intro ---------------- */
[data-stagger] {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(14px);
  transition:
    opacity     1100ms var(--ease-quint),
    transform   1100ms var(--ease-quint),
    filter      1100ms var(--ease-quint);
}

body.is-loading #orb { opacity: 0; transition: opacity 1400ms var(--ease-soft); }
body.is-loading .vignette { opacity: 0; transition: opacity 1400ms var(--ease-soft); }
body.is-loading .grain { opacity: 0; transition: opacity 1400ms var(--ease-soft); }

body.is-ready #orb { opacity: 1; }
body.is-ready .vignette { opacity: 1; }
body.is-ready .grain { opacity: 0.06; }

body.is-ready [data-stagger="1"] { opacity: 1; transform: none; filter: blur(0); transition-delay: 220ms; }
body.is-ready [data-stagger="2"] { opacity: 1; transform: none; filter: blur(0); transition-delay: 1480ms; }
body.is-ready [data-stagger="3"] { opacity: 1; transform: none; filter: blur(0); transition-delay: 1700ms; }

/* Letter-by-letter wordmark reveal — staggered after brand fades in */
.logo .wordmark tspan {
  opacity: 0;
  transition: opacity 760ms var(--ease-quint);
}
body.is-ready .logo .wordmark tspan { opacity: 1; }
body.is-ready .logo .wordmark tspan:nth-child(1) { transition-delay:  920ms; }
body.is-ready .logo .wordmark tspan:nth-child(2) { transition-delay: 1010ms; }
body.is-ready .logo .wordmark tspan:nth-child(3) { transition-delay: 1100ms; }
body.is-ready .logo .wordmark tspan:nth-child(4) { transition-delay: 1190ms; }
body.is-ready .logo .wordmark tspan:nth-child(5) { transition-delay: 1280ms; }
body.is-ready .logo .wordmark tspan:nth-child(6) { transition-delay: 1370ms; }

/* Audio toggle — minimal floating control bottom-right */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 11px 0 11px 0;
  cursor: pointer;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease), opacity 800ms var(--ease);
  opacity: 0;
}
body.is-ready .audio-toggle { opacity: 1; transition-delay: 1900ms; }
.audio-toggle:hover { border-color: var(--line-2); background: rgba(255,255,255,0.05); }
.audio-toggle .bar {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--fg-mut);
  border-radius: 2px;
  transition: height 360ms var(--ease), background-color 240ms var(--ease);
}
.audio-toggle[aria-pressed="true"] .bar {
  background: var(--fg);
  animation: bar-bounce 1.4s ease-in-out infinite;
}
.audio-toggle[aria-pressed="true"] .bar:nth-child(1) { animation-delay: 0ms;   }
.audio-toggle[aria-pressed="true"] .bar:nth-child(2) { animation-delay: 180ms; }
.audio-toggle[aria-pressed="true"] .bar:nth-child(3) { animation-delay: 360ms; }
.audio-toggle[aria-pressed="true"] .bar:nth-child(4) { animation-delay: 540ms; }
@keyframes bar-bounce {
  0%, 100% { height: 4px; }
  50%      { height: 12px; }
}

/* Reduced motion — kill orb + animations, keep static glow */
@media (prefers-reduced-motion: reduce) {
  #orb { display: none; }
  .aurora { display: none; }
  body::after {
    content: "";
    position: fixed; inset: 0;
    background: radial-gradient(600px 600px at 50% 50%, rgba(37, 99, 235, 0.18), transparent 60%);
    z-index: 0;
    pointer-events: none;
  }
  [data-stagger] { opacity: 1; transform: none; filter: none; transition: none; }
  .btn-shine { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
  .capture {
    flex-direction: column;
    border-radius: 22px;
    padding: 6px;
    gap: 6px;
    width: 100%;
  }
  .capture input {
    width: 100%;
    font-size: 16px;        /* avoid iOS zoom */
    padding: 14px 18px;
    text-align: center;
  }
  .capture button {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
    font-size: 15px;
  }
  .capture-success {
    border-radius: 22px;
    padding: 16px 18px;
  }
  .foot { letter-spacing: 0.14em; }
}
