:root {
  --bg: #06110c;
  --bg-2: #0b1a13;
  --surface: rgba(14, 32, 24, 0.72);
  --line: rgba(132, 190, 158, 0.18);
  --text: #edf7f1;
  --muted: #9bb5a8;
  --accent: #3dd68c;
  --accent-2: #7ef0b5;
  --ink: #04140c;
  --display: "Syne", sans-serif;
  --sans: "Instrument Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 70% at 80% 10%, rgba(61, 214, 140, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(20, 90, 60, 0.35), transparent 50%),
    linear-gradient(160deg, #06110c 0%, #0a1a14 45%, #07130e 100%);
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.topbar,
.hero,
.about,
.how,
.plans,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 28px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark-img {
  display: block;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.logo-mark-img.small {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.logo-mark-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.logo-mark-link:hover .logo-mark-img,
.logo:hover .logo-mark-img {
  filter: brightness(1.05);
}

.logo-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.top-nav a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--ink) !important;
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 72px;
}

.hero-copy {
  animation: rise 900ms ease both;
}

.brand-lockup {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #f4fff8 20%, var(--accent) 55%, #9dffc9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lede {
  margin: 18px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #24b871);
  color: var(--ink);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(61, 214, 140, 0.08);
}

.hero-demo {
  animation: floatIn 1100ms 120ms ease both;
}

.demo-frame {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 38, 28, 0.95), rgba(8, 20, 14, 0.98));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(61, 214, 140, 0.05),
    0 0 60px rgba(61, 214, 140, 0.08);
  animation: drift 8s ease-in-out infinite;
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.demo-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a4f45;
}

.demo-chrome span:nth-child(1) { background: #ff6b6b; }
.demo-chrome span:nth-child(2) { background: #f0c674; }
.demo-chrome span:nth-child(3) { background: #3dd68c; }

.demo-chrome p {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.demo-body {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 340px;
}

.demo-sidebar,
.demo-output {
  padding: 16px;
}

.demo-sidebar {
  border-right: 1px solid var(--line);
}

.demo-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-fields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.demo-fields li {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.demo-fields li.active {
  color: var(--text);
  background: rgba(61, 214, 140, 0.12);
  border-color: rgba(61, 214, 140, 0.35);
}

.demo-cta-chip {
  margin-top: 14px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #24b871);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  animation: pulse 2.4s ease-in-out infinite;
}

.demo-json {
  margin: 0;
  min-height: 180px;
  padding: 12px;
  border-radius: 10px;
  background: #050d09;
  border: 1px solid var(--line);
  color: #b7f5d2;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow: hidden;
}

.demo-endpoint {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.demo-endpoint .method {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.demo-endpoint code {
  font-size: 0.75rem;
  color: var(--muted);
}

.about,
.how,
.plans {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 28px 24px;
}

.section-inner {
  max-width: 720px;
  animation: rise 700ms ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about h2,
.how h2,
.plans h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}

.plans-inner {
  animation: rise 700ms ease both;
}

.plans-lede {
  margin: 0 0 32px;
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.plan-card.gloss {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 26px 24px 24px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(180, 230, 200, 0.22);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 38%, transparent 62%),
    linear-gradient(180deg, rgba(22, 48, 36, 0.88), rgba(8, 22, 15, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(61, 214, 140, 0.04);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.plan-card.gloss:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 240, 181, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 28px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(61, 214, 140, 0.12);
}

.plan-card-shine {
  pointer-events: none;
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(
    ellipse 70% 55% at 30% 20%,
    rgba(255, 255, 255, 0.22),
    rgba(126, 240, 181, 0.08) 40%,
    transparent 70%
  );
  z-index: 0;
}

.plan-card.gloss > *:not(.plan-card-shine) {
  position: relative;
  z-index: 1;
}

.plan-card.featured {
  border-color: rgba(61, 214, 140, 0.45);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.14) 0%, rgba(61, 214, 140, 0.08) 36%, transparent 62%),
    linear-gradient(180deg, rgba(28, 62, 46, 0.95), rgba(10, 28, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 56px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(61, 214, 140, 0.14);
}

.plan-badge {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent), #7ef0b5);
  box-shadow: 0 4px 16px rgba(61, 214, 140, 0.35);
}

.plan-tier {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-price {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, #f4fff8 10%, var(--accent) 70%, #9dffc9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-price span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.plan-blurb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 2.7em;
}

.plan-benefits {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  flex: 1;
}

.plan-benefits li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
}

.plan-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #9dffc9, var(--accent));
  box-shadow: 0 0 10px rgba(61, 214, 140, 0.55);
}

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 13px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.15s, filter 0.15s, background 0.15s, border-color 0.15s;
}

.plan-cta-primary {
  color: var(--ink);
  background: linear-gradient(135deg, #7ef0b5, var(--accent) 45%, #24b871);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 24px rgba(61, 214, 140, 0.28);
}

.plan-cta-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.plan-cta-ghost {
  color: var(--text);
  border: 1px solid rgba(180, 230, 200, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-cta-ghost:hover {
  border-color: rgba(126, 240, 181, 0.45);
  background: rgba(61, 214, 140, 0.1);
}

.plans-footnotes {
  margin-top: 28px;
  max-width: 40rem;
}

.plans-footnotes p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.plans-footnotes a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.plans-footnotes a:hover {
  text-decoration: underline;
}

.about p,
.how .steps span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.about strong {
  color: var(--text);
}

.steps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  gap: 4px;
  padding: 16px 16px 16px 58px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(61, 214, 140, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.steps strong {
  color: var(--text);
  font-size: 1rem;
}

.footer {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 36px 28px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.footer .site-legal {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 4px;
}

.ad-strip {
  max-width: 720px;
  margin: 0 auto 28px;
  padding: 16px 20px;
  text-align: center;
}

.ad-strip[hidden] {
  display: none !important;
}

.ad-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.ad-hint a {
  color: var(--accent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  justify-self: start;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  justify-self: end;
}

.footer-app-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s, transform 0.15s;
}

.social-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.footer > .product-of-link {
  justify-self: center;
}

.product-of-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  opacity: 0.95;
  transition: opacity 0.15s, transform 0.15s;
}

.product-of-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.product-of-logo {
  display: block;
  height: 36px;
  width: auto;
}

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(61, 214, 140, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-demo {
    animation: none !important;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .brand-lockup {
    font-size: clamp(3rem, 18vw, 4.5rem);
  }

  .hero h1 {
    max-width: none;
  }

  .demo-body {
    grid-template-columns: 1fr;
  }

  .demo-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .plan-blurb {
    min-height: 0;
  }

  .top-nav a:not(.nav-cta):not(.nav-signin) {
    display: none;
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-brand,
  .footer-actions,
  .footer > .product-of-link,
  .footer .site-legal {
    justify-self: center;
  }

  .footer-actions {
    justify-content: center;
  }

  .footer-brand {
    flex-direction: column;
  }
}
