/* The Stack 42: one stylesheet for every page. No web fonts, no scripts,
   nothing loaded from anywhere else. Light and dark follow the system. */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #121a2b;
  --text-muted: #56627a;
  --border: #d9e0ec;
  --accent: #2f6fd6;
  --accent-strong: #1d4fa6;
  --accent-soft: #e3edfc;
  --navy: #0a1428;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 6px 20px rgb(16 24 40 / 6%);
  --radius: 14px;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1222;
    --surface: #121b30;
    --surface-2: #17223b;
    --text: #e8edf7;
    --text-muted: #a2aec6;
    --border: #26324d;
    --accent: #6ab4ff;
    --accent-strong: #9fceff;
    --accent-soft: #16294a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.prose { max-width: var(--measure); }
.muted { color: var(--text-muted); }
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 60ch; }

/* Header and nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Sections */
.hero { padding: 64px 0 40px; }
.hero-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-row img.app-icon { width: 128px; height: 128px; border-radius: 28px; box-shadow: var(--shadow); }
.section { padding: 8px 0 40px; }
/* A page title with the mark beside it (About). */
.title-row { display: flex; align-items: center; gap: 18px; margin: 0 0 0.5rem; }
.title-row h1 { margin: 0; }
.title-row img { width: 64px; height: 64px; flex: none; }
@media (max-width: 480px) { .title-row { gap: 12px; } .title-row img { width: 48px; height: 48px; } }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.product {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: start;
}
.product img { width: 96px; height: 96px; border-radius: 22px; }
.product .glyph {
  width: 96px; height: 96px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 2.4rem;
}
@media (max-width: 520px) {
  .product { grid-template-columns: 1fr; }
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin: 0 6px 6px 0;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) {
  .button, .button:hover { color: var(--navy); }
}
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }

.screenshot {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
  margin: 8px 0 4px;
}
figure { margin: 24px 0; }
figcaption { font-size: 0.9rem; color: var(--text-muted); }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
}

dl.faq dt { font-weight: 700; margin-top: 1.4rem; }
dl.faq dd { margin: 0.3rem 0 0; }

table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

kbd {
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 48px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-block: 22px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--text-muted); }
