/* ---------------------------------------------------------------
   Pfinstig — teaser page styles
   All fonts and assets are self-hosted (see assets/fonts) — no
   third-party requests are made by this page.
------------------------------------------------------------------ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08080d;
  --bg-elevated: #0f0f18;
  --fg: #f4f3f8;
  --fg-muted: #a5a3b3;
  --accent-1: #7c5cff;
  --accent-2: #22d3c9;
  --border: rgba(244, 243, 248, 0.1);
  --focus: #9c8bff;
  --font-display:
    "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f7fb;
    --bg-elevated: #ffffff;
    --fg: #16151d;
    --fg-muted: #5c5a6b;
    --border: rgba(22, 21, 29, 0.1);
  }
}

* {
  box-sizing: border-box;
}

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

html {
  color-scheme: dark light;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* --- Ambient background -------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background: var(--bg);
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  width: min(60vw, 640px);
  height: min(60vw, 640px);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}

.backdrop::before {
  top: -10%;
  left: -10%;
  background: var(--accent-1);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.backdrop::after {
  bottom: -15%;
  right: -10%;
  background: var(--accent-2);
  animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(6%, 8%) scale(1.15);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-8%, -6%) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop::before,
  .backdrop::after {
    animation: none;
  }
}

/* --- Layout ----------------------------------------------------- */

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

header.site {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: block;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

main.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent);
}

h1.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 7rem);
  /* line-height > 1 so background-clip: text has room to paint descenders
     (e.g. the "g"); the negative margins pull the extra leading back in
     so the line still sits as tight as line-height: 1 would visually. */
  line-height: 1.2;
  margin: calc((1 - 1.2) * 0.5em) 0;
  letter-spacing: -0.03em;
  background: linear-gradient(
    120deg,
    var(--fg) 40%,
    var(--accent-1) 75%,
    var(--accent-2) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--fg-muted);
}

.tagline strong {
  color: var(--fg);
  font-weight: 600;
}

/* --- Waitlist form ----------------------------------------------- */

.waitlist {
  margin-top: 2.5rem;
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 420px;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.waitlist input[type="email"]::placeholder {
  color: var(--fg-muted);
}

.waitlist input[type="email"]:focus-visible,
.waitlist button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.waitlist button {
  flex: 0 0 auto;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: #0b0b12;
  background: linear-gradient(120deg, var(--accent-2), var(--accent-1));
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.waitlist button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px
    color-mix(in srgb, var(--accent-1) 60%, transparent);
}

.waitlist button:active {
  transform: translateY(0);
}

.form-status {
  min-height: 1.4em;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--accent-2);
}

.form-status[hidden] {
  display: none;
}

footer.site {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.8rem;
  padding-top: 1.5rem;
}
