/* Stow website. Colours from docs/brand/README.md; every pair used is listed in scripts/site/check.mjs. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F7F8F6;          /* Paper */
  --text: #0B2E33;        /* Ink */
  --muted: #3E5B5F;
  --surface: #FFFFFF;
  --border: #CBD6D4;
  --link: #037079;        /* Stow Teal */
  --button-bg: #037079;
  --button-text: #FFFFFF;
  --band: #EADBC0;        /* Kraft, used sparingly */
  --band-text: #0B2E33;
  --placeholder-bg: #EADBC0;
  --placeholder-text: #8A5300; /* Amber text tone */
  --placeholder-border: #D98A1C; /* Amber */
  --code-bg: #E9EEEC;
  --focus: #037079;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B2E33;        /* Ink */
    --text: #F7F8F6;      /* Paper */
    --muted: #B7C9C8;
    --surface: #10393F;
    --border: #2B565B;
    --link: #3FB8AC;      /* Night Teal */
    --button-bg: #3FB8AC;
    --button-text: #0B2E33;
    --band: #EADBC0;
    --band-text: #0B2E33;
    --placeholder-bg: #EADBC0;
    --placeholder-text: #0B2E33;
    --placeholder-border: #D98A1C;
    --code-bg: #16454B;
    --focus: #3FB8AC;
  }
}

*, *::before, *::after { 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(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
p, ul, ol, dl { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }

code, kbd, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 40rem) {
  .wrap { padding: 0 2rem; }
}
.prose { max-width: 44rem; }

.skip {
  position: absolute;
  left: 16px;
  top: -4rem;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 36px; height: 36px; }
.wordmark {
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--link);
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Main */
main { display: block; padding-bottom: 4rem; }
.page-head { padding: 3rem 0 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

.hero { padding: 3.5rem 0 1rem; }
.hero h1 { max-width: 20ch; }
.hero h1 .second { display: block; color: var(--link); }
.hero .lede { color: var(--text); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}
.button {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  border: 2px solid var(--button-bg);
}
.button:hover { text-decoration: underline; }
.button.secondary {
  background: transparent;
  color: var(--link);
}
.small { font-size: 0.9375rem; color: var(--muted); }

/* App screens */
.screen { margin: 2rem 0; }
.screen img {
  border-radius: 10px;
  border: 1px solid var(--border);
  width: 100%;
}
.screen figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Cards and grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.grid > li { margin: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 0.5rem;
}
.card h3 { margin-top: 0; font-size: 1.1rem; }

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1.2fr; }
  .split .screen { margin-top: 0; }
}

.band {
  background: var(--band);
  color: var(--band-text);
  border-radius: 12px;
  padding: 1.25rem 1.5rem 0.25rem;
  margin: 2rem 0;
}
.band a { color: var(--band-text); }

.price {
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.25rem;
}

.notice {
  border-left: 4px solid var(--link);
  background: var(--surface);
  padding: 0.9rem 1.1rem 0.1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

/* Placeholders that must be filled before launch */
mark.ph {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  outline: 2px dashed var(--placeholder-border);
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 0.25em;
  font-weight: 600;
}
.draft-banner {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border: 2px dashed var(--placeholder-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem 0.1rem;
  margin: 1.5rem 0;
}
.draft-banner a { color: var(--placeholder-text); }

/* Help */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.toc ul { margin: 0; padding-left: 1.2rem; }
details {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
details > summary {
  cursor: pointer;
  font-weight: 600;
}
details[open] > summary { margin-bottom: 0.5rem; }

dl.facts { display: grid; gap: 0.25rem 1.5rem; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0 0 0.75rem; }
@media (min-width: 40rem) {
  dl.facts { grid-template-columns: 12rem 1fr; }
  dl.facts dd { margin: 0; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  margin: 0 0 1rem;
}
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--link); }
