/* Megagentic — coming-soon page */
:root {
  --bg: #f6f5f1;
  --bg-elev: #ffffff;
  --text: #14161b;
  --text-2: #4a4f5a;
  --text-3: #767b86;
  --border: #e2dfd7;
  --border-strong: #cfcbc1;
  --accent: #e0572a;
  --accent-hover: #c8461b;
  --accent-soft: #fbe6dc;
  --accent-ink: #9e3510;
  --signal: #14a06a;
  --trace: rgba(20, 22, 27, .10);
  --dot: rgba(20, 22, 27, .09);
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e12; --bg-elev: #14171d;
    --text: #eef0f3; --text-2: #aab0bb; --text-3: #7e8592;
    --border: #232730; --border-strong: #323744;
    --accent: #ff6a3a; --accent-hover: #ff8358; --accent-soft: rgba(255,106,58,.13); --accent-ink: #ffa17f;
    --signal: #2fd08e;
    --trace: rgba(255, 255, 255, .08);
    --dot: rgba(255, 255, 255, .06);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 20%, transparent 80%);
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Background traces */
.traces { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.trace-set path {
  fill: none; stroke: var(--trace); stroke-width: 2; stroke-linejoin: round;
  stroke-dasharray: 900; stroke-dashoffset: 900; animation: route 2.6s ease-out forwards;
}
.trace-set path:nth-child(2n) { animation-delay: .25s; }
.trace-set path:nth-child(3n) { animation-delay: .5s; }
.pads circle { fill: var(--bg); stroke: var(--trace); stroke-width: 2; opacity: 0; animation: fade .6s 2s forwards; }
.pulses circle { fill: var(--accent); opacity: .75; filter: drop-shadow(0 0 4px var(--accent)); }
@keyframes route { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Layout */
.page {
  position: relative; z-index: 1; min-height: 100%;
  display: grid; grid-template-rows: auto 1fr auto;
  max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px);
}
.top { display: flex; align-items: center; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.2rem/1 var(--font-display); letter-spacing: -0.02em; }

.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 64px; }
.mark { width: 84px; height: 84px; margin-bottom: 28px; filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--accent) 35%, transparent)); }
.mark svg { width: 100%; height: 100%; display: block; }
.mark .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s .3s ease-in-out forwards; }
.mark .pad { opacity: 0; transform-origin: center; transform-box: fill-box; animation: pop .35s ease-out forwards; }
.mark .pad-a { animation-delay: .25s; }
.mark .pad-c { animation-delay: 1s; }
.mark .pad-b { animation-delay: 1.65s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }

.badge {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
  font: 500 .78rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

h1 {
  margin: 0; max-width: 14ch;
  font: 700 clamp(2.6rem, 7vw, 5rem)/1.02 var(--font-display); letter-spacing: -0.04em;
}
h1 .accent { color: var(--accent); }
.lead { margin: 24px 0 0; max-width: 44ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); }

.progress { width: min(360px, 100%); margin: 40px 0 36px; }
.bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.bar span {
  display: block; height: 100%; width: 38%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #f0a13a));
  animation: slide 2.4s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(270%); } }
.status { margin: 12px 0 0; font: 500 .82rem var(--font-mono); color: var(--text-3); }
.status .mono { color: var(--signal); }
.status .mono::after { content: " ›"; color: var(--text-3); }
#status-text { display: inline-block; transition: opacity .25s, transform .25s; }
#status-text.swap { opacity: 0; transform: translateY(-4px); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 11px;
  background: var(--accent); color: #fff; font: 600 1rem/1 var(--font-body);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px -8px color-mix(in srgb, var(--accent) 75%, transparent);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding: 22px 0 28px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--text-3);
}
.foot p { margin: 0; }
.foot a:hover { color: var(--text); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .mark { width: 68px; height: 68px; }
  .foot { justify-content: center; text-align: center; }
  .trace-set, .pads, .pulses { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .trace-set path { stroke-dashoffset: 0; }
  .pads circle, .mark .pad { opacity: 1; }
  .mark .draw { stroke-dashoffset: 0; }
  .pulses { display: none; }
}

/* Soft halo so background traces fade out behind the headline */
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 50%; width: min(900px, 120%); height: 115%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--bg) 62%, transparent);
}
