/* Coffee Army · Obsidian plugins.
   Writing paper and an Obsidian purple, with each plugin in its own color.
   Fonts are shared with the other Coffee Army sites. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --page: #f6f0e4;        /* writing paper */
  --panel: #fffcf6;
  --ink: #241f2e;
  --muted: #5a5366;
  --rule: #e3d9c6;
  --brand: #6b45d8;       /* Obsidian purple */
  --on-brand: #ffffff;
  --focus: #6b45d8;

  /* One color per plugin, taken from the plugin itself. */
  --board: #c9821f;       /* Hero's Journey Act I post-it */
  --dialogue: #1d7f74;
  --repeated: #b86e00;    /* the default highlight, darkened for text */
  --highlight: #ffaa00;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1b1922;
    --panel: #24212d;
    --ink: #efebf5;
    --muted: #b8b1c6;
    --rule: #3a3546;
    --brand: #a58cff;
    --on-brand: #15112a;
    --focus: #a58cff;
    --board: #f0b25a;
    --dialogue: #5cc8b8;
    --repeated: #ffbf4d;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

.wrap {
  width: min(100% - 32px, 60rem);
  margin-inline: auto;
}

a { color: inherit; }

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

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(127 110 160 / 0.14);
  font: 500 0.9em var(--mono);
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---- Header --------------------------------------------------------- */

.site-header { padding-block: 18px; }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 1.25rem/1 var(--display);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font: 500 0.8125rem/1.6 var(--mono);
  letter-spacing: 0.04em;
}

.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Studio bar: link back to the Coffee Army home, above the site header ---- */
.studio-bar { border-bottom: 1px solid var(--rule); font: 500 0.8125rem/1.4 var(--mono); }
.studio-bar .wrap { padding-block: 9px; }
.studio-bar a { color: var(--muted); text-decoration: none; }
.studio-bar a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Hero ----------------------------------------------------------- */

.hero { padding-block: clamp(32px, 8vw, 88px) clamp(32px, 6vw, 64px); }

.badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 800 clamp(2.75rem, 11vw, 6rem)/0.92 var(--display);
  letter-spacing: -0.035em;
  color: var(--brand);
}

.lede {
  max-width: 34rem;
  margin: 20px 0 0;
  font-size: 1.1875rem;
  color: var(--muted);
}

.hero-list {
  display: grid;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.hero-list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.hero-list a:hover { text-decoration: underline; }

.dot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 3px;
}
.dot-board { background: linear-gradient(135deg, #f6c873 0 33%, #f2a1c4 33% 66%, #8fe0b5 66%); }
.dot-dialogue { background: var(--dialogue); }
.dot-repeated { background: var(--highlight); }

/* ---- Plugins -------------------------------------------------------- */

.plugin {
  --accent: var(--brand);
  padding-block: clamp(40px, 7vw, 72px);
  border-top: 1px solid var(--rule);
}

.plugin-board { --accent: var(--board); }
.plugin-dialogue { --accent: var(--dialogue); }
.plugin-repeated { --accent: var(--repeated); }

.plugin-head { margin-bottom: 24px; }

.plugin-kicker {
  margin: 0 0 8px;
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0;
  font: 800 clamp(1.875rem, 5vw, 2.75rem)/1.02 var(--display);
  letter-spacing: -0.02em;
}

.status {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 10px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.06em;
}

.status-soon { border-style: dashed; }

.plugin-body {
  display: grid;
  gap: 24px;
}

.plugin-text { max-width: 40rem; }
.plugin-text > p:first-child { margin-top: 0; font-size: 1.125rem; }

.features {
  margin: 0;
  padding-left: 1.2em;
}
.features li { margin-block: 6px; }
.features li::marker { color: var(--accent); }

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 22px 0 0;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

@media (prefers-color-scheme: dark) {
  .button { color: #15112a; }
}

.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--accent);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 28px rgb(40 30 60 / 0.1);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* A second, smaller screenshot sits beside the text on wide screens. */
@media (min-width: 860px) {
  .plugin-body:has(.shot-small) {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .plugin-body:has(.shot-small) .shot:not(.shot-small) { grid-column: 1 / -1; grid-row: 2; }
  .plugin-body:has(.shot-small) .plugin-text { grid-row: 1; }
  .plugin-body:has(.shot-small) .shot-small { grid-row: 1; }
}

/* ---- Install -------------------------------------------------------- */

.install {
  margin-block: clamp(24px, 5vw, 48px) 56px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
}

.install h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.install ol { padding-left: 1.3em; }
.install li { margin-block: 6px; }
.install li::marker { font: 500 0.9em var(--mono); color: var(--brand); }

.note {
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 0 40px;
  font: 500 0.8125rem/1.5 var(--mono);
  color: var(--muted);
}

.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Buy Me a Coffee banner: drawn here, no third-party script or image; it only links to the page. */
.bmc { margin-block: 8px 32px; }
.bmc-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 22px;
  border: 2px dashed var(--rule);
  border-radius: 14px;
}
.bmc-inner p { margin: 0; color: var(--muted); }
.bmc-inner p strong { color: var(--ink); }
.bmc-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 16px;
  border-radius: 999px;
  background: #ffdd00;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.25);
  transition: transform 0.15s ease;
}
.bmc-button:hover { background: #ffe433; transform: translateY(-1px); }
.bmc-cup { flex: none; }
@media (prefers-reduced-motion: reduce) { .bmc-button { transition: none; } .bmc-button:hover { transform: none; } }
