/* ============================================================
   Agorra Labs — styles.css
   Plain CSS. Shared across index.html, about.html, team.html.
   ============================================================ */

:root {
  /* Colors */
  --bg:       #FAFAF8;
  --ink:      #1A1A1A;
  --grey:     #6B6B66;
  --hairline: #E5E5E0;

  /* Spacing scale */
  --frame:       40px;   /* nav margin from the corners */
  --footer-h:    44px;   /* fixed footer bar height */
  --section-gap: 140px;
  --content-left: clamp(40px, 12vw, 220px);
  --pad-top:     clamp(120px, 16vh, 190px);
  --measure:     640px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.index { overflow: hidden; }   /* index is a fixed, full-viewport graphic */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Nav ------------------------------------------------------------------- */
.monogram {
  position: fixed;
  top: var(--frame);
  left: var(--frame);
  z-index: 10;
  display: block;
}
.monogram img { height: 22px; width: auto; display: block; }

.nav-right {
  position: fixed;
  top: var(--frame);
  right: var(--frame);
  z-index: 10;
  display: flex;
  gap: 24px;
}
.nav-right a,
.footer-bar a,
.footer-bar span {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

/* --- Footer bar (all pages) ----------------------------------------------- */
.footer-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--frame);
  background: var(--bg);
  border-top: 1px solid var(--hairline);
}
.footer-bar span { letter-spacing: 0.10em; }

/* --- index.html: full-viewport graphic ------------------------------------ */
.graphic {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--footer-h);   /* never collides with the footer bar */
  z-index: 1;
  pointer-events: none;
}
.graphic canvas { display: block; width: 100%; height: 100%; }

/* Annotation callouts (swarm.js, Phase 2): SVG overlay over the canvas */
.callout-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.callout-layer .leader {
  fill: none;
  stroke: var(--grey);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.callout-layer text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  fill: var(--grey);
}
.contagion-arc {
  fill: none;
  stroke: #C4C4BE;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.ghost-hull {
  fill: none;
  stroke: var(--hairline);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

/* Event log panel (swarm.js, Phase 3): bottom-left, above the footer bar */
.event-log {
  position: fixed;
  left: var(--frame);
  bottom: calc(var(--footer-h) + 22px);
  max-width: 320px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;   /* container appears; title/lines animate in */
}
.event-log.revealed { opacity: 1; }
.log-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.log-lines { display: flex; flex-direction: column; }
.log-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.75;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.log-line.shown { opacity: 1; }
.log-ts { margin-right: 14px; opacity: 0.8; }
.log-line.contagion { padding-left: 16px; }
.log-line.contagion .log-ts { margin-right: 8px; opacity: 0.6; }

@media (max-width: 767px) { .event-log { display: none; } }

/* Cohort stats panel (swarm.js, Phase 4): left side, vertically centered, desktop only */
.stats-panel {
  position: fixed;
  left: var(--frame);
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;         /* container appears; title + rows animate in */
}
.stats-panel.revealed { opacity: 1; }
.stats-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 16px;
}
.stat-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
  line-height: 2.1;
}
.stat-row .s-act  { flex: 0 0 4px; width: 4px; height: 4px; background: var(--hairline); }
.stat-row .s-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row .s-count { flex: 0 0 40px; text-align: right; }
.stat-row .s-bar  { flex: 0 0 56px; position: relative; height: 2px; background: var(--hairline); }
.stat-row .s-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--ink); }
.stat-row .s-flow { flex: 0 0 34px; text-align: right; color: var(--grey); }

@media (max-width: 1199px) { .stats-panel { display: none; } }

.graphic-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
}
.graphic-fallback.show { display: flex; }
.graphic-fallback img { width: 260px; max-width: 70vw; height: auto; }
.graphic-fallback .tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
}

/* --- Content pages (about.html, team.html) -------------------------------- */
main {
  padding: var(--pad-top) 40px calc(var(--footer-h) + 80px) var(--content-left);
}
main > * { max-width: var(--measure); }

.statement {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
  max-width: 560px;
}
.statement + .statement { margin-top: 1.3em; }   /* multi-paragraph statement */

.meta {
  margin: 40px 0 0;
  display: flex; flex-wrap: wrap; gap: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

section { margin-top: var(--section-gap); }

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 32px;
}

p { margin: 0; }

/* Team headshot + name + role (team.html person columns) */
.headshot {
  width: 140px; height: 140px;
  object-fit: cover; filter: grayscale(100%);
  display: block; margin-bottom: 22px;
}
.name {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300; font-size: 22px; line-height: 1.2;
  color: var(--ink); margin: 0 0 6px;
}
.role {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey); margin: 0 0 16px;
}

/* --- About: technical-document layout (Phase 8) --------------------------- */
main.doc { position: relative; }

.doc-section {
  position: relative;
  max-width: var(--measure);
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--hairline);
}
.doc-section .gutter {
  position: absolute;
  left: -56px;
  top: 38px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--grey);
}

/* Section 01: opening statement (left) + Agorra definition & rotating motif (right) */
.about-split { max-width: var(--measure); }
.about-split .split-right { margin-top: 56px; }

.dict-word {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
}
.dict-pron {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin: 10px 0 0;
}
.dict-def {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

/* Rotating Parthenon point-cloud motif, sitting above the dictionary entry */
.motif {
  width: 100%;
  max-width: 300px;
  height: 190px;
  margin: 0 0 28px;
}
.motif canvas { display: block; width: 100%; height: 100%; }

@media (min-width: 960px) {
  .about-split {
    max-width: 940px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 64px;
    align-items: start;
  }
  .about-split .split-right { margin-top: 0; }   /* top-aligned with the statement */
}
@media (max-width: 720px)  { .doc-section .gutter { display: none; } }

/* --- Team page (Phase 9) --------------------------------------------------- */
.doc-section.team-section { max-width: 940px; border-top: none; padding-top: 0; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; }  /* columns stretch → full-height divider */
.team-grid .person-col { padding-right: 72px; display: flex; flex-direction: column; }
.team-grid .person-col + .person-col {
  padding-right: 0;
  padding-left: 72px;
  border-left: 1px solid var(--hairline);   /* single hairline between the two columns */
}
.team-grid .person-col p {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}
.team-grid .person-col p + p { margin-top: 1em; }   /* second bio paragraph */
.person-links { margin-top: auto; padding-top: 28px; }   /* pin to column bottom so both align */
.person-email {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--grey);
}
.linkedin-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 18px;
  border: 1px solid var(--hairline);
  background: transparent;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey);
}
.linkedin-btn:hover { text-decoration: none; border-color: var(--ink); }

@media (max-width: 767px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-grid .person-col { padding-right: 0; }
  .team-grid .person-col + .person-col { padding-left: 0; border-left: none; margin-top: 56px; }
}

/* --- Links ----------------------------------------------------------------- */
a { color: inherit; text-decoration: none; }
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 720px) {
  :root {
    --frame: 24px;
    --section-gap: 80px;
    --content-left: 24px;
  }
  main { padding: 88px 24px calc(var(--footer-h) + 64px) 24px; }
  .statement { font-size: 16px; }
}
