/* ═══════════════════════════════════════════════
   ECKWIP MICROSITE — SHARED STYLES
   Depends on: eckwip.css (base tokens)
═══════════════════════════════════════════════ */

/* Fonts loaded via <link> in HTML for performance */

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

:root {
  --ink:        #0A0A0A;
  --paper:      #FAFAF7;
  --yellow:     #EDB72E;
  --teal:       #1D6E74;
  --teal-light: #2A8B8F;
  --n-100:      #EFEFE8;
  --n-200:      #DFDFD7;
  --n-400:      #9B9B93;
  --n-600:      #565652;
  --serif:      'Unbounded', 'Arial Black', sans-serif;
  --sans:       'Epilogue', 'Inter', sans-serif;
  --gap:        12px;
  --pad:        32px;
  --radius:     0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Topbar ──────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: var(--ink);
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.logo-badge {
  width: 40px; height: 40px;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-decoration: none;
}
.logo-badge img { width: 32px; height: 32px; object-fit: contain; }
.logo-name {
  font-family: var(--serif); font-size: 17px; font-weight: 500;
  color: #fff; letter-spacing: -0.01em; text-decoration: none;
}
.topbar-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.15); }
.topbar-sub { font-size: 11px; color: var(--yellow); font-family: var(--serif); }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-ts { font-size: 10px; color: rgba(255,255,255,0.75); font-family: 'Courier New', monospace; margin-right: 10px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-light); animation: blink 3s ease-in-out infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Microsite Nav ───────────────────────────── */
.site-nav {
  display: flex; align-items: center; gap: 0;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 0 32px;
  overflow-x: auto;
}
.site-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  font-size: 12px; font-weight: 500;
  color: var(--n-600);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); border-bottom-color: var(--yellow); font-weight: 600; }
.site-nav a .nav-num { font-family: var(--serif); font-size: 10px; color: var(--n-400); }
.site-nav a.active .nav-num { color: var(--yellow); }

.nav-back {
  margin-left: auto;
  font-size: 11px; color: var(--n-400);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  padding: 14px 0 14px 20px;
  border-left: 1px solid var(--n-200);
  white-space: nowrap;
}
.nav-back:hover { color: var(--ink); }

/* ── Page shell ──────────────────────────────── */
.page-wrap {
  flex: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px var(--pad) 64px;
  width: 100%;
}

/* ── Page header ─────────────────────────────── */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--n-200);
}
.page-header .pg-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal);
  margin-bottom: 12px;
  display: block;
}
.page-header h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-header h1 em { color: var(--yellow); font-weight: 800; }
.pg-h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 17px; color: var(--ink);
  margin-bottom: 10px; margin-top: 16px; line-height: 1.4;
}
.page-header .pg-desc {
  font-size: 16px; line-height: 1.7; color: var(--n-600);
  max-width: 56ch; font-weight: 300;
}

/* ── Footer ──────────────────────────────────── */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  flex-wrap: wrap; gap: 8px;
}
.footer-left { display: none; }
.footer-right { font-size: 11px; color: var(--yellow); font-family: var(--serif); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 11px; color: rgba(255,255,255,0.35); text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-links a:hover { color: #fff; }

/* ── Shared tag pill ─────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.tag--signal  { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.tag--pattern { background: var(--teal); border-color: var(--teal); color: #fff; }
.tag--question { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Shared CTA button ───────────────────────── */
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-cta:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-cta:active { transform: translate(0,0); box-shadow: none; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  :root { --pad: 16px; }
  .topbar { padding: 12px 16px; }
  .site-nav { padding: 0 16px; }
  .site-footer { padding: 16px; }
  .nav-back { display: none; }
}

/* ── Internal body links ─────────────────────── */
.pg-desc a,
.ie-body a,
.node-body a,
.taught-desc a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.pg-desc a:hover,
.ie-body a:hover,
.node-body a:hover,
.taught-desc a:hover { color: var(--ink); }
