/* MarketMerged — editorial edition
   Type:   Libre Caslon Condensed (display), Geist (text, labels)
   Colour: paper, card, ink, stone, hairline, emerald (accent, used sparingly)
   Grid:   12 columns, 1200px max, hairline structure */

@font-face {
  font-family: "Libre Caslon Condensed";
  src: url("/assets/fonts/libre-caslon-condensed-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #EFF0EA;
  --card: #F8F8F4;
  --ink: #151515;
  --stone: #686962;
  --hair: #D6D7CE;
  --emerald: #1F4D3A;
  --emerald-deep: #163A2B;

  --serif: "Libre Caslon Condensed", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale */
  --t-hero: clamp(3.2rem, 1.045rem + 7.22vw, 7.84rem);
  --t-cta: clamp(3rem, 1.2rem + 5.4vw, 6.75rem);
  --t-h2: clamp(2.375rem, 1.4rem + 2.9vw, 4.25rem);
  --t-card: clamp(1.75rem, 1.15rem + 1.25vw, 2.375rem);
  --t-h3: clamp(1.5rem, 1.25rem + 0.55vw, 1.875rem);
  --t-lede: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-label: 0.6875rem;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1200px;
  --col-gap: clamp(16px, 2vw, 28px);
  --section-y: clamp(88px, 10vw, 152px);
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

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

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}
.cta :focus-visible { outline-color: var(--paper); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 50;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

/* Tiny letter-spaced labels: industry names and roles only. */
.label {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.label .dot { color: var(--hair); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--emerald); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #FFFFFF; }

.text-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink);
  text-underline-offset: 6px;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.text-link:hover { color: var(--emerald); text-decoration-color: var(--emerald); }
.text-link .arrow { display: inline-block; text-decoration: none; transition: transform .25s var(--ease); }
.text-link:hover .arrow--r { transform: translateX(3px); }
.text-link:hover .arrow--d { transform: translateY(2px); }
.text-link--light { color: var(--paper); text-decoration-color: rgba(239, 240, 234, 0.45); }
.text-link--light:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }
.ext { display: inline-block; margin-left: 0.3em; text-decoration: none; }

.copy-btn {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--hair);
  border-radius: 0;
  background: transparent;
  color: var(--stone);
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease;
}
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn.is-copied { border-color: var(--emerald); color: var(--emerald); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(239, 240, 234, 0.88);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--hair);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { flex: none; width: 26px; height: 26px; }
.brand-word {
  font-family: var(--serif);
  font-size: 1.4375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  transform: translateY(1px);
}
.header-mail {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .25s ease;
}
.header-mail:hover { color: var(--emerald); }
.header-mail-short { display: none; }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.progress-bar {
  display: block;
  height: 100%;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(48px, 6.5vw, 96px); overflow: hidden; }
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 1.06;           /* clears the descender-to-i-dot clash between lines */
  letter-spacing: -0.022em;
  font-variant-numeric: lining-nums;
}
.hero-title .line {
  display: block;
  overflow: hidden;            /* mask for the entrance */
  padding-bottom: 0.18em;      /* room for descenders (g, p, y, j, q)… */
  margin-bottom: -0.18em;      /* …without changing the line spacing */
  padding-inline: 0.06em;      /* room for overhanging serifs (the W in “We”)… */
  margin-inline: -0.06em;      /* …without moving the text */
}
.hero-title .line > span { display: inline-block; }

.merge-rule { margin-top: clamp(24px, 3vw, 40px); }
.merge-svg { display: block; width: 100%; height: 40px; overflow: visible; }
.merge-svg path { fill: none; stroke-width: 1.25; stroke-linecap: round; }
.merge-a { stroke: var(--ink); }
.merge-b { stroke: var(--emerald); }
.js .merge-rule:not(.is-ready) .merge-svg { opacity: 0; animation: mm-show 0s 2.5s forwards; }
@keyframes mm-show { to { opacity: 1; } }

.hero-foot { margin-top: clamp(28px, 3.5vw, 44px); row-gap: 28px; align-items: center; }
.lede {
  grid-column: 1 / span 6;
  max-width: 55ch;
  margin: 0;
  font-size: var(--t-lede);
  line-height: 1.45;
}
.hero-actions {
  grid-column: 7 / span 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: clamp(40px, 4.5vw, 64px) 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hair);
  color: var(--stone);
}

/* One orchestrated entrance: lines rise, the rule draws (main.js), the rest settles. */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line > span { animation: mm-rise 1.1s var(--ease) both; }
  .hero-title .line:nth-child(2) > span { animation-delay: .09s; }
  .hero-title .line:nth-child(3) > span { animation-delay: .18s; }
  .hero-foot > * { animation: mm-settle .9s var(--ease) both; animation-delay: .75s; }
  .hero-foot > .hero-actions { animation-delay: .85s; }
  .hero-foot > .facts { animation-delay: 1s; }
}
/* Start far enough down that nothing shows through the larger mask padding. */
@keyframes mm-rise { from { transform: translateY(135%); } to { transform: none; } }
@keyframes mm-settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Section heads ---------- */

.industries, .how, .sides, .founders { padding-block: var(--section-y); }
.industries { padding-top: clamp(72px, 8vw, 112px); }
.how, .sides, .founders { border-top: 1px solid var(--hair); }

.section-head {
  align-items: end;
  row-gap: 18px;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.section-head h2,
.sides-head h2,
.founders-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.02em;
}
.section-head h2 { grid-column: 1 / span 7; }
.section-head p {
  grid-column: 9 / span 4;
  margin: 0;
  color: var(--stone);
  font-size: var(--t-small);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Where we make introductions ---------- */

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.industry {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(280px, 24vw, 344px);
  padding: 20px clamp(20px, 2.2vw, 30px) 22px;
  border-top: 3px solid var(--ink);
  border-right: 1px solid var(--hair);
  background: transparent;
  transition: background-color .35s ease, box-shadow .35s ease, transform .35s var(--ease);
}
/* A short emerald marker in the ink top rule, echoing the two colours of the mark. */
.industry::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--emerald);
}
.industry-label { margin: 0; color: var(--ink); }
.industry-title {
  max-width: 11.5em;
  margin: clamp(28px, 2.8vw, 40px) 0 14px;
  font-family: var(--serif);
  font-size: var(--t-card);
  line-height: 1.14;
  letter-spacing: -0.012em;
  transition: color .3s ease;
}
.industry-line {
  max-width: 24em;
  margin: 0 0 28px;
  color: var(--stone);
  font-size: var(--t-small);
  line-height: 1.5;
}
.industry-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-size: 0.875rem;
}
.industry-foot .text-link { font-size: inherit; text-underline-offset: 5px; }
.join { flex: none; width: 24px; height: 12px; }

@media (hover: hover) {
  .industry:hover {
    z-index: 1;
    background: var(--card);
    box-shadow: 0 28px 48px -32px rgba(21, 21, 21, 0.32);
    transform: translateY(-4px);
  }
  .industry:hover .industry-title { color: var(--emerald); }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { position: relative; padding-top: 40px; padding-right: 8%; }
.step::before {                     /* hairline connector to the next step */
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: calc(-1 * var(--col-gap));
  height: 1px;
  background: var(--ink);
}
.step--last::before { right: 0; background: linear-gradient(90deg, var(--ink), var(--ink) 40%, var(--hair)); }
.step-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.step--last .step-node { background: var(--emerald); border-color: var(--emerald); }
.step-num {
  display: block;
  margin-bottom: 18px;
  color: var(--stone);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.step h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: var(--t-h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.step p { max-width: 20em; margin: 0; color: var(--stone); }

/* ---------- Who we work with ---------- */

.sides .grid { row-gap: 40px; }
.sides-head { grid-column: 1 / span 4; }
.side { padding-top: 22px; border-top: 2px solid var(--ink); }
.side--a { grid-column: 5 / span 4; }
.side--b { grid-column: 9 / span 4; border-top-color: var(--emerald); }
.side h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: var(--t-h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.side p { max-width: 22em; margin: 0 0 24px; color: var(--stone); }

/* ---------- Founders ---------- */

.founders .grid { row-gap: 40px; }
.founders-head { grid-column: 1 / span 4; }
.founders-head p { max-width: 20em; margin: 18px 0 0; color: var(--stone); }
.person:nth-of-type(1) { grid-column: 5 / span 4; }
.person:nth-of-type(2) { grid-column: 9 / span 4; }
.person img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--hair);
  filter: saturate(0.94);
}
.person h3 {
  margin: 20px 0 6px;
  font-family: var(--serif);
  font-size: var(--t-h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.person-role { margin: 0; color: var(--stone); }
.person-links {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  font-size: var(--t-small);
}
.person-links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair);
  text-underline-offset: 5px;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.person-links a:hover { color: var(--emerald); text-decoration-color: var(--emerald); }

/* ---------- Final CTA (the one ink band) ---------- */

.cta {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(96px, 12vw, 176px) clamp(88px, 10vw, 152px);
}
.cta .grid { row-gap: 40px; align-items: end; }
.cta h2 {
  grid-column: 1 / span 8;
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-cta);
  line-height: 1.06;
  letter-spacing: -0.022em;
}
.cta-body { grid-column: 9 / span 4; }
.cta-body > p:first-child { margin: 0 0 24px; color: rgba(239, 240, 234, 0.7); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(239, 240, 234, 0.16);
  font-size: var(--t-small);
}
.cta-address a { color: var(--paper); text-underline-offset: 5px; text-decoration-color: rgba(239, 240, 234, 0.4); }
.cta-address a:hover { text-decoration-color: var(--paper); }
.cta .copy-btn { border-color: rgba(239, 240, 234, 0.28); color: rgba(239, 240, 234, 0.8); }
.cta .copy-btn:hover,
.cta .copy-btn.is-copied { border-color: var(--paper); color: var(--paper); }

/* ---------- Footer ---------- */

.site-footer { padding-block: clamp(40px, 5vw, 64px); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--hair);
}
.footer-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px clamp(16px, 2vw, 28px) 28px;
  border-left: 1px solid var(--hair);
  font-size: 0.875rem;
}
.footer-cell:first-child { padding-left: 0; border-left: 0; }
.footer-brand .brand-word { font-size: 1.3125rem; }
.footer-brand p { max-width: 22em; margin: 14px 0 0; color: var(--stone); }
.footer-key { margin: 0 0 6px; color: var(--stone); }
.footer-cell a:not(.brand) {
  align-self: flex-start;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair);
  text-underline-offset: 4px;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.footer-cell a:not(.brand):hover { color: var(--emerald); text-decoration-color: var(--emerald); }
.footer-legal { justify-content: flex-end; color: var(--stone); }
.footer-legal p { margin: 0; }

/* ---------- Scroll reveals ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0;
    translate: 0 16px;
    transition: opacity .9s var(--ease), translate .9s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .reveal-ready [data-reveal].is-in { opacity: 1; translate: none; }
  .reveal-ready .industry[data-reveal] {
    transition:
      opacity .9s var(--ease) calc(var(--d, 0) * 90ms),
      translate .9s var(--ease) calc(var(--d, 0) * 90ms),
      background-color .35s ease 0s,
      box-shadow .35s ease 0s,
      transform .35s var(--ease) 0s;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .section-head h2 { grid-column: 1 / -1; }
  .section-head p { grid-column: 1 / span 8; }
  .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sides-head, .founders-head { grid-column: 1 / -1; }
  .side--a { grid-column: 1 / span 6; }
  .side--b { grid-column: 7 / span 6; }
  .person:nth-of-type(1) { grid-column: 1 / span 6; }
  .person:nth-of-type(2) { grid-column: 7 / span 6; }
  .cta h2 { grid-column: 1 / -1; }
  .cta-body { grid-column: 1 / span 8; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .footer-cell:nth-child(n+3) { border-top: 1px solid var(--hair); }
}

@media (max-width: 820px) {
  .lede, .hero-actions { grid-column: 1 / -1; }
}

/* ---------- Mobile ---------- */

@media (max-width: 680px) {
  :root { --header-h: 58px; }
  .header-mail-full { display: none; }
  .header-mail-short { display: inline; }
  .brand-word { font-size: 1.3125rem; }
  .hero-actions { gap: 18px 24px; }
  .facts { flex-direction: column; gap: 6px; }
  .facts .dot { display: none; }
  .section-head p { grid-column: 1 / -1; }
  .industry-grid { grid-template-columns: 1fr; }
  .industry { min-height: 0; }
  .industry-title { margin-top: 32px; }

  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .step { padding: 0 0 0 36px; }
  .step::before { top: 6px; bottom: -42px; left: 5px; right: auto; width: 1px; height: auto; }
  .step--last::before { display: none; }
  .step-node { top: 0; }
  .step-num { margin-bottom: 10px; }

  .side--a, .side--b { grid-column: 1 / -1; }
  .person h3 { font-size: 1.375rem; }
  .person-links { font-size: 0.8125rem; }
  .cta-body { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cell { padding-left: 0; border-left: 0; }
  .footer-cell + .footer-cell { border-top: 1px solid var(--hair); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .industry:hover { transform: none !important; }
}
