/* Static landing content rendered before (and for crawlers, instead of) the app bundle.
   Same two reading colours as docs.css: #a6adc8 for prose, #cdd6f4 for headings
   and emphasis. Keep them in step so landing -> /docs does not shift tone. */
#landing {
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #a6adc8;
  background: #1e1e2e;
  min-height: 100vh;
  padding: 3rem 1.25rem 4rem;
}
#landing > div { max-width: 44rem; margin: 0 auto; }
#landing h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; color: #cdd6f4; }
#landing h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; color: #cdd6f4; }
#landing strong { color: #cdd6f4; }
#landing p { margin: 0 0 1rem; }
#landing a { color: #89b4fa; }
#landing ul { padding-left: 1.25rem; margin: 0 0 1rem; }
#landing li { margin: 0.25rem 0; }
#landing code { background: #313244; padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
#landing nav { font-size: 0.9rem; margin-bottom: 2rem; }
#landing nav a { margin-right: 1rem; }
#landing .cta {
  display: inline-block; margin: 0.5rem 0 1.5rem; padding: 0.6rem 1.1rem;
  background: #89b4fa; color: #1e1e2e; border-radius: 6px; font-weight: 600; text-decoration: none;
}
#landing img.shot {
  display: block; width: 100%; height: auto; margin: 0 0 2rem;
  border: 1px solid #313244; border-radius: 8px;
}
#landing footer { margin-top: 3rem; font-size: 0.85rem; }
#landing nav.languages { font-size: 0.8rem; margin-top: -1.5rem; }
/* The language row is pulled up under the client nav; with no nav above it,
   it is the first thing on the page and sits where it is. */
#landing > div > nav.languages:first-child { margin-top: 0; }
#landing nav.languages a[aria-current] { font-weight: 600; text-decoration: none; }

/* Intent landing pages ---------------------------------------------------- */
#landing .architecture {
  display: grid; gap: 0.5rem; justify-items: center; margin: 1.25rem 0 2rem;
}
#landing .architecture-step {
  width: min(100%, 22rem); padding: 0.65rem 1rem; text-align: center;
  border: 1px solid #45475a; border-radius: 8px; background: #181825;
}
#landing .architecture-arrow { color: #89b4fa; font-size: 1.35rem; line-height: 1; }
#landing .comparison-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
#landing table.comparison { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 0.9rem; }
#landing .comparison th, #landing .comparison td {
  padding: 0.7rem; border: 1px solid #313244; text-align: left; vertical-align: top;
}
#landing .comparison thead th { color: #cdd6f4; background: #181825; }
#landing .comparison tbody th { width: 22%; color: #cdd6f4; }

/* Pricing page ------------------------------------------------------------ */
/* The billing switch is CSS only (no inline script is allowed by the CSP), so
   the radios sit before the cards and drive them through sibling selectors.
   Off-screen rather than display:none, to stay keyboard-reachable. */
#landing .billing-switch > input { position: absolute; left: -9999px; }
#landing .segmented {
  display: inline-flex; align-items: center; gap: 0.2rem;
  vertical-align: middle; margin: 0 0 1.5rem; padding: 0.25rem 0.3rem;
  border: 1px solid #313244; border-radius: 999px; background: #181825;
}
#landing .segmented label {
  cursor: pointer; padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: #a6adc8; user-select: none;
}
#landing #billing-annual:checked ~ .segmented label[for="billing-annual"],
#landing #billing-monthly:checked ~ .segmented label[for="billing-monthly"] { background: #89b4fa; color: #1e1e2e; }
/* Outside the pill: inside it, the discount read as a third, disabled option. */
#landing .billing-switch .save {
  display: inline-block; vertical-align: middle; margin: 0 0 1.5rem 0.75rem;
  font-size: 0.8rem; font-weight: 600; color: #a6e3a1;
}
#landing #billing-monthly:checked ~ .save { opacity: 0.35; }
#landing .billing-switch > input:focus-visible ~ .segmented { outline: 2px solid #89b4fa; outline-offset: 2px; }

#landing .plans { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 0 0 1rem; }
#landing .plan {
  display: flex; flex-direction: column;
  border: 1px solid #313244; border-radius: 12px; padding: 1.5rem; background: #181825;
}
#landing .plan.featured { border-color: #89b4fa; box-shadow: inset 0 0 0 1px #89b4fa; }
#landing .plan-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
#landing .plan h2 { margin: 0; font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; }
#landing .plan .badge {
  border-radius: 999px; background: #89b4fa; color: #1e1e2e;
  padding: 0.12rem 0.55rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
}
#landing .plan .price { font-size: 2.4rem; line-height: 1; font-weight: 600; color: #cdd6f4; margin: 0 0 0.4rem; }
#landing .plan .price .per { font-size: 0.9rem; font-weight: 400; color: #a6adc8; margin-left: 0.35rem; }
/* A minimum height keeps the two cards' feature lists on the same line. */
#landing .plan .billing-note { font-size: 0.85rem; margin: 0 0 1.4rem; min-height: 1.4em; }
#landing .plan ul { list-style: none; padding: 0; margin: 0 0 1.6rem; font-size: 0.93rem; }
#landing .plan li { position: relative; padding-left: 1.45rem; margin: 0.5rem 0; }
#landing .plan li::before { content: "\2713"; position: absolute; left: 0; color: #a6e3a1; font-weight: 700; }
#landing .plan .cta { display: block; margin: auto 0 0; text-align: center; }
#landing .plan:not(.featured) .cta { background: transparent; color: #89b4fa; border: 1px solid #45475a; }

/* One billing period is shown at a time; annual is the default. */
#landing .plans .monthly { display: none; }
#landing #billing-monthly:checked ~ .plans .annual { display: none; }
#landing #billing-monthly:checked ~ .plans p.monthly { display: block; }
#landing #billing-monthly:checked ~ .plans a.monthly { display: block; }

@media (max-width: 40rem) { #landing .plans { grid-template-columns: 1fr; } }

/* Until the app's stylesheet lands, the browser's default 8px body margin shows
   the white canvas as a frame around the dark page. Tailwind's preflight sets
   the same thing once the bundle is up, so this only covers the gap. */
body { margin: 0; }
/* Pages that ship without the app bundle never get that stylesheet. */
body.static { background: #1e1e2e; }

/* Shown from first paint and removed by `landing-fallback.ts` — either when the
   app is on screen, or, if it never paints, when the static copy comes back. */
#boot {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: #1e1e2e; color: #a6adc8;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Pricing FAQ: <details> so it collapses without a line of script. */
#landing details {
  border-bottom: 1px solid #313244;
  padding: 0.75rem 0;
}
#landing details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #cdd6f4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#landing details summary::-webkit-details-marker { display: none; }
#landing details summary::before {
  content: "+";
  width: 1rem;
  flex: none;
  color: #89b4fa;
  font-weight: 400;
}
#landing details[open] summary::before { content: "\2013"; }
#landing details p { margin: 0.6rem 0 0 1.5rem; }
