/* ============================================================
   DXAI (DesignXAI Academy): colors_and_type.css
   One file. Every token. Import this and you're 80% there.
   Evolved from the AI Makers Club system: same terminal bones,
   cleaner paper, one new accent, a real display face.
   ============================================================ */

/* --- Fonts --------------------------------------------------- */
/* Geist: display + reading. JetBrains Mono: structure, labels, data. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* --- Color: inks & paper --- */
  --paper:        #F6F5F0;   /* cleaner, cooler than AIMC cream */
  --paper-2:      #ECEAE2;
  --paper-3:      #DEDBD0;
  --white:        #FFFFFF;   /* reserved: certificates, print sheets */
  --ink:          #0A1433;   /* AIMC navy, deepened */
  --ink-2:        #37425F;
  --ink-3:        #5E6784;
  --volt:         #D4F53C;   /* the optimist accent. a highlighter, not a paint */
  --volt-2:       #E8FA9E;   /* soft highlight for long spans */
  --volt-ink:     #4A5A00;   /* volt family, readable on paper (AA) */
  --mist:         rgba(10, 20, 51, 0.08);
  --mist-2:       rgba(10, 20, 51, 0.16);

  /* Semantic aliases. Everything resolves to ink, paper, volt. */
  --bg:           var(--paper);
  --bg-alt:       var(--paper-2);
  --bg-inverse:   var(--ink);
  --fg:           var(--ink);
  --fg-2:         var(--ink-2);
  --fg-3:         var(--ink-3);
  --fg-inverse:   var(--paper);
  --accent:       var(--volt);
  --accent-ink:   var(--volt-ink);
  --rule:         var(--mist-2);
  --rule-strong:  var(--ink);

  /* States are expressed with ASCII + inversion, never a new hue. */
  --success:      var(--volt-ink);  /* [x] */
  --warning:      var(--ink);       /* [!] on volt */
  --danger:       var(--ink);       /* [!] inverted block */

  /* --- Type families --- */
  --ff-sans:   'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ff-mono:   'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* --- Type scale --- */
  --t-2xs: 0.6875rem; /* 11: mono labels */
  --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 */
  --t-5xl: 8.5rem;    /* 136: posters, covers */

  /* --- Spacing (8px rhythm, unchanged) --- */
  --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 (unchanged: one weight, no radius) --- */
  --border-w:    1.5px;
  --border:      var(--border-w) solid var(--ink);
  --border-thin: 1px solid var(--mist-2);
  --radius:      0;

  /* --- Depth --- */
  --plate-offset: 6px;       /* volt plate behind a block, replaces riso offset */

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

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

/* ============================================================
   Base elements
   ============================================================ */

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-sans);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); letter-spacing: -0.025em; }
h4 { font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.015em; }
h5, h6 {
  font-family: var(--ff-mono); font-size: var(--t-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-2);
}

/* Poster display: covers, social, slide titles */
.display {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: var(--t-4xl);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

p, li { font-size: var(--t-md); }
p { max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: var(--t-lg); line-height: 1.45; color: var(--fg-2); letter-spacing: -0.01em; }
small, .small { font-size: var(--t-sm); color: var(--fg-2); }

/* label: the institutional mono voice. uppercase, tracked. */
.label, .meta {
  font-family: var(--ff-mono);
  font-size: var(--t-2xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}

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);
}
/* hover = a highlighter swipe, not a color change */
a:hover { background: var(--volt); text-decoration-color: var(--ink); }

code, pre, kbd, samp { font-family: var(--ff-mono); font-size: 0.92em; }
code { background: var(--paper-2); padding: 0.1em 0.35em; }
pre { background: var(--ink); color: var(--paper); border: var(--border); padding: var(--sp-4); overflow: auto; }
pre code { background: none; padding: 0; }

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

::selection { background: var(--volt); color: var(--ink); }

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

/* hl: the highlighter. the one expressive gesture in the system. */
.hl {
  background: linear-gradient(transparent 8%, var(--volt) 8%, var(--volt) 92%, transparent 92%);
  color: var(--ink);          /* always ink on volt, even inside an ink band */
  padding: 0 0.12em;
  margin: 0 -0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl--soft { background: linear-gradient(transparent 55%, var(--volt-2) 55%); padding: 0 0.08em; }

/* 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); }
.card--inverse { background: var(--ink); color: var(--paper); }

/* path-header: every asset has one. now a prompt, not a folder. */
.path-header {
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  color: var(--fg-2);
  letter-spacing: 0;
  margin-bottom: var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.path-header::before { content: "dxai \203A  "; color: var(--ink); font-weight: 700; }
.ink-band .path-header::before, .card--inverse .path-header::before { color: var(--volt); }

/* course-code: the academy marker. DX 101, DX 204 ... */
.course-code {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.course-code::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--volt);
  outline: var(--border);
  outline-offset: -1.5px;
}

/* button: ink default, mono, uppercase */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-mono);
  font-size: var(--t-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--sp-3) var(--sp-5);
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--volt); color: var(--ink); }
.btn:active { transform: translate(1px, 1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--volt { background: var(--volt); color: var(--ink); }
.btn--volt:hover { background: var(--ink); color: var(--volt); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { font-size: var(--t-xs); padding: var(--sp-2) var(--sp-4); }
.btn--lg { font-size: var(--t-md); padding: var(--sp-4) var(--sp-6); }

.cursor { display: inline-block; animation: blink 1s step-end infinite; }
.cursor::after { content: "\2588"; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* input: same border, no radius, volt focus */
.input, .textarea, .select {
  font-family: var(--ff-sans);
  font-size: var(--t-md);
  padding: var(--sp-3) var(--sp-4);
  border: var(--border);
  background: var(--white);
  color: var(--ink);
  width: 100%;
  border-radius: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus, .select:focus { outline: 3px solid var(--volt); outline-offset: 0; }
.field-label { display: block; margin-bottom: var(--sp-2); }
.field-error {
  display: inline-block; margin-top: var(--sp-2);
  font-family: var(--ff-mono); font-size: var(--t-xs);
  background: var(--ink); color: var(--paper); padding: 2px 8px;
}
.field-error::before { content: "[!] "; color: var(--volt); }

/* tag */
.tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--t-2xs);
  font-weight: 500;
  padding: 3px 8px;
  border: var(--border);
  background: transparent;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.tag--volt { background: var(--volt); }
.tag--ink { background: var(--ink); color: var(--paper); }

/* plate: volt block offset behind, replaces the riso misregistration.
   A hard offset (zero blur), with a second layer drawing its ink edge.
   This is the only box-shadow allowed in the system: never soft, never grey. */
.plate {
  box-shadow:
    var(--plate-offset) var(--plate-offset) 0 0 var(--volt),
    var(--plate-offset) var(--plate-offset) 0 var(--border-w) var(--ink);
}

/* grid-paper: the notebook. subtle, academic. */
.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--mist) 1px, transparent 1px),
    linear-gradient(90deg, var(--mist) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ink-band: full-bleed dark band, the terminal screen */
.ink-band {
  background: var(--ink);
  color: var(--paper);
  padding: var(--sp-5) var(--sp-6);
}
.ink-band a:not(.btn) { color: var(--paper); }
.ink-band a:not(.btn):hover { color: var(--ink); }

/* checklist: the brand mark in action. ASCII, never emoji */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 2.25em; text-indent: -2.25em; }
.checklist li::before { content: "[ ] "; font-family: var(--ff-mono); font-weight: 700; color: var(--ink-3); white-space: pre; }
.checklist li.done::before { content: "[x] "; color: var(--ink); background: linear-gradient(transparent 15%, var(--volt) 15%, var(--volt) 85%, transparent 85%); }
.checklist li.wip::before { content: "[~] "; color: var(--ink-2); }

/* progress: ASCII bar. fill with JS or by hand */
.progress { font-family: var(--ff-mono); font-size: var(--t-sm); letter-spacing: 0; white-space: pre; }
.progress .fill { color: var(--ink); }
.progress .rest { color: var(--ink-3); }

/* status dots */
.dot { display: inline-block; font-size: 1em; line-height: 1; }
.dot--live::before { content: "\25CF"; color: var(--ink); }
.dot--soon::before { content: "\25CB"; color: var(--fg-3); }

/* credential seal: the certification stamp */
.seal {
  display: inline-grid;
  gap: 2px;
  border: var(--border);
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--ff-mono);
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--paper);
}
.seal strong { font-size: var(--t-sm); letter-spacing: 0.02em; }
.seal strong::before { content: "[x] "; background: var(--volt); }

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