/*
 * Quiet Tools Studio storefront.
 *
 * One stylesheet for the whole site, because the site is a shop rather than a
 * collection of pages: a product card, a product page and the catalogue have to
 * look like they belong to the same place or the shop reads as unfinished.
 *
 * The palette is not a taste decision. #2dd4bf is the accent already used in the
 * product icons and in the report's verdict badges; #0f172a is the background of
 * the listing images. The site is meant to look like a continuation of the tools
 * rather than a separate storefront wearing their logo.
 *
 * Light and dark both, following the reader's system until they choose otherwise.
 */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0d9488;
  --accent-text: #ffffff;
  --accent-soft: #ccfbf1;
  --radius: 12px;
  --max: 1100px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 8px 24px rgb(15 23 42 / 5%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f172a;
    --surface: #1b2438;
    --surface-2: #16203a;
    --line: #2b3648;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #2dd4bf;
    --accent-text: #06231f;
    --accent-soft: #134e4a;
    --shadow: 0 1px 2px rgb(0 0 0 / 25%), 0 10px 30px rgb(0 0 0 / 25%);
  }
}

:root[data-theme='dark'] {
  --bg: #0f172a;
  --surface: #1b2438;
  --surface-2: #16203a;
  --line: #2b3648;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-text: #06231f;
  --accent-soft: #134e4a;
  --shadow: 0 1px 2px rgb(0 0 0 / 25%), 0 10px 30px rgb(0 0 0 / 25%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 42px 0 14px; }
h3 { font-size: 18px; margin: 0; letter-spacing: -0.01em; }

.lede { font-size: 18px; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

section { margin-bottom: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* ------------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--text);
  font-size: 17px;
}
.brand:hover { text-decoration: none; }

nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 15px; }
nav a:hover { color: var(--text); text-decoration: none; }
nav a[aria-current='page'] { color: var(--text); font-weight: 600; }

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 11px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

/* ------------------------------------------------------------------- heroes */

.hero { padding: 64px 0 40px; }
.hero h1 { max-width: 20ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.button {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.button:hover { text-decoration: none; border-color: var(--muted); }
.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.button.primary:hover { filter: brightness(1.06); }
.button.small { padding: 7px 13px; font-size: 14px; }
.button.wide { display: block; text-align: center; }

/* -------------------------------------------------------------------- cards */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.more { font-size: 15px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.card[hidden] { display: none; }

.card-head { display: flex; align-items: center; gap: 14px; color: var(--text); }
.card-head:hover { text-decoration: none; }
.card-head h3 { display: inline; }
.card .kind { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.card-summary { margin: 16px 0 0; color: var(--muted); font-size: 15px; flex: 1; }

.card-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.price { font-weight: 700; font-size: 17px; }
.price.free { color: var(--accent); }
.price.soon { color: var(--muted); font-weight: 600; font-size: 15px; }

/* ------------------------------------------------------------------ filters */

.filters { margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  min-width: 52px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.filter-empty { color: var(--muted); margin: 4px 0 0; }

/* ------------------------------------------------------------- product page */

.breadcrumb { padding-top: 28px; font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 6px; }

.product-head {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding: 28px 0 8px;
}
.product-title { display: flex; gap: 20px; align-items: flex-start; }
.product-title .lede { margin-top: 4px; }
.facts { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.buy-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.buy-box .price { font-size: 26px; display: block; margin-bottom: 14px; }
.buy-box .button { margin-bottom: 12px; }
.buy-box p:last-child { margin-bottom: 0; }

figure { margin: 24px 0; }
figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li {
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
ul.plain li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 21px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
ul.plain li:last-child { border-bottom: 0; }
ul.plain li strong { color: var(--text); }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.contact-card p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.big-link { font-size: 21px; font-weight: 650; }

/* ------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------- responsive */

@media (max-width: 820px) {
  .product-head { grid-template-columns: 1fr; }
  .buy-box { order: -1; }
  .hero { padding: 40px 0 28px; }
  nav { gap: 16px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .product-title { gap: 14px; }
  .product-title img { width: 52px; height: 52px; }
}

@media print {
  .site-header, .site-footer, .filters, .buy-box, .theme-toggle { display: none; }
  body { background: #fff; color: #000; }
}

/* A field that is knowingly unfinished. Marked rather than omitted: an absent
   seller name reads as an oversight, a marked one reads as work in progress. */
.todo {
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 14px;
  font-weight: 500;
}
