/* ==========================================================================
   Labinator design system tokens — see labinator-website/DESIGN.md
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  /* Color */
  --lb-primary: #2400ff;
  --lb-primary-text: #1e00d6;
  --lb-primary-deep: #1b00bd;
  --lb-primary-tint: #eceafd;
  --lb-primary-wash: #f5f4fe;
  --lb-on-primary: #ffffff;
  --lb-ink: #141414;
  --lb-ink-soft: #262626;
  --lb-charcoal: #3d3d3d;
  --lb-slate: #4a4a4a;
  --lb-paper: #faf8f4;
  --lb-paper-bright: #ffffff;
  --lb-paper-deep: #f2efe8;
  --lb-ink-panel: #141414;
  --lb-on-ink: #faf8f4;
  --lb-on-ink-muted: #c9c6bf;
  --lb-hairline: #e3dfd6;
  --lb-hairline-strong: #c9c4b8;
  --lb-hairline-ink: #2e2e2e;
  --lb-focus-ring: #2400ff;
  --lb-link: #1e00d6;

  /* Type */
  --lb-font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --lb-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --lb-font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Spacing */
  --lb-xxs: 0.25rem;
  --lb-xs: 0.5rem;
  --lb-sm: 0.75rem;
  --lb-md: 1rem;
  --lb-lg: 1.5rem;
  --lb-xl: 2rem;
  --lb-xxl: 3rem;
  --lb-xxxl: 4rem;
  --lb-section-sm: clamp(3rem, 6vw, 5rem);
  --lb-section: clamp(4rem, 9vw, 7.5rem);
  --lb-section-lg: clamp(6rem, 12vw, 10rem);

  /* Motion */
  --lb-duration-fast: 200ms;
  --lb-duration-base: 450ms;
  --lb-duration-slow: 700ms;
  --lb-ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --lb-rise: 1.25rem;

  /* Radius */
  --lb-radius-none: 0;
  --lb-radius-xs: 0.125rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lb-paper);
  color: var(--lb-ink);
  font-family: var(--lb-font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--lb-focus-ring);
  outline-offset: 2px;
}

.skip-to-content {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--lb-ink);
  color: var(--lb-on-ink);
  padding: var(--lb-sm) var(--lb-md);
  z-index: 100;
  font-family: var(--lb-font-display);
  font-size: 0.9375rem;
}
.skip-to-content:focus {
  left: var(--lb-md);
  top: var(--lb-md);
}

.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 var(--lb-xl);
}

@media (max-width: 30rem) {
  .container { padding: 0 var(--lb-lg); }
}

/* ==========================================================================
   Typography scale
   ========================================================================== */

.eyebrow {
  font-family: var(--lb-font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-slate);
}

.mega-display {
  font-family: var(--lb-font-display);
  font-size: clamp(2.5rem, 6vw + 1rem, 5.5rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--lb-ink);
}

.heading-2 {
  font-family: var(--lb-font-display);
  font-size: clamp(1.5rem, 1.5vw + 0.875rem, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.heading-3 {
  font-family: var(--lb-font-display);
  font-size: clamp(1.25rem, 0.75vw + 1rem, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
}

.subtitle {
  font-family: var(--lb-font-body);
  font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--lb-charcoal);
}

.body-sm { font-size: 0.875rem; line-height: 1.6; color: var(--lb-charcoal); }

.mono-tag {
  font-family: var(--lb-font-mono);
  font-size: 0.8125rem;
  color: var(--lb-slate);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--lb-paper);
  border-bottom: 1px solid var(--lb-hairline);
  height: 4.5rem;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--lb-sm);
  font-family: var(--lb-font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lb-ink);
}

.brand-link svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

.header-context {
  font-family: var(--lb-font-body);
  font-size: 0.875rem;
  color: var(--lb-slate);
  display: none;
}

@media (min-width: 40rem) {
  .header-context { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--lb-section) 0 var(--lb-xxl);
  border-bottom: 1px solid var(--lb-hairline);
}

.hero .eyebrow { margin-bottom: var(--lb-md); }

.hero-title { max-width: 42rem; }
.hero-title span { display: block; }
.hero-title .accent-line { color: var(--lb-primary-text); }

.hero-subtitle {
  margin-top: var(--lb-lg);
  max-width: 34rem;
}

/* Signature element: the C#1 -> C#14 version timeline */
.version-timeline {
  margin-top: var(--lb-xxl);
  max-width: 42rem;
  position: relative;
}

.version-timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--lb-xs);
}

.version-timeline-rule {
  position: relative;
  height: 2px;
  background: var(--lb-primary);
}

.version-timeline-rule::before,
.version-timeline-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lb-primary);
  transform: translateY(-50%);
}
.version-timeline-rule::before { left: 0; }
.version-timeline-rule::after { right: 0; }

.version-timeline-preview {
  position: absolute;
  right: -3.5rem;
  top: 0;
  width: 3rem;
  height: 2px;
  background-image: linear-gradient(
    to right,
    var(--lb-hairline-strong) 50%,
    transparent 50%
  );
  background-size: 8px 2px;
}

.version-timeline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: var(--lb-xs);
}

.version-timeline-ticks span {
  font-family: var(--lb-font-mono);
  font-size: 0.75rem;
  color: var(--lb-slate);
}

/* ==========================================================================
   Stats bar
   ========================================================================== */

.stats-bar-section { border-bottom: 1px solid var(--lb-hairline); }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-cell {
  padding: var(--lb-lg) var(--lb-xl);
  border-left: 1px solid var(--lb-hairline);
}
.stat-cell:first-child { border-left: none; padding-left: 0; }

.stat-figure {
  font-family: var(--lb-font-display);
  font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--lb-ink);
}

.stat-label {
  margin-top: var(--lb-xxs);
  font-family: var(--lb-font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-slate);
}

@media (max-width: 40rem) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(3) { border-left: none; padding-left: 0; }
  .stat-cell:nth-child(1),
  .stat-cell:nth-child(2) { border-bottom: 1px solid var(--lb-hairline); padding-bottom: var(--lb-lg); }
}

/* ==========================================================================
   Resource list
   ========================================================================== */

.resources { padding: var(--lb-section) 0; }
.resources .eyebrow { margin-bottom: var(--lb-lg); }

.resource-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: start;
  gap: var(--lb-xl);
  padding: var(--lb-xl) 0;
  border-top: 1px solid var(--lb-hairline);
}

/* Load-triggered entrance (not scroll-triggered): this page is short enough
   that the whole resource list sits near the fold, and scroll-based
   IntersectionObserver reveals never fire in non-interactive rendering
   contexts (headless capture, print, some crawlers), which can strand
   content invisible. A CSS animation on load is simpler and can't get stuck. */
@keyframes lb-rise-in {
  from { opacity: 0; transform: translateY(var(--lb-rise)); }
  to { opacity: 1; transform: none; }
}

.resource-row {
  animation: lb-rise-in var(--lb-duration-slow) var(--lb-ease-out-soft) both;
}

.resource-row:nth-of-type(1) { animation-delay: 0ms; }
.resource-row:nth-of-type(2) { animation-delay: 80ms; }
.resource-row:nth-of-type(3) { animation-delay: 160ms; }
.resource-row:nth-of-type(4) { animation-delay: 240ms; }

.resources > .container > .resource-row:last-child {
  border-bottom: 1px solid var(--lb-hairline);
}

.resource-icon { width: 2rem; height: 2rem; color: var(--lb-ink); }
.resource-icon svg { width: 100%; height: 100%; }

.resource-body { max-width: 40rem; }

.resource-index {
  font-family: var(--lb-font-mono);
  font-size: 0.75rem;
  color: var(--lb-slate);
  display: block;
  margin-bottom: var(--lb-xs);
}

.resource-title { color: var(--lb-ink); }

.resource-desc {
  margin-top: var(--lb-sm);
  color: var(--lb-charcoal);
  max-width: 38rem;
}

.resource-action { align-self: center; white-space: nowrap; }

/* action-link component */
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--lb-font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--lb-ink);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--lb-ink);
  transition: border-color var(--lb-duration-fast) var(--lb-ease-out-soft),
    color var(--lb-duration-fast) var(--lb-ease-out-soft);
}
.action-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--lb-duration-base) var(--lb-ease-out-soft);
}
.action-link:hover,
.action-link:focus-visible {
  color: var(--lb-primary-text);
  border-bottom-color: var(--lb-primary-text);
  border-bottom-width: 2px;
}
.action-link:hover svg,
.action-link:focus-visible svg { transform: translateX(0.25rem); }

@media (max-width: 40rem) {
  .resource-row { grid-template-columns: 1fr; gap: var(--lb-md); }
  .resource-icon { display: none; }
  .resource-action { justify-self: start; }
}

/* ==========================================================================
   Course cross-link band
   ========================================================================== */

.crosslink {
  border-top: 1px solid var(--lb-hairline);
  border-bottom: 1px solid var(--lb-hairline);
  padding: var(--lb-xl) 0;
}

.crosslink .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lb-xl);
  flex-wrap: wrap;
}

.crosslink-text { max-width: 34rem; color: var(--lb-charcoal); }
.crosslink-text strong { color: var(--lb-ink); font-weight: 500; }

/* ==========================================================================
   Footer colophon
   ========================================================================== */

.footer-region { padding: var(--lb-section-sm) 0; border-top: 1px solid var(--lb-hairline); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--lb-xl);
}

.footer-col-label {
  font-family: var(--lb-font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-slate);
  margin-bottom: var(--lb-md);
  display: block;
}

.footer-about {
  font-size: 0.875rem;
  color: var(--lb-charcoal);
  max-width: 28rem;
  line-height: 1.6;
}

.footer-links li { margin-bottom: var(--lb-xs); }
.footer-link {
  font-size: 0.875rem;
  color: var(--lb-charcoal);
  transition: color var(--lb-duration-fast) var(--lb-ease-out-soft);
}
.footer-link:hover, .footer-link:focus-visible {
  color: var(--lb-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 40rem) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--lb-xl); }
}

.colophon-rule-wrap { padding-top: var(--lb-xl); margin-top: var(--lb-xl); }

.colophon-annotation {
  font-family: var(--lb-font-display);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lb-slate);
  display: block;
  margin-bottom: var(--lb-xs);
}

.colophon-rule { height: 2px; background: var(--lb-primary); }

.wordmark-block {
  background: var(--lb-primary);
  color: var(--lb-on-primary);
  padding: var(--lb-lg) var(--lb-xl) var(--lb-xxl);
}

.wordmark-block .caption { font-size: 0.8125rem; color: var(--lb-on-primary); opacity: 0.85; }

.wordmark {
  font-family: var(--lb-font-display);
  font-size: clamp(2.5rem, 11vw, 9rem);
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin-top: var(--lb-md);
}

/* ==========================================================================
   Motion — reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .resource-row { animation: none; opacity: 1; transform: none; }
}
