/* ShurIQ Explainer Lab — Design System */

:root {
  --bg: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-accent: #F0EDE8;
  --ink: #1A1A2E;
  --ink-secondary: #5A5A6E;
  --muted: #8A8A9E;

  /* angle-coded accents — used sparingly */
  --cobalt: #2D5BFF;       /* methodology */
  --warm: #E8572A;         /* outcome */
  --gold: #D4A017;         /* moat */
  --teal: #0D9488;         /* category */
  --violet: #7C3AED;       /* wedge */
  --rose: #E11D48;         /* tension */

  --cobalt-light: #E8EDFF;
  --warm-light: #FFF0EB;
  --gold-light: #FFF8E7;
  --teal-light: #E6F7F5;
  --violet-light: #F3EEFF;
  --rose-light: #FFF1F3;

  --border: #E5E2DD;
  --shadow: 0 1px 3px rgba(26,26,46,0.06), 0 1px 2px rgba(26,26,46,0.04);
  --shadow-lg: 0 4px 16px rgba(26,26,46,0.08), 0 2px 4px rgba(26,26,46,0.04);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Brand wordmark — keep ShurIQ in sans inside serif headings */
.brand {
  font-family: 'IBM Plex Sans', sans-serif;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { opacity: 0; }
.anim.visible { animation: fadeUp 0.7s ease-out forwards; }
.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250,248,245,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .nav-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--cobalt);
}
nav .nav-links {
  display: flex;
  gap: 0.25rem;
}
nav .nav-links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s;
}
nav .nav-links a:hover {
  background: var(--cobalt-light);
  color: var(--cobalt);
}
@media (max-width: 900px) {
  nav .nav-links { display: none; }
}

/* Hero */
.hero {
  padding: 7rem 2rem 3rem;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.hero .overline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: 'IBM Plex Serif', serif;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--cobalt);
}
.hero .subtitle {
  font-size: 1.05rem;
  color: var(--ink-secondary);
  max-width: 600px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}
.hero .meta-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .meta-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.hero .meta-item strong {
  color: var(--ink);
  font-weight: 600;
}

/* Sections */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-header {
  margin-bottom: 2.25rem;
}
.section-header .overline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-family: 'IBM Plex Serif', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.section-header h2 em {
  font-style: italic;
  color: var(--cobalt);
}
.section-header p {
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 680px;
  line-height: 1.7;
}

/* Divider */
.divider { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.divider hr { border: none; height: 1px; background: var(--border); }

/* The Brief — inline editorial card */
.brief-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.25rem;
  box-shadow: var(--shadow);
  position: relative;
}
.brief-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2.25rem;
  bottom: 2.25rem;
  width: 3px;
  background: var(--cobalt);
  border-radius: 2px;
}
.brief-card .brief-from {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.brief-card blockquote {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.brief-card .brief-body {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* Method steps */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.method-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
}
.method-step .step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cobalt);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.method-step h3 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.method-step p {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* Ground map tiles */
.ground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.ground-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.25s;
}
.ground-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.ground-tile .ground-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}
.ground-tile .ground-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.ground-tile .ground-freq {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}
.ground-tile h3 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.625rem;
  line-height: 1.3;
}
.ground-tile .ground-desc {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}
.ground-tile .ground-quotes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ground-tile .ground-quote {
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--bg-accent);
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  line-height: 1.5;
  font-style: italic;
}

.ground-tile.tag-methodology .ground-tag { background: var(--cobalt-light); color: var(--cobalt); }
.ground-tile.tag-moat .ground-tag         { background: var(--gold-light);   color: var(--gold);   }
.ground-tile.tag-outcome .ground-tag      { background: var(--warm-light);   color: var(--warm);   }
.ground-tile.tag-category .ground-tag     { background: var(--teal-light);   color: var(--teal);   }
.ground-tile.tag-wedge .ground-tag        { background: var(--violet-light); color: var(--violet); }
.ground-tile.tag-metaphor .ground-tag     { background: var(--rose-light);   color: var(--rose);   }

/* TODO injection markers for KG agent */
.todo-marker {
  background: var(--bg-accent);
  border: 1px dashed var(--muted);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.todo-marker::before {
  content: '◌';
  font-size: 1.1rem;
  color: var(--cobalt);
}

/* Tension cards */
.tension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.tension-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.tension-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rose);
}
.tension-card .tension-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rose);
  margin-bottom: 0.625rem;
}
.tension-card h3 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.875rem;
  line-height: 1.3;
}
.tension-card .tension-desc {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.tension-card .tension-sides {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tension-card .side {
  font-size: 0.78rem;
  background: var(--bg-accent);
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  line-height: 1.5;
}
.tension-card .side strong {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.tension-card .editorial-line {
  background: var(--rose-light);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink);
  font-family: 'IBM Plex Serif', serif;
  font-style: italic;
}
.tension-card .editorial-line strong {
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose);
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

/* Latent field */
.latent-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.latent-frame p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* Variants — shelves */
.shelf {
  margin-bottom: 3.5rem;
}
.shelf-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.shelf-header .shelf-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cobalt);
  background: var(--cobalt-light);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}
.shelf-header h3 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.shelf-header .shelf-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}
.shelf-header p {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-top: 0.25rem;
}

/* Variant card — base */
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.variant {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: all 0.2s;
}
.variant:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.variant .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.variant .chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-accent);
  color: var(--ink-secondary);
}
.variant .chip.angle-methodology { background: var(--cobalt-light); color: var(--cobalt); }
.variant .chip.angle-moat        { background: var(--gold-light);   color: var(--gold);   }
.variant .chip.angle-outcome     { background: var(--warm-light);   color: var(--warm);   }
.variant .chip.angle-category    { background: var(--teal-light);   color: var(--teal);   }
.variant .chip.angle-wedge       { background: var(--violet-light); color: var(--violet); }
.variant .chip.angle-tension     { background: var(--rose-light);   color: var(--rose);   }
.variant .chip.audience          { background: var(--bg-accent);    color: var(--ink-secondary); }
.variant .chip.voice             { background: var(--bg-accent);    color: var(--ink-secondary); }

.variant .variant-copy {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}
.variant .variant-copy.serif {
  font-family: 'IBM Plex Serif', serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.45;
}
.variant .variant-attr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

/* Long variants — Shelf C / D */
.variant.long {
  grid-column: span 2;
}
.variant.long .variant-copy {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-secondary);
}
.variant.long .variant-copy strong {
  color: var(--ink);
}
.variant.deep {
  grid-column: 1 / -1;
}
.variant.deep .variant-copy {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-secondary);
}
.variant.deep .variant-copy p {
  margin-bottom: 0.875rem;
}
.variant.deep h4 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

@media (max-width: 720px) {
  .variant.long, .variant.deep { grid-column: 1; }
}

/* Pull quotes — Shelf G */
.pullquote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.pullquote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
}
.pullquote::before {
  content: '"';
  font-family: 'IBM Plex Serif', serif;
  font-size: 3rem;
  color: var(--cobalt);
  opacity: 0.18;
  position: absolute;
  top: 0.25rem;
  left: 1rem;
  line-height: 1;
}
.pullquote .pullquote-text {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
  position: relative;
  z-index: 1;
}
.pullquote .pullquote-attr {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1rem;
}

/* Underneath — closing editorial */
.underneath-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}
.underneath-card p {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink);
}
.underneath-card p em {
  font-style: italic;
  color: var(--cobalt);
}

/* Footer */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer .footer-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
footer .footer-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
}

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 5.5rem 1.25rem 2.5rem; }
  section { padding: 3rem 1.25rem; }
  .ground-grid, .tension-grid, .pullquote-grid {
    grid-template-columns: 1fr;
  }
  .brief-card { padding: 1.5rem 1.5rem 1.5rem 1.75rem; }
  .underneath-card { padding: 1.75rem; }
}
