@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #0b0b11;
  --paper: #f8f4ee;
  --accent: #1f6bff;
  --accent-2: #00b894;
  --accent-3: #6c5ce7;
  --muted: #5b5b6a;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(17, 20, 32, 0.1);
  --shadow: 0 24px 60px rgba(14, 14, 28, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f1f5fe 0%, #f8f4ee 40%, #f1efe8 100%);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 420px;
  height: 420px;
  filter: blur(40px);
  opacity: 0.5;
  border-radius: 50%;
  animation: drift 18s ease-in-out infinite;
}

.orb-a {
  background: radial-gradient(circle, rgba(31, 107, 255, 0.85), transparent 60%);
  top: -160px;
  left: -120px;
}

.orb-b {
  background: radial-gradient(circle, rgba(0, 184, 148, 0.65), transparent 60%);
  right: -160px;
  top: 20%;
  animation-delay: 4s;
}

.orb-c {
  background: radial-gradient(circle, rgba(108, 92, 231, 0.6), transparent 60%);
  left: 10%;
  bottom: -180px;
  animation-delay: 8s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.35;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 8vw 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
}

.pill {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

main {
  padding: 0 8vw 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  padding: 40px 0 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: rgba(31, 107, 255, 0.15);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.8rem, 4vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.signal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(31, 107, 255, 0.3);
  animation: pulse 2s infinite;
}

.section {
  padding: 40px 0;
}

.section-header {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}

.section h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
}

/* ── Features ── */

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.feature-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ── Example card ── */

.example-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(17, 20, 32, 0.1);
  display: grid;
  gap: 0;
}

.example-card > h3 {
  margin-bottom: 12px;
}

.example-body {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 12px;
  align-items: stretch;
}

/* ── Code editor block ── */

.code-block {
  background: #1e1e2e;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #181825;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
  margin-left: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #6c7086;
  letter-spacing: 0.03em;
}

.code-lines {
  margin: 0;
  padding: 12px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1;
  overflow: auto;
  flex: 1;
  counter-reset: line-number;
  white-space: pre;
  color: #cdd6f4;
}

.code-lines .line {
  display: block;
  counter-increment: line-number;
  padding: 0 16px 0 0;
}

.code-lines .line::before {
  content: counter(line-number);
  display: inline-block;
  width: 3.2em;
  padding-right: 1em;
  text-align: right;
  color: #45475a;
  user-select: none;
  -webkit-user-select: none;
}

/* Syntax colours (Catppuccin Mocha inspired) */
.cm { color: #6c7086; }        /* comments */
.yw { color: #89b4fa; font-weight: 600; }  /* YW annotations */
.kw { color: #cba6f7; }        /* keywords */
.fn { color: #89dceb; }        /* functions */
.st { color: #a6e3a1; }        /* strings */
.nu { color: #fab387; }        /* numbers */

/* ── Views panel ── */

.views-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.views-panel h4 {
  font-size: 0.85rem;
  color: var(--muted);
}

.view-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(17, 20, 32, 0.12);
  background: #fff;
  padding: 10px;
  flex: 1;
  display: flex;
  align-items: center;
}

.view-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ── Combined view row ── */

.combined-row {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.combined-row h4 {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Footer ── */

footer {
  padding: 24px 8vw 40px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Reveal animations ── */

section, header, footer, .feature-item, .example-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.reveal, header.reveal, footer.reveal, .feature-item.reveal, .example-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 24px 6vw 16px;
  }

  main {
    padding: 0 6vw 70px;
  }

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