/* wucop — minimal local-first scratchpad. Self-contained, no external assets. */

:root {
  --paper:      #f2f4f3;
  --paper-2:    #ffffff;
  --ink:        #1b211f;
  --muted:      #626b67;
  --line:       #dde2e0;
  --accent:     #2e6b5a;
  --accent-ink: #1f4c40;
  --accent-soft:#e7efeb;
  --amber:      #b7791f;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 760px);
  margin-inline: auto;
}

/* ---- header ---- */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}
.nav { display: flex; gap: 1.4rem; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---- hero ---- */
.hero { padding: clamp(3rem, 9vw, 5.5rem) 0 2.5rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 2rem;
}

/* ---- scratchpad signature ---- */
.pad {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(27,33,31,0.02), 0 14px 40px -28px rgba(27,33,31,0.35);
  overflow: hidden;
}
.pad-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  background: linear-gradient(var(--paper), var(--paper-2));
}
.pad-bar .save { display: inline-flex; align-items: center; gap: 0.4rem; }
.pad-bar .save::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: 0.35; transition: opacity 0.25s;
}
.pad-bar .save.on::before { opacity: 1; }
.pad textarea {
  display: block;
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 1.15rem 1.15rem 1.4rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.98rem;
  line-height: 1.7;
  caret-color: var(--accent);
}
.pad textarea::placeholder { color: #a9b2ae; }
.pad-foot {
  padding: 0.55rem 0.95rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* ---- features ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3.5rem 0 1rem;
  border-top: 1px solid var(--line);
  margin-top: 3.5rem;
}
.grid h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  margin: 0 0 0.4rem;
}
.grid p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.grid .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.7rem;
}

/* ---- prose pages ---- */
.prose { padding: clamp(2.5rem, 7vw, 4rem) 0 1rem; max-width: var(--measure); }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: 1.4rem; }
.prose h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 2.2rem 0 0.6rem;
}
.prose p { margin: 0 0 1.1rem; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose .meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 0.72rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s;
}
.btn:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }

/* ---- 404 ---- */
.center {
  min-height: 62vh;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
}
.code404 {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

/* ---- footer ---- */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 1.6rem 0 2.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---- a11y + responsive ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; gap: 1.9rem; }
  .nav { gap: 1rem; }
}

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