/* ============================================================
   IGNOTUSLABS — style.css
   Visual styling: typography detail, components, cursor,
   glyph stage, project cards, field canvas. Decoration only.
   ============================================================ */

/* ------------------------------------------------------------
   Typography components
   ------------------------------------------------------------ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: var(--fw-regular);
  letter-spacing: var(--tracking-widest);
  color: var(--color-secondary);
  text-transform: uppercase;
}

.display {
  font-size: var(--fs-display);
  font-weight: var(--fw-light);
  line-height: 0.98;
  letter-spacing: var(--tracking-tight);
}

.title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  line-height: 1.4;
  letter-spacing: var(--tracking-tight);
}

.lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-light);
  line-height: var(--leading-snug);
  color: var(--color-primary);
}

.body {
  font-size: var(--fs-body);
  color: var(--color-secondary);
  line-height: var(--leading-normal);
  max-width: 52ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-tertiary);
}

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Manifesto — the central voice of the lab */
.manifesto {
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: var(--fw-light);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

.manifesto em {
  font-style: normal;
  color: var(--color-secondary);
}

.manifesto strong {
  font-weight: var(--fw-regular);
  color: var(--color-primary);
}

/* ------------------------------------------------------------
   Field canvas (background)
   ------------------------------------------------------------ */

.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-field);
  pointer-events: none;
  opacity: 0.55;
}

/* ------------------------------------------------------------
   Glyph
   ------------------------------------------------------------ */

.glyph {
  position: relative;
  width: 100%;
  height: 100%;
}

.glyph svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.glyph__stroke {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.glyph .glyph__node {
  fill: var(--color-primary);
}

.glyph__faint {
  stroke: var(--color-divider-strong);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}

/* Persistent companion glyph that follows the viewport */
.companion {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  left: var(--gutter);
  width: 5.5rem;
  height: 0.85rem;
  z-index: var(--z-glyph);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-quiet);
}

.companion.is-active {
  opacity: 0.5;
}

/* ------------------------------------------------------------
   Hero explore indicator
   ------------------------------------------------------------ */

.explore__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-widest);
  color: var(--color-tertiary);
  text-transform: uppercase;
}

.explore__line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-divider-strong)
  );
}

/* ------------------------------------------------------------
   Research graph
   ------------------------------------------------------------ */

.graph {
  width: 100%;
  height: 100%;
}

.graph .graph__edge {
  stroke: var(--color-divider-strong);
  stroke-width: 1;
  fill: none;
  transition: stroke var(--dur-fast) var(--ease-precise);
}

.graph .graph__edge.is-active {
  stroke: var(--color-primary);
}

.graph .graph__node-circle {
  fill: var(--color-bg);
  stroke: var(--color-secondary);
  stroke-width: 1;
  transition: stroke var(--dur-fast) var(--ease-precise),
    fill var(--dur-fast) var(--ease-precise);
  cursor: none;
}

.graph .graph__node:hover .graph__node-circle,
.graph .graph__node.is-active .graph__node-circle {
  fill: var(--color-primary);
  stroke: var(--color-primary);
}

/* Visible focus indicator for keyboard users on graph nodes
   (role="button"). Uses the rare accent as a critical-state cue. */
.graph .graph__node:focus-visible .graph__node-circle {
  stroke: var(--color-accent);
  stroke-width: 2;
}

.graph__node-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-wider);
  fill: var(--color-secondary);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  transition: fill var(--dur-fast) var(--ease-precise);
}

.graph__node:hover .graph__node-label,
.graph__node.is-active .graph__node-label {
  fill: var(--color-primary);
}

.research__detail .detail__title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-light);
  margin-bottom: var(--space-1);
}

.research__detail .detail__copy {
  font-size: var(--fs-small);
  color: var(--color-secondary);
  line-height: var(--leading-normal);
}

.legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-wider);
  color: var(--color-tertiary);
  text-transform: uppercase;
}

.legend__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
}

.legend__dot--primary {
  background: var(--color-primary);
}

/* ------------------------------------------------------------
   Projects
   ------------------------------------------------------------ */

.project__index {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-widest);
  color: var(--color-tertiary);
}

.project__codename {
  font-size: var(--fs-h1);
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.project__name {
  font-size: var(--fs-body);
  color: var(--color-secondary);
  letter-spacing: var(--tracking-wide);
}

.project__copy {
  font-size: var(--fs-body);
  color: var(--color-secondary);
  line-height: var(--leading-normal);
  max-width: 46ch;
}

.project__meta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.project__meta dt {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-wider);
  color: var(--color-tertiary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.project__meta dd {
  font-size: var(--fs-small);
  color: var(--color-primary);
}

.project__diagram svg {
  width: 100%;
  height: 100%;
}

.diag__stroke {
  fill: none;
  stroke: var(--color-divider-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.diag__accent {
  stroke: var(--color-primary);
}

/* ------------------------------------------------------------
   Artifacts
   ------------------------------------------------------------ */

.artifact__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-wider);
  color: var(--color-tertiary);
  text-transform: uppercase;
}

.artifact__caption {
  font-size: var(--fs-small);
  color: var(--color-secondary);
  line-height: var(--leading-snug);
}

.artifact svg {
  width: 100%;
  height: 100%;
  max-height: 220px;
}

/* Glyph evolution timeline */
.evolution__track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-2);
}

.evolution__cell {
  flex: 1;
  aspect-ratio: 360 / 56;
  /* Fallback for browsers without aspect-ratio support */
  min-height: 56px;
  border: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: center;
}

.evolution__cell svg {
  width: 94%;
  height: 94%;
}

/* Type specimen */
.specimen__char {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: var(--fw-light);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  padding-bottom: .75rem;
}

.specimen__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--color-divider);
  padding: var(--space-1) 0;
  font-size: var(--fs-small);
  color: var(--color-secondary);
}

.specimen__row .key {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-wider);
  color: var(--color-tertiary);
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   About manifesto
   ------------------------------------------------------------ */

.about__lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about__line {
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: var(--fw-light);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

.about__signoff {
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-widest);
  color: var(--color-tertiary);
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   Custom cursor
   ------------------------------------------------------------ */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--color-primary);
  border-radius: 50%;
}

.cursor__ring {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  opacity: 0.4;
  transition: width var(--dur-base) var(--ease-quiet),
    height var(--dur-base) var(--ease-quiet),
    opacity var(--dur-base) var(--ease-quiet),
    margin var(--dur-base) var(--ease-quiet);
}

.cursor.is-hover .cursor__ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  opacity: 0.7;
}

.cursor.is-hidden {
  opacity: 0;
}

/* Touch devices: hide custom cursor, restore native */
@media (hover: none) {
  body {
    cursor: auto;
  }
  .cursor {
    display: none;
  }
}

/* ------------------------------------------------------------ */
/* Skip navigation link — keyboard accessibility              */
/* ------------------------------------------------------------ */

.skip-link {
  position: fixed;
  top: -120px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-raised);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border: 1px solid var(--color-divider-strong);
  transition: top var(--dur-fast) var(--ease-precise);
}

.skip-link:focus {
  top: 1rem;
}
