/* GTKDraw site. Ubuntu Sans on an 8px rhythm, square edges, Adwaita colors.
   Hand-drawn notes are a quiet Adwaita gray. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f4;
  --fg: #1e1d22;
  --muted: #5e5c64;
  --line: #deddda;
  --accent: #1c71d8;
  --note: #77767b;
  --code-bg: #f6f5f4;

  --sans: "Ubuntu Sans", "Adwaita Sans", Cantarell, system-ui, sans-serif;
  --mono: "Ubuntu Sans Mono", "Adwaita Mono", ui-monospace, monospace;
  --hand: "Caveat", "Comic Neue", cursive;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e20;
    --bg-soft: #26262a;
    --fg: #f2f2f4;
    --muted: #a4a3aa;
    --line: #3a393f;
    --accent: #78aeed;
    --note: #9a9996;
    --code-bg: #26262a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1e20;
  --bg-soft: #26262a;
  --fg: #f2f2f4;
  --muted: #a4a3aa;
  --line: #3a393f;
  --accent: #78aeed;
  --note: #9a9996;
  --code-bg: #26262a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.75rem var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, pre, figure { margin: 0; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: .92em; }
p code { background: var(--code-bg); padding: 0 .25em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top line */
.top {
  max-width: 70rem; margin: 0 auto; padding: 0 16px; height: 4rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--fg); font-weight: 550; text-decoration: none; }
.ver { font: .8125rem var(--mono); color: var(--muted); font-weight: 400; }
.top nav { display: flex; gap: 1.5rem; }
.top nav a { color: var(--fg); text-decoration: none; font-size: .9375rem; }
.top nav a:hover { text-decoration: underline; }
.top nav { align-items: center; }

/* theme toggle: round button, the new theme grows out of it in a circle */
.theme {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; padding: 0; margin-left: -.25rem;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--fg); border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}
.theme:hover { background: var(--bg-soft); border-color: var(--fg); }
.theme svg { width: 1.125rem; height: 1.125rem; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* reading column */
.col { max-width: 42rem; margin: 0 auto; padding: 0 16px; }
.col + .col { margin-top: 4rem; }
.col p + p { margin-top: 1rem; }
h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 550; margin-bottom: 1rem; }
.aside { color: var(--muted); font-size: .9375rem; line-height: 1.5rem; }

/* intro */
.intro { padding-top: 5rem; }
h1 {
  font-size: 2.5rem; line-height: 3.25rem; font-weight: 400; letter-spacing: -.015em;
}
.cmd {
  display: inline-flex; align-items: stretch; margin-top: 2.5rem;
  border: 1px solid var(--fg); max-width: 100%;
}
.cmd code { padding: .75rem 1.25rem; font-size: 1rem; white-space: nowrap; overflow-x: auto; }
.prompt { color: var(--muted); user-select: none; }
.copy {
  font: inherit; font-size: .9375rem; border: 0; border-left: 1px solid var(--fg);
  background: var(--fg); color: var(--bg); padding: 0 1.25rem; cursor: pointer; min-width: 6.5rem;
}
.copy:hover { background: var(--accent); }
.intro .aside { margin-top: 1rem; }

/* annotated window */
.shot .light { display: block; }
.shot .dark { display: none; }
:root[data-theme="dark"] .shot .light { display: none; }
:root[data-theme="dark"] .shot .dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .light { display: none; }
  :root:not([data-theme="light"]) .shot .dark { display: block; }
}

.showcase { max-width: 1272px; margin: 4rem auto 5rem; padding: 0 16px; overflow-x: clip; }
.stage { position: relative; width: 1240px; height: 700px; transform-origin: 0 0; }
.shot img {
  display: none; position: absolute; left: 140px; top: 80px; width: 960px; height: auto;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 18%)) drop-shadow(0 18px 36px rgb(0 0 0 / 22%));
}

.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; stroke: var(--note); }
.note {
  position: absolute; margin: 0; color: var(--note);
  font: 700 26px/26px var(--hand); white-space: nowrap;
}
.n1 { left: 0; top: 240px; width: 128px; text-align: right; }
.n2 { left: 300px; top: 10px; }
.n4 { left: 1112px; top: 394px; }
.n5 { left: 790px; top: 10px; }
.showcase figcaption { display: none; }

/* what it adds */
.adds { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.adds li { padding: 1rem 0 1rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.adds li::before {
  content: ""; position: absolute; left: .25rem; top: 1.625rem; width: .75rem; height: 2px; background: var(--note);
}

/* install */
.tabset { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabset button {
  font: inherit; font-size: .9375rem; background: none; color: var(--muted); border: 0;
  padding: .5rem 1rem; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer;
}
.tabset button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.tabset button:hover { color: var(--fg); }
.term {
  background: var(--code-bg); border: 1px solid var(--line); padding: 1rem 1.25rem;
  font: .875rem/1.5rem var(--mono); overflow-x: auto;
}
.panel .aside { margin-top: .75rem; }
#install > p:last-child { margin-top: 1.5rem; }

footer.col {
  margin-top: 6rem; margin-bottom: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; line-height: 1.5rem;
}
footer a { color: inherit; }

/* narrow screens: plain window, notes become a numbered list */
@media (max-width: 760px) {
  .intro { padding-top: 3rem; }
  h1 { font-size: 1.875rem; line-height: 2.5rem; }
  .cmd code { font-size: .875rem; padding: .625rem .875rem; }
  .copy { min-width: 0; padding: 0 .875rem; }
  .showcase { margin: 3rem auto; }
  .stage { width: 960px; height: 593px; }
  .shot img { left: 0; top: 0; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 18%)); }
  .ink, .note { display: none; }
  .showcase figcaption { display: block; margin-top: 1.5rem; }
  .showcase ol { margin: 0; padding-left: 1.25rem; color: var(--muted); font-size: .9375rem; line-height: 1.5rem; }
  .showcase li + li { margin-top: .5rem; }
}
