/* MAVI Partners. Colours sampled from the logo file. */
:root {
  --blue: #082345;        /* brand deep blue, from the logo */
  --navy: #051730;        /* dark navy */
  --slate: #3e546c;       /* mountain highlight in the logo */
  --stone: #96867a;       /* "PARTNERS" in the logo */
  --stone-soft: #d9d0c5;
  --ivory: #faf7f1;
  --paper: #f2ece2;
  --white: #ffffff;
  --ink: #1b2536;
  --muted: #5a6475;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--slate); }
:focus-visible { outline: 3px solid var(--stone); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--blue); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
em.accent { font-style: italic; color: var(--stone); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
section { padding: clamp(56px, 9vw, 112px) 0; }
.section-paper { background: var(--paper); }
.section-navy { background: var(--blue); color: var(--ivory); }
.section-navy h2, .section-navy h3, .section-navy h4 { color: var(--ivory); }
.section-navy a { color: var(--ivory); }
.section-navy .eyebrow { color: var(--stone-soft); }
.section-navy .lede { color: #cfd6e0; }

.eyebrow {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--stone); font-weight: 600; margin: 0 0 1.2em; display: block;
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 44em; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; font: 600 1rem var(--sans);
  padding: .85em 1.5em; border-radius: 999px; border: 1.5px solid var(--blue);
  background: var(--blue); color: var(--ivory); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--ivory); }
.section-navy .btn { background: var(--ivory); color: var(--blue); border-color: var(--ivory); }
.section-navy .btn:hover { background: #fff; }
.section-navy .btn-ghost { background: transparent; color: var(--ivory); }
.section-navy .btn-ghost:hover { background: var(--ivory); color: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--stone); padding-bottom: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 247, 241, .94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(8, 35, 69, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }
.brand img { height: 60px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav a { text-decoration: none; font-weight: 500; font-size: .97rem; color: var(--blue); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--stone); }
.nav a.btn { padding: .6em 1.2em; color: var(--ivory); border: 1.5px solid var(--blue); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--blue); color: var(--blue); border-radius: 999px; padding: .5em 1.1em; font: 600 .95rem var(--sans); cursor: pointer; }
@media (max-width: 1040px) {
  .nav-toggle { display: inline-block; min-height: 44px; }
  .brand img { height: 50px; }
  .site-header .wrap { min-height: 70px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ivory); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; border-bottom: 1px solid rgba(8, 35, 69, .12); box-shadow: 0 18px 30px rgba(8, 35, 69, .08); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(8, 35, 69, .08); font-size: 1.05rem; }
  .nav a.btn { margin-top: 16px; justify-content: center; padding: .85em 1.2em; }
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 1.2em; }
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 15em; }

/* Intent routing */
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(32px, 5vw, 56px); }
.route {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 220px;
  padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.route:hover { transform: translateY(-4px); box-shadow: 0 22px 40px rgba(8, 35, 69, .16); }
.route h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3em; }
.route p { margin: 0; }
.route .go { font-weight: 600; margin-top: 1.6em; display: inline-flex; gap: .5em; }
.route-hire { background: var(--blue); color: #cfd6e0; }
.route-hire h2, .route-hire .go { color: var(--ivory); }
.route-hire:hover { color: #cfd6e0; }
.route-role { background: var(--stone-soft); color: var(--ink); }
.route-role:hover { color: var(--ink); }
.route small { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; opacity: .8; display: block; margin-bottom: 1.2em; }

/* Grids and cards */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.top { align-items: start; }
.card { background: var(--white); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 32px); border: 1px solid rgba(8, 35, 69, .07); }
.section-paper .card { background: var(--ivory); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: var(--ink); display: block; transition: transform .2s, box-shadow .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(8, 35, 69, .1); color: var(--ink); }

/* "The team behind" moments */
.moments { border-top: 1px solid rgba(250, 247, 241, .22); margin-top: 40px; }
.moment { display: grid; grid-template-columns: 1.1fr 1.6fr 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid rgba(250, 247, 241, .22); align-items: baseline; }
.moment h3 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 0; font-style: italic; font-weight: 400; }
.moment p { margin: 0; color: #cfd6e0; }
.moment .roles { font-size: .88rem; letter-spacing: .04em; color: var(--stone-soft); }

a.moment { text-decoration: none; transition: padding-left .25s; }
a.moment:hover { padding-left: 12px; }
a.moment:hover h3 { color: var(--stone-soft); }
.moment .roles strong { display: block; color: var(--ivory); letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; margin-bottom: 4px; }

/* Peak motif, echoing the logo */
.hero, .page-hero { position: relative; overflow: hidden; }
.hero::after, .page-hero::after {
  content: ""; position: absolute; right: -40px; top: 24px; width: min(46vw, 560px); aspect-ratio: 5 / 3; z-index: 0; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 300' fill='none' stroke='%2396867a' stroke-width='1.2'%3E%3Cpath d='M0 300 L120 60 L230 250 L340 20 L500 300'/%3E%3Cpath d='M40 300 L120 140 L210 290 M300 300 L340 110 L460 300' opacity='.5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.hero > .wrap, .page-hero > .wrap { position: relative; z-index: 1; }
@media (max-width: 720px) { .hero::after, .page-hero::after { opacity: .28; width: 70vw; } }

/* Credibility strip */
.cred { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid rgba(8, 35, 69, .14); border-bottom: 1px solid rgba(8, 35, 69, .14); }
.cred .num { font-family: var(--serif); font-size: clamp(3.4rem, 8vw, 6rem); line-height: 1; color: var(--blue); }
.cred .num small { display: block; font: 600 .78rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--stone); margin-top: 10px; }
.cred ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.cred li a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(8, 35, 69, .1); text-decoration: none; font-family: var(--serif); font-size: 1.25rem; }
.cred li a span { color: var(--stone); }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1.2em 0 0; }
.chips li { border: 1px solid rgba(8, 35, 69, .22); border-radius: 999px; padding: 6px 14px; font-size: .92rem; color: var(--blue); }
.section-navy .chips li { border-color: rgba(250, 247, 241, .35); color: var(--ivory); }

/* Why rows */
.why { margin-top: 36px; counter-reset: why; }
.why-row { counter-increment: why; display: grid; grid-template-columns: 70px 1fr 1.5fr; gap: 20px; padding: 26px 0; border-top: 1px solid rgba(8, 35, 69, .14); align-items: baseline; }
.why-row::before { content: "0" counter(why); font-family: var(--serif); color: var(--stone); font-size: 1.1rem; }
.why-row h3 { margin: 0; }
.why-row p { margin: 0; color: var(--muted); }

/* Areas covered on specialism pages */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 28px; }
.area { padding: 20px 0; border-top: 1px solid rgba(8, 35, 69, .14); }
.area h3 { font-size: 1.25rem; margin-bottom: .3em; }
.area p { margin: 0; color: var(--muted); font-size: .98rem; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--blue); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.cats button { font: 600 .85rem var(--sans); border: 1px solid rgba(8, 35, 69, .22); background: transparent; color: var(--blue); border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.cats button[aria-pressed="true"] { background: var(--blue); color: var(--ivory); }

/* Steps */
.steps.five { grid-template-columns: repeat(5, 1fr); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.step { counter-increment: step; border-top: 2px solid var(--blue); padding-top: 20px; }
.step::before { content: "0" counter(step); font-family: var(--serif); font-size: 1.1rem; color: var(--stone); display: block; margin-bottom: 10px; }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Placeholders: always visibly labelled */
.placeholder { border: 1.5px dashed var(--stone); background: rgba(150, 134, 122, .08); border-radius: var(--radius); position: relative; }
.ph-tag {
  display: inline-block; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase;
  background: var(--stone); color: #fff; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.ph-photo { aspect-ratio: 4 / 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); max-width: 440px; width: 100%; }
.ph-logo { min-height: 96px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; font-size: .82rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.sample-banner { background: var(--stone-soft); color: var(--ink); border-radius: 12px; padding: 14px 18px; font-size: .95rem; margin-bottom: 28px; }
.sample-banner strong { color: var(--blue); }

/* Quotes */
.quote { padding: clamp(24px, 3vw, 36px); }
.quote blockquote { margin: 0 0 1em; font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; color: var(--blue); }
.quote cite { font-style: normal; font-size: .92rem; color: var(--muted); }

/* Jobs */
.filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.filters label { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.job-list { display: grid; gap: 14px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; }
.job h3 { margin: 0 0 .25em; font-size: 1.4rem; }
.job .meta, .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .93rem; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.job .go { font-weight: 600; color: var(--blue); white-space: nowrap; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--paper); color: var(--slate); }
.tag-sample { background: var(--stone); color: #fff; }
.job-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 24px 0; border-top: 1px solid rgba(8, 35, 69, .12); border-bottom: 1px solid rgba(8, 35, 69, .12); margin: 28px 0 36px; }
.job-facts dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); font-weight: 600; }
.job-facts dd { margin: 4px 0 0; font-weight: 500; color: var(--blue); }

/* Articles */
.article-card .series { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); font-weight: 600; }
.article-card h3 { margin-top: .5em; }
.article-card .read { font-size: .9rem; color: var(--muted); }
.prose { font-size: 1.1rem; }
.prose h2 { font-size: 1.7rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose .standfirst { font-family: var(--serif); font-size: 1.4rem; line-height: 1.4; color: var(--blue); }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 14px 0 14px 34px; border-bottom: 1px solid rgba(8, 35, 69, .1); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 14px; height: 8px; border-left: 2px solid var(--stone); border-bottom: 2px solid var(--stone); transform: rotate(-45deg); }
.ticks strong { color: var(--blue); }

/* Forms */
form.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: .9rem; font-weight: 600; color: var(--blue); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1.5px solid rgba(8, 35, 69, .2); border-radius: 12px; padding: .75em .9em; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(150, 134, 122, .35); }
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
.form-status { font-weight: 600; color: var(--blue); margin: 0; }
.contact-lines { list-style: none; padding: 0; margin: 0 0 1.5em; }
.contact-lines li { padding: 14px 0; border-bottom: 1px solid rgba(8, 35, 69, .1); }
.contact-lines span { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); font-weight: 600; }
.contact-lines a { font-family: var(--serif); font-size: 1.3rem; text-decoration: none; overflow-wrap: anywhere; }

/* CTA band */
.cta { text-align: center; }
.cta h2 { max-width: 16em; margin-left: auto; margin-right: auto; }
.cta .lede { margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--navy); color: #b9c2cf; padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: #e6e9ee; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.foot-word { font-family: var(--sans); letter-spacing: .42em; color: var(--ivory); font-size: 1.5rem; font-weight: 400; margin: 0; }
.foot-word small { display: block; font-size: .7rem; letter-spacing: .5em; color: var(--stone-soft); margin-top: 6px; }
.site-footer h4 { font-family: var(--sans); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--stone-soft); margin-bottom: 1em; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55em; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 44px; padding-top: 22px; font-size: .82rem; display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.foot-legal .ph-inline { border-bottom: 1px dashed var(--stone); }

/* Reveal on scroll (only when JS is on and motion is OK) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .route, a.card { transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .g4, .steps, .steps.five { grid-template-columns: repeat(2, 1fr); }
  .why-row { grid-template-columns: 50px 1fr; }
  .why-row p { grid-column: 2; }
  .cred { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .moment { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .job-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .routes, .split, .g2, .g3, .row2, .areas, .cred ul { grid-template-columns: 1fr; }
  .route { min-height: 0; }
  .job { grid-template-columns: 1fr; }
  .ph-photo { max-width: 320px; }
}
@media (max-width: 480px) {
  .g4, .steps, .steps.five, .foot-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .g4[data-clients] { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
