/* ============================================================
   IBC Labs — Design Tokens & Base Styles
   ============================================================ */

:root {
  /* Color */
  --bg:            #F7F6F3;  /* Off-white */
  --surface:       #FFFFFF;  /* White */
  --text:          #1C1C1C;  /* Charcoal */
  --text-2:        #5A5A5A;  /* Slate */
  --accent:        #0D2B55;  /* Deep Navy */
  --accent-tint:   #E8EFF8;  /* Navy tint */
  --border:        #E0DDD8;  /* Hairline */

  /* Status */
  --status-pub-bg:   #E6F0E9;
  --status-pub-fg:   #2E5D43;
  --status-act-bg:   #E8EFF8;
  --status-act-fg:   #0D2B55;
  --status-fc-bg:    #ECEAE6;
  --status-fc-fg:    #6A665F;

  /* Type */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Spacing scale */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 128px;

  /* Grid */
  --maxw: 1100px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

p { margin: 0 0 var(--s3); text-wrap: pretty; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s4);
}
.container--narrow { max-width: 760px; }

/* ---------- Type roles ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}
.subheading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.01em;
}
.prose { max-width: 680px; }
.prose p { font-size: 18px; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Signature hairline ---------- */
.rule {
  height: 1px;
  background: var(--accent);
  border: 0;
  width: 100%;
  margin: var(--s3) 0 var(--s4);
}
.rule--thin { background: var(--border); }

/* ---------- Status badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.badge--published { background: var(--status-pub-bg); color: var(--status-pub-fg); }
.badge--active    { background: var(--status-act-bg); color: var(--status-act-fg); }
.badge--forthcoming { background: var(--status-fc-bg); color: var(--status-fc-fg); }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: 11px 18px;
  border-radius: 3px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  background: transparent;
  color: var(--accent);
}
.btn .arrow { transition: transform .18s ease; }
.btn:hover { background: var(--accent); color: #fff; }
.btn:hover .arrow { transform: translateX(3px); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: #0a2244; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--text); color: #fff; border-color: var(--text); }

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}
.tlink .arrow { transition: transform .18s ease; }
.tlink:hover .arrow { transform: translateX(3px); }
.tlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid transparent;
  padding: var(--s3);
  transition: border-top-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  border-top-color: var(--accent);
  box-shadow: 0 1px 0 var(--border), 0 12px 28px -18px rgba(13,43,85,.28);
}

/* ---------- Page transition ----------
   Resting state is fully visible. The entrance animates transform only
   (no opacity hide) so a cloned/restarted capture at t:0 still shows content. */
.page { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .page { animation: pageIn .5s cubic-bezier(.22,.61,.36,1); }
}
@keyframes pageIn {
  from { transform: translateY(14px); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Utilities ---------- */
.muted { color: var(--text-2); }
.accent { color: var(--accent); }
.section { padding: var(--s6) 0; }
.section--tight { padding: var(--s5) 0; }
.stack-1 > * + * { margin-top: var(--s1); }
.stack-2 > * + * { margin-top: var(--s2); }
.stack-3 > * + * { margin-top: var(--s3); }
.divider-list > * { border-bottom: 1px solid var(--border); }
.divider-list > *:last-child { border-bottom: 0; }
