/* paddock landing page. Static, no build step. Dark only. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #161616;
  --card: #0A0A0A;
  --border: #222222;
  --border-strong: #2E2E2E;
  --fg: #EDEDED;
  --muted: #8F8F8F;
  --deny: #F87171;
  --ok: #4ADE80;
  --btn-secondary: #1A1A1A;
  --radius: 8px;

  --font-display: "Funnel Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 1rem;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--panel);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-block: 0.4rem;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 40px;
  }
}

/* Grid and flex children may shrink so wide code scrolls inside its own box. */
.grid > *,
.panel-top > *,
.panel-sub > *,
.docs > *,
.recipe,
.recipes {
  min-width: 0;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

/* Buttons and pills */

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.85;
}

.btn-primary {
  background: var(--fg);
  color: #000;
}

.btn-secondary {
  background: var(--btn-secondary);
  color: var(--fg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}

.pill:hover {
  color: var(--fg);
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Header */

.site-header .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.wordmark:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-size: 0.875rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

@media (max-width: 639px) {
  .nav .hide-sm {
    display: none;
  }
}

/* Hero */

.hero {
  padding-top: 140px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.05;
  text-wrap: balance;
  margin: 24px auto 20px;
}

.lede {
  max-width: 40ch;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-shot {
  margin: 120px 0 0;
}

.hero-shot picture {
  display: block;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

.caption {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Sections */

.section {
  padding-top: 160px;
}

.section-title {
  text-align: center;
  margin-bottom: 64px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.sub {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 400;
  font-size: inherit;
}

.two-tone {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: left;
}

.two-tone .sub {
  display: block;
  max-width: 34ch;
  color: var(--muted);
  font-size: inherit;
}

/* Cards: computer use and sandboxes */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 64px;
}

@media (min-width: 800px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-art {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--card);
}

.card-art img {
  display: block;
  max-height: 236px;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  object-fit: contain;
}

.card-body {
  padding: 32px;
}

.card-body h3 {
  font-size: 1.0625rem;
  color: var(--fg);
  margin-bottom: 8px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.minis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.mini {
  min-width: 0;
  padding: 12px;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: left;
  overflow-wrap: anywhere;
}

.mini p {
  margin: 0;
}

.mini .name {
  color: var(--fg);
}

.mini .ok {
  color: var(--ok);
}

.mini .deny {
  color: var(--deny);
}

/* Bordered grids: How it works and Everything in a box */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.grid > * {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  background: var(--bg);
}

.grid-steps > * {
  min-height: 260px;
}

.grid-steps .step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.grid-steps p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.grid-steps strong {
  color: var(--fg);
  font-weight: 500;
}

.grid-items > * {
  min-height: 240px;
}

@media (max-width: 799px) {
  .grid-steps > *,
  .grid-items > * {
    min-height: auto;
    gap: 40px;
  }
}

.grid-items .ico {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.grid-items .ico svg {
  display: block;
  width: 28px;
  height: 28px;
}

.grid-items h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.grid-items p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.grid-items code {
  background: var(--panel);
  border-radius: 4px;
  font-size: 0.85em;
}

@media (min-width: 600px) {
  .grid-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .grid-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  .grid-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Big panels */

.panel {
  position: relative;
  margin-inline: 16px;
  padding-block: 96px;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 639px) {
  .panel {
    padding-block: 56px;
  }

  .panel > .wrap {
    padding-inline: 24px;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .panel > .wrap {
    padding-inline: 48px;
  }
}

.panel .codeblock {
  width: 100%;
}

.panel-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .panel-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
  }
}

.panel h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 16px;
}

.panel .lead {
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 32px;
}

.panel-sub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 64px;
  border-top: 1px solid var(--border-strong);
}

.panel-sub > * {
  padding: 40px 0;
}

.panel-sub > * + * {
  border-top: 1px solid var(--border-strong);
}

.panel-sub h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.panel-sub p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .panel-sub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-sub > * {
    padding: 40px;
  }

  .panel-sub > :first-child {
    padding-left: 0;
  }

  .panel-sub > :nth-child(2) {
    padding-right: 0;
    border-top: 0;
    border-left: 1px solid var(--border-strong);
  }
}

/* Closing panel */

.closing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}

.closing > * {
  position: relative;
}

.closing h2 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 32px;
}

/* Install */

.install-block {
  max-width: 760px;
  margin-inline: auto;
}

.install-note {
  color: var(--muted);
  margin: 32px auto 16px;
  text-align: center;
}

.install-more {
  display: block;
  margin-top: 24px;
  text-align: center;
}

.install-intro {
  color: var(--muted);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 32px;
}

.section-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Codeblocks */

.codeblock {
  position: relative;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}

.codeblock pre {
  margin: 0;
  padding: 48px 20px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre;
}

.codeblock pre code {
  font-size: inherit;
  background: none;
  border-radius: 0;
  padding: 0;
  overflow-wrap: normal;
}

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
}

.copy:hover {
  color: var(--fg);
}

/* Footer */

.site-footer {
  padding: 48px 0;
  margin-top: 160px;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

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

/* Docs page */

.docs-head {
  padding-top: 120px;
}

.docs-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.docs-head .lead {
  color: var(--muted);
  max-width: 65ch;
  margin-bottom: 0;
}

.docs-section {
  padding-top: 64px;
}

.docs-section h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 24px;
}

.docs-section h3 {
  font-size: 1.0625rem;
  margin: 40px 0 16px;
}

.docs-section p,
.docs-section li {
  max-width: 65ch;
  color: var(--muted);
}

/* Install steps hold codeblocks, so the step itself must not cap them at 65ch. */
.docs-section ol > li {
  max-width: none;
}

.docs-section ol {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.docs-section ol > li {
  counter-increment: step;
  margin: 0 0 32px;
  padding: 0;
}

.docs-section ol > li > p {
  margin-bottom: 16px;
}

.docs-section ol > li > p:last-child {
  margin-bottom: 0;
}

.docs-section ol > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.docs-section ol > li > p:first-of-type code {
  color: var(--fg);
}

.docs-section ul {
  padding-left: 1.25rem;
}

.docs-section li {
  margin-block: 0.5rem;
}

.docs-section code {
  color: var(--fg);
}

.docs-section .codeblock {
  max-width: 760px;
}

.docs-section ol > li > .codeblock {
  margin-top: 16px;
}

.docs {
  display: grid;
  gap: 2rem;
  margin-top: 40px;
}

.docs > .intro {
  color: var(--muted);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover {
  color: var(--fg);
}

.toc a[aria-current="true"] {
  color: var(--fg);
  border-left-color: var(--fg);
}

.recipe {
  padding-block: 48px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 88px;
}

.recipe:first-child {
  border-top: 0;
  padding-top: 0;
}

.recipe h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.recipe p {
  color: var(--muted);
  max-width: 65ch;
}

.recipe .codeblock {
  margin-bottom: 0;
}

.reference {
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.reference h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.reference ul {
  list-style: none;
  padding: 0;
}

.reference li {
  margin-block: 0.5rem;
  max-width: 68ch;
  color: var(--muted);
}

.reference a {
  color: var(--fg);
}

@media (min-width: 960px) {
  .docs {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 88px;
  }
}

/* Motion: the page has almost none, but keep reduced motion honest. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
