/* ============================================================================
   CCSS WEBSITE — STYLES
   Design tokens live in :root below. Change a value here and it updates
   everywhere the variable is used across the site.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* ---- color ---- */
  --ink:        #10192B;   /* primary dark: headings, hero, footer */
  --ink-soft:   #3B4A63;   /* secondary text on light backgrounds */
  --paper:      #EEF0EE;   /* main section background (cool, not cream) */
  --paper-dim:  #E2E5E1;   /* card / alt background */
  --white:      #FBFBF9;   /* card surfaces on paper */
  --line:       #CDD2CB;   /* hairlines, borders */
  --brass:      #A9782C;   /* primary accent */
  --brass-soft: #C79A4E;   /* accent hover / light */
  --maroon:     #7A2426;   /* stamp / signal accent */

  /* ---- type ---- */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Source Serif 4', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* ---- layout ---- */
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

/* ============================== NAV ============================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238, 240, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.wordmark .full {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.wordmark .sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--brass);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: var(--brass);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 1px solid var(--ink);
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mobile-panel.open { display: flex; }
.mobile-panel a {
  padding: 16px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
}
.mobile-panel a.mobile-cta {
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ============================== HERO ============================== */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  padding: 108px 0 84px;
}

.hero-contours {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-meta .eyebrow { color: var(--brass-soft); }
.hero-meta .eyebrow::before { background: var(--brass-soft); }

.coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(251,251,249,0.55);
  letter-spacing: 0.04em;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(38px, 6vw, 68px);
  white-space: pre-line;
  max-width: 16ch;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 26px;
  max-width: 46ch;
  font-size: 18px;
  color: rgba(251,251,249,0.78);
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--brass);
  color: var(--ink);
  font-weight: 500;
  border: 1px solid var(--brass);
}
.btn-primary:hover { background: var(--brass-soft); border-color: var(--brass-soft); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid rgba(251,251,249,0.35);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); transform: translateY(-1px); }

.stat-strip {
  margin-top: 76px;
  padding-top: 28px;
  border-top: 1px solid rgba(251,251,249,0.16);
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.stat-strip .stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--white);
}
.stat-strip .stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(251,251,249,0.55);
  margin-top: 4px;
}

/* ============================== SECTIONS ============================== */

section { padding: 96px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-top: 14px;
}

.section-head p {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ============================== PUBLICATIONS ============================== */

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pub-card {
  background: var(--white);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow .25s ease;
}
.pub-card.in-view { opacity: 1; transform: translateY(0); }
.pub-card:hover { box-shadow: inset 0 0 0 1px var(--brass); }

.pub-stamp {
  position: absolute;
  top: 26px;
  right: 26px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--maroon);
  border: 1px solid var(--maroon);
  padding: 3px 8px;
  border-radius: var(--radius);
  transform: rotate(2deg);
}

.pub-topic {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 16px;
}

.pub-card h3 {
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 12px;
  padding-right: 64px;
}

.pub-card .pub-excerpt {
  font-size: 14.5px;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 20px;
}

.pub-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--paper-dim);
  font-size: 13px;
}

.pub-author {
  font-weight: 600;
}

.pub-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.pub-link:hover { border-color: var(--brass); }

/* ============================== PROGRAMS ============================== */

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.program-card {
  background: var(--paper);
  padding: 34px 28px;
  transition: background .25s ease;
}
.program-card:hover { background: var(--white); }

.program-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 18px;
}

.program-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.program-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.program-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================== ABOUT / MISSION ============================== */

.about-section { background: var(--ink); color: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
}
.about-section .eyebrow { color: var(--brass-soft); }
.about-section .eyebrow::before { background: var(--brass-soft); }
.about-section h2 { color: var(--white); margin-top: 14px; font-size: clamp(28px, 3.6vw, 40px); }

.mission-copy p {
  font-size: 16px;
  color: rgba(251,251,249,0.8);
  margin: 0 0 20px;
}
.mission-copy p:last-child { margin-bottom: 0; }

/* ============================== TEAM ============================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 52px;
}

.team-card {
  border-top: 2px solid var(--brass);
  padding-top: 18px;
}

.team-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 6px;
  margin-bottom: 14px;
}

.team-bio {
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ============================== SUBMISSIONS ============================== */

.submissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.rule-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rule {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}

.rule-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--maroon);
  flex-shrink: 0;
}

.rule-title {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.rule-detail {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.note-box {
  font-size: 13.5px;
  color: var(--ink-soft);
  border-left: 2px solid var(--brass);
  padding-left: 16px;
  margin-top: 8px;
}

.contrib-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px;
}
.contrib-box h3 { font-size: 18px; margin-bottom: 18px; }
.contrib-box ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}
.contrib-box li { display: flex; gap: 10px; }
.contrib-box li::before { content: "—"; color: var(--brass); flex-shrink: 0; }

.email-cta {
  display: block;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 16px;
  border-radius: var(--radius);
  transition: background .2s ease;
}
.email-cta:hover { background: var(--maroon); }

/* ============================== FOOTER ============================== */

footer {
  background: var(--ink);
  color: rgba(251,251,249,0.6);
  padding: 56px 0 32px;
  border-top: 1px solid rgba(251,251,249,0.1);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(251,251,249,0.1);
}

.footer-word {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-addr {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  padding: 5px 0;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ============================== RESPONSIVE ============================== */

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .submissions-grid { grid-template-columns: 1fr; gap: 40px; }
  section { padding: 68px 0; }
  .hero { padding: 88px 0 56px; }
  .stat-strip { gap: 36px; margin-top: 56px; }
}

@media (max-width: 520px) {
  .pub-card h3 { padding-right: 0; }
  .pub-stamp { position: static; display: inline-block; margin-bottom: 14px; transform: none; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
