/* Stow's site. Colours are the app's own (mockups/README.md): teal is for actions only, and the
   status colours are not used here at all. */

:root {
  --bg: #fbfaf8;
  --panel: #f0eeea;
  --card: #ffffff;
  --border: #e2ded7;
  --text: #1f1e1c;
  --muted: #6e6a63;
  --faint: #97928a;
  --accent: #0f7a86;
  --accent-hover: #0b616b;
  --on-accent: #ffffff;
  --code-bg: #1f1e1c;
  --code-text: #eceae7;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1d1f;
    --panel: #151719;
    --card: #212427;
    --border: #2a2d30;
    --text: #eceae7;
    --muted: #a39f98;
    --faint: #8b877f;
    --accent: #3fb0c2;
    --accent-hover: #6cc6d4;
    --on-accent: #0f1214;
    --code-bg: #151719;
    --code-text: #eceae7;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.top, main, footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 19px;
  text-decoration: none;
}
/* SPL-136: the trademark sign, small and raised, so it doesn't shout in headings or the wordmark. */
.tm { font-size: 0.5em; vertical-align: super; line-height: 0; font-weight: 400; }
/* In the flex wordmark the sign is its own flex item: cancel the gap and raise it by hand. */
.brand .tm { margin-left: -10px; position: relative; top: -0.5em; }
.top nav { display: flex; gap: 20px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

h1, h2 { letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(34px, 6vw, 56px); margin: 48px 0 16px; }
h2 { font-size: 24px; margin: 0 0 10px; }

.hero { text-align: center; }
.lede { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 19px; }

.downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.downloads p { flex-basis: 100%; margin: 0; }
.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.fine, .soon { font-size: 14px; color: var(--faint); }


.shot { margin: 40px auto 0; max-width: 960px; }
.shot img, .shot video {
  display: block;
  width: 100%;
  height: auto;
  /* The screenshots are whole macOS windows, rounded corners and all, so the shadow follows them. */
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.22));
}

section { margin: 88px 0; }

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rules h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -0.01em; }
.rules p { margin: 0; }
.rules article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.rules p, .feature p, .fit li, .price p { color: var(--muted); }
.rules h2 { font-size: 20px; }
em { font-style: normal; color: var(--text); font-weight: 560; }

.feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.feature .shot { margin: 0; }
.command { grid-template-columns: 1fr 1.2fr; }

pre {
  margin: 0;
  padding: 20px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-text);
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", Consolas, monospace;
  overflow-x: auto;
}

.fit ul { padding-left: 20px; }
.fit li { margin: 6px 0; }

.price {
  text-align: center;
  background: var(--panel);
  border-radius: 16px;
  padding: 48px 24px;
}
.price h2 { font-size: 40px; }
.price p { max-width: 560px; margin: 0 auto 14px; }
.price .button { margin-top: 10px; }

footer p { margin: 6px 0; }
footer a { color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 40px;
  color: var(--faint);
  font-size: 14px;
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { margin-top: 28px; }
  section { margin: 56px 0; }
  .rules, .feature, .command, .steps-grid, .platforms { grid-template-columns: 1fr; }
  .command pre { order: 2; }
  .top nav { gap: 14px; font-size: 14px; }
  .shot { margin-top: 28px; }
}

/* A grid item defaults to min-width: auto, so the code block would widen the page on a phone. */
.feature > * { min-width: 0; }

/* The demo comes in both themes; only the one matching the reader's is shown. */
.demo .dark { display: none; }
@media (prefers-color-scheme: dark) {
  .demo .light { display: none; }
  .demo .dark { display: block; }
}
/* A recording is a rectangle, and its corners hold whatever was behind the window. Clip it to the
   window's own corners (a touch over 12.5 pt on a 1200 x 1000 pt window, so no background survives), in proportion so it holds at any
   width. */
.demo video { border-radius: 1.2% / 1.44%; }

/* Guides (SPL-96): one readable column. */
.guide { max-width: 720px; }
.guide h1 { font-size: clamp(30px, 5vw, 42px); margin: 40px 0 14px; }
.guide h2 { margin-top: 44px; }
.guide h3 { font-size: 19px; margin: 28px 0 8px; }
.guide p code, .guide li code {
  font: 0.92em ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", Consolas, monospace;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow-wrap: anywhere;
}
.guide p, .guide li { color: var(--muted); }
.guide strong { color: var(--text); font-weight: 600; }
.guide .kicker { margin: 32px 0 0; font-size: 14px; color: var(--faint); }
.guide .lede { margin: 0 0 8px; text-align: left; }
.guide li { margin: 8px 0; }
.steps { padding-left: 22px; }
.try {
  margin: 64px 0 32px;
  padding: 32px 24px;
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
}
.try h2 { margin-top: 0; }
.try .shot { margin: 20px auto; }
.guide-list { list-style: none; padding: 0; }
.guide-list li { margin: 24px 0; }
.guide-list a { font-size: 20px; font-weight: 600; text-decoration: none; }
.guide-list p { margin: 4px 0 0; }

/* The sentence the demo ends on, said under it as well (SPL-125). */
.sentence {
  max-width: 680px;
  margin: 24px auto 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  text-align: left;
}

.how h2, .why h2, .faq h2 { margin-bottom: 20px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps-grid li { counter-increment: step; }
.steps-grid li::before {
  content: counter(step);
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.steps-grid h3 { font-size: 19px; margin: 0 0 6px; }
.steps-grid p { margin: 0; color: var(--muted); }

.ticks { padding-left: 20px; }
.ticks li { margin: 10px 0; color: var(--muted); }
.ticks strong { color: var(--text); font-weight: 600; }

.buy { margin-top: 10px; }
.buy .fine { margin: 12px auto 0; }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); max-width: 720px; }

/* The plain pages: download, buy, privacy, support. One readable column, like a guide. */
.page { max-width: 760px; }
.page h1 { font-size: clamp(30px, 5vw, 42px); margin: 40px 0 10px; }
.page h2 { margin-top: 40px; }
.page > p, .page li { color: var(--muted); }
.page li { margin: 8px 0; }
.page strong { color: var(--text); font-weight: 600; }
.page .lede { margin: 0 0 24px; text-align: left; }
.page .price { margin: 32px 0; }

.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.platforms article {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.platforms h2 { margin-top: 0; }
.platforms ul { padding-left: 20px; margin: 16px 0 0; }
.platforms li { color: var(--muted); }
.platforms .downloads { justify-content: flex-start; }

/* After the base rules above, so these win on a phone. The nav keeps the four pages and drops the
   in-page link, which the home page reaches by scrolling anyway. */
@media (max-width: 760px) {
  .steps-grid, .platforms { grid-template-columns: 1fr; }
  .top nav a[href$="#how"] { display: none; }
}
@media (max-width: 400px) {
  .top nav { gap: 12px; font-size: 13px; }
}
@media (max-width: 360px) {
  .top { gap: 8px; }
  .top nav { gap: 9px; }
}
.page .price h2 { margin-top: 0; }
@media (max-width: 760px) {
  .price h2 { font-size: 30px; }
}
