/* Civic Power Lab — shared styles
   Inspired by Athos Bulcão's modular tile compositions.
   Default scheme: Peacock + Terracotta (Jewel · A). */

:root {
  /* paper / field */
  --cream: #f1ead7;
  --cream-2: #e5dcc0;
  --paper: #f1ead7;
  --rule: #ccbf9f;

  /* ink */
  --ink: #141c1f;
  --ink-2: #23333a;
  --mute: #5e6f74;

  /* mark (snowflake logo) */
  --mark-color: #15616d;
  --mark-accent: #b84a2e;

  /* semantic accents */
  --cobalt: #15616d;       /* peacock teal */
  --cobalt-deep: #0d3d45;  /* deep teal */
  --terracotta: #b84a2e;   /* warm terracotta */
  --olive: #a87820;        /* antique gold */
  --rust: #8a3a1c;

  /* headliners / hero */
  --headline-bg: #0d3d45;
  --headline-text: #f1ead7;
  --headline-em: #d9a636;
  --headline-mute: #9dbcc2;

  /* footer tuning */
  --footer-mark-color: #f1ead7;
  --footer-mark-accent: #d9a636;

  --font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --maxw: 1340px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--cobalt); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 88px); line-height: 1.0; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.2; }

p { text-wrap: pretty; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.mono-lg {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--mute);
}

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

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.brand-name b { font-weight: 600; display: block; line-height: 1.1; }
.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 14px;
}

.nav-links a {
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-links a:hover { color: var(--cobalt); border-bottom-color: var(--cobalt); }
.nav-links a.active { color: var(--cobalt); border-bottom-color: var(--cobalt); border-bottom-width: 2px; }

.nav-cta {
  background: var(--ink);
  color: var(--cream) !important;
  padding: 8px 16px !important;
  border-radius: 2px;
  border: none !important;
  transition: background .15s;
}
.nav-cta:hover { background: var(--cobalt) !important; border: none !important; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
}

.nav-menu-btn {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--rule);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-head {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.page-head-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

@media (max-width: 760px) {
  .page-head-inner { grid-template-columns: 1fr; }
  .page-head { padding: 48px 0 32px; }
}

.page-head h1 {
  font-size: clamp(44px, 5.5vw, 88px);
  line-height: 0.98;
}

.page-head .lede {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
}

.page-head .crumb {
  margin-bottom: 20px;
}

/* =========================================================
   SECTIONS / LAYOUT
   ========================================================= */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--rule);
}
.section.tight { padding: 48px 0; }
.section.loose { padding: 96px 0; }
.section.cream-2 { background: var(--cream-2); }
.section.cobalt {
  background: var(--cobalt-deep);
  color: var(--cream);
}
.section.cobalt h1, .section.cobalt h2, .section.cobalt h3 { color: var(--cream); }
.section.cobalt .mono, .section.cobalt .mono-lg { color: #b8c5e8; }
.section.cobalt a { color: var(--cream); }
.section.cobalt a:hover { color: #f4c58a; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-head .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

/* =========================================================
   CARDS / RESEARCH ITEMS
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(20,20,20,.18);
}

.card-tile {
  aspect-ratio: 5 / 3;
  background: var(--cream-2);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
}

.card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  align-items: center;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.card p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.card .card-foot {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  color: var(--mute);
  background: transparent;
}
.tag.cobalt { border-color: var(--cobalt); color: var(--cobalt); }
.tag.terra { border-color: var(--terracotta); color: var(--terracotta); }
.tag.olive { border-color: var(--olive); color: var(--olive); }
.tag.solid {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.btn:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--cream) !important; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--cream) !important; }
.btn.cobalt { background: var(--cobalt); border-color: var(--cobalt); }
.btn.cobalt:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.btn svg { width: 14px; height: 14px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: #0d3d45;           /* deep peacock, not pure black */
  color: var(--cream);
  padding: 0 0 32px;
  position: relative;
  overflow: hidden;
}
.footer .container { position: relative; }
.footer-strip {
  height: 120px;
  overflow: hidden;
  border-bottom: 1px solid rgba(241,234,215,0.12);
}
.footer-strip > svg { display: block; width: 100%; height: 100%; }
.footer > .container { padding-top: 72px; }
.footer a { color: var(--cream); opacity: 0.82; }
.footer a:hover { opacity: 1; color: var(--headline-em); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--headline-em);     /* gold accent for section labels */
  margin-bottom: 16px;
  font-weight: 400;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 14px; }

/* Bulcão acknowledgment — sits above the copyright line */
.footer-colophon {
  border-top: 1px solid rgba(241,234,215,0.14);
  padding-top: 28px;
  padding-bottom: 28px;
  max-width: 62ch;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 620px) {
  .footer-colophon { grid-template-columns: 1fr; gap: 10px; }
}
.footer-colophon .fc-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--headline-em);
  white-space: nowrap;
  padding-top: 3px;
}
.footer-colophon p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(241,234,215,0.78);
  font-style: italic;
}
.footer-colophon p b {
  font-style: normal;
  font-weight: 500;
  color: var(--cream);
}

.footer-bottom {
  border-top: 1px solid rgba(241,234,215,0.14);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241,234,215,0.55);
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================================
   SECTION MARKERS — tile strips that label each section
   (different motif+color per section for wayfinding)
   ========================================================= */
.section-marker {
  height: 72px;
  width: 100%;
  overflow: hidden;
  display: block;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section-marker.tall { height: 108px; }
.section-marker.short { height: 48px; }
.section-marker > svg { display: block; width: 100%; height: 100%; }
.section-marker + .section,
.section + .section-marker { margin-top: 0; }

.section-marker-label {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--paper);
}
.section-marker-label .sml-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
  padding: 22px var(--gutter) 22px var(--gutter);
  white-space: nowrap;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--rule);
}
.section-marker-label .sml-strip {
  min-height: 60px;
  overflow: hidden;
}
.section-marker-label .sml-strip > svg { display: block; width: 100%; height: 100%; }

/* =========================================================
   UTILITIES
   ========================================================= */
.rule { height: 1px; background: var(--rule); margin: 48px 0; }
.rule.thick { height: 2px; background: var(--ink); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--cobalt);
  display: inline-block;
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--ink-2);
  max-width: 30ch;
}

.prose p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.prose p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3em;
  float: left;
  line-height: 0.9;
  padding: 6px 8px 0 0;
  color: var(--cobalt);
}
.prose h3 {
  margin-top: 32px;
  margin-bottom: 10px;
}

/* Ornamental divider */
.orn-divider {
  height: 80px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
