/* ============================================================
   Quana — Coming Soon
   Design tokens
   ============================================================ */
:root {
  --bg-0: #03050c;
  --bg-1: #060a16;
  --bg-2: #0a1024;

  --ink-0: #f3f6ff;
  --ink-1: #c9d2ee;
  --ink-2: #8892b8;
  --ink-3: #5a6489;

  --cyan: #00eaff;
  --electric: #4d8bff;
  --violet: #7b5cff;
  --magenta: #c46bff;

  --glow-cyan: 0 0 18px rgba(0, 234, 255, 0.55), 0 0 42px rgba(0, 234, 255, 0.25);
  --glow-violet: 0 0 24px rgba(123, 92, 255, 0.45), 0 0 60px rgba(123, 92, 255, 0.2);

  --grad-headline: linear-gradient(
    100deg,
    #e6f8ff 0%,
    #9be9ff 22%,
    #4d8bff 48%,
    #b89bff 72%,
    #f3f6ff 100%
  );
  --grad-brand: linear-gradient(135deg, #00eaff 0%, #7b5cff 100%);

  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-display);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100svh;
  background:
    radial-gradient(1200px 800px at 75% 12%, rgba(123, 92, 255, 0.09), transparent 60%),
    radial-gradient(900px 700px at 12% 88%, rgba(0, 234, 255, 0.07), transparent 60%),
    linear-gradient(180deg, #01020a 0%, #02030f 55%, #010108 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* ============================================================
   Background layers
   ============================================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: -2px;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(123, 160, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 160, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: 0.7;
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  transition: transform 0.3s var(--ease-out);
}

.scan-sweep {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 234, 255, 0.025) 49%,
    rgba(0, 234, 255, 0.05) 50%,
    rgba(0, 234, 255, 0.025) 51%,
    transparent 100%
  );
  background-size: 100% 220%;
  background-position: 0 -120%;
  mix-blend-mode: screen;
  animation: scan 9s linear infinite;
  opacity: 0.35;
}

@keyframes scan {
  0%   { background-position: 0 -120%; }
  100% { background-position: 0 220%; }
}

.orb {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: screen;
  will-change: transform;
}

.orb--violet {
  width: 620px;
  height: 620px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle at 30% 30%, rgba(123, 92, 255, 0.5), rgba(123, 92, 255, 0) 65%);
  animation: orbDrift1 22s var(--ease-in-out) infinite alternate;
}

.orb--cyan {
  width: 540px;
  height: 540px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle at 60% 60%, rgba(0, 234, 255, 0.45), rgba(0, 234, 255, 0) 65%);
  animation: orbDrift2 26s var(--ease-in-out) infinite alternate;
}

@keyframes orbDrift1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-60px, 40px, 0) scale(1.08); }
}

@keyframes orbDrift2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(60px, -50px, 0) scale(1.1); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}

/* ============================================================
   Stage / Layout
   ============================================================ */
.stage {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 5vw, 64px);
  gap: clamp(24px, 4vw, 56px);
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-0);
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 12px rgba(0, 234, 255, 0.08);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ffae;
  box-shadow: 0 0 10px #00ffae, 0 0 22px rgba(0, 255, 174, 0.4);
  animation: pulse 2.2s var(--ease-in-out) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(20px, 3vw, 32px);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Dark halo behind the hero so headline reads cleanly over particles */
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -8%;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(3, 5, 12, 0.78) 0%,
    rgba(3, 5, 12, 0.55) 35%,
    rgba(3, 5, 12, 0.22) 60%,
    rgba(3, 5, 12, 0) 80%
  );
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}

.eyebrow__bracket {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 12vw, 168px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  position: relative;
}

.headline__inner {
  position: relative;
  display: inline-block;
  background: var(--grad-headline);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 2px 18px rgba(3, 5, 12, 0.95))
    drop-shadow(0 0 28px rgba(77, 139, 255, 0.35));
  animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

/* Glitch / chromatic aberration layers (drawn from data-text) */
.headline__inner::before,
.headline__inner::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  mix-blend-mode: screen;
  opacity: 0;
}

.headline__inner::before {
  background: linear-gradient(90deg, var(--cyan), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  transform: translate(0, 0);
}

.headline__inner::after {
  background: linear-gradient(90deg, var(--magenta), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  transform: translate(0, 0);
}

.headline.is-revealed .headline__inner::before,
.headline.is-revealed .headline__inner::after {
  animation: glitch 6.5s steps(1, end) infinite;
}

.headline.is-revealed .headline__inner::after {
  animation-delay: 0.25s;
  animation-duration: 7.2s;
}

@keyframes glitch {
  0%, 92%, 100% { opacity: 0; transform: translate(0, 0); }
  92.5%         { opacity: 0.85; transform: translate(2px, -1px); }
  93%           { opacity: 0.4;  transform: translate(-2px, 1px); }
  93.5%         { opacity: 0.7;  transform: translate(1px, 2px); }
  94%           { opacity: 0;    transform: translate(0, 0); }
  97%           { opacity: 0.6;  transform: translate(-1px, -2px); }
  97.5%         { opacity: 0;    transform: translate(0, 0); }
}

/* Per-letter reveal */
.headline .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotateX(-40deg);
  filter: blur(8px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.85s var(--ease-out),
    filter 0.6s var(--ease-out);
}

.headline .letter.is-in {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  filter: blur(0);
}

.headline .letter--space {
  width: 0.28em;
}

.subheadline {
  margin: 0;
  max-width: 680px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-1);
  letter-spacing: 0.005em;
}

.subheadline__brand {
  display: inline-block;
  font-weight: 700;
  font-size: 1.35em;
  letter-spacing: 0.01em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 234, 255, 0.35));
  vertical-align: -0.06em;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 40px rgba(0, 0, 0, 0.4);
}

.meta__item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: var(--font-mono);
}

.meta__label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meta__value {
  font-size: 13px;
  color: var(--ink-0);
  letter-spacing: 0.05em;
}

.meta__divider {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

/* Reveal-on-load */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer__sep {
  color: var(--ink-3);
  opacity: 0.6;
}

.footer__contact {
  color: var(--ink-2);
  transition: color 0.25s var(--ease-out), text-shadow 0.25s var(--ease-out);
}

.footer__contact:hover,
.footer__contact:focus-visible {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  outline: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .stage {
    padding: 20px 18px;
    gap: 28px;
  }
  .topbar { gap: 10px; }
  .status__label { display: none; }
  .status { padding: 8px 10px; }
  .meta {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
    padding: 12px 16px;
    gap: 12px 18px;
  }
  .meta__divider { display: none; }
  .footer {
    flex-wrap: wrap;
    text-align: center;
    font-size: 11px;
  }
  .grid-overlay { background-size: 36px 36px, 36px 36px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .scan-sweep,
  .orb--violet,
  .orb--cyan,
  .status__dot,
  .headline__inner {
    animation: none !important;
  }
  .headline .letter {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  #bg-canvas { display: none; }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
      radial-gradient(900px 600px at 70% 20%, rgba(123, 92, 255, 0.22), transparent 65%),
      radial-gradient(700px 500px at 20% 80%, rgba(0, 234, 255, 0.18), transparent 65%);
  }
}
