/* Taskifier site. Matches the iOS app: SF Pro Rounded, system grays, the icon's red, True Black in dark mode. */

:root {
  color-scheme: light dark;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --red: #cd3838;            /* app icon */
  --blue: #007aff;           /* iOS system blue, the app's "Settings"/"Done" */
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;     /* iOS systemGroupedBackground */
  --card: #ffffff;
  --text: #000000;
  --text-secondary: rgb(60 60 67 / 0.6);
  --text-tertiary: rgb(60 60 67 / 0.3);
  --separator: rgb(60 60 67 / 0.18);
  --bar: rgb(142 142 147 / 0.16);

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red: #e04848;          /* a touch lighter for contrast on black */
    --blue: #0a84ff;
    --bg: #000000;           /* True Black */
    --bg-grouped: #000000;
    --card: #1e1e23;         /* Dark Gray charcoal */
    --text: #ffffff;
    --text-secondary: rgb(235 235 245 / 0.6);
    --text-tertiary: rgb(235 235 245 / 0.3);
    --separator: rgb(84 84 88 / 0.6);
    --bar: rgb(142 142 147 / 0.24);
  }
}

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

html {
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--card);
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

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

/* MARK: Header and footer */

.site-header {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a { color: var(--text-secondary); font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.75rem 2.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer ul { display: flex; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--text-secondary); }
.site-footer p { margin: 0; }

/* MARK: Home — icon only */

body.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand-spacer { flex: 1; }

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1.75rem 3rem;
  text-align: center;
}

.home-icon {
  width: min(200px, 42vw);
  height: auto;
  border-radius: 44px;
  filter: drop-shadow(0 8px 24px rgb(0 0 0 / 0.12));
}

.home-name {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* MARK: Documents (privacy, support) */

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.75rem 1rem;
}
.doc h1 {
  font-size: clamp(2.25rem, 6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}
.doc .meta { color: var(--text-secondary); margin: 0 0 2rem; }
.doc h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 2.75rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}
.doc h3 { font-size: 1.125rem; margin: 1.75rem 0 0.5rem; }
.doc p, .doc li { font-size: 1.0625rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin: 0.375rem 0; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-grouped);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
@media (prefers-color-scheme: dark) { .doc code { background: var(--card); } }

.callout {
  background: var(--bg-grouped);
  border-radius: var(--radius-l);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
@media (prefers-color-scheme: dark) { .callout { background: var(--card); } }
.callout p:first-child { margin-top: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.toc {
  background: var(--bg-grouped);
  border-radius: var(--radius-l);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1rem;
}
@media (prefers-color-scheme: dark) { .toc { background: var(--card); } }
.toc h2 { margin: 0 0 0.5rem; font-size: 1.0625rem; }
.toc ol { margin: 0; columns: 2 14rem; column-gap: 2rem; }
.toc li { margin: 0.2rem 0; font-size: 0.9375rem; break-inside: avoid; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--separator);
}
.doc th { font-weight: 700; }
.doc thead th { color: var(--text-secondary); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Placeholders the owner must fill in before publishing. Loud on purpose. */
.todo {
  background: rgb(255 204 0 / 0.3);
  border-radius: 4px;
  padding: 0 0.25em;
  font-weight: 600;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--bg-grouped);
  border-radius: var(--radius-l);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
@media (prefers-color-scheme: dark) { .contact-card { background: var(--card); } }
.contact-card .label { color: var(--text-secondary); font-size: 0.875rem; }
.contact-card a { font-size: 1.25rem; font-weight: 700; }

.faq details {
  border-bottom: 1px solid var(--separator);
  padding: 0.875rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-tertiary); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.5rem 0 0; color: var(--text-secondary); }

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