/* KOLO on the web: the landing, the legal pages and the server's own pages (/join, /connect, /qr, login).
   Paper and ink. Heavy tight headlines. One black pill. One quiet link. One yellow thing per screen.

   Shared building blocks (used by the server's HTML too):
     .page          centred column with the logo on top
     .title         heavy headline; <mark> inside = the yellow highlighter
     .copy          body text (also long-form legal text)
     .btn           black pill; .btn--primary is the same pill full width
     .link          quiet text link
     .card          white rounded panel
     .field         label + input
     .qr            QR code box (wrap an <svg> or <img>)
     .steps         numbered 01/02/03 list
*/

:root {
  --yellow: #ffd400;
  --ink: #000;
  --body: #424245;
  --quiet: #6e6e73;
  --paper: #fff;
  --soft: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --focus: #0071e3;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: var(--paper); }

/* ---------- shared blocks ---------- */

.page {
  display: grid;
  gap: 24px;
  width: min(100% - 40px, 480px);
  margin: 0 auto;
  padding: 28px 0 64px;
}
.page--wide { width: min(100% - 40px, 1120px); }
.page--text { width: min(100% - 40px, 680px); }

.logo { display: inline-block; width: 92px; line-height: 0; }
.logo img { width: 100%; height: auto; }

.title {
  margin: 0;
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.title mark {
  padding: 0 0.12em;
  margin: 0 -0.06em;
  color: inherit;
  background: url("highlight.webp") center 58% / 100% 82% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.copy { color: var(--body); font-size: 1.0625rem; line-height: 1.55; }
.copy > :first-child { margin-top: 0; }
.copy > :last-child { margin-bottom: 0; }
.copy h2 { margin: 2.2em 0 0.5em; color: var(--ink); font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; }
.copy h3 { margin: 1.6em 0 0.4em; color: var(--ink); font-size: 1.05rem; }
.copy ul { padding-left: 1.2em; }
.copy li { margin: 0.3em 0; }
.copy a { color: var(--ink); text-underline-offset: 3px; }
.copy strong { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: 700 1.0625rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #2c2c2e; }
.btn:active { transform: scale(0.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.3; cursor: default; }
.btn--primary { width: 100%; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--quiet);
  font: 600 0.9375rem/1.4 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.link:hover { color: var(--ink); }

.card {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.field { display: grid; gap: 6px; }
.field label, .field > span { font-size: 0.875rem; font-weight: 600; color: var(--body); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.4 var(--font);
}
.field input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
.field small { color: var(--quiet); font-size: 0.8125rem; }
.field--error input { border-color: #c4271b; }
.field--error small { color: #c4271b; }

.qr {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.qr svg, .qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.steps { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: 6px; counter-increment: step; }
.steps li::before {
  content: "0" counter(step);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--quiet);
}
.steps h3 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.steps p { margin: 0; color: var(--body); }

.muted { color: var(--quiet); font-size: 0.875rem; }
.center { text-align: center; justify-self: center; }

/* ---------- landing ---------- */

.top { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 0; }

.hero { display: grid; gap: 28px; justify-items: start; padding: 12vh 0 10vh; }
.hero .title { font-size: clamp(2.6rem, 1.2rem + 6.4vw, 6rem); letter-spacing: -0.05em; line-height: 0.98; }
.hero__line { display: block; }
.hero__sub { margin: 0; max-width: 30ch; color: var(--body); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.section { display: grid; gap: 32px; padding: 72px 0; border-top: 1px solid var(--line); }
.section__title { margin: 0; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }

/* the moment: a ChatGPT exchange, KOLO's line in yellow */
.chat {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: var(--soft);
}
.chat__head { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; font-weight: 600; color: var(--quiet); }
.chat__head b { color: var(--ink); }
.chat__stage { display: grid; }
.chat__turn { grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; transition: opacity 0.45s ease, transform 0.45s ease; }
.chat__turn[aria-hidden="true"] { opacity: 0; transform: translateY(6px); pointer-events: none; }
.chat__ask { justify-self: end; max-width: 85%; margin: 0; padding: 9px 16px; border-radius: 20px; background: #e3e3e8; font-size: 1rem; }
.moment { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--yellow); color: #000; }
.moment p { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.moment small { font-size: 0.8125rem; color: #4c4000; }
.dots { display: flex; gap: 4px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c7c7cc; transition: background-color 0.2s; }
.dots button[aria-pressed="true"]::after { background: #000; }

.split { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

.privacy-line { display: grid; justify-items: start; margin: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; max-width: 32ch; }
.privacy-line a { display: inline-block; margin-top: 12px; color: var(--quiet); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.privacy-line a:hover { color: var(--ink); }

.end { display: grid; gap: 28px; justify-items: start; padding: 96px 0; border-top: 1px solid var(--line); }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.875rem;
}
.foot nav { display: flex; gap: 20px; }
.foot a { color: inherit; text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--ink); }

/* legal / support pages */
.doc-head { display: grid; gap: 12px; padding: 48px 0 8px; }
.doc-head .title { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem); }
.todo { padding: 0 4px; border-radius: 4px; background: #fff3b0; color: #5a4a00; font-size: 0.9em; }


/* ---------- server pages (server/app/templates use kolo-* names) ----------
   Same look as the blocks above, mapped onto the server's class names. */

.kolo-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.kolo-header, .kolo-main, .kolo-footer { width: min(100% - 40px, 480px); margin: 0 auto; }
.kolo-header { padding: 28px 0 8px; }
.kolo-logo {
  display: block;
  width: 92px;
  height: 45px;
  overflow: hidden;
  background: url("kolo-logo.svg") left center / contain no-repeat;
  color: transparent;
  font-size: 0;
}
.kolo-main { display: grid; gap: 20px; align-content: start; padding: 32px 0 56px; }
.kolo-footer { display: flex; gap: 8px; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 0.875rem; }
.kolo-footer a { color: inherit; font-weight: 600; text-decoration: none; }
.kolo-footer a:hover { color: var(--ink); }

.kolo-title {
  margin: 0;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.kolo-title mark { padding: 0 0.12em; margin: 0 -0.06em; color: inherit; background: url("highlight.webp") center 58% / 100% 82% no-repeat; }
.kolo-lead { margin: -4px 0 0; color: var(--body); font-size: 1.0625rem; line-height: 1.5; }
.kolo-muted { margin: 0; color: var(--quiet); font-size: 0.875rem; }
.kolo-muted a { color: inherit; font-weight: 600; }
.kolo-error { margin: 0; padding: 12px 16px; border-radius: 14px; background: #fdecea; color: #a1190f; font-size: 0.9375rem; }

.kolo-card { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); }
.kolo-auth-title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.kolo-form { display: grid; gap: 12px; }
.kolo-label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--body); }
.kolo-input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 14px;
  background: var(--paper); color: var(--ink); font: 1rem/1.4 var(--font);
}
.kolo-input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }

/* primary = the one black pill; plain kolo-button = quiet secondary */
.kolo-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
}
.kolo-button:hover { border-color: #000; }
.kolo-button-primary { min-height: 52px; border: 0; background: #000; color: #fff; font-size: 1.0625rem; }
.kolo-button-primary:hover { background: #2c2c2e; }
.kolo-form .kolo-button, .kolo-card > .kolo-button { width: 100%; }
.kolo-auth-signup { border: 0; background: var(--soft); }

/* connect steps */
.kolo-connect-steps { display: grid; gap: 20px; }
.kolo-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.kolo-step { display: block; counter-increment: step; font-size: 1.0625rem; line-height: 1.45; }
.kolo-step::before { display: block; margin-bottom: 6px; content: "0" counter(step); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; color: var(--quiet); }
.kolo-step a { color: var(--ink); text-underline-offset: 3px; }
.kolo-fields { display: grid; gap: 8px; margin: 6px 0 0; }
.kolo-field { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.kolo-field-label { font-size: 0.8125rem; font-weight: 600; color: var(--quiet); }
.kolo-field-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; min-width: 0; }
.kolo-copy-value { min-width: 0; overflow-wrap: anywhere; font: 0.875rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.kolo-copy { flex: none; min-height: 36px; padding: 0 14px; font-size: 0.875rem; }

/* QR */
.kolo-qr-image { display: grid; place-items: center; width: min(100%, 280px); margin: 0 auto; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.kolo-qr-image svg { display: block; width: 100%; height: auto; }
.kolo-qr-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--soft); }

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