/* ============================================================
   Open Insights — styles.css
   Design tokens, base, layout, components, animations, responsive
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ink:         #0f1410;
  --paper:       #f5f2eb;
  --sage:        #4a6741;
  --sage-light:  #6b8f62;
  --amber:       #c9882a;
  --amber-light: #e5a94a;
  --mist:        #dde5d8;
  --rule:        #c8c2b4;
  --mid:         #6b6457;
  --white:       #fdfaf5;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── BASE ────────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 400; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { font-size: 1rem; color: var(--ink); max-width: 62ch; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── LOGO STACK ──────────────────────────────────────────────── */
.logo-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1;
  text-decoration: none;
}
.logo-open {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.logo-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--rule);
  margin: 3px 0;
}
.logo-insights {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--sage);
}
/* Footer variant — lighter rule */
.logo-stack--footer .logo-rule { background: rgba(245,242,235,0.2); }
.logo-stack--footer .logo-open { color: var(--paper); }

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { text-decoration: none; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem; color: var(--sage); text-decoration: none;
  letter-spacing: 0.02em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--sage-light); }

.nav-cta {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.08em; background: var(--sage); color: var(--white);
  padding: 0.5rem 1.25rem; text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--sage-light); }

/* ── SECTION LABEL ───────────────────────────────────────────── */
.section-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1rem;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero-section { padding: 0; background: var(--paper); }

.hero {
  min-height: 100vh; padding: 8rem 2rem 5rem;
  display: grid; grid-template-columns: 1fr 460px;
  gap: 4rem; align-items: center;
  max-width: 1200px; margin: 0 auto;
}

.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.14em; color: var(--sage); text-transform: uppercase;
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 2rem; height: 1px; background: var(--sage);
}

.hero h1 { margin-bottom: 1.5rem; color: var(--ink); }

.hero-lead {
  font-size: 1.1rem; line-height: 1.75; color: var(--ink);
  margin-bottom: 2.5rem; max-width: 54ch;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
  letter-spacing: 0.08em; background: var(--sage); color: var(--white);
  padding: 0.875rem 2rem; text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--sage-light); transform: translateY(-1px); }

.btn-secondary {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
  letter-spacing: 0.08em; background: transparent; color: var(--ink);
  padding: 0.875rem 2rem; text-decoration: none; display: inline-block;
  border: 1px solid var(--rule); transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--sage); color: var(--sage); }

.btn-white {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  letter-spacing: 0.08em; background: var(--white); color: var(--sage);
  padding: 0.875rem 1.75rem; text-decoration: none; text-align: center;
  display: block; transition: background 0.2s;
}
.btn-white:hover { background: var(--paper); }

.btn-ghost-white {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  letter-spacing: 0.08em; background: transparent; color: var(--white);
  padding: 0.875rem 1.75rem; text-decoration: none; text-align: center;
  display: block; border: 1px solid rgba(253,250,245,0.4); transition: border-color 0.2s;
}
.btn-ghost-white:hover { border-color: var(--white); }

/* ── COMMITMENTS CARD ────────────────────────────────────────── */
.commitments-card {
  position: relative; background: var(--white);
  border: 1px solid var(--rule); padding: 2.5rem;
}
.commitments-card::before {
  content: ''; position: absolute; top: -4px; left: -4px; right: 4px; bottom: 4px;
  border: 1px solid var(--mist); pointer-events: none; z-index: -1;
}
.card-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
}
.commitment-item {
  padding: 1rem 0; border-bottom: 1px solid var(--mist);
  display: flex; gap: 1rem; align-items: flex-start;
}
.commitment-item:last-child { border-bottom: none; }
.commit-icon {
  width: 1.5rem; height: 1.5rem; flex-shrink: 0; background: var(--mist);
  display: flex; align-items: center; justify-content: center; margin-top: 0.1rem;
}
.commit-icon svg { width: 14px; height: 14px; stroke: var(--sage); fill: none; stroke-width: 2; }
.commit-title { font-size: 0.9rem; font-weight: 500; color: var(--ink); margin-bottom: 0.25rem; }
.commit-desc { font-size: 0.8rem; color: var(--ink); line-height: 1.5; max-width: none; }

/* ── HOW ENABLED SECTION ─────────────────────────────────────── */
.enabled-section { background: var(--ink); color: var(--paper); padding: 5rem 0; }
.enabled-section .section-label { color: var(--amber-light); }
.enabled-section h2 { color: var(--paper); }

.enabled-intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem;
  align-items: start; margin-bottom: 4rem;
}
.enabled-intro-right { padding-top: 0.5rem; }
.enabled-intro-right p { color: rgba(245,242,235,0.65); }

/* Framework grid */
.framework-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  margin-top: 1rem;
}
.framework-cell { background: var(--ink); padding: 2rem 1.75rem; position: relative; }
.framework-cell.highlighted {
  background: rgba(74,103,65,0.18);
  border-top: 2px solid var(--sage);
}
.framework-index {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245,242,235,0.35); margin-bottom: 1.25rem;
}
.framework-cell h3 {
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
  color: var(--paper); margin-bottom: 0.75rem;
}
.framework-cell.highlighted h3 { color: var(--amber-light); }
.framework-cell p {
  font-size: 0.85rem; color: rgba(245,242,235,0.55);
  line-height: 1.6; max-width: none;
}
.framework-cell p a {
  color: rgba(245,242,235,0.9); text-decoration: none; transition: text-decoration 0.15s;
}
.framework-cell p a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Flow bar */
.framework-flow-bar {
  display: flex; align-items: center; gap: 1.5rem;
  margin-top: 1.5rem; padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.flow-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245,242,235,1);
}
.flow-label--highlight {
  font-family: 'DM Sans', sans-serif; font-size: 0.75rem;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber-light);
}
.flow-arrow { color: rgba(245,242,235,1); flex-shrink: 0; font-size: 1.2rem; }

/* ── SERVICES ────────────────────────────────────────────────── */
.services-section { background: var(--paper); padding: 5rem 0 3rem; }

.service-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; margin-top: 3rem; background: var(--rule);
}
.service-card-full { grid-column: 1 / -1; }

.service-card {
  background: var(--white); padding: 2.5rem;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0; background: var(--sage);
  transition: width 0.4s ease;
}
.service-card:hover::after { width: 100%; }
.service-card--mist { background: var(--mist); }

.service-icon {
  width: 2.5rem; height: 2.5rem; background: var(--mist);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.service-icon--paper { background: var(--paper); }
.service-icon svg { width: 18px; height: 18px; stroke: var(--sage); fill: none; stroke-width: 1.5; }

.service-card h3 { margin-bottom: 0.5rem; }
.service-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.08em; color: var(--ink);
  display: block; margin-bottom: 1rem;
}
a.service-tag--link {
  color: var(--sage); text-decoration: none;
  transition: color 0.2s;
}
a.service-tag--link::after { content: ' →'; }
a.service-tag--link:hover { color: var(--sage-light); }
.service-card p { font-size: 0.9rem; max-width: none; margin-bottom: 1.5rem; }
.service-link {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--sage); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.service-link::after { content: '→'; }

/* ── PARTNERS ────────────────────────────────────────────────── */
.partners-section { background: var(--mist); padding: 3rem 0; }

.partner-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); margin-top: 2.5rem;
}
.partner-cell { background: var(--white); padding: 1.75rem; }
.partner-name {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem;
  font-weight: 500; color: var(--ink); margin-bottom: 0.4rem; letter-spacing: 0.03em;
}
.partner-name a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
}
.partner-role { font-size: 0.78rem; color: var(--ink); max-width: none; line-height: 1.4; }

.partners-footnote {
  border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.5rem;
}
.partners-footnote p {
  font-size: 0.85rem; color: var(--mid);
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.03em; line-height: 1.6;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section { background: var(--sage); color: var(--white); padding: 3rem 0; }

.cta-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 3rem; align-items: center;
}
.cta-section h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.4rem); }
.cta-section p { color: rgba(253,250,245,0.75); margin-top: 1rem; }
.cta-section .section-label { color: rgba(253,250,245,0.6); }
.cta-actions { display: flex; flex-direction: column; gap: 1rem; min-width: 220px; }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer { background: var(--ink); color: var(--paper); padding: 3rem 0 2rem; }

.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem; padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.5rem;
}
.footer-brand .logo-stack--footer { margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.85rem; color: rgba(245,242,235,0.5); margin-top: 0.75rem; max-width: 36ch; }

.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sage-light); margin-bottom: 1rem; font-weight: 400;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  font-size: 0.85rem; color: rgba(245,242,235,0.65);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--paper); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  color: rgba(245,242,235,0.3); letter-spacing: 0.06em;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow  { animation: fadeUp 0.6s ease both; }
.hero h1       { animation: fadeUp 0.6s ease 0.1s both; }
.hero-lead     { animation: fadeUp 0.6s ease 0.2s both; }
.hero-actions  { animation: fadeUp 0.6s ease 0.3s both; }
.commitments-card { animation: fadeUp 0.7s ease 0.2s both; }

/* Scroll reveal (applied via JS) */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 7rem; }
  .commitments-card { display: none; }
  .enabled-intro { grid-template-columns: 1fr; gap: 2rem; }
  .framework-grid { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .service-cards { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .partner-grid { grid-template-columns: 1fr; }
  .framework-flow-bar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
