/* ============================================================
   Vanaheim Labs — brand stylesheet (v2: restrained/premium)
   Palette: Pine #2E7D5B · Sage #A8C5A1 · Gold #F2C14E
            Sky #7EC1F2 · Cream #F5F3EE · Near-black #0B0F0D
   ============================================================ */

:root {
  --pine: #2E7D5B;
  --pine-dark: #21593F;
  --sage: #A8C5A1;
  --gold: #F2C14E;
  --sky: #7EC1F2;
  --cream: #F5F3EE;
  --ink: #16211C;
  --ink-soft: #4A564E;

  --dark: #0B0F0D;
  --dark-line: rgba(245, 243, 238, 0.09);
  --dark-line-strong: rgba(245, 243, 238, 0.16);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-lg: 4px;
  --radius-md: 3px;
  --radius-sm: 2px;

  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 0.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
}
h1 em, h2 em { font-style: italic; }
p { margin: 0 0 1em; color: var(--ink-soft); }

/* ============ Rule / divider ============ */
.rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 0 0 22px;
}
.rule--light { background: var(--gold); }

/* ============ Buttons / links ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.94rem;
  transition: gap 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { gap: 12px; opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(22, 33, 28, 0.3); }
.btn-ghost:hover { border-color: var(--ink); }

.link-arrow {
  font-weight: 600;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: gap 0.15s ease;
}
.link-arrow:hover { gap: 11px; }

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22, 33, 28, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; }
.badge-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid rgba(245, 243, 238, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a { font-weight: 500; font-size: 0.95rem; color: var(--ink); transition: opacity 0.15s ease; }
.main-nav a:hover { opacity: 0.6; }
.nav-cta {
  background: var(--ink);
  color: var(--cream) !important;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.nav-cta:hover { opacity: 0.85; }

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

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-bottom: 1px solid rgba(22, 33, 28, 0.1);
  padding: 8px 24px 20px;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { padding: 12px 0; font-weight: 500; border-bottom: 1px solid rgba(22, 33, 28, 0.08); color: var(--ink); }

/* ============ Dark hero (home + page-hero) ============ */
.hero, .page-hero {
  position: relative;
  padding: 120px 0 140px;
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
}
.page-hero { padding: 88px 0 96px; }

.hero-network {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner, .page-hero-inner { position: relative; z-index: 1; max-width: 780px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  color: var(--cream);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.2vw, 4rem);
  margin-bottom: 0.45em;
  letter-spacing: -0.01em;
}
.hero h1 em { color: var(--gold); font-style: italic; }
.hero-lede {
  font-size: 1.15rem;
  color: rgba(245, 243, 238, 0.72);
  max-width: 620px;
  margin-bottom: 2.2em;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-primary { background: var(--gold); color: var(--dark); }
.hero .btn-primary:hover { opacity: 0.9; }
.hero .btn-ghost { color: var(--cream); border-color: rgba(245, 243, 238, 0.35); }
.hero .btn-ghost:hover { border-color: var(--cream); }

.page-hero h1 {
  font-family: var(--font-display);
  color: var(--cream);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  margin-bottom: 0.4em;
}
.page-hero-lede { font-size: 1.08rem; color: rgba(245, 243, 238, 0.72); max-width: 660px; margin-bottom: 0; line-height: 1.65; }
.page-hero .eyebrow { color: var(--sage); }

.scroll-mark {
  position: absolute;
  right: 40px;
  top: 40px;
  width: 92px;
  height: 92px;
  opacity: 0.35;
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Sections (light) ============ */
.section { padding: 104px 0; }
.section-alt { background: #EFEDE5; }
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.section h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  max-width: 720px;
  font-weight: 400;
}
.section-lede { font-size: 1.06rem; max-width: 680px; margin-bottom: 2.8em; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 3rem;
}
.section-head h2 { margin-bottom: 0; }
.section-head .section-lede { margin-bottom: 0; }

/* ============ Structure / pillars (numbered, monochrome) ============ */
.pillar-grid, .service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(22, 33, 28, 0.14);
}
.pillar-card, .thesis-card, .industry-card {
  padding: 34px 32px 34px 0;
  border-right: 1px solid rgba(22, 33, 28, 0.14);
}
.pillar-card:last-child, .thesis-card:last-child, .industry-card:last-child { border-right: none; }
.pillar-grid .pillar-card:not(:first-child),
.service-grid .pillar-card:not(:first-child) { padding-left: 32px; }
.pillar-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.pillar-card h3, .industry-card h3 { font-size: 1.25rem; margin-bottom: 0.5em; font-weight: 500; }
.pillar-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 1em;
}
.pillar-card p:last-child, .industry-card p { margin-bottom: 0; font-size: 0.96rem; }

/* ============ R&D block ============ */
.rd-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; }
.rd-copy p { font-size: 1.03rem; }
.rd-list { list-style: none; padding: 0; margin: 1.6em 0 0; display: flex; flex-direction: column; }
.rd-list li {
  padding: 18px 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(22, 33, 28, 0.14);
}
.rd-list li:last-child { border-bottom: 1px solid rgba(22, 33, 28, 0.14); }
.rd-list strong { color: var(--ink); }

.rd-stats { display: flex; flex-direction: column; }
.rd-stat { padding: 22px 0; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.rd-stat:last-child { border-bottom: 1px solid rgba(22, 33, 28, 0.14); }
.rd-num { display: block; font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; color: var(--ink); }
.rd-label { display: block; font-size: 0.85rem; letter-spacing: 0.03em; margin-top: 4px; color: var(--ink-soft); }

/* ============ Projects (dark-on-light monochrome cards) ============ */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 1rem; background: rgba(22, 33, 28, 0.14); border: 1px solid rgba(22, 33, 28, 0.14); }
.project-card { background: var(--cream); padding: 38px 36px; display: flex; flex-direction: column; }
.project-mark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--cream);
  background: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.project-body { display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-size: 1.4rem; margin-bottom: 0.2em; font-weight: 500; }
.project-tag { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 1.1em; }
.project-body p:not(.project-tag) { font-size: 0.97rem; flex: 1; }
.project-link { margin-top: 12px; color: var(--ink); align-self: flex-start; }

/* ============ Reading list teaser (dark strip) ============ */
.reading-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--dark);
  color: var(--cream);
  padding: 56px 56px;
  flex-wrap: wrap;
}
.reading-teaser-copy .section-kicker { color: var(--sage); }
.reading-teaser-copy h2 { color: var(--cream); margin-bottom: 0.6em; font-weight: 400; }
.reading-teaser-quote {
  margin: 0; padding: 0; border: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: rgba(245, 243, 238, 0.85);
}
.reading-teaser-quote cite {
  display: block; margin-top: 8px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(245, 243, 238, 0.5);
}
.reading-teaser .btn-primary { background: var(--gold); color: var(--dark); flex: none; }
.reading-teaser .btn-primary:hover { opacity: 0.9; }

/* ============ Timeline (Advisory) — clean numbered list, no dots ============ */
.timeline { margin-top: 1rem; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(22, 33, 28, 0.14);
}
.timeline-year { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--ink); }
.timeline-item h3 { font-size: 1.15rem; margin-bottom: 0.4em; font-weight: 500; }
.timeline-item p { font-size: 0.98rem; margin-bottom: 0; max-width: 620px; }

/* ============ Thesis pillars (Investments) — numbered, no cards ============ */
.thesis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 1rem; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.thesis-card h3 { font-size: 1.05rem; margin-bottom: 0.6em; font-weight: 500; }
.thesis-card p { font-size: 0.92rem; margin-bottom: 0; }

/* ============ Criteria table (Investments) — plain rows ============ */
.criteria-table { margin-top: 1rem; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.criteria-row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid rgba(22, 33, 28, 0.14); }
.criteria-label {
  padding: 20px 0;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.criteria-value { padding: 20px 0; font-size: 0.99rem; color: var(--ink); display: flex; align-items: center; }

/* ============ Portfolio list (Investments) — old-site style rows ============ */
.portfolio-list { margin-top: 1rem; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.portfolio-row {
  display: grid;
  grid-template-columns: 200px 1fr 90px;
  gap: 28px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid rgba(22, 33, 28, 0.14);
}
.portfolio-row-head { display: flex; flex-direction: column; gap: 4px; }
.portfolio-tag { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.portfolio-row h3 { font-size: 1.2rem; margin: 0; font-weight: 500; }
.portfolio-row p { font-size: 0.96rem; margin: 0; }
.portfolio-year { font-family: var(--font-display); font-size: 1rem; color: var(--ink-soft); text-align: right; }

/* ============ Pitch CTA (Investments) — dark strip ============ */
.pitch-cta {
  margin-top: 3.5rem;
  background: var(--dark);
  color: var(--cream);
  padding: 48px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.pitch-cta p { color: rgba(245, 243, 238, 0.75); font-size: 1.02rem; max-width: 560px; margin-bottom: 0; }
.pitch-cta .btn-primary { background: var(--gold); color: var(--dark); flex: none; }
.pitch-cta .btn-primary:hover { opacity: 0.9; }

/* ============ Book list (Books) — plain numbered rows ============ */
.book-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ink);
  padding: 0;
  margin: 0 0 3.5rem;
  max-width: 640px;
}
.book-quote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.book-list { display: flex; flex-direction: column; border-top: 1px solid rgba(22, 33, 28, 0.14); }
.book-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(22, 33, 28, 0.14);
}
.book-num { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--ink-soft); }
.book-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 0.3em; }
.book-head h3 { font-size: 1.2rem; margin: 0; font-weight: 500; }
.book-year { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.book-author {
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 0.7em;
}
.book-item p:last-child { font-size: 0.97rem; margin-bottom: 0; }

/* ============ Footer (dark) ============ */
.site-footer { position: relative; background: var(--dark); color: var(--cream); padding-top: 64px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--dark-line);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.badge-mark--footer { background: var(--cream); }
.badge-mark--footer svg path { stroke: #0B0F0D !important; }
.footer-brand-word { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; margin: 0; color: var(--cream); }
.footer-brand-sub { margin: 2px 0 0; font-size: 0.82rem; color: rgba(245, 243, 238, 0.55); }
.footer-mid p { color: rgba(245, 243, 238, 0.6); font-size: 0.92rem; margin-bottom: 0.4em; }
.footer-contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(245, 243, 238, 0.5); margin-bottom: 0.6em; }
.footer-email { font-weight: 600; font-size: 1.05rem; color: var(--gold); border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
.footer-email:hover { border-color: var(--gold); }
.footer-bottom { padding: 22px 24px 28px; font-size: 0.82rem; color: rgba(245, 243, 238, 0.4); text-align: center; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .pillar-grid, .service-grid, .thesis-grid, .project-grid { grid-template-columns: 1fr; }
  .pillar-card, .thesis-card, .industry-card { border-right: none; border-bottom: 1px solid rgba(22, 33, 28, 0.14); padding: 28px 0; }
  .pillar-grid .pillar-card:not(:first-child), .service-grid .pillar-card:not(:first-child) { padding-left: 0; }
  .project-card { border-bottom: 1px solid rgba(22, 33, 28, 0.14); }
  .rd-wrap { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 76px 0 96px; }
  .page-hero { padding: 64px 0 72px; }
  .section { padding: 64px 0; }
  .reading-teaser, .pitch-cta { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .criteria-row { grid-template-columns: 1fr; }
  .criteria-label { padding-bottom: 4px; }
  .criteria-value { padding-top: 0; }
  .book-item { grid-template-columns: 1fr; gap: 8px; }
  .book-num { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .portfolio-row { grid-template-columns: 1fr; gap: 6px; }
  .portfolio-year { text-align: left; }
  .scroll-mark { display: none; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .wrap { padding: 0 20px; }
}
