/* flow-lang landing page styles. Dark theme to match the editor's
   Cloudscape dark mode and the docs site. Hand-rolled CSS - no
   framework - so the landing page stays light-weight and indexable. */

:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --bg-card: #161b22;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #30363d;
  --code-bg: #1e2937;
  --code-fg: #e6edf3;
  --kw: #ff7b72;
  --ty: #d2a8ff;
  --str: #a5d6ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* Nebula backdrop. Three soft radial gradients layered over a deep
   navy base, fixed against the viewport so the haze stays put on
   scroll. Saturations are intentionally low - the gradients are
   atmosphere, not focus. Cloudscape / docs cards paint opaque
   panels over the top so prose stays readable. */
body {
  background-color: #07080d;
  background-image:
    radial-gradient(
      ellipse 70% 55% at 18% 12%,
      rgba(99, 102, 241, 0.18),
      transparent 65%
    ),
    radial-gradient(
      ellipse 65% 50% at 85% 25%,
      rgba(217, 70, 239, 0.12),
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 60% at 50% 95%,
      rgba(59, 130, 246, 0.14),
      transparent 65%
    ),
    radial-gradient(
      ellipse 50% 40% at 75% 80%,
      rgba(34, 197, 94, 0.06),
      transparent 70%
    );
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
}

p code,
li code,
.caption code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 8, 13, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-size: 16px;
}

.site-header .brand:hover {
  text-decoration: none;
}

.site-header nav a {
  margin-left: 20px;
  color: var(--fg-muted);
}

.site-header nav a:hover {
  color: var(--fg);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.hero {
  text-align: center;
  padding: 32px 0 56px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.hero .lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta a {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.05s ease;
}

.cta a:hover {
  text-decoration: none;
}

.cta .primary {
  background: var(--accent);
  color: #ffffff;
}

.cta .primary:hover {
  background: var(--accent-hover);
}

.cta .secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.cta .secondary:hover {
  background: var(--bg-alt);
}

section h2 {
  font-size: 28px;
  margin: 56px 0 24px;
  letter-spacing: -0.01em;
}

.notice {
  margin: 48px 0 16px;
  padding: 20px 24px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-left-width: 4px;
  border-radius: 6px;
}

.notice h2 {
  font-size: 17px;
  margin: 0 0 10px;
  color: #fdba74;
  letter-spacing: 0;
}

.notice p {
  margin: 0 0 10px;
  color: var(--fg-muted);
  font-size: 14px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice a {
  color: #fdba74;
}

.notice a:hover {
  color: #fed7aa;
}

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

.why-grid article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
}

.why-grid h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--fg);
}

.why-grid p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.example pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 20px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
}

.example .kw {
  color: var(--kw);
}

.example .ty {
  color: var(--ty);
}

.example .str {
  color: var(--str);
}

.caption {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
}

.cta-bottom {
  text-align: center;
  margin-top: 64px;
}

.cta-bottom a {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 16px;
  background: var(--accent);
  color: #ffffff;
}

.cta-bottom a:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 32px;
}

footer strong {
  color: var(--fg);
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero .lede {
    font-size: 16px;
  }
  .example-grid {
    grid-template-columns: 1fr;
  }
}
