/* ============================================
   scientifics.io — design system
   Ink/Paper/Amber palette, serif+mono type,
   dots-to-network signature motif
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #0E1217;
  --paper: #F7F5F0;
  --amber: #C28840;
  --amber-deep: #A07F45;
  --gray-mid: #9B958A;
  --gray-dark: #7A756B;
  --gray-text: #5B5650;
  --gray-text-light: #A8A39A;
  --border-hair: rgba(14, 18, 23, 0.12);

  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

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

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; color: var(--ink); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

.lede {
  font-size: 1.18rem;
  color: var(--gray-text);
  max-width: 640px;
}

.mono-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--gray-text);
}

/* ---------- Header / Nav ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hair);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
}

.brand-mark svg { width: 30px; height: 30px; }
.brand-mark .wordmark { white-space: nowrap; }
.brand-mark .io { color: var(--amber); }

nav.site-nav {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

nav.site-nav a {
  color: var(--gray-text);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--ink);
}

nav.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--amber);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 18px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.nav-cta:hover { background: var(--amber-deep); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle svg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 13px 24px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--amber-deep); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-hair);
}
.btn-secondary:hover { border-color: var(--ink); }

.btn-on-dark {
  background: var(--amber);
  color: var(--ink);
}
.btn-on-dark:hover { background: #d6a35e; }

.btn-ghost-on-dark {
  background: transparent;
  color: var(--paper);
  border-color: rgba(247,245,240,0.3);
}
.btn-ghost-on-dark:hover { border-color: var(--paper); }

.btn-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
section.tight { padding: 64px 0; }

.section-dark {
  background: var(--ink);
  color: var(--paper);
}
.section-dark p { color: rgba(247,245,240,0.78); }
.section-dark .lede { color: rgba(247,245,240,0.78); }

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0.5;
}

/* The dots-to-network motif, used as a thin section divider */
.signal-rule {
  display: flex;
  align-items: center;
  height: 14px;
  margin: 56px 0;
  opacity: 0.55;
}
.signal-rule svg { width: 100%; height: 14px; }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 22px; }

.hero-mark {
  justify-self: end;
}
.hero-mark svg { width: 100%; max-width: 420px; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.card {
  background: #fff;
  border: 1px solid var(--border-hair);
  border-radius: 6px;
  padding: 32px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.card .card-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
}

.card h3 { margin-bottom: 12px; }
.card p { color: var(--gray-text); font-size: 0.96rem; margin-bottom: 0; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--amber);
}

/* ---------- Offering detail blocks ---------- */

.offering-block {
  padding: 64px 0;
  border-top: 1px solid var(--border-hair);
}
.offering-block:first-of-type { border-top: none; }

.offering-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.offering-meta .mono-label { display: block; margin-bottom: 8px; }

.offering-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.offering-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--gray-text);
  font-size: 0.97rem;
}
.offering-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.not-this {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 2px solid var(--amber);
  background: rgba(194, 136, 64, 0.06);
  font-size: 0.92rem;
  color: var(--gray-text);
}
.not-this strong { color: var(--ink); }

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(247,245,240,0.12);
}

.footer-brand .brand-mark { color: var(--paper); }
.footer-brand p { color: rgba(247,245,240,0.6); font-size: 0.92rem; max-width: 320px; margin-top: 14px; }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.5);
  margin: 0 0 16px;
}

.footer-col a {
  display: block;
  color: rgba(247,245,240,0.85);
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(247,245,240,0.45);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page header (non-home pages) ---------- */

.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border-hair);
}

/* ---------- Utility ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--gray-text); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { justify-self: start; order: -1; }
  .hero-mark svg { max-width: 280px; }
  .card-grid { grid-template-columns: 1fr; }
  .offering-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .two-col { grid-template-columns: 1fr; }

  nav.site-nav { display: none; }
  .menu-toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
