/* Knowsie site — the app's own light palette (src/theme/colors.ts) and
   type (Fraunces for headlines, the system face for reading). Light only
   (Malwina, 2026-10-07). */

/* Fraunces 600, upright and italic, latin subset, served from this site so
   visitors' browsers make no third-party font requests. SIL Open Font License 1.1,
   see /assets/fonts/OFL.txt. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-600-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F7F3EC;
  --surface: #FFFFFF;
  --surface-alt: #EFEAE1;
  --border: #DDD6C9;
  --text: #211F1C;
  --muted: #726C63;
  --accent: #1F4D57;
  --accent-bright: #2E6B78;
  --on-accent: #F7F3EC;
  /* Error messages: the app's light-theme red tint, with the red a shade
     darker so the text passes contrast (AA) on it. */
  --danger: #9B2C2C;
  --danger-bg: #F5DADA;
  /* The eye mark (see .eye below). */
  --eye-line: #211F1C;
  --eye-white: none;
  --eye-pupil: #211F1C;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*, *::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 var(--sans);
  padding-inline: 20px;
}
a { color: var(--accent-bright); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; }
.narrow { max-width: 680px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: italic 600 26px/1 var(--serif);
  letter-spacing: -0.01em;
}
.brand svg { width: 52px; height: 34px; flex: none; }

/* Malvi's hand-drawn eye, traced: ink on cream; on dark the eye-white
   fills in and the pupil stays dark. */
.eye .eye-white { fill: var(--eye-white); stroke: var(--eye-white); stroke-width: 8; stroke-linejoin: round; }
.eye .eye-ink { fill: var(--eye-line); }
.eye .eye-pupil { fill: var(--eye-pupil); }
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--text); }

/* Home */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-block: 56px 72px;
}
.hero h1 {
  margin: 0 0 18px;
  font: 600 clamp(40px, 6vw, 64px)/1.05 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { margin: 0 0 28px; font-size: 19px; color: var(--muted); max-width: 34em; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); flex: none; }
.hero-mark {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 28px;
  background: var(--surface-alt);
  display: grid;
  place-items: center;
}
/* Malwina's intro: two eyes, the left one winks once (about every 5 s). */
.wink { position: relative; width: 84%; aspect-ratio: 844 / 300; }
.wink svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--text); }
.wink-closed { opacity: 0; animation: wink-closed 5s infinite; }
.wink-open { animation: wink-open 5s infinite; }
@keyframes wink-closed { 0%, 59.99% { opacity: 0; } 60%, 63.99% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes wink-open { 0%, 59.99% { opacity: 1; } 60%, 63.99% { opacity: 0; } 64%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wink-closed, .wink-open { animation: none; } }

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 40px 64px;
  border-top: 1px solid var(--border);
}
.points h2 { margin: 0 0 6px; font: italic 600 22px/1.25 var(--serif); }
.points p { margin: 0; color: var(--muted); font-size: 16px; }

/* Text pages (privacy, support) */
.doc { padding-block: 32px 72px; }
.doc h1 { margin: 0 0 6px; font: 600 clamp(34px, 5vw, 46px)/1.1 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.doc .meta { margin: 0 0 32px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 40px 0 10px; font: italic 600 24px/1.25 var(--serif); text-wrap: balance; }
.doc h3 { margin: 26px 0 6px; font-size: 17px; }
.doc p, .doc li { max-width: 65ch; }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.doc th { background: var(--surface-alt); font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }
.callout { padding: 16px 18px; border-radius: 12px; background: var(--surface-alt); color: var(--text); font-size: 16px; }
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.contact-card strong { font-size: 19px; }
.contact-card + .contact-card { margin-top: 12px; }
.toc { margin: 24px 0 8px; padding: 16px 18px; border-radius: 12px; background: var(--surface-alt); font-size: 16px; }
.doc .toc p { margin: 0 0 6px; }
.doc .toc ul { margin: 0; }
.doc .toc li + li { margin-top: 2px; }
.doc .table-scroll:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* Password reset form (/reset/) */
.form-field { display: grid; gap: 6px; max-width: 420px; margin: 0 0 18px; }
.form-field label { font-weight: 600; font-size: 16px; }
/* 17px keeps iOS Safari from zooming in when the field is tapped. */
.form-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 17px/1.4 var(--sans);
}
.form-field input:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; border-color: var(--accent-bright); }
.doc .form-hint { margin: 0; color: var(--muted); font-size: 15px; }
.form-check { display: flex; width: fit-content; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 16px; cursor: pointer; }
.form-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.form-error { max-width: 420px; margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 16px; }
.button {
  min-height: 48px;
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 17px/1.2 var(--sans);
  cursor: pointer;
}
.button:hover { background: var(--accent-bright); }
.button:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.button:disabled { opacity: 0.55; cursor: default; }
.doc .form-help { margin-top: 40px; color: var(--muted); font-size: 15px; }
[hidden] { display: none !important; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 24px 48px; }
  .hero-mark { max-width: 220px; border-radius: 22px; }
  .points { grid-template-columns: 1fr; gap: 24px; }
  .site-nav { gap: 16px; }
}
