/*
 * SuiteMemo marketing site — one stylesheet, no build step, no external fonts.
 * Tokens are copied from docs/builder/design/design-spec.md §2.2 (owned register)
 * so the site and the extension's popup/options pages look like one product.
 * Mobile-first; light + dark via prefers-color-scheme; honours reduced motion,
 * reduced transparency and increased contrast.
 */

/* ===== Tokens (light) ===== */
:root {
  color-scheme: light dark;

  --bg: #F5F5F7;
  --bg-elevated: #FFFFFF;
  --bg-inset: #EBEBEF;
  --label: rgba(0, 0, 0, .85);
  --label-2: rgba(0, 0, 0, .55);
  --label-3: rgba(0, 0, 0, .40);
  --separator: rgba(0, 0, 0, .08);
  --brand-500: #607799;
  --brand-600: #4F6A93;
  --brand-300: #9FB4D4;
  --accent: var(--brand-600);
  --accent-fill: rgba(96, 119, 153, .12);
  --warn: #B25E00;
  --warn-fill: rgba(245, 124, 0, .12);
  --success: #2E7D32;
  --danger: #C62828;
  --danger-fill: rgba(198, 40, 40, .10);
  --focus: #3B82F6;
  --on-brand: #FFFFFF;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-full: 999px;

  --sp-1: .125rem;
  --sp-2: .25rem;
  --sp-3: .375rem;
  --sp-4: .5rem;
  --sp-5: .75rem;
  --sp-6: 1rem;
  --sp-7: 1.5rem;
  --sp-8: 2rem;
  --sp-9: 3rem;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ring-hairline: 0 0 0 1px rgba(0, 0, 0, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .06);
  --ring-focus: 0 0 0 4px rgba(59, 130, 246, .25);
  --material-thin: rgba(255, 255, 255, .72);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-hover: ease;
  --dur-press: 100ms;
  --dur-fast: 120ms;

  --measure: 42rem;
  --wide: 68rem;
}

/* ===== Tokens (dark) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E;
    --bg-elevated: #2C2C2E;
    --bg-inset: #3A3A3C;
    --label: rgba(255, 255, 255, .92);
    --label-2: rgba(255, 255, 255, .62);
    --label-3: rgba(255, 255, 255, .42);
    --separator: rgba(255, 255, 255, .10);
    --accent: var(--brand-300);
    --accent-fill: rgba(159, 180, 212, .16);
    --warn: #F0A24A;
    --warn-fill: rgba(245, 124, 0, .18);
    --success: #6CCB74;
    --danger: #FF6B6B;
    --danger-fill: rgba(255, 107, 107, .16);
    --focus: #60A5FA;
    --ring-hairline: 0 0 0 1px rgba(255, 255, 255, .08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .48), 0 1px 3px rgba(0, 0, 0, .40);
    --material-thin: rgba(28, 28, 30, .72);
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root { --material-thin: var(--bg-elevated); }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root {
    --ring-hairline: 0 0 0 1px currentColor;
    --separator: currentColor;
    --label-2: var(--label);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

/* Anchor targets land below the sticky header (taller on narrow screens). */
[id] { scroll-margin-top: 7rem; }
@media (min-width: 40rem) { [id] { scroll-margin-top: 5rem; } }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--sp-5); }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.015em; margin-top: var(--sp-8); }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; margin-top: var(--sp-7); }
p, ul, ol, dl, table { margin: 0 0 var(--sp-6); }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: var(--sp-2); }

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

code, .mono {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--bg-inset);
  border-radius: var(--r-xs);
  padding: 0 var(--sp-2);
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--mono);
  font-size: .8125rem;
  background: var(--bg-inset);
  border-radius: var(--r-sm);
  padding: var(--sp-5);
  overflow-x: auto;
  margin: 0 0 var(--sp-6);
}
pre code { background: none; padding: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ===== Skip link ===== */
.skip {
  position: absolute;
  left: var(--sp-5);
  top: -100px;
  z-index: 100;
  background: var(--bg-elevated);
  color: var(--accent);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}
.skip:focus { top: var(--sp-5); }

/* ===== Layout ===== */
.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.prose { max-width: var(--measure); }

main { display: block; padding: var(--sp-8) 0 var(--sp-9); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--material-thin);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--separator);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--label);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}
.brand svg { width: 28px; height: 28px; color: var(--brand-500); flex: none; }
.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li + li { margin-top: 0; }
.nav a {
  display: inline-block;
  padding: var(--sp-3) var(--sp-2);
  color: var(--label);
  text-decoration: none;
  font-size: .9375rem;
  min-height: 44px;
  line-height: calc(44px - 2 * var(--sp-3));
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ===== Hero ===== */
.hero { padding: var(--sp-7) 0 var(--sp-8); }
.hero h1 { font-size: 2.125rem; max-width: 20ch; }
.lede { font-size: 1.125rem; color: var(--label); max-width: var(--measure); }
.small { font-size: .875rem; color: var(--label-2); }

/* ===== Buttons ===== */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin: var(--sp-7) 0 var(--sp-5);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  min-height: 44px;
  padding: var(--sp-4) var(--sp-7);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-elevated);
  color: var(--label);
  box-shadow: var(--ring-hairline), var(--shadow-sm);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-hover);
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  /* brand-600 fill: white text at 5.5:1 (brand-500 is only 4.6:1) */
  background: var(--brand-600);
  color: var(--on-brand);
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--bg-inset); text-decoration: none; }
  .btn--primary:hover { background: #445C80; }
}

/* "Coming soon" stands in for the store buttons until the listings are public. */
.soon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-5);
  margin: var(--sp-7) 0 var(--sp-5);
  color: var(--label-2);
}
.soon__pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-full);
  background: var(--accent-fill);
  color: var(--accent);
  font-weight: 600;
}

/* ===== Cards / sections ===== */
.section { padding: var(--sp-7) 0; }
.section > h2:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  box-shadow: var(--ring-hairline), var(--shadow-sm);
  padding: var(--sp-7) var(--sp-6);
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-top: 0; }

/* Screenshot placeholders: the box is a stand-in, the caption is real. */
.shot { margin: 0; }
.shot__frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(135deg, var(--accent-fill) 0 12px, transparent 12px 24px),
    var(--bg-inset);
  box-shadow: var(--ring-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  text-align: center;
  color: var(--label);
  font-size: .875rem;
}
.shot figcaption { margin-top: var(--sp-5); }
.shot figcaption strong { display: block; font-size: 1rem; color: var(--label); }

/* ===== Pricing ===== */
.table-wrap { overflow-x: auto; margin: 0 0 var(--sp-6); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  box-shadow: var(--ring-hairline);
  font-size: .9375rem;
}
caption {
  text-align: left;
  font-weight: 600;
  padding: 0 0 var(--sp-4);
  color: var(--label);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--separator);
}
thead th { font-size: .8125rem; color: var(--label-2); font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.price { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: .9375rem; font-weight: 500; color: var(--label-2); letter-spacing: 0; }

/* ===== Trust block ===== */
.trust dt { font-weight: 600; margin-top: var(--sp-6); }
.trust dt:first-child { margin-top: 0; }
.trust dd { margin: var(--sp-2) 0 0; }
.list-check, .list-cross { list-style: none; padding-left: 0; }
.list-check li, .list-cross li { padding-left: 1.5rem; position: relative; }
.list-check li::before, .list-cross li::before {
  position: absolute; left: 0; top: 0; font-weight: 700;
}
.list-check li::before { content: "+"; color: var(--success); }
.list-cross li::before { content: "\2212"; color: var(--danger); }

/* ===== Notices ===== */
.draft {
  background: var(--warn-fill);
  color: var(--label);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-sm);
  padding: var(--sp-5) var(--sp-6);
  font-size: .9375rem;
}
.draft strong { color: var(--label); font-weight: 700; }
.ph {
  background: var(--warn-fill);
  border-radius: var(--r-xs);
  padding: 0 var(--sp-2);
  font-weight: 600;
}
.toc { font-size: .9375rem; }
.toc ol { margin-bottom: 0; }

.faq h3 { margin-top: var(--sp-8); }
.faq h2 + h3 { margin-top: var(--sp-6); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--separator);
  padding: var(--sp-8) 0 var(--sp-9);
  font-size: .875rem;
  color: var(--label-2);
}
.site-footer p { margin-bottom: var(--sp-4); }
.site-footer .seller { color: var(--label); }
.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
}
.foot-nav li + li { margin-top: 0; }
.foot-nav a { display: inline-block; min-height: 44px; line-height: 44px; }

/* ===== Wider screens ===== */
@media (min-width: 40rem) {
  h1 { font-size: 2.5rem; }
  .hero { padding: var(--sp-9) 0 var(--sp-8); }
  .hero h1 { font-size: 2.75rem; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card { padding: var(--sp-7); }
}
@media (min-width: 60rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media print {
  .site-header { position: static; backdrop-filter: none; }
  .skip, .actions { display: none; }
  a { color: inherit; }
}
