/* ogshot — proof-sheet design system
   Clean, high-contrast neutrals with a single blue accent (Vercel-adjacent):
   near-white/true-black surfaces, hairline gray borders, subtle shadows.
   Light: bright canvas, white specimen prints. Dark ("darkroom"): the room
   goes black, the prints stay white. */

:root {
  --canvas: #fafafa;
  --ink: #0a0a0a;
  --ink-soft: #666666;
  --paper: #ffffff;
  --blue: #0070f3;
  --blue-deep: #0060df;
  --btn-bg: #0070f3;
  --btn-bg-hover: #0060df;
  --hover-fill: #f2f2f2;
  --rule: #eaeaea;
  --rule-soft: #f2f2f2;
  --ok: #0a7c42;
  --warn: #9a6400;
  --err: #d12d2d;
  --err-bg: #fef2f2;
  --chip: #f0f0f1;
  --font-sans: "Archivo", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --check: conic-gradient(#ececec 90deg, #f7f7f7 90deg 180deg, #ececec 180deg 270deg, #f7f7f7 270deg) 0 0 / 18px 18px;
  --spec-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 14px 30px -14px rgba(0, 0, 0, 0.18);
  --spec-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.08), 0 22px 44px -18px rgba(0, 0, 0, 0.24);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --ink: #ededed;
    --ink-soft: #8f8f8f;
    --paper: #0a0a0a;
    --blue: #3291ff;
    --blue-deep: #52a8ff;
    --btn-bg: #0070f3;
    --btn-bg-hover: #3291ff;
    --hover-fill: #1a1a1a;
    --rule: #2e2e2e;
    --rule-soft: #1f1f1f;
    --ok: #4ecb8d;
    --warn: #e5a455;
    --err: #ff6369;
    --err-bg: #2a1516;
    --chip: #1a1a1a;
    --check: conic-gradient(#161616 90deg, #0e0e0e 90deg 180deg, #161616 180deg 270deg, #0e0e0e 270deg) 0 0 / 18px 18px;
    --spec-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 34px -14px rgba(0, 0, 0, 0.7);
    --spec-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.55), 0 24px 48px -18px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* Classes below set `display`, which would silently defeat the hidden
   attribute (author rules beat the UA sheet). Keep hidden meaning hidden. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.wrap { max-width: 1460px; margin: 0 auto; padding: 0 clamp(24px, 4vw, 56px); }

/* Grid/flex items default to min-width:auto, so an unbreakable line (a long
   URL in a .code block) silently widens the whole page. Let layout children
   shrink; inner .code blocks then scroll or wrap themselves. */
.hero > *, .sheet > *, .steps > *, .features > *, .pricing > *,
.workbench > *, .stat-cards > *, .tpl-grid > *, .docs-layout > *,
.signin-grid > *, .two-col > *, .tpl > * { min-width: 0; }

/* ---- Navigation ---- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .lens {
  width: 13px;
  height: 13px;
  border: 2.5px solid var(--blue);
  border-right: none;
  border-bottom: none;
  display: inline-block;
  transition: transform 0.25s ease;
}
.wordmark:hover .lens { transform: translate(-2px, -2px); }

.nav-links { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); }

/* ---- Type ---- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow b { color: var(--blue); font-weight: 600; }

h1 {
  font-size: clamp(46px, 5.6vw, 86px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 14px 0 20px;
}

h2 {
  font-size: 29px;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: -0.025em;
  margin: 6px 0 12px;
}

.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border: 1px solid var(--btn-bg);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}
.btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; }

/* Secondary: hairline border, subtle gray fill on hover — no full inversion. */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  background: var(--hover-fill);
  border-color: var(--ink-soft);
  color: var(--ink);
}

.btn-small { padding: 8px 14px; font-size: 13.5px; }

.btn-danger {
  background: transparent;
  color: var(--err);
  border-color: var(--err);
}
.btn-danger:hover { background: var(--err); color: var(--paper); border-color: var(--err); }

/* ---- Specimens (the signature element) ----
   Specimens are prints: paper stays white in both schemes. */

.specimen {
  background: #fff;
  border: 1px solid #131820;
  box-shadow: var(--spec-shadow);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a.specimen, .specimen.lift { display: block; }
a.specimen:hover, .specimen.lift:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--spec-shadow-hover);
  text-decoration: none;
}
.specimen .frame {
  display: block;
  background: var(--check);
  min-height: 80px;
}
.specimen img {
  display: block;
  width: 100%;
  height: auto;
}
.specimen .strip {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid #131820;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #5a6474;
  background: #f6f8fb;
}
.strip .sep { color: #c7cfda; }
.strip .grow { flex: 1; }

/* Crop marks around hero-grade specimens */
.marked { position: relative; padding: 16px; }
.marked::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 14px 1.5px, 1.5px 14px, 14px 1.5px, 1.5px 14px,
                   14px 1.5px, 1.5px 14px, 14px 1.5px, 1.5px 14px;
  background-position: top left, top left, top right, top right,
                       bottom left, bottom left, bottom right, bottom right;
}

@media (prefers-reduced-motion: no-preference) {
  .develop img { animation: develop 0.9s ease 0.15s both; }
  @keyframes develop {
    from { opacity: 0; filter: saturate(0.15) contrast(0.75); }
  }
}

/* ---- Badges ---- */

.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
}
.badge.hit { color: var(--ok); }
.badge.miss { color: var(--warn); }
.badge.err { color: var(--err); }
.badge.plan { color: var(--blue); }
/* Badges inside specimen strips sit on white paper in both schemes. */
.strip .badge.hit { color: #0b7a45; }
.strip .badge.miss { color: #a85b00; }

/* ---- Code blocks ---- */

.code {
  position: relative;
  background: #131820;
  color: #dbe4ee;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  border: 1px solid #2a3340;
  border-radius: 6px;
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre;
}
.code .c { color: #7c8794; }   /* comment */
.code .k { color: #8ab4ff; }   /* key / flag */
.code .s { color: #a8d5a2; }   /* string */
.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: #131820;
  color: #97a3b1;
  border: 1px solid #3a4350;
  border-radius: 4px;
  padding: 3px 9px;
  cursor: pointer;
}
.code-copy:hover { color: #fff; border-color: #97a3b1; }
.code-copy.done { color: #69db8f; border-color: #69db8f; }

/* ---- Cards & panels ---- */

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px;
}

.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head .note { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.section-head .spacer { flex: 1; }

/* ---- Forms ---- */

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 5px;
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 9px 10px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue), transparent 80%);
}
textarea { resize: vertical; }

.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; font-family: var(--font-sans); }

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.check input { width: auto; accent-color: var(--blue); }

.seg {
  display: inline-flex;
  border: 1px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.seg button {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--paper);
  color: var(--ink-soft);
  border: none;
  cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }

/* ---- Tables ---- */

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
td code, li code, p code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--chip);
  padding: 1.5px 5px;
  border-radius: 4px;
}

/* ---- Footer ---- */

footer {
  margin-top: 88px;
  border-top: 1px solid var(--rule);
  padding: 26px 0 40px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Landing ---- */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); align-items: center; padding: 56px 0 8px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero .code { margin-top: 26px; }

.sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step .n { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--blue); }
.step h3 { margin: 6px 0 6px; font-size: 19px; font-weight: 700; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.features .card h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; }
.features .card p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.price-card { display: flex; flex-direction: column; }
.price-card .tier { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.price-card .amount { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 2px; }
.price-card .amount span { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.price-card ul { margin: 12px 0 18px; padding: 0 0 0 18px; color: var(--ink-soft); font-size: 14px; flex: 1; }
.price-card.featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 16px 34px -18px color-mix(in srgb, var(--blue), transparent 55%); }

/* ---- Playground ---- */

.workbench { display: grid; grid-template-columns: minmax(min(380px, 100%), 440px) minmax(0, 1fr); gap: clamp(26px, 3vw, 48px); align-items: start; padding: 34px 0 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
}
.chip:hover { color: var(--blue); border-color: var(--blue); }

/* ---- Dashboard ---- */

.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat-cards .num { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.stat-cards .label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

.account-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.account-bar img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); }
.account-bar .who { flex: 1; min-width: 160px; }
.account-bar .who .login { font-weight: 700; font-size: 17px; }
.account-bar .who .sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }

.quota { margin-top: 16px; }
.quota .meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.quota .bar { height: 10px; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.quota .fill { height: 100%; background: var(--blue); transition: width 0.4s ease; }
.quota .fill.hot { background: var(--warn); }
.quota .fill.full { background: var(--err); }

.key-table td { font-family: var(--font-mono); font-size: 13px; }
.key-table .name { font-family: var(--font-sans); font-weight: 600; font-size: 14.5px; }

.reveal {
  border: 1px solid var(--ok);
  border-radius: 6px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--ok), transparent 92%);
  margin-top: 14px;
}
.reveal .k { font-family: var(--font-mono); font-size: 14px; word-break: break-all; }
.reveal .note { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

.signin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }

/* ---- Templates gallery ---- */

.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; padding-top: 8px; }
.strip b { color: #0a0a0a; font-weight: 600; }
/* Long template URLs read better wrapped than trapped in a card-width scrollbar. */
.tpl .code { white-space: pre-wrap; word-break: break-all; }
.tpl-params { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-params code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--chip);
  border-radius: 4px;
  padding: 2px 7px;
}
.tpl-params code.req { outline: 1px solid var(--blue); color: var(--blue); background: transparent; }

/* ---- Misc ---- */

.alert {
  border: 1px solid var(--err);
  color: var(--err);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--err-bg);
}

.notice {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--paper);
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 20px;
}

.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(40px, 4vw, 72px); padding: 34px 0 0; }
.docs-nav { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 10px; }
.docs-nav a { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.docs-nav a:hover { color: var(--blue); }
.docs-body h2 { margin-top: 44px; }
.docs-body h2:first-child { margin-top: 0; }
/* overflow-x auto so wide reference tables scroll on phones, not clip. */
.docs-body .card { margin: 14px 0 8px; padding: 0; overflow-x: auto; }
.docs-body .card table { font-size: 13.5px; }
.docs-body .code { margin: 14px 0; }

/* ---- Responsive ----
   Desktop-first: base rules target ~1000–1600px; queries below scale down to
   phones and up to large/ultrawide displays. */

/* Large desktops: let the layout breathe into the extra width. */
@media (min-width: 1800px) {
  .wrap { max-width: 1600px; }
  .section { padding-top: 92px; }
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 2400px) {
  html { font-size: 18px; }
  .wrap { max-width: 1840px; }
  h1 { font-size: clamp(86px, 4.4vw, 116px); }
}

/* Tablet: two-up grids, single-column split layouts, tighter vertical rhythm. */
@media (max-width: 960px) {
  .hero, .workbench, .docs-layout, .signin-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet, .steps, .pricing, .stat-cards, .tpl-grid, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .section { padding-top: 58px; }
  .hero { padding-top: 40px; }
}

/* Phones: everything single-column; nav links drop to their own row. */
@media (max-width: 640px) {
  .sheet, .steps, .pricing, .features, .stat-cards, .two-col, .tpl-grid { grid-template-columns: minmax(0, 1fr); }
  .nav { padding: 16px 0; gap: 10px; }
  .nav-links { flex-basis: 100%; gap: 12px 18px; font-size: 14.5px; }
  .nav-links .btn { display: none; } /* nav CTA is redundant with the Dashboard link on mobile */
  h1 { font-size: clamp(38px, 12vw, 56px); letter-spacing: -0.03em; }
  h2 { font-size: 24px; }
  .lede { font-size: 17px; }
  .section { padding-top: 46px; }
  .hero { padding-top: 26px; }
  .section-head { gap: 6px 12px; }
  .section-head .spacer { display: none; }
  .card { padding: 18px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .workbench, .docs-layout { gap: 28px; }
  footer { flex-direction: column; gap: 10px; }
}

/* Small phones: trim padding and type so nothing feels cramped. */
@media (max-width: 400px) {
  .wrap { padding: 0 18px; }
  h1 { font-size: clamp(32px, 11vw, 46px); }
  .btn { padding: 11px 18px; }
  .code { font-size: 12.5px; padding: 14px 15px; }
  .seg button { padding: 8px 14px; }
}
