/* ============================================================
   YABBAC — The Collection
   Visual system: "archive dossier" — light / paper edition
   - warm paper background, near-black ink for readability
   - single blood-red accent (from the YABBAC wordmark)
   - Bricolage Grotesque (display) · Newsreader (body) · Space Mono (data)
   ============================================================ */

:root {
  /* surfaces */
  --bg:         #f3f1ec;
  --surface:    #ffffff;
  --raised:     #ffffff;
  --line:       #e2ddd4;
  --line-soft:  #ece7de;

  /* ink */
  --ink:        #1c1814;
  --ink-soft:   #3d3630;
  --muted:      #6c635b;
  --faint:      #9a9188;

  /* accent */
  --accent:     #cf2620;
  --accent-dim: #a81d18;

  /* depth */
  --shadow:      0 1px 2px rgba(40, 30, 20, 0.04), 0 3px 10px rgba(40, 30, 20, 0.05);
  --shadow-lift: 0 2px 4px rgba(40, 30, 20, 0.06), 0 10px 24px rgba(40, 30, 20, 0.09);

  /* type */
  --display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --body:    'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:    'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius: 4px;
  --maxw:   1120px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  /* barely-there warm wash from the top */
  background-image: radial-gradient(120% 70% at 50% -12%,
                    rgba(207, 38, 32, 0.05), transparent 60%);
  background-attachment: fixed;
}

body {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 48px) 40px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

::selection { background: var(--accent); color: #fff; }

/* --- Masthead ------------------------------------------------ */

.masthead {
  margin-bottom: clamp(32px, 6vw, 56px);
  padding-bottom: clamp(20px, 4vw, 28px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 6.5vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: left;
  max-width: 20ch;
}

/* keeps your existing <red> markup working; .init is the clean equivalent */
h1 red,
h1 .init {
  color: var(--accent);
  text-decoration: none;
}

.tagline {
  margin: 18px 0 0;
  font-family: var(--body);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
}

/* --- Card grid ---------------------------------------------- */

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-lift);
}

.card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color .15s ease;
}

.card h3 a:hover { color: var(--accent); }

/* metadata row — reads like a catalog manifest */
.progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.progress .files { color: var(--muted); }

.progress .completed { color: var(--faint); }

.progress .completed::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.description {
  margin: 0;
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  text-align: left;
}

.description b { color: var(--ink); font-weight: 600; }

/* helpful links pinned to the bottom so cards align */
.helpfulLinks {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.helpfulLinks a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

.helpfulLinks a::before {
  content: "\2197"; /* ↗ */
  color: var(--accent);
}

.helpfulLinks a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
  margin-top: 2px;
}

/* --- Footer -------------------------------------------------- */

footer {
  margin-top: clamp(48px, 8vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: left;
}

footer p { margin: 0; max-width: 72ch; }
footer p + p { margin-top: 14px; }
footer br { display: none; }

footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: color .15s ease, border-color .15s ease;
}

footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Accessibility ------------------------------------------ */

a:focus-visible,
.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
