/* ogrender: one stylesheet, no build step, no framework.
   Visual language follows the supplied Linear design analysis: near-black canvas,
   four-step surface ladder, hairline borders, one lavender accent (CTA, focus, links).
   Dark only by design (the system ships no light marketing theme). Inter self-hosted
   as the documented substitute for Linear's proprietary sans. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --primary: #5e6ad2;
  --primary-hover: #828fff;
  --primary-focus: #5e69d1;
  --on-primary: #ffffff;

  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;

  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --hairline: #23252a;
  --hairline-strong: #34343a;

  --success: #27a644;
  --danger: #eb5757;

  --r-xs: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  --sans: "Inter", "SF Pro Display", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  letter-spacing: -0.05px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

code, pre, kbd { font-family: var(--mono); }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--primary-hover); }

:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary-focus) 60%, transparent); outline-offset: 2px; border-radius: var(--r-xs); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

.logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("/favicon.svg") center / contain no-repeat;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.nav-links a {
  color: var(--ink-subtle);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--r-md);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-1); }

/* the two reference pages stay in the footer on small screens so the nav holds one line */
@media (max-width: 767px) {
  .nav-links a[href="/og-image-size.html"],
  .nav-links a[href="/vs-vercel-og.html"] { display: none; }
}

.nav-links .nav-cta {
  margin-left: 8px;
  color: var(--ink);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  font-weight: 500;
}
.nav-links .nav-cta:hover { background: var(--surface-2); border-color: var(--hairline-strong); }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font: 500 14px/1.2 var(--sans);
  white-space: nowrap;
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--hairline-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* type */

h1, h2, h3 { color: var(--ink); font-weight: 600; margin: 0; }

h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
@media (min-width: 768px) { h2 { font-size: 40px; } }

h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.3px; margin: 32px 0 8px; }

p { margin: 0 0 16px; }

.section-sub, h2 + p.section-sub {
  color: var(--ink-subtle);
  font-size: 18px;
  line-height: 1.5;
  max-width: 62ch;
  margin: 0 0 32px;
}

/* sections */

section { padding: 64px 0; }
@media (min-width: 768px) { section { padding: 96px 0; } }
section.alt { background: var(--canvas); border-top: 1px solid var(--hairline); }

/* hero (generic: pricing, docs, reference pages) */

.hero { padding: 56px 0 32px; }
@media (min-width: 768px) { .hero { padding: 80px 0 40px; } }

.hero h1 {
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -1.4px;
  margin: 0 0 16px;
  max-width: 18ch;
}
@media (min-width: 768px) { .hero h1 { font-size: 56px; letter-spacing: -1.8px; } }

.hero p.lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-subtle);
  max-width: 52ch;
  margin: 0 0 32px;
}

/* landing hero: asymmetric split, product output on the right */

.hero-split {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-split { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.hero-split .hero-copy h1 { max-width: none; font-size: 40px; }
@media (min-width: 768px) { .hero-split .hero-copy h1 { font-size: 52px; } }

.shot {
  margin: 0;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
}
.shot img { border-radius: var(--r-md); }
.shot figcaption { font-size: 13px; color: var(--ink-subtle); padding: 12px 4px 2px; }

/* request panel */

.request {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
}
.request-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font: 400 13px/1.4 var(--mono);
  color: var(--ink-subtle);
}
.request-bar .method { color: var(--ink); }
.request pre { border-radius: 0; background: transparent; padding: 20px; }
.request-out {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
}
@media (min-width: 768px) { .request-out { grid-template-columns: repeat(3, 1fr); } }
.request-out div { padding: 16px 20px; font-size: 14px; color: var(--ink-subtle); }
.request-out div + div { border-top: 1px solid var(--hairline); }
@media (min-width: 768px) {
  .request-out div + div { border-top: 0; border-left: 1px solid var(--hairline); }
}
.request-out strong { display: block; color: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 2px; }

/* bento: one wide output cell, two stacked cells */

.bento {
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  .bento { grid-template-columns: 8fr 4fr; }
  .bento .cell-stack { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .bento .cell-stack .stack-list { margin-top: 0; }
}
.cell {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cell h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.4px; }
.cell p { margin: 0; color: var(--ink-subtle); font-size: 15px; }
.cell-wide img { border-radius: var(--r-md); border: 1px solid var(--hairline); margin-top: 16px; }
.cell-wide .pair { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 600px) { .cell-wide .pair { grid-template-columns: 1fr 1fr; } }
.cell-wide .pair img { margin-top: 0; }
.cell-price { background: var(--surface-2); border-color: var(--hairline-strong); }
.cell-price .figure { font-size: 56px; font-weight: 600; letter-spacing: -2px; line-height: 1; color: var(--ink); margin: 8px 0; }
.cell-price .figure span { font-size: 18px; letter-spacing: 0; color: var(--ink-subtle); font-weight: 400; }
.stack-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 0; list-style: none; }
.stack-list li {
  font: 400 13px/1.4 var(--mono);
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}

/* limits block: plain text, hairline top, no card */

.limits { max-width: 68ch; }
.limits p { color: var(--ink-muted); font-size: 17px; }
.limits p strong { color: var(--ink); font-weight: 500; }

/* code */

pre {
  background: var(--surface-1);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  padding: 16px 20px;
  border-radius: var(--r-lg);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
.request pre { border: 0; }

p code, li code, td code, .callout code, .limits code {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  font-size: 0.88em;
  color: var(--ink);
}

.demo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 800px) { .demo-grid { grid-template-columns: 1fr 1fr; } }
.demo-grid figure { margin: 0; }
.demo-grid figcaption { font-size: 13px; color: var(--ink-subtle); margin-top: 8px; }
.demo-grid img { border-radius: var(--r-lg); border: 1px solid var(--hairline); }

/* callouts */

.callout {
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--primary);
  background: var(--surface-1);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 15px;
  color: var(--ink-muted);
}
.callout strong { color: var(--ink); font-weight: 500; }

/* tables */

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; }
td { border-top: 1px solid var(--hairline); color: var(--ink-muted); }
th { color: var(--ink-subtle); font-weight: 500; font-size: 13px; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

/* feature grid (reference pages) */

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-grid h3 { margin-top: 0; }
.feature-grid p { color: var(--ink-subtle); margin: 0; font-size: 15px; }

/* pricing */

.plans { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(4, 1fr); } }

.plan {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan.featured { background: var(--surface-2); border-color: var(--hairline-strong); }
.plan .name { font-weight: 500; font-size: 15px; color: var(--ink-muted); }
.plan.featured .name { color: var(--ink); }
.plan .price { font-size: 40px; font-weight: 600; letter-spacing: -1.2px; line-height: 1.1; }
.plan .price span { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-subtle); }
.plan ul { margin: 4px 0 8px; padding: 0; list-style: none; font-size: 14px; color: var(--ink-subtle); }
.plan li { padding: 4px 0; }
.plan .btn { margin-top: auto; width: 100%; }

/* dashboard */

.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.card h2 { font-size: 22px; letter-spacing: -0.4px; margin-bottom: 8px; }
.card .section-sub { font-size: 15px; margin-bottom: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
}
.field input::placeholder { color: var(--ink-tertiary); }
.field input:focus { outline: 2px solid color-mix(in srgb, var(--primary-focus) 60%, transparent); outline-offset: 1px; border-color: var(--primary-focus); }

.status-msg { font-size: 14px; margin: 12px 0 0; min-height: 1.4em; color: var(--ink-subtle); }
.status-msg.error { color: var(--danger); }
.status-msg.ok { color: var(--success); }

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--ink-muted);
}
.key-row + .key-row { border-top: 1px solid var(--hairline); }
.key-row code { color: var(--ink); }

.usage-bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.usage-bar > div { height: 100%; background: var(--primary); }

/* safe-zone diagram (og-image-size.html) */

.dim-card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 20px; }
.dim-preview {
  aspect-ratio: 1.91 / 1;
  background: var(--surface-2);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-md);
  position: relative;
  margin-top: 12px;
}
.dim-preview .safe { position: absolute; inset: 8% 6%; border: 1px dashed var(--primary); border-radius: var(--r-xs); }
.dim-preview .safe::after { content: "safe zone"; position: absolute; top: 4px; left: 6px; font-size: 11px; color: var(--primary-hover); }

/* footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 64px;
  font-size: 13px;
  color: var(--ink-subtle);
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--ink-subtle); text-decoration: none; margin-right: 20px; }
.site-footer a:hover { color: var(--ink); }
.site-footer a:last-child { margin-right: 0; }

.small-print { font-size: 13px; color: var(--ink-subtle); margin-top: 16px; }

/* long-form prose on reference pages */
main ul, main ol { color: var(--ink-muted); padding-left: 20px; }
main li { margin: 6px 0; }
main section > .container > p { color: var(--ink-muted); max-width: 70ch; }

/* reference pages (docs, OG sizes, vs Vercel OG): denser rhythm than the landing page */
.doc section { padding: 40px 0; }
.doc .hero { padding: 56px 0 8px; }
.doc h2 { font-size: 28px; letter-spacing: -0.6px; }
.doc h3 { font-size: 18px; }
pre + p, .table-wrap + p, pre + ul { margin-top: 16px; }
.doc h2:not(:first-child) { margin-top: 56px; }
