/* perchbrowser.com. Tokens are Perch's Ink theme (dark, default) and Paper theme (light)
   from DESIGN.md, with the Blue accent. No third-party requests: fonts are served from /fonts. */

@font-face { font-family: "Geist"; src: url("/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Serif"; src: url("/fonts/geist-serif.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --canvas: #000000;
  --card: #0E0E10;
  --elevated: #1A1A1E;
  --ink: #FCFDFF;
  --body: rgba(252, 253, 255, 0.86);
  --mute: #A1A4A5;
  --hair: rgba(255, 255, 255, 0.06);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --accent: #4C8DFF;
  --btn-bg: #FCFDFF;
  --btn-fg: #000000;
  --btn-hover: #E6E8EB;

  --serif: "Geist Serif", Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: 24px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --canvas: #F4F5F7;
    --card: #FFFFFF;
    --elevated: #ECEEF1;
    --ink: #0A0A0C;
    --body: rgba(10, 10, 12, 0.82);
    --mute: #5F6366;
    --hair: rgba(0, 0, 0, 0.06);
    --hair-strong: rgba(0, 0, 0, 0.12);
    --accent: #2B68D6;
    --btn-bg: #0A0A0C;
    --btn-fg: #FFFFFF;
    --btn-hover: #2A2C30;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--ink); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 5; background: var(--canvas); border-bottom: 1px solid var(--hair); }
.nav-in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.mark { width: 24px; height: 24px; }
.mark-bar { fill: var(--ink); }
.mark-dot { fill: var(--accent); }
.links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; font-size: 14px; }
.links a { color: var(--body); text-decoration: none; transition: color 120ms var(--ease); }
.links a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 112px 0 96px; }
.hero-text { display: grid; justify-items: center; text-align: center; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }
h1 { margin: 0; max-width: 26ch; font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; }
.nowrap { white-space: nowrap; }
.lead { margin: 24px 0 0; max-width: 52ch; font-size: 19px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.status { margin: 24px 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mute); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-fg); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 120ms var(--ease); }
.btn:hover { background: var(--btn-hover); }
.text-link { font-size: 15px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 4px; transition: text-decoration-color 120ms var(--ease); }
.text-link:hover { text-decoration-color: currentColor; }

/* Product images: real Perch pages in a frame, set off by a hairline. */
.shot { margin: 0; }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--hair-strong); background: var(--card); }
.hero-shot { margin: 80px auto 0; }
.hero-shot figcaption { margin: 16px auto 0; max-width: 68ch; text-align: center; font-size: 13px; line-height: 1.5; color: var(--mute); }

/* Sections */
.band { padding: 96px 0; border-top: 1px solid var(--hair); scroll-margin-top: 64px; }
h2 { margin: 0; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.05; max-width: 18ch; }
.copy > p { margin: 20px 0 0; max-width: 54ch; text-wrap: pretty; }
.copy > p + p { margin-top: 16px; }
.split { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 56px; }
  .split.flip > .copy { order: 2; }
  .split.flip { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); }
  .split > .shot { position: sticky; top: 96px; }
}

.rows { margin: 32px 0 0; max-width: 54ch; }
.rows > div { padding: 16px 0; border-top: 1px solid var(--hair); }
.rows > div:last-child { border-bottom: 1px solid var(--hair); }
.rows dt { color: var(--ink); font-weight: 500; }
.rows dd { margin: 4px 0 0; }
.rows-side { margin-top: 0; max-width: none; }

.aside-list { padding-top: 8px; }
.list-title { margin: 0 0 12px; font-size: 14px; color: var(--mute); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; background: var(--elevated); color: var(--ink); font-size: 14px; }

.term { border-radius: 12px; border: 1px solid var(--hair-strong); background: var(--card); overflow-x: auto; }
.term pre { margin: 0; padding: 24px; font: 400 14px/1.7 var(--mono); color: var(--ink); }
.term code { font-size: inherit; }
.term .c { color: var(--mute); }

.closing-in { display: grid; justify-items: center; text-align: center; }
.closing-in h2 { max-width: none; }
.closing-in p { margin: 20px 0 0; max-width: 58ch; text-wrap: pretty; }
.closing-in p + p { margin-top: 12px; }

/* Footer */
.foot { border-top: 1px solid var(--hair); padding: 32px 0 48px; font-size: 14px; color: var(--mute); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; }
.foot .links a { color: var(--mute); }
.foot .links a:hover { color: var(--ink); }

/* Plain pages (site privacy, 404) */
.page { padding: 96px 0 128px; }
.page .wrap { max-width: 720px; }
.page h1 { max-width: none; font-size: clamp(40px, 6vw, 56px); }
.page p { margin: 20px 0 0; max-width: 62ch; }
.page a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .links { gap: 16px; }
  .hero { padding: 72px 0 64px; }
  .lead { font-size: 17px; }
  .hero-shot { margin-top: 56px; }
  .band { padding: 72px 0; }
  .split { gap: 32px; }
  .term pre { padding: 16px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
  /* Settings screenshots would scale below readable text on a phone; the copy beside them says the same. */
  .split > .shot { display: none; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

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

.targets { margin: 32px 0 0; max-width: 54ch; border: 1px solid var(--hair-strong); border-radius: 12px; background: var(--card); }
.targets .t-head, .targets .t-foot { margin: 0; padding: 12px 20px; font-size: 14px; color: var(--mute); }
.targets dl { margin: 0; }
.targets dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--hair); }
.targets dt { color: var(--body); }
.targets dd { margin: 0; font: 400 14px/1.5 var(--mono); color: var(--ink); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.targets .t-foot { border-top: 1px solid var(--hair); }
