/* ==========================================================================
   MF Whales — institutional monochrome
   Sibling to Wealth Egypt: same black-and-white discipline, differentiated
   by typeface (IBM Plex vs Space Grotesk/Inter), density, and structure.
   ========================================================================== */

:root {
  --ink: #101114;
  --paper: #fafaf7;
  --grey-1: #3a3c42;
  --grey-2: #6b6e76;
  --grey-3: #9b9ea6;
  --grey-4: #d4d5d1;
  --rule: #e2e3df;

  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* One easing curve, two durations. Used everywhere, without exception. */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 200ms;
  --slow: 360ms;

  --measure: 64ch;
  --gutter: 32px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- layout - */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 200;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------ typography - */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--grey-3);
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.h-page {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  letter-spacing: -0.03em;
}

.h-section {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.h-item {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.55;
  color: var(--grey-1);
  max-width: 40ch;
}

.prose {
  max-width: var(--measure);
}

.prose p + p {
  margin-top: 1.1em;
}

.prose p {
  color: var(--grey-1);
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.muted {
  color: var(--grey-2);
}

/* The canonical identity sentence. Same treatment everywhere it appears. */
.identity {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 46ch;
  border-left: 1px solid var(--ink);
  padding-left: 22px;
}

/* ------------------------------------------------------------------ nav - */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-logo .mark {
  height: 24px;
  width: auto;
  display: block;
}

.nav-logo .wordmark {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--grey-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav-links a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--rule);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform var(--fast) var(--ease),
    opacity var(--fast) var(--ease);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
}

/* --------------------------------------------------------------- hero --- */

.hero {
  padding: clamp(90px, 16vh, 180px) 0 clamp(70px, 11vh, 130px);
  border-bottom: 1px solid var(--rule);
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.hero .h-display {
  margin-bottom: 40px;
  max-width: 15ch;
}

/* --------------------------------------------------------- page header -- */

.page-head {
  padding: clamp(56px, 9vh, 96px) 0 clamp(44px, 7vh, 72px);
  border-bottom: 1px solid var(--rule);
}

.page-head .eyebrow {
  margin-bottom: 20px;
}

.page-head .h-page {
  margin-bottom: 24px;
}

/* ------------------------------------------------------------- sections - */

.section {
  padding: clamp(64px, 10vh, 120px) 0;
  border-bottom: 1px solid var(--rule);
}

.section:last-of-type {
  border-bottom: none;
}

.section-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--gutter);
  margin-bottom: 48px;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--grey-3);
  letter-spacing: 0.1em;
  padding-top: 0.5em;
}

/* Two-column body: label rail on the left, content on the right.
   Keeps a single shared left edge down the whole page. */
.railed {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--gutter);
}

/* ------------------------------------------------------- index (home) --- */

.index-list {
  border-top: 1px solid var(--rule);
}

.index-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: var(--gutter);
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background var(--fast) var(--ease);
}

.index-item:hover {
  background: rgba(16, 17, 20, 0.025);
}

.index-item .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--grey-3);
  letter-spacing: 0.1em;
}

.index-item .body p {
  color: var(--grey-2);
  font-size: 0.95rem;
  margin-top: 6px;
  max-width: 56ch;
}

.index-item .arrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--grey-3);
  transition: transform var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.index-item:hover .arrow {
  transform: translateX(5px);
  color: var(--ink);
}

/* ----------------------------------------------------------- fact row --- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.fact {
  flex: 1 1 200px;
  padding: 26px 28px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.fact .value {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}

.fact .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-3);
}

/* -------------------------------------------------------------- blocks -- */

.blocks {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.blocks-2 {
  grid-template-columns: repeat(2, 1fr);
}

.block {
  background: var(--paper);
  padding: 36px 34px;
}

.block .eyebrow {
  margin-bottom: 14px;
}

.block .h-item {
  margin-bottom: 12px;
}

.block p {
  color: var(--grey-2);
  font-size: 0.95rem;
  max-width: 46ch;
}

.block p + p {
  margin-top: 0.9em;
}

/* --------------------------------------------------------------- steps -- */

.steps {
  border-top: 1px solid var(--rule);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--gutter);
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.step .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--grey-3);
  letter-spacing: 0.1em;
  padding-top: 0.35em;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--grey-2);
  font-size: 0.95rem;
  max-width: 58ch;
}

/* ---------------------------------------------------------- disclosure -- */

/* Legible disclosure is a credibility signal. Body type, normal size,
   normal background — never shrunk to grey fine print. */
.disclosure {
  border: 1px solid var(--ink);
  padding: 32px 34px;
}

.disclosure h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.disclosure p {
  font-size: 0.95rem;
  color: var(--grey-1);
  max-width: 68ch;
}

.disclosure p + p {
  margin-top: 1em;
}

.disclosure + .disclosure {
  margin-top: 20px;
}

/* ------------------------------------------------------------- contact -- */

.contact-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: var(--gutter);
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.contact-row:first-of-type {
  border-top: 1px solid var(--rule);
}

.contact-row .label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-3);
  padding-top: 0.3em;
}

.contact-row a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--grey-4);
  transition: border-color var(--fast) var(--ease);
}

.contact-row a:hover {
  border-bottom-color: var(--ink);
}

/* ---------------------------------------------------------------- link -- */

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity var(--fast) var(--ease);
}

.textlink:hover {
  opacity: 0.62;
}

.textlink .arrow {
  font-family: var(--mono);
  transition: transform var(--fast) var(--ease);
}

.textlink:hover .arrow {
  transform: translateX(4px);
}

/* -------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--ink);
  padding: 60px 0 44px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--rule);
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  list-style: none;
  align-content: start;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--grey-2);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: space-between;
  align-items: baseline;
}

.footer-bottom p,
.footer-legal {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--grey-3);
}

.footer-legal {
  max-width: 78ch;
  line-height: 1.7;
}

.footer-bottom + .footer-legal {
  margin-top: 24px;
}

.footer-mark {
  height: 22px;
  width: auto;
  display: block;
  margin-bottom: 20px;
}

/* ------------------------------------------------------------- motion --- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--slow) var(--ease),
    transform var(--slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  .blocks-2 {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 22px;
  }

  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    border-top: 1px solid var(--rule);
  }

  .nav-links a {
    display: block;
    padding: 15px var(--gutter);
    border-bottom: none;
  }

  .section-head,
  .railed,
  .step,
  .index-item,
  .contact-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .index-item {
    grid-template-columns: 1fr auto;
  }

  .index-item .num {
    grid-column: 1 / -1;
  }

  .identity {
    padding-left: 16px;
  }
}
