/* ──────────────────────────────────────────────────────────────────────
   MSIH Ventures — editorial / off-white / asymmetric
   Palette: Madinah-stone (paper), basalt ink, date umber, single ink accent.
   Type: Fraunces (display, with optical sizing) + Inter Tight (body).
   ────────────────────────────────────────────────────────────────────── */

:root {
  /* Earthy / regional palette */
  --paper:        #F4EFE6;   /* warm sand / madinah stone */
  --paper-deep:   #EDE5D5;   /* slightly deeper paper */
  --ink:          #1B1815;   /* basalt — near-black with warm cast */
  --ink-soft:     #2D2925;   /* secondary copy */
  --ink-mute:     #6B6358;   /* tertiary, captions */
  --ink-faint:    #A89E8E;   /* hairlines, marginalia */
  --line:         rgba(27, 24, 21, 0.12);
  --line-soft:    rgba(27, 24, 21, 0.06);
  --umber:        #6E2E1F;   /* date-flesh accent — used sparingly */
  --umber-deep:   #4A1F15;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--umber); color: var(--paper); }

/* Layout primitives */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

.two-col {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  align-items: start;
}

.margin {
  position: sticky;
  top: 96px;
}
.margin-tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  font-variation-settings: 'opsz' 14, 'SOFT' 50;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  border-top: 1px solid var(--ink);
  padding-top: 8px;
  display: inline-block;
}

/* ───────── Topbar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 230, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 24, 'SOFT' 30, 'WONK' 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--ink);
}
.wordmark .m, .wordmark .s, .wordmark .i, .wordmark .h {
  letter-spacing: -0.02em;
}
.wordmark .i { color: var(--umber); }
.wordmark em {
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  font-variation-settings: 'opsz' 14, 'SOFT' 80;
  margin-left: 8px;
  color: var(--ink-mute);
  letter-spacing: 0.16em;
  text-transform: lowercase;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}
.topnav a {
  position: relative;
  padding-bottom: 2px;
  transition: color 0.15s;
}
.topnav a:hover { color: var(--umber); }
.topnav a.cta {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: 0;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.topnav a.cta:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ───────── Hero ───────── */
.hero {
  padding: 120px 0 100px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* soft umber halftone in upper right — barely visible */
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 80%;
  background:
    radial-gradient(circle at 30% 30%, rgba(110, 46, 31, 0.08), transparent 60%);
  pointer-events: none;
}
.kicker {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  font-variation-settings: 'opsz' 14, 'SOFT' 60;
  color: var(--ink-mute);
  margin-bottom: 36px;
  letter-spacing: 0.01em;
}

.display {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1;
  color: var(--ink);
  max-width: 14ch;
}
.display em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  color: var(--umber);
  font-weight: 400;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  margin-top: 64px;
  align-items: end;
}
.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--ink);
  padding-left: 20px;
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink-soft);
  font-variation-settings: 'opsz' 18, 'SOFT' 60;
}
.hero-meta em {
  font-style: italic;
  font-variation-settings: 'opsz' 18, 'SOFT' 100;
  color: var(--umber);
}

/* ───────── Essay sections ───────── */
.essay {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}
.essay.alt {
  background: var(--paper-deep);
}

.prose h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 60, 'SOFT' 30;
  margin-bottom: 28px;
  max-width: 22ch;
}
.prose h2 em {
  font-style: italic;
  color: var(--umber);
  font-variation-settings: 'opsz' 60, 'SOFT' 100;
}
.prose p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 60ch;
}
.prose p a {
  color: var(--umber);
  border-bottom: 1px solid var(--umber);
  padding-bottom: 1px;
  transition: background 0.15s;
}
.prose p a:hover {
  background: var(--umber);
  color: var(--paper);
}

/* Lane (replaces "card 01/02/03") */
.lane {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.lane:first-of-type { margin-top: 16px; }
.lane:last-of-type { border-bottom: 1px solid var(--line); }
.lane h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 30, 'SOFT' 40;
  margin-bottom: 8px;
  color: var(--ink);
}
.lane p {
  font-size: 17px;
  margin-bottom: 0;
}

/* Definition list — Mesa IT facts */
.defs {
  margin: 28px 0 24px;
  border-top: 1px solid var(--line);
}
.defs > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.defs dt {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-mute);
  font-variation-settings: 'opsz' 14, 'SOFT' 70;
}
.defs dd {
  font-size: 16px;
  color: var(--ink-soft);
}
.defs dd em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 16, 'SOFT' 100;
  color: var(--umber);
}

.link-out a {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  font-variation-settings: 'opsz' 18, 'SOFT' 80;
  color: var(--umber);
  border-bottom: 1px solid var(--umber);
  padding-bottom: 2px;
}

/* Quieter "by the way" paragraph inside an essay */
.prose p.aside-line {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 17px;
  font-variation-settings: 'opsz' 17, 'SOFT' 80;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 26px;
  max-width: 60ch;
}
.prose p.aside-line a {
  color: var(--umber);
  border-bottom: 1px solid var(--umber);
  font-style: normal;
  font-family: 'Inter Tight', sans-serif;
}

/* ───────── Madaar feature ───────── */
.madaar-feature {
  background: var(--ink);
  color: var(--paper);
  padding: 110px 0;
  border-bottom: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.madaar-feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(110, 46, 31, 0.35), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(110, 46, 31, 0.18), transparent 55%);
  pointer-events: none;
}
.madaar-feature .wrap { position: relative; }
.madaar-feature .kicker { color: rgba(244, 239, 230, 0.65); }
.madaar-title {
  color: var(--paper);
  margin-bottom: 32px;
  max-width: none;
  font-size: clamp(56px, 9vw, 124px);
}
.madaar-title em {
  color: var(--paper);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.madaar-title .dot {
  color: var(--umber);
  font-style: normal;
  margin: 0 0.05em;
  display: inline-block;
  transform: translateY(-0.1em);
}
.madaar-lede {
  font-size: 19px;
  line-height: 1.6;
  color: rgba(244, 239, 230, 0.78);
  max-width: 58ch;
  margin-bottom: 36px;
}
.btn-link {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 19px;
  color: var(--paper);
  border-bottom: 1px solid var(--paper);
  padding-bottom: 4px;
  font-variation-settings: 'opsz' 19, 'SOFT' 80;
  transition: color 0.15s, border-color 0.15s;
}
.btn-link:hover {
  color: #E8B5A0;
  border-color: #E8B5A0;
}

.madaar-aside {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 239, 230, 0.15);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(244, 239, 230, 0.5);
  font-variation-settings: 'opsz' 14, 'SOFT' 80;
  letter-spacing: 0.01em;
}

/* ───────── Contact ───────── */
.contact {
  padding: 96px 0;
  background: var(--paper);
}
.contact-lede {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 58ch;
}
.contact-list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.contact-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-list .ck {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-mute);
  font-variation-settings: 'opsz' 14, 'SOFT' 70;
}
.contact-list a {
  color: var(--umber);
  border-bottom: 1px solid var(--umber);
  padding-bottom: 1px;
}

/* ───────── Footer ───────── */
.foot {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}
.foot-mark {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  font-variation-settings: 'opsz' 16, 'SOFT' 30, 'WONK' 1;
}
.foot-mark em {
  color: var(--umber);
  font-style: normal;
  margin: 0 4px;
}
.foot-meta {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  font-variation-settings: 'opsz' 13, 'SOFT' 70;
}
.foot-meta a {
  color: var(--umber);
  border-bottom: 1px solid var(--umber);
}

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .margin { position: static; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .topbar .wrap { height: 60px; }
  .topnav { gap: 16px; font-size: 13px; }
  .topnav a:not(.cta):nth-of-type(n+3) { display: none; }
  .hero { padding: 72px 0 64px; }
  .essay { padding: 64px 0; }
  .madaar-feature { padding: 72px 0; }
  .contact { padding: 64px 0; }
  .defs > div, .contact-list li { grid-template-columns: 100px 1fr; gap: 16px; }
  .wordmark em { display: none; }
}
