/* Mad Firms — editorial, restrained. Montserrat only; accents are the same face in italic. */

:root {
  --paper: #f3f2ee;
  --card: #ffffff;
  --ink: #141413;
  --ink-2: #4c4b47;
  --muted: #7d7c76;
  --line: #dedbd2;
  --line-2: #ebe9e2;
  --dark: #131312;
  --dark-2: #1c1c1a;
  --dark-line: #2c2c29;
  --accent: #b9532a; /* burnt sienna, used sparingly */
  --sans: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

em.s {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mf-section { padding-block: clamp(64px, 9vw, 120px); }
.mf-section--tight { padding-block: clamp(40px, 6vw, 72px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--ink); }

.lead { font-size: 16px; color: var(--ink-2); max-width: 46ch; }
.lead + .lead { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 14px;
  border: 1px solid var(--ink); cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { background: #2a2a28; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--paper); }
.btn svg { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.mf-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 242, 238, .86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.mf-header.is-stuck { border-bottom-color: var(--line-2); }
.mf-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand__mark { width: 26px; height: 26px; }
.brand__mark path { fill: var(--ink); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 14px; color: var(--ink-2); position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--ink);
  transition: right .25s ease;
}
.nav a:hover::after { right: 0; }
.nav .btn { margin-left: 8px; color: #fff; }
.nav .btn:hover { color: #fff; }
.nav .btn::after { display: none; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .25s, opacity .25s; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.hero h1 {
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.hero__aside { display: grid; gap: 22px; padding-bottom: 8px; }
.hero__aside .lead { max-width: 40ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Reveal on load */
.rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.rise:nth-child(2) { animation-delay: .1s; }
.rise:nth-child(3) { animation-delay: .2s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Tiles strip ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  color: #fff; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end;
  isolation: isolate;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 1px, transparent 1px 14px);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.tile:hover::before { transform: scale(1.06) rotate(1deg); }
.tile--a { background: linear-gradient(160deg, #2d3a4a, #131a22); }
.tile--b { background: linear-gradient(160deg, #6a5a44, #2c2419); }
.tile--c { background: linear-gradient(160deg, #3f4a3a, #161a14); }
.tile__num { font-style: italic; font-weight: 400; letter-spacing: -0.03em; font-size: clamp(44px, 5.4vw, 68px); line-height: .95; opacity: .92; }
.tile__label { margin-top: 12px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .78; }
.tile svg { position: absolute; right: 18px; top: 18px; width: 34%; height: auto; opacity: .35; }

/* ---------- Stack row ---------- */
.stack { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 26px; }
.stack .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.stack__label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stack ul { display: flex; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; }
.stack li { font-weight: 600; font-size: 15px; color: var(--ink-2); letter-spacing: -0.01em; opacity: .75; }

/* ---------- Two-col ---------- */
.two { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.two h2 { font-size: clamp(28px, 3.4vw, 40px); }
.two__text { display: grid; gap: 18px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.stat b { display: block; font-weight: 500; font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- Big line ---------- */
.rule {
  padding-block: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.rule p {
  font-style: italic; font-weight: 400; font-size: clamp(24px, 3vw, 38px); line-height: 1.2; letter-spacing: -0.02em;
  max-width: 26ch; color: var(--ink);
}

/* ---------- Section head ---------- */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 28px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { font-size: clamp(30px, 3.8vw, 44px); max-width: 16ch; }
.sec-head p { color: var(--ink-2); max-width: 44ch; justify-self: end; }

/* ---------- Process cards ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px; min-height: 340px; display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(20,20,19,.35); }
.step__top { display: flex; justify-content: space-between; align-items: flex-start; }
.step__num { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.step__art { width: 120px; height: 120px; color: var(--ink); }
.step h3 { margin-top: auto; font-size: 19px; padding-top: 40px; }
.step p { margin-top: 8px; color: var(--ink-2); font-size: 14px; }

/* ---------- Advisory ---------- */
.adv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.adv__art {
  border-radius: var(--radius); background: var(--dark); aspect-ratio: 4 / 4.6; overflow: hidden; position: relative;
}
.adv__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.adv h2 { font-size: clamp(30px, 3.8vw, 44px); }
.adv .lead { margin-top: 16px; }
.services { margin-top: 32px; display: grid; gap: 0; }
.service { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service__icon { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.service__icon svg { width: 16px; height: 16px; }
.service h3 { font-size: 15px; font-weight: 600; }
.service p { margin-top: 4px; font-size: 14px; color: var(--ink-2); }

/* ---------- Verticals ---------- */
.verticals { background: var(--card); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.vert { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line-2); }
.vert:first-of-type { border-top: 0; }
.vert h3 { font-style: italic; font-weight: 500; font-size: clamp(32px, 3.8vw, 48px); letter-spacing: -0.03em; }
.vert p { margin-top: 14px; color: var(--ink-2); max-width: 46ch; }
.vert ul { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: 14px; color: var(--ink-2); }
.vert li { display: flex; gap: 10px; align-items: center; }
.vert li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); flex: none; }
.vert__visual { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper); border: 1px solid var(--line-2); }
.vert__visual svg { width: 100%; height: 100%; }
.vert__badge {
  position: absolute; right: 16px; bottom: 16px; background: var(--dark); color: #fff; border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 8px; min-width: 150px;
}
.vert__badge small { font-size: 11px; opacity: .7; }
.vert__badge .btn { padding: 8px 14px; font-size: 13px; justify-content: center; }
.vert:nth-child(even) .vert__visual { order: -1; }

/* ---------- Contact ---------- */
.contact { background: var(--dark); color: #fff; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); }
.contact h2 { font-size: clamp(30px, 3.8vw, 44px); }
.contact .lead { color: rgba(255,255,255,.7); margin-top: 14px; }
.contact__meta { margin-top: 40px; display: grid; gap: 22px; }
.contact__meta small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; margin-bottom: 6px; }
.contact__meta a { border-bottom: 1px solid rgba(255,255,255,.3); }
.contact__meta a:hover { border-bottom-color: #fff; }
.form { display: grid; gap: 12px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form input, .form textarea {
  width: 100%; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 10px;
  padding: 14px 16px; color: #fff; outline: none; transition: border-color .2s;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(255,255,255,.4); }
.form input:focus, .form textarea:focus { border-color: rgba(255,255,255,.5); }
.form textarea { min-height: 130px; resize: vertical; }
.form .btn { justify-content: center; width: 100%; }
.form__note { font-size: 12px; color: rgba(255,255,255,.5); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #fff; border-top: 1px solid var(--dark-line); padding-block: 56px 28px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, .6fr)); gap: 32px; }
.footer .brand { color: #fff; }
.footer .brand__mark path { fill: #fff; }
.footer__about { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.6); max-width: 36ch; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer li { margin-bottom: 8px; }
.footer li a { font-size: 13px; color: rgba(255,255,255,.62); }
.footer li a:hover { color: #fff; }
.footer__bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--dark-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,.5); }
.footer__bottom a:hover { color: #fff; }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(48px, 7vw, 96px); }
.legal__inner { max-width: 720px; }
.legal h1 { font-size: clamp(34px, 4.6vw, 54px); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 40px; }
.legal h2 { font-size: 20px; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 20px; margin: 16px 0; padding: 20px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); }
.legal dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.legal dd { margin: 0; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .rise { opacity: 1; transform: none; animation: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .two, .adv, .vert, .contact .wrap, .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
  .vert:nth-child(even) .vert__visual { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step h3 { padding-top: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 0; font-size: 16px; width: 100%; border-bottom: 1px solid var(--line-2); }
  .nav a::after { display: none; }
  .nav .btn { margin: 16px 0 0; border-bottom: 0; width: auto; }
  .nav-toggle { display: block; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 9; }
  .form__row { grid-template-columns: 1fr; }
  .vert ul { grid-template-columns: 1fr; }
  .legal dl { grid-template-columns: 1fr; gap: 4px 0; }
  .legal dd { margin-bottom: 10px; }
  .footer__grid { grid-template-columns: 1fr; }
}
