/* Typefaces: js/font-clock.js picks one per hour via --font-family and --font-weight */
@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Precept;
  src: url('../fonts/Precept-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Quantif;
  src: url('../fonts/Quantif-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: Precept;
  --font-weight: 900;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: #fff;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 64px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 16px;
  background-color: #fff;
  color: #000;
  font-family: var(--font-family), "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: var(--font-weight);
  line-height: 1.4;
  letter-spacing: -0.05em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

/* Each block gets its own context-shapes SVG (see js/context.js) */
.block {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.body-text {
  margin: 0;
  text-box: trim-both cap alphabetic;
  transition: color 0.6s ease;
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  white-space: nowrap;
}

.row .body-text {
  flex-shrink: 0;
}

.list {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* Load sequence: blocks fade in top to bottom once shapes are drawn */
.js .block {
  opacity: 0;
  transition: opacity 0.6s ease var(--fade-delay, 0s), color 0.6s ease;
}

.js .block.is-in {
  opacity: 1;
}

/* Context treatment */
.context-shapes {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  shape-rendering: crispEdges;
}

.context-shapes * {
  transition: fill 0.6s ease;
}

.toggle {
  cursor: pointer;
}

body.context-mode .body-text {
  color: transparent;
  pointer-events: none;
}

body.context-mode .toggle {
  pointer-events: auto;
}

body.context-mode .context-shapes * {
  fill: #000 !important;
}

@media (prefers-reduced-motion: reduce) {
  .body-text, .js .block, .context-shapes * {
    transition: none;
  }
}
