/* ============================================================
   AI Makers Club — colors_and_type.css
   One file. Every token. Import this and you're 80% there.
   ============================================================ */

/* --- Fonts --------------------------------------------------- */
/* JetBrains Mono — structural. Instrument Serif — editorial. */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Instrument+Serif:ital@0;1&display=swap');

/* Uncomment when /fonts/*.woff2 is populated for offline use
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
*/

:root {
  /* --- Color: inks & paper --- */
  --paper:        #F3ECDA;
  --paper-2:      #EAE1C8;
  --paper-3:      #DFD4B3;
  --ink:          #15224A;
  --ink-2:        #3B4874;
  --ink-3:        #6B7494;
  --riso-red:     #E8464A;
  --riso-red-ink: #C0353A;
  --mist:         rgba(21, 34, 74, 0.08);
  --mist-2:       rgba(21, 34, 74, 0.16);

  /* Semantic aliases — all resolve to the 3-ink palette. */
  --bg:           var(--paper);
  --bg-alt:       var(--paper-2);
  --fg:           var(--ink);
  --fg-2:         var(--ink-2);
  --fg-3:         var(--ink-3);
  --accent:       var(--riso-red);
  --accent-ink:   var(--riso-red-ink);
  --rule:         var(--mist);
  --rule-strong:  var(--ink);

  --success:      var(--ink);        /* expressed via ASCII, not hue */
  --warning:      var(--riso-red);
  --danger:       var(--riso-red-ink);

  /* --- Type families --- */
  --ff-mono:   'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ff-serif:  'Instrument Serif', 'Times New Roman', Georgia, serif;

  /* --- Type scale --- */
  --t-xs:  0.75rem;   /* 12 */
  --t-sm:  0.875rem;  /* 14 */
  --t-md:  1rem;      /* 16 */
  --t-lg:  1.25rem;   /* 20 */
  --t-xl:  1.75rem;   /* 28 */
  --t-2xl: 2.5rem;    /* 40 */
  --t-3xl: 4rem;      /* 64 */
  --t-4xl: 6rem;      /* 96 */

  /* --- Spacing (8px rhythm) --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* --- Borders --- */
  --border-w:  1.5px;
  --border:    var(--border-w) solid var(--ink);
  --border-thin: 1px solid var(--mist-2);
  --radius:    0;

  /* --- Motion --- */
  --ease:      cubic-bezier(.2,.6,.2,1);
  --dur:       120ms;

  /* --- Layout --- */
  --measure:   72ch;
  --maxw:      1200px;
  --gutter:    24px;
}

/* ============================================================
   Base elements — semantic defaults
   ============================================================ */

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-mono);
  font-size: var(--t-md);
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-mono);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
  text-transform: lowercase;
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); font-weight: 500; }
h5, h6 { font-size: var(--t-sm); font-weight: 500; color: var(--fg-2); }

/* The editorial display — for brief titles, pull quotes, posters */
.display, h1.display {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-style: italic;
  font-size: var(--t-3xl);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
}

p, li { font-size: var(--t-md); }
small, .small { font-size: var(--t-sm); color: var(--fg-2); }
.meta { font-size: var(--t-xs); color: var(--fg-2); text-transform: lowercase; letter-spacing: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

code, pre, kbd, samp { font-family: var(--ff-mono); }
pre { background: var(--paper-2); border: var(--border); padding: var(--sp-4); overflow: auto; }

hr { border: 0; border-top: var(--border-thin); margin: var(--sp-6) 0; }

::selection { background: var(--riso-red); color: var(--paper); }

/* ============================================================
   Utility components — the small kit
   ============================================================ */

/* card — one card style, everywhere. */
.card {
  background: var(--paper);
  border: var(--border);
  padding: var(--sp-5);
  border-radius: var(--radius);
}
.card--alt { background: var(--paper-2); }

/* path-header — every asset has one */
.path-header {
  font-family: var(--ff-mono);
  font-size: var(--t-sm);
  color: var(--fg-2);
  letter-spacing: 0;
  margin-bottom: var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.path-header::before { content: "~/"; color: var(--riso-red-ink); }

/* ascii-box — bordered with explicit corner glyphs optional */
.ascii-box {
  border: var(--border);
  padding: var(--sp-5);
  background: var(--paper);
}

/* spec-sticker — riso-red tag, rotated, top-right */
.spec-sticker {
  display: inline-block;
  background: var(--riso-red);
  color: var(--paper);
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  font-weight: 700;
  padding: 6px 10px;
  transform: rotate(-3deg);
  text-transform: lowercase;
  letter-spacing: 0;
  line-height: 1.3;
}

/* button — ink default, inverts on hover */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-mono);
  font-size: var(--t-md);
  font-weight: 500;
  padding: var(--sp-3) var(--sp-5);
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform var(--dur) var(--ease);
}
.btn:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.btn:active { transform: translate(1px, 1px); }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--riso-red); color: var(--paper); border-color: var(--riso-red); }
.btn--accent:hover { background: var(--paper); color: var(--riso-red-ink); border-color: var(--ink); }

.btn .cursor { display: inline-block; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* input — same border, no radius */
.input, .textarea {
  font-family: var(--ff-mono);
  font-size: var(--t-md);
  padding: var(--sp-3) var(--sp-4);
  border: var(--border);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.input:focus, .textarea:focus { outline: 2px solid var(--riso-red); outline-offset: 2px; }

/* tag */
.tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  padding: 2px 8px;
  border: var(--border);
  background: var(--paper);
  color: var(--ink);
  text-transform: lowercase;
}
.tag--red { background: var(--riso-red); color: var(--paper); border-color: var(--riso-red); }

/* riso-offset — the duplicated layer misregistration, replaces drop shadow */
.riso-offset {
  position: relative;
  isolation: isolate;
}
.riso-offset::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--riso-red);
  transform: translate(4px, 4px);
  z-index: -1;
}

/* halftone — decorative dot field */
.halftone {
  background-image: radial-gradient(var(--ink) 1px, transparent 1.5px);
  background-size: 8px 8px;
  opacity: 0.06;
}

/* grid-overlay — subtle column hint */
.grid-overlay {
  background-image:
    linear-gradient(to right, var(--mist) 1px, transparent 1px);
  background-size: 24px 100%;
}

/* full-bleed red banner */
.red-band {
  background: var(--riso-red);
  color: var(--paper);
  padding: var(--sp-5) var(--sp-6);
}

/* checklist — ASCII, never emoji */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 1.75em; text-indent: -1.75em; }
.checklist li::before { content: "[ ] "; font-family: var(--ff-mono); color: var(--fg-2); }
.checklist li.done::before { content: "[\2713] "; color: var(--riso-red-ink); }
.checklist li.wip::before { content: "[~] "; color: var(--ink-2); }

/* status dots */
.dot { display: inline-block; font-size: 1em; line-height: 1; }
.dot--live::before { content: "●"; color: var(--riso-red); }
.dot--soon::before { content: "○"; color: var(--fg-2); }

/* page number */
.pagenum {
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-4);
  font-size: var(--t-xs);
  color: var(--fg-2);
  font-family: var(--ff-mono);
}
