/* Plume's site: presentation page and documentation. Same neutral grays as the editor, orange accent
   (the default fill of a new shape). Light and dark follow the system. */

:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfbfc, #161618);
  --surface: light-dark(#f1f1f3, #212123);
  --border: light-dark(#dedee2, #333336);
  --text: light-dark(#1d1d1f, #f2f2f4);
  --text-2: light-dark(#5e5e66, #a1a1a8);
  --accent: #ff6f00;
  --accent-text: light-dark(#b04c00, #ff8f3a); /* links and orange text: ≥ 4.5:1 on --bg and --surface */
  --on-accent: #1d1d1f; /* dark on orange: 6:1 (white would be 2.8:1, below WCAG AA) */
  --radius: 10px;
  --width: 72rem;
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --titles: "Fira Sans", var(--font);
}

/* Titles and the brand in the app's own Fira Sans (bundled; Latin subset of the bold) */
@font-face {
  font-family: "Fira Sans";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/FiraSans-Bold.woff2") format("woff2");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 5rem; } /* anchors land below the sticky bar */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* skip link: hidden until focused by the keyboard */
.skip {
  position: absolute; z-index: 2; top: 0.5rem; left: 0.5rem;
  padding: 0.5rem 1rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
img { max-width: 100%; height: auto; }

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem max(1rem, (100% - var(--width)) / 2);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.bar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.bar nav a { color: var(--text-2); font-size: 0.95rem; text-decoration: none; }
.bar nav a:hover { color: var(--text); }

main { padding: 0 1rem; }
section { max-width: var(--width); margin: 0 auto; padding: 4.5rem 0; }
section + section { border-top: 1px solid var(--border); }

h1, h2, h3, .brand { font-family: var(--titles); font-weight: 700; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 2rem; margin: 0 0 0.5rem; text-align: center; }
h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }
.intro { text-align: center; color: var(--text-2); margin: 0 auto 2.5rem; }
.note { color: var(--text-2); font-size: 0.9rem; }

/* Hero */
.hero { text-align: center; padding-top: 4rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; margin: 0 auto 1.25rem; }
.hero h1 em { font-style: normal; color: light-dark(var(--accent-text), var(--accent)); }
.lead { max-width: 40rem; margin: 0 auto 2rem; color: var(--text-2); font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 3rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { border-color: var(--text-2); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.12); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }

.shot {
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.18);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.features p { margin: 0; color: var(--text-2); font-size: 0.95rem; }
.features svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0.6rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

/* Try it / two columns */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.split h2 { text-align: left; }
@media (max-width: 50rem) { .split { grid-template-columns: 1fr; } }

/* Before / after pictures */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 44rem; margin: 0 auto; }
.compare figure { margin: 0; text-align: center; }
.compare img { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.compare figcaption { margin-top: 0.5rem; color: var(--text-2); font-size: 0.9rem; }
.more { text-align: center; margin-top: 2rem; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin: 2rem 0; }
.platform { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
/* download buttons: white in both themes, dark text (16:1); orange border on hover and keyboard focus */
.button.download { background: #ffffff; border-color: var(--border); color: #1d1d1f; }
.button.download:hover, .button.download:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.platform ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; padding: 0; list-style: none; }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; margin-top: 2rem; }
.columns p { color: var(--text-2); margin: 0; }

footer { padding: 2rem 1rem 3rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-2); font-size: 0.9rem; }
footer a { color: inherit; }

/* Documentation pages (Markdown rendered by scripts/site.js) */
.doc { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.doc .back { display: inline-block; margin-bottom: 1rem; font-size: 0.95rem; }
.doc h1 { font-size: 2.2rem; margin: 0 0 1.5rem; }
.doc h2 { font-size: 1.45rem; text-align: left; margin: 2.5rem 0 0.75rem; }
.doc h3 { margin-top: 1.75rem; }
.doc .table { overflow-x: auto; margin: 1rem 0 1.5rem; } /* wide tables scroll; the table keeps its table role */
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.doc th { color: var(--text-2); font-weight: 600; }
.doc code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface); font: 0.88em var(--mono); }
.doc pre { padding: 1rem; overflow-x: auto; border-radius: var(--radius); background: var(--surface); }
.doc pre code { padding: 0; background: none; }
.doc li + li { margin-top: 0.25rem; }
