/* korigo.app (D-32): one stylesheet, system fonts, no external resources. Colours come from the app icon. */
:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-border: rgba(28, 25, 20, 0.08);
  --text: #1c1914;
  --text-secondary: rgba(28, 25, 20, 0.74);
  --text-muted: rgba(28, 25, 20, 0.56);
  --hairline: rgba(28, 25, 20, 0.12);
  --accent: #0b6e69;
  --accent-hover: #08524e;
  --accent-text: #ffffff;
  --accent-tint: rgba(63, 208, 201, 0.16);
  --wicker: #e9a863;
  --wicker-tint: rgba(233, 168, 99, 0.18);
  --shadow: 0 1px 2px rgba(28, 25, 20, 0.06), 0 8px 24px rgba(28, 25, 20, 0.08);
  --radius: 1rem;
  --page: 64rem;
  --narrow: 42.5rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --space-section: clamp(2.5rem, 1.5rem + 5vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1012;
    --surface: #17191c;
    --surface-border: rgba(255, 255, 255, 0.07);
    --text: #f3f1ec;
    --text-secondary: rgba(243, 241, 236, 0.78);
    --text-muted: rgba(243, 241, 236, 0.58);
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #4fd8d0;
    --accent-hover: #7fe5df;
    --accent-text: #062a28;
    --accent-tint: rgba(79, 216, 208, 0.14);
    --wicker-tint: rgba(233, 168, 99, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -100vw;
}
.skip:focus { left: var(--gutter); top: 0.5rem; padding: 0.5rem 0.75rem; background: var(--surface); z-index: 1; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 2rem; height: 2rem; border-radius: 22.5%; }
.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--accent-tint); }

/* Home: hero */
.hero {
  text-align: center;
  padding: var(--space-section) 0 calc(var(--space-section) * 0.75);
}
.hero-icon {
  width: clamp(6.5rem, 5rem + 6vw, 9rem);
  height: auto;
  border-radius: 22.5%;
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 1.75rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.lead {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--text-secondary);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.55;
}
.pill {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--wicker-tint);
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.875rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.button-primary { background: var(--accent); color: var(--accent-text); }
.button-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.button-secondary { border: 1px solid var(--hairline); color: var(--text); }
.button-secondary:hover { color: var(--text); background: var(--accent-tint); }

/* Home: features */
.features {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space-section);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}
.feature {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
}
.feature svg {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border-radius: 0.75rem;
  background: var(--accent-tint);
  color: var(--accent);
}
.feature h2 { margin: 1rem 0 0.35rem; font-size: 1.0625rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; }

/* Legal pages */
.legal {
  max-width: calc(var(--narrow) + 2 * var(--gutter));
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}
.legal .eyebrow { margin-top: 0; }
.legal h1 {
  margin: 0;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.meta {
  margin: 0.75rem 0 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.toc {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
}
.toc h2 {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2 14rem; column-gap: 2rem; }
.toc li { margin: 0.2rem 0; break-inside: avoid; }
.toc a { color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.legal section { scroll-margin-top: 1.5rem; }
.legal section h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.legal section p, .legal section li { color: var(--text-secondary); }
.legal section ul { padding-left: 1.25rem; }
.legal section li { margin: 0.4rem 0; }
.legal strong { color: var(--text); font-weight: 600; }

/* 404 */
.notfound { text-align: center; padding: var(--space-section) 0; }
.notfound h1 { margin: 1.5rem 0 0.5rem; font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem); letter-spacing: -0.02em; }
.notfound p { color: var(--text-secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); color: var(--text-muted); font-size: 0.875rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 36rem) {
  .site-footer .wrap { flex-direction: column; text-align: center; }
  .site-footer nav { justify-content: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .nav a, .button, .toc a, .site-footer a { transition: color 0.15s, background-color 0.15s; }
}
