/* Zettly site — the app's Paper theme (apps/desktop/DesignSystem/tokens/theme-paper.css).
   Secondary text uses ink2, never ink3: ink3 is ~3:1 on paper, under WCAG's 4.5:1. */
:root {
  --canvas: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1c1a17;
  --ink2: #5b564d;
  --line: #e2dccf;
  --rule: rgba(90, 114, 134, 0.16);
  --margin: rgba(192, 57, 43, 0.28);
  --accent: #a2563b;
  --on-accent: #fffdf8;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.06), 0 12px 32px rgba(28, 26, 23, 0.12);
  /* system faces only: no font requests, so the site loads nothing from third parties */
  --serif: ui-serif, "New York", Newsreader, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "IBM Plex Mono", Menlo, monospace;
  color-scheme: light dark;
}
/* Dark follows the system unless the visitor pinned a theme; theme.js sets
   data-theme on <html> for a pinned choice, and without it nothing changes. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #1d1c19;
    --surface: #2a2824;
    --ink: #efeae1;
    --ink2: #b3aca2;
    --line: #3a3630;
    --rule: rgba(239, 234, 225, 0.06);
    --margin: rgba(217, 136, 95, 0.22);
    --accent: #d9885f;
    --on-accent: #1c1a17;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  --canvas: #1d1c19;
  --surface: #2a2824;
  --ink: #efeae1;
  --ink2: #b3aca2;
  --line: #3a3630;
  --rule: rgba(239, 234, 225, 0.06);
  --margin: rgba(217, 136, 95, 0.22);
  --accent: #d9885f;
  --on-accent: #1c1a17;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--canvas);
  /* the Notebook paper: a 27px rule and a red margin */
  background-image:
    linear-gradient(90deg, transparent 63px, var(--margin) 63px, var(--margin) 64px, transparent 64px),
    repeating-linear-gradient(180deg, transparent 0 26px, var(--rule) 26px 27px);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 0 80px; }
@media (max-width: 720px) {
  body { background-image: repeating-linear-gradient(180deg, transparent 0 26px, var(--rule) 26px 27px); }
  .wrap { padding: 0 16px; }
}

/* header / footer */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 22px/1 var(--serif); }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top nav a { color: var(--ink2); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
/* the theme switch: hidden until theme.js runs, since it does nothing without it */
.theme-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.theme-switch[hidden] { display: none; }
.theme-switch button { display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink2); cursor: pointer; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 26, 23, 0.14); }
footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 28px 0 48px; color: var(--ink2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--ink2); }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(40px, 7vw, 72px); margin: 48px 0 16px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; }
h3 { font-size: 22px; margin: 32px 0 8px; }
.lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink2); max-width: 36em; margin: 0 0 28px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--ink2); }
.label { font: italic 400 20px/1.3 var(--serif); color: var(--ink2); }

/* call to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 48px; }
.button { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; padding: 12px 20px; border-radius: 8px; }
.button[aria-disabled="true"] { opacity: 0.85; cursor: default; }

/* screenshots */
.shot { border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.hero-shot { margin: 0 0 24px; }

/* features: text beside a screenshot, alternating */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-top: 112px; }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-of-type(even) .copy { order: 2; }
.feature ul { padding-left: 1.1em; margin: 12px 0 0; color: var(--ink2); }
.feature li { margin: 6px 0; }
.feature p { color: var(--ink2); margin: 0; }
@media (max-width: 860px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 72px; }
  .feature:nth-of-type(even) .copy { order: 0; }
}

/* the privacy card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px 32px; box-shadow: var(--shadow); margin-top: 112px; }
.card ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--ink2); }

/* documents (privacy, support) */
.doc { max-width: 42em; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 4px; }
.doc h2 { font-size: 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc p, .doc li { color: var(--ink); }
.doc table { border-collapse: collapse; width: 100%; font-size: 16px; margin-top: 8px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
kbd { font: 13px var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--surface); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
