/* Brand palette from the Synaptifi AI brand guide */
:root {
  --green: #00a86b;
  --lime: #d1e751;
  --black: #000000;
  --ink: #050807;
  --fg: #eef3ee;
  --muted: #8a978f;
  --line: rgb(238 243 238 / 0.12);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

.glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42rem;
  height: 42rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(0 168 107 / 0.22),
    rgb(209 231 81 / 0.06) 45%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
}

.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.caps {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.muted {
  color: var(--muted);
}

.bar {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

header.bar .mono {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 2rem;
  height: 2rem;
}

.brand b {
  color: var(--green);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(5 8 7 / 0.6);
  backdrop-filter: blur(8px);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lime);
}

.dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lime);
  animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.75rem, 14vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

#coming-soon {
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#coming-soon:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 8px;
}

#coming-soon em {
  background: linear-gradient(90deg, var(--green), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

.lede {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.meter {
  display: flex;
  gap: 0.375rem;
  margin-top: 3rem;
}

.meter span {
  width: 1.5rem;
  height: 0.25rem;
  border-radius: 999px;
  background: rgb(238 243 238 / 0.1);
  transition: background 0.3s;
}

.meter span.on {
  background: var(--lime);
}

footer.bar {
  flex-wrap: wrap;
}

/* Easter egg popup */
dialog {
  width: min(22rem, calc(100% - 2rem));
  padding: 2.5rem 1.5rem 2rem;
  border: 1px solid rgb(0 168 107 / 0.5);
  border-radius: 1rem;
  background: #0b110e;
  color: var(--fg);
  text-align: center;
  box-shadow: 0 0 80px rgb(0 168 107 / 0.25);
}

dialog[open] {
  animation: pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1.2);
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
}

dialog h2 {
  margin: 0.5rem 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.25rem;
}

dialog p {
  margin: 0;
}

.wave {
  font-size: 3rem;
}

.close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.close:hover {
  color: var(--fg);
  background: rgb(238 243 238 / 0.08);
}

/* Neural field */
.edge {
  stroke: var(--fg);
  stroke-opacity: 0.07;
}

.pulse {
  stroke: var(--lime);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 6 394;
  animation: travel 4s linear infinite;
}

.node {
  fill: var(--green);
  animation: node 3.2s ease-in-out infinite;
}

@media (max-width: 640px) {
  .hide-sm {
    display: none;
  }
  footer.bar {
    justify-content: center;
  }
}

/* Animations */
.rise {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wiggle {
  animation: wiggle 0.25s ease-in-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px) rotate(-0.6deg);
  }
  75% {
    transform: translateX(3px) rotate(0.6deg);
  }
}

@keyframes travel {
  to {
    stroke-dashoffset: -400;
  }
}

@keyframes node {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  dialog[open] {
    animation: none !important;
  }
}
