*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06070a;
  --bg-elevated: #0e1016;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f5f7;
  --text-secondary: #9ca3b8;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-3: #c084fc;
  --glow-teal: rgba(94, 234, 212, 0.2);
  --glow-indigo: rgba(129, 140, 248, 0.15);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1180px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background layers */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(94, 234, 212, 0.08), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(129, 140, 248, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(192, 132, 252, 0.06), transparent 55%);
  animation: meshShift 18s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1.05); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Shell */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.site-nav .nav-cta {
  margin-left: 0.35rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  color: var(--bg);
  box-shadow: 0 4px 20px var(--glow-teal);
  transform: translateY(-1px);
}

/* Hero */
main {
  padding-bottom: 5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: min(85vh, 780px);
  padding: 2rem 0 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.line-accent {
  position: relative;
  white-space: nowrap;
}

.line-accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.12em;
  width: 100%;
  height: 0.35em;
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.35), rgba(129, 140, 248, 0.25));
  border-radius: 2px;
  z-index: -1;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 42ch;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Form */
.notify-form {
  max-width: 28rem;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 50px -20px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input-wrap:focus-within {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.1),
    0 0 40px -10px var(--glow-teal),
    0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

.notify-form input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
}

.notify-form input::placeholder {
  color: var(--text-secondary);
}

.notify-form button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06070a;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.notify-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--glow-teal);
}

.notify-form button svg {
  transition: transform 0.2s var(--ease-out);
}

.notify-form button:hover svg {
  transform: translateX(3px);
}

.form-hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  min-height: 1.25em;
  color: var(--accent);
}

.form-hint.error {
  color: #f87171;
}

.trust-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.trust-line svg {
  opacity: 0.6;
  flex-shrink: 0;
}

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: orbitSpin 24s linear infinite;
}

.orbit-1 {
  width: 320px;
  height: 320px;
  border-color: rgba(94, 234, 212, 0.12);
}

.orbit-2 {
  width: 400px;
  height: 400px;
  border-style: dashed;
  border-color: rgba(129, 140, 248, 0.1);
  animation-duration: 36s;
  animation-direction: reverse;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.code-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 340px);
  background: rgba(14, 16, 22, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.7),
    0 0 60px -20px var(--glow-indigo);
  animation: floatPanel 6s ease-in-out infinite;
}

@keyframes floatPanel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.code-panel-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-panel-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.code-block {
  padding: 1.25rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
}

.tok-keyword { color: #c084fc; }
.tok-name { color: #5eead4; }
.tok-prop { color: #93c5fd; }
.tok-string { color: #fcd34d; }

.cursor-blink {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.float-card {
  position: absolute;
  z-index: 3;
  padding: 0.65rem 1rem;
  background: rgba(14, 16, 22, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.float-card-1 {
  top: 8%;
  right: -4%;
  animation: floatCard 5s ease-in-out infinite;
}

.float-card-2 {
  bottom: 12%;
  left: -6%;
  animation: floatCard 5s ease-in-out 1.5s infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.float-value {
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Marquee */
.marquee {
  overflow: hidden;
  padding: 1.5rem 0;
  border-block: 1px solid var(--border);
  margin-bottom: 4rem;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.marquee-track .sep {
  color: var(--accent);
  opacity: 0.5;
  font-size: 0.5rem;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Bento */
.section-head {
  margin-bottom: 2rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 20ch;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}

.bento-card:hover {
  border-color: rgba(94, 234, 212, 0.2);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.bento-large {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.bento-wide {
  grid-column: span 2;
  padding: 1.5rem 2rem;
}

.bento-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.bento-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.bento-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.bento-stat {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.bento-metrics {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  gap: 1rem;
}

.metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.metric-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-brand .logo-text {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 28ch;
}

.footer-meta {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-meta a {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-meta a:hover {
  color: var(--accent);
}

.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;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: 300px;
  }

  .float-card-1 { right: 0; }
  .float-card-2 { left: 0; }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-large,
  .bento-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .bento-metrics {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .input-wrap {
    flex-direction: column;
    padding: 0.5rem;
  }

  .notify-form button {
    justify-content: center;
    width: 100%;
  }

  .orbit-1 { width: 260px; height: 260px; }
  .orbit-2 { width: 320px; height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }
}
