/* Meridian Partners: see STYLE-GUIDE.md */
:root {
  --ink: #0e0e10;
  --ink-raised: #1c1c20;
  --red: #ff1a24;
  --red-deep: #e10a14;
  --paper: #f7f7f8;
  --white: #ffffff;
  --text: #16161a;
  --muted: #55555e;
  --muted-dark: #a7a7b0;
  --line: #e7e7ea;
  --radius: 12px;
  --head: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--body); color: var(--text); background: var(--white);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); color: var(--text); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 24px; border-radius: 999px; font: 500 15px/1 var(--body);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-ghost { border-color: #3a3a40; color: var(--white); }
.btn-ghost:hover { border-color: #6a6a72; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---- Header ---- */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1f1f24; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 40px; width: auto; }
.menu { display: flex; align-items: center; gap: 28px; }
.menu a:not(.btn) { text-decoration: none; color: var(--muted-dark); font-size: 15px; transition: color .2s; }
.menu a:not(.btn):hover { color: var(--white); }
.menu-btn { display: none; }

/* ---- Hero ---- */
.hero { background: var(--ink); color: var(--white); padding: 96px 0 104px; overflow: hidden; }
.eyebrow { color: var(--muted-dark); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 20px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); font-weight: 700; letter-spacing: -0.035em; max-width: 920px; }
.red { color: var(--red); }
.lead { color: var(--muted-dark); font-size: clamp(16px, 1.6vw, 19px); max-width: 620px; margin: 24px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.trust-row { list-style: none; padding: 0; margin: 56px 0 0; display: flex; flex-wrap: wrap; gap: 12px 32px; color: #d6d6dc; font-size: 14px; }
.trust-row li { display: flex; align-items: center; gap: 10px; }
.trust-row li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--red); flex: none; }

/* ---- Sections ---- */
.section { padding: 112px 0; }
.light { background: var(--paper); }
.white { background: var(--white); border-top: 1px solid var(--line); }
.label { color: var(--red-deep); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; max-width: 720px; }
.intro { color: var(--muted); font-size: 17px; max-width: 600px; margin: 16px 0 0; }

/* ---- Service cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(14,14,16,.07); border-color: #dcdce0; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: #fff0f0; display: grid; place-items: center; margin-bottom: 20px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--red-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 21px; font-weight: 700; }
.card p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.card .tags { font-size: 13px; color: #7a7a83; margin-top: 14px; }
.link { margin-top: auto; padding-top: 20px; color: var(--red-deep); text-decoration: none; font-weight: 500; font-size: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.link-muted { color: var(--muted); }

.two-up { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.two-up .card { padding: 36px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 15px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px;
  border-left: 2px solid var(--red-deep); border-bottom: 2px solid var(--red-deep); transform: rotate(-45deg);
}
.card .note { margin-top: 20px; padding: 14px 16px; background: var(--paper); border-radius: 10px; font-size: 14px; }

/* ---- Staffing process ---- */
.process {
  list-style: none; counter-reset: s; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.process li {
  counter-increment: s; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; color: var(--muted); font-size: 15px;
}
.process li::before {
  content: counter(s); width: 32px; height: 32px; border-radius: 50%; margin-bottom: 16px;
  background: var(--ink); color: var(--white); display: grid; place-items: center; font: 700 14px/1 var(--head);
}
.process li b { display: block; color: var(--text); font: 700 17px/1.3 var(--head); margin-bottom: 6px; }
.process li:nth-child(7)::before { background: var(--red); }
.fineprint { margin: 32px 0 0; max-width: 760px; font-size: 14px; color: var(--muted); padding-left: 16px; border-left: 2px solid var(--line); }

/* ---- About / values ---- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 8px; align-items: start; }
.vision { margin: 32px 0 0; padding: 28px; background: var(--ink); color: var(--white); border-radius: 16px; font: 500 20px/1.45 var(--head); letter-spacing: -0.01em; }
.vision span { display: block; font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.story-link { display: inline-block; padding-top: 24px; }
.values { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; }
.values li { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.values li:first-child { border-top: 1px solid var(--line); }
.values li b { display: block; color: var(--text); font: 700 18px/1.3 var(--head); margin-bottom: 2px; }

/* ---- 404 page ---- */
.not-found { min-height: calc(100vh - 72px - 120px); display: flex; align-items: center; }

/* ---- Inner page hero ---- */
.page-hero { padding: 80px 0 88px; }
.page-hero h1 { font-size: clamp(34px, 5.2vw, 60px); }
.menu a[aria-current="page"] { color: var(--white); }

/* ---- About: story ---- */
.story { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.story-text p { margin: 0 0 18px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.story-text .story-close { color: var(--text); font-weight: 500; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---- About: vision & mission ---- */
.vm { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; margin-top: 48px; }
.vm-card { border: 1px solid var(--line); border-radius: 16px; padding: 36px; }
.vm-card span { display: block; font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--red-deep); margin-bottom: 16px; }
.vm-card p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.vm-dark { background: var(--ink); border-color: var(--ink); }
.vm-dark span { color: var(--red); }
.vm-dark p { color: var(--white); font: 500 22px/1.45 var(--head); letter-spacing: -0.01em; }

/* ---- About: value cards ---- */
.value-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.value-card .num { font: 700 14px/1 var(--head); color: var(--red-deep); }
.value-card h3 { font-size: 22px; font-weight: 700; margin-top: 14px; }
.value-card > p { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.value-card details { margin-top: auto; padding-top: 18px; }
.value-card summary {
  cursor: pointer; list-style: none; font-size: 14px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; border-top: 1px solid var(--line);
}
.value-card summary::-webkit-details-marker { display: none; }
.value-card summary::after { content: "+"; font: 500 20px/1 var(--body); color: var(--red-deep); transition: transform .2s var(--ease); }
.value-card details[open] summary::after { transform: rotate(45deg); }
.value-card details ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

/* ---- Staffing: what we handle ---- */
.handle { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.handle li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); font-size: 15px; }
.handle li b { display: block; color: var(--text); font: 700 17px/1.3 var(--head); margin-bottom: 6px; }

/* ---- Staffing: who does what ---- */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.role { border: 1px solid var(--line); border-radius: 16px; padding: 36px; }
.role h3 { font-size: 22px; font-weight: 700; }
.role .ticks { margin-top: 20px; color: var(--muted); }
.role-dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.role-dark .ticks { color: #d6d6dc; }
.role-dark .ticks li::before { border-color: var(--red); }

/* ---- Staffing: arrangement ---- */
.arrangement { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.story-text strong { color: var(--text); font-weight: 600; }

/* ---- Accounting: team flow ---- */
.flow { list-style: none; counter-reset: s; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.flow li { counter-increment: s; position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; color: var(--muted); font-size: 15px; }
.flow li::before {
  content: counter(s); width: 32px; height: 32px; border-radius: 50%; margin-bottom: 16px;
  background: var(--ink); color: var(--white); display: grid; place-items: center; font: 700 14px/1 var(--head);
}
.flow li:nth-child(2) { border-color: var(--red-deep); }
.flow li:nth-child(2)::before { background: var(--red); }
.flow li b { display: block; color: var(--text); font: 700 18px/1.3 var(--head); margin-bottom: 6px; }

/* ---- Accounting: what to expect ---- */
.expect { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 48px; }
.expect h3 { font-size: 18px; font-weight: 700; padding-top: 16px; border-top: 2px solid var(--red-deep); }
.expect p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

/* ---- Legal pages (Privacy Policy) ---- */
.legal { max-width: 760px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.legal h2 { font-size: 24px; color: var(--text); margin: 48px 0 12px; }
.legal h3 { font-size: 18px; color: var(--text); margin: 28px 0 8px; }
.legal p { margin: 0 0 16px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 6px; }
.legal a { color: var(--red-deep); }
.legal strong { color: var(--text); font-weight: 600; }
.legal-meta { font-size: 14px; }
.legal-pending { margin-top: 24px; padding: 20px 24px; background: #fff6d6; border: 1px dashed #c9a400; border-radius: 12px; color: #5c4a00; }
.legal-pending p { margin: 0; }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.legal h2:first-child { margin-top: 0; }
.legal h2 { scroll-margin-top: 96px; }
.toc { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; background: var(--paper); }
.toc-title { margin: 0 0 10px; font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--red-deep); }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal-contact { font-style: normal; padding: 20px 24px; background: var(--paper); border-radius: 12px; margin: 0 0 16px; color: var(--text); }
.legal-sign { font: 500 16px/1.4 var(--head); color: var(--text); }
.hero .placeholder { color: #5c4a00; }
.form-hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.form-hint a { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note.ok { color: #1d7a3e; font-weight: 500; }
.form .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.form-privacy { margin: 0; font-size: 13px; color: var(--muted); }
.form-privacy a { color: var(--text); }

/* ---- Closing statement ---- */
.closing { background: var(--ink); color: var(--white); padding: 104px 0; text-align: center; }
.closing-text { font: 700 clamp(26px, 3.6vw, 40px)/1.25 var(--head); letter-spacing: -0.02em; max-width: 860px; margin: 0 auto; }
.closing-sub { color: var(--muted-dark); margin: 20px 0 0; font-size: 16px; }
.closing .actions { justify-content: center; }

/* ---- Contact ---- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.direct { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.direct li { display: flex; gap: 16px; font-size: 15px; }
.direct li > span:first-child { width: 88px; flex: none; color: var(--muted); }
.direct a { text-decoration: none; font-weight: 500; }
.placeholder { background: #fff6d6; border-bottom: 1px dashed #c9a400; padding: 0 4px; border-radius: 3px; }

.form { background: var(--paper); border-radius: 16px; padding: 32px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form select, .form textarea {
  font: 400 15px/1.4 var(--body); color: var(--text); background: var(--white);
  border: 1px solid #dcdce0; border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,26,36,.15); }
.form input[type="file"] { padding: 10px; font-size: 14px; }
.form .invalid { border-color: var(--red-deep); }
.form .btn { justify-self: start; margin-top: 4px; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-note.err { color: var(--red-deep); }
.hidden { display: none !important; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--muted-dark); padding: 40px 0; font-size: 14px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot img { height: 34px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); }
.foot p { margin: 0; }
.foot .tagline { margin-top: 10px; color: var(--white); font: 500 14px/1 var(--head); }

/* ---- Gentle reveal on scroll ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- Tablet ---- */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .process, .value-cards, .handle, .expect { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .about, .contact, .story, .vm, .arrangement, .legal-layout { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; }
  .vm { gap: 20px; }
}

/* ---- Phone ---- */
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .menu-btn {
    display: grid; gap: 6px; place-content: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid #2a2a30; border-radius: 10px; cursor: pointer;
  }
  .menu-btn span { display: block; width: 18px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .25s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .menu {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 16px 20px; border-bottom: 1px solid #1f1f24;
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
  }
  .menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid #1f1f24; font-size: 16px; }
  .menu .btn { margin-top: 16px; }
  .hero { padding: 64px 0 72px; }
  .actions .btn { width: 100%; }
  .trust-row { flex-direction: column; margin-top: 40px; }
  .section { padding: 72px 0; }
  .cards, .process, .two, .value-cards, .handle, .roles, .expect { grid-template-columns: 1fr; }
  .expect { gap: 24px; }
  .role { padding: 24px; }
  .page-hero { padding: 56px 0 64px; }
  .vm-card { padding: 24px; }
  .vm-dark p { font-size: 19px; }
  .closing { padding: 72px 0; text-align: left; }
  .closing .actions { justify-content: flex-start; }
  .two-up .card, .form { padding: 24px; }
  .process li { padding: 20px; }
  .vision { font-size: 18px; padding: 24px; }
  .form .btn { justify-self: stretch; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
