/* ========================================================================
   CLARITY UNLOCKED — Writers / Masthead stylesheet
   Shared tokens + nav + footer + roster grid
   ======================================================================== */

:root {
  --paper:          #fafaf8;
  --paper-2:        #f3f3ef;
  --ink:            #0f0f0d;
  --ink-soft:       #3a3a36;
  --ink-mid:        #6b6b64;
  --grey:           #9a9a92;
  --grey-2:         #c4c4bc;
  --accent:         #c8102e;
  --signal:         #c8102e;
  --rule:           #e8e8e2;
  --rule-strong:    #c8c8c0;
  --desk-labor:     #2563eb;
  --desk-identity:  #7c3aed;
  --desk-tools:     #0891b2;
  --desk-doctrine:  #dc2626;
  --desk-studio:    #d97706;
  --desk-inside:    #059669;
  --body:    'Inter', sans-serif;
  --display: 'Inter Tight', sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --max:       1200px;
  --reading:   680px;
  --gutter:    clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 8vw, 96px);
  --duration:      0.22s;
  --duration-fast: 0.12s;
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
html, body { overflow-x: hidden; min-width: 320px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Skip link ---- */
.skip { position: absolute; left: -9999px; top: -9999px; }
.skip:focus { left: var(--gutter); top: 10px; padding: 10px 14px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; z-index: 100; }

/* ---- Mono caps ---- */
.mono {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--ink);
}
.mono--grey { color: var(--grey); }
.mono--md { font-size: 13px; letter-spacing: 0.24em; }

/* ---- Top strip ---- */
.strip {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.strip__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 36px; padding: 8px 0;
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.24em;
  color: rgba(255,255,255,0.72); flex-wrap: nowrap;
}
.strip a { color: rgba(255,255,255,0.72); flex-shrink: 0; white-space: nowrap; }
.strip a:hover { color: var(--paper); }
.strip__center { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.strip__dot { width: 6px; height: 6px; background: var(--signal); display: inline-block; flex-shrink: 0; border-radius: 50%; animation: cu-pulse 2s ease-in-out infinite; }
.strip__portfolio { display: flex; align-items: center; gap: 16px; flex-shrink: 0; white-space: nowrap; }
.strip__portfolio .strip__sep { color: rgba(255,255,255,0.30); }
@keyframes cu-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; flex-wrap: nowrap; }
.nav__brand { font-family: var(--mono); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.32em; color: var(--ink); flex-shrink: 0; white-space: nowrap; }
.nav__brand:hover { opacity: 0.6; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); flex-shrink: 1; min-width: 0; flex-wrap: nowrap; }
.nav__links a { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--ink); transition: opacity var(--duration-fast) var(--ease); white-space: nowrap; }
.nav__links a:hover, .nav__links a.active { opacity: 0.55; }
.hamb { display: none; background: none; border: 0; padding: 8px; cursor: pointer; font-family: var(--mono); font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); }
.mobile-menu { display: none; flex-direction: column; gap: 18px; padding: 22px 0 32px; border-bottom: 1px solid var(--rule); }
.mobile-menu.open { display: flex; }
.mobile-menu .wrap { display: flex; flex-direction: column; gap: 18px; }
.mobile-menu a { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); }

/* ---- Roster grid ---- */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.roster__cell {
  padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 32px);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 20px;
  background: var(--paper);
  position: relative;
  min-height: 240px;
  transition: background var(--duration) var(--ease);
  text-decoration: none; color: inherit;
  border-top: 3px solid transparent;
}
.roster__cell:hover { background: var(--paper-2); }
.roster__cell:last-child { border-right: 0; }
.roster__cell--filled { background: var(--ink); color: var(--paper); border-top-color: var(--accent); }
.roster__cell--filled:hover { background: #1a1a18; }

.roster__monogram {
  width: 56px; height: 56px;
  border: 1px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 400; font-size: 26px;
  letter-spacing: 0;
}
.roster__role {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--grey);
  margin-bottom: 6px;
}
.roster__cell--filled .roster__role { color: rgba(255,255,255,0.65); }
.roster__name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(20px, 2.2cqi, 26px);
  line-height: 1.1; letter-spacing: -0.018em; color: inherit; margin: 0;
}
.roster__tag {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin-top: 8px;
}
.roster__beat {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft);
  margin-top: auto;
}
.roster__cell--filled .roster__beat { color: rgba(255,255,255,0.65); }

/* ---- CTA ---- */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 22px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-weight: 600; font-size: 12px;
  letter-spacing: 0.24em; text-transform: uppercase;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.cta:hover { background: var(--paper); color: var(--ink); }

/* ---- Footer ---- */
.footer {
  background: var(--paper); border-top: 1px solid var(--rule);
  padding: clamp(64px, 8vw, 96px) 0 clamp(36px, 4vw, 48px); color: var(--ink);
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--rule);
}
.footer__brand { font-family: var(--display); font-weight: 400; font-size: clamp(20px, 2vw, 26px); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.footer__tagline { font-family: var(--body); font-size: 13px; line-height: 1.6; color: var(--ink-soft); max-width: 340px; margin: 0; }
.footer__col h4 { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--grey); margin: 0 0 18px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-family: var(--body); font-size: 13px; color: var(--ink); transition: color var(--duration) var(--ease); display: inline-block; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--grey); }
.footer__bottom .accent { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .roster { grid-template-columns: repeat(2, 1fr); }
  .roster__cell { border-bottom: 1px solid var(--rule); }
  .roster__cell:nth-child(2n) { border-right: 0; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .hamb { display: block; }
  .strip__center { display: none; }
  .roster { grid-template-columns: 1fr; }
  .roster__cell { border-right: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}
