/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a12;
  --bg-soft: #0f1020;
  --surface: #14152a;
  --surface-2: #1a1c33;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --fg: #f4f4f8;
  --fg-dim: #b4b4c5;
  --fg-mute: #7a7a92;

  --accent: #22d3ee;       /* cyan */
  --accent-2: #a855f7;     /* violet */
  --accent-3: #f472b6;     /* pink */
  --accent-glow: color-mix(in oklab, var(--accent) 60%, transparent);

  --gradient: linear-gradient(
    100deg,
    #67e8f9 0%,
    #a855f7 45%,
    #f472b6 100%
  );

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #e0e0ea;
}

::selection {
  background: color-mix(in oklab, var(--accent) 40%, transparent);
  color: white;
}

/* ---------- Accessibility ---------- */
.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;
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 8px;
  z-index: 100;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* ---------- Background atmosphere ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    transparent 75%
  );
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    transparent 75%
  );
}

.bg-glow {
  position: fixed;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 120vw);
  height: 800px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      40% 60% at 30% 40%,
      rgba(34, 211, 238, 0.22) 0%,
      transparent 60%
    ),
    radial-gradient(
      40% 60% at 70% 50%,
      rgba(168, 85, 247, 0.22) 0%,
      transparent 60%
    ),
    radial-gradient(
      30% 50% at 50% 60%,
      rgba(244, 114, 182, 0.18) 0%,
      transparent 65%
    );
  filter: blur(20px);
}

/* ---------- Layout primitives ---------- */
.site-header,
main > section,
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 28px;
  height: 28px;
}

.logo-word {
  font-size: 18px;
}

.logo-dim {
  color: var(--accent);
}

.logo-word.small {
  font-size: 15px;
  color: var(--fg-dim);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.nav-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-cta:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 540px) {
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(48px, 9vw, 120px) clamp(40px, 7vw, 80px);
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
}

.headline {
  font-size: clamp(44px, 7.5vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shimmer 8s ease-in-out infinite;
}

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

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--fg-dim);
  max-width: 56ch;
  margin: 0 0 32px;
}

.microcopy {
  margin: 14px 0 0;
  color: var(--fg-mute);
  font-size: 13px;
}

/* ---------- Forms ---------- */
.signup-form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 520px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.signup-form:focus-within {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  background: rgba(34, 211, 238, 0.04);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 15%, transparent);
}

.signup-form input[type="email"] {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--fg);
  outline: none;
  min-width: 0;
}

.signup-form input[type="email"]::placeholder {
  color: var(--fg-mute);
}

.signup-form button {
  appearance: none;
  border: 0;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #0a0a12;
  background: linear-gradient(180deg, #ffffff 0%, #d8dbe6 100%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 6px 20px -8px rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.signup-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.signup-form button:active {
  transform: translateY(0);
}

.signup-form button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.signup-form button:hover .btn-arrow {
  transform: translateX(2px);
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 6px;
  font-size: 13px;
  color: var(--fg-mute);
  min-height: 1.2em;
}

.form-status.is-error {
  color: #fca5a5;
}

.form-status.is-success {
  color: #86efac;
}

@media (max-width: 480px) {
  .signup-form {
    grid-template-columns: 1fr;
  }
  .signup-form button {
    justify-content: center;
  }
}

/* ---------- Demo window ---------- */
.hero-demo {
  perspective: 1200px;
}

.demo-window {
  background: linear-gradient(
    180deg,
    rgba(20, 21, 42, 0.85) 0%,
    rgba(15, 16, 32, 0.85) 100%
  );
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 -2px 0 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(8px);
  transform: rotateX(2deg) rotateY(-3deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .demo-window:hover {
    transform: rotateX(0) rotateY(0);
  }
}

@media (max-width: 920px) {
  .demo-window { transform: none; }
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 100%
  );
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a4f;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.demo-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

.demo-body {
  padding: 22px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(6px);
  animation: bubble-in 0.4s ease forwards;
}

@keyframes bubble-in {
  to { opacity: 1; transform: translateY(0); }
}

.bubble.user {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.25);
  color: #d6f7fb;
  border-bottom-right-radius: 6px;
}

.bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border-bottom-left-radius: 6px;
}

.bubble.bot code,
.bubble.user code {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

.bubble.bot strong {
  color: var(--fg);
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-mute);
  animation: typing 1.2s ease-in-out infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* ---------- Values ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-block: clamp(40px, 6vw, 80px);
}

@media (max-width: 880px) {
  .values { grid-template-columns: 1fr; }
}

.value {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.value:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.value-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--accent);
  margin-bottom: 18px;
}

.value-icon svg {
  width: 20px;
  height: 20px;
}

.value h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 10px;
}

.value p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Manifesto ---------- */
.manifesto {
  text-align: center;
  padding-block: clamp(60px, 8vw, 120px);
  max-width: 780px;
}

.manifesto-eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.manifesto-headline {
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.1;
}

.manifesto-body {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg-dim);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 60ch;
}

/* ---------- Signup section ---------- */
.signup {
  padding-block: clamp(40px, 6vw, 100px);
}

.signup-card {
  position: relative;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      120% 100% at 0% 0%,
      rgba(34, 211, 238, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      120% 100% at 100% 100%,
      rgba(168, 85, 247, 0.1) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, rgba(20, 21, 42, 0.5) 0%, rgba(20, 21, 42, 0.2) 100%);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.signup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.signup-headline {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.15;
  max-width: 18ch;
}

.signup-sub {
  margin: 0 0 28px;
  color: var(--fg-dim);
  font-size: 17px;
  max-width: 56ch;
}

.signup-perks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.signup-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-dim);
}

.signup-perks svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: none;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 40px 60px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-meta {
  margin: 0;
  font-size: 13px;
  color: var(--fg-mute);
  max-width: 50ch;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .demo-window {
    transform: none;
  }
}
