/* Lloyd design system — v0.1 draft
   Paper and ink, one hi-vis accent, drafting-sheet structure.
   Fonts: load tokens.json > font.google-fonts-url before this file. */

:root {
  /* colour */
  --paper: #f2efe9;
  --paper-2: #e7e3da;
  --card: #fbfaf7;
  --ink: #121211;
  --ink-2: #5c5a55;
  --ink-3: #7a776f;
  --line: #cfc9bd;
  --night: #121211;
  --on-night: #f2efe9;
  --on-night-2: #a19e96;
  --hivis: #d9ff3f;
  --redline: #c2361b;

  /* type */
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;

  /* space + shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r-image: 8px; --r-card: 12px; --r-pill: 999px;
  --gutter: 32px;
  --max: 1360px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (max-width: 760px) { :root { --gutter: 16px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--hivis); color: var(--ink); }

/* The sheet: page framed by a hairline, like a drawing border */
.sheet {
  max-width: var(--max);
  margin: 0 auto;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  min-height: 100vh;
}
.band { border-top: 1px solid var(--ink); padding: var(--s9) var(--gutter); }
.band--tight { padding-top: var(--s7); padding-bottom: var(--s7); }
@media (max-width: 760px) {
  .sheet { border-left: 0; border-right: 0; }
  .band { padding: var(--s8) var(--gutter); }
}

/* ---------- type ---------- */
.display, .h1, .h2, .h3 { font-family: var(--sans); font-weight: 500; margin: 0; text-wrap: balance; }
.display { font-size: clamp(44px, 7vw, 88px); line-height: .98; letter-spacing: -.03em; }
.h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -.025em; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -.02em; }
.h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.lead { font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 36em; margin: 0; text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.4; }
/* Lloyd's voice: one italic serif phrase per headline */
.voice { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ---------- eyebrow: section number + dimension line ---------- */
.eyebrow {
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  margin-bottom: var(--s5);
}
.eyebrow .dim {
  position: relative; flex: 0 0 56px; height: 1px; background: currentColor;
}
.eyebrow .dim::before, .eyebrow .dim::after {
  content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: currentColor;
}
.eyebrow .dim::before { left: 0; }
.eyebrow .dim::after { right: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 500 14px/1 var(--mono);
  padding: 13px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--ease) 160ms, color var(--ease) 160ms, transform var(--ease) 160ms;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--primary { background: var(--hivis); }              /* one per view: Start free */
.btn--primary:hover { background: var(--ink); color: var(--hivis); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.on-night .btn { border-color: var(--on-night); color: var(--on-night); }
.on-night .btn--primary { background: var(--hivis); border-color: var(--hivis); color: var(--ink); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 400 12px/1 var(--mono);
  padding: 6px 10px; border: 1px solid currentColor; border-radius: var(--r-pill);
}
.tag--hivis { background: var(--hivis); border-color: var(--hivis); color: var(--ink); }
.tag--redline { color: var(--redline); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--ink); border-radius: var(--r-card);
  padding: var(--s5); background: var(--paper);
}
.card--raised {
  background: var(--card); border-color: var(--line);
  box-shadow: 0 1px 0 rgba(18,18,17,.04), 0 18px 40px -18px rgba(18,18,17,.28);
}

/* spec table — mono key/value rows with hairlines (project cards, plan sets) */
.spec { width: 100%; border-collapse: collapse; font: 400 13px/1.4 var(--mono); }
.spec tr { border-bottom: 1px solid var(--ink); }
.spec td { padding: 10px 0; vertical-align: top; }
.spec td:last-child { text-align: right; }
.spec--soft tr { border-color: var(--line); }

/* app window chrome — for showing Lloyd working inside SketchUp / Revit / Claude */
.window { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.window__bar {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font: 400 12px/1 var(--mono); color: var(--ink-2);
}
.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }

/* prompt card — a builder's words and Lloyd's reply */
.prompt { display: grid; gap: var(--s3); }
.prompt__who { font: 400 12px/1 var(--mono); color: var(--ink-2); margin-bottom: 6px; }
.prompt__you {
  font: 400 15px/1.45 var(--sans); background: var(--paper-2);
  border-radius: 10px; padding: 12px 14px;
}
.prompt__lloyd { font: 400 15px/1.45 var(--sans); padding: 2px 2px 0; }
.prompt__lloyd b { font-weight: 500; }

/* ---------- annotation on imagery ---------- */
.annot { position: absolute; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.annot__dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: var(--hivis); box-shadow: 0 0 0 2px var(--ink);
}
.annot__line { width: 40px; height: 1px; background: var(--ink); flex: none; }
.annot__label {
  font: 500 12px/1 var(--mono); background: var(--hivis); color: var(--ink);
  padding: 7px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.annot--left { flex-direction: row-reverse; transform: translateX(calc(-100% + 14px)); }  /* label to the left of the point */
.annot--redline .annot__label { background: var(--redline); color: #fff; }
.annot--redline .annot__dot { background: var(--redline); box-shadow: 0 0 0 2px #fff; }

/* ---------- image frames & placeholders ---------- */
.frame { position: relative; border-radius: var(--r-image); overflow: hidden; background: var(--paper-2); }
.frame__caption {
  position: absolute; left: 12px; bottom: 12px;
  font: 400 12px/1 var(--mono); background: var(--paper); color: var(--ink);
  padding: 7px 10px; border-radius: var(--r-pill);
}
/* drafting hatch for placeholders */
.hatch {
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(-45deg, transparent 0 11px, rgba(18,18,17,.09) 11px 12px);
}

/* ---------- accordion rows ---------- */
.rows { border-top: 1px solid var(--ink); }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s5);
  padding: var(--s5) 0; border-bottom: 1px solid var(--ink);
}
.row .plus { font: 300 32px/1 var(--sans); }

/* ---------- night section ---------- */
.on-night { background: var(--night); color: var(--on-night); }
.on-night .lead, .on-night .small { color: var(--on-night-2); }
.panel-hivis { border: 1px solid var(--hivis); border-radius: var(--r-card); padding: var(--s5); }
.on-night .accent { color: var(--hivis); }   /* hi-vis text is allowed on night only */

/* ---------- title block footer (drawing-sheet title block) ---------- */
.titleblock {
  display: grid; grid-template-columns: 2fr repeat(4, 1fr);
  border-top: 1px solid var(--ink);
}
.titleblock > div { padding: var(--s4) var(--gutter) var(--s4) var(--s4); border-left: 1px solid var(--ink); }
.titleblock > div:first-child { border-left: 0; padding-left: var(--gutter); }
.titleblock .k { font: 400 11px/1 var(--mono); color: var(--ink-2); margin-bottom: 8px; }
.titleblock .v { font: 500 14px/1.3 var(--mono); }
@media (max-width: 760px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div { border-left: 0; border-top: 1px solid var(--ink); padding-left: var(--gutter); }
  .titleblock > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .titleblock > div:nth-child(odd):not(:first-child) { border-left: 1px solid var(--ink); }
}

/* ---------- utilities ---------- */
.wrap { max-width: var(--max); margin: 0 auto; }
.grid { display: grid; gap: var(--s5); }
.stack > * + * { margin-top: var(--s4); }
.muted { color: var(--ink-2); }
.hl { background: linear-gradient(transparent 58%, var(--hivis) 58% 92%, transparent 92%); }  /* marker highlight */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
