/* Local First Consulting
   Colours come from the logo and proposal styling. */
:root {
  --ink: #1F2622;
  --muted: #59615C;
  --forest: #3D6E27;   /* text-safe green */
  --leaf: #4EA72E;     /* logo green, for marks and large type */
  --stone: #B7B7B7;    /* logo grey dots */
  --mist: #EFF3EC;
  --line: #DCE3D8;
  --paper: #FFFFFF;

  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --wrap: 72rem;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--forest); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
.wrap-narrow { max-width: 44rem; }
.lede { font-size: 1.25rem; line-height: 1.55; max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; font-family: var(--sans); line-height: 1; }
.brand-name { font-size: 1.3rem; font-weight: 500; }
.brand-sub { font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; font-family: var(--sans); font-weight: 500; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--leaf); }
.nav .nav-cta { background: var(--forest); color: #fff; padding: .45rem .9rem; border-radius: 999px; border: 0; }
.nav .nav-cta:hover { background: var(--ink); color: #fff; }

/* Buttons and links */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; background: var(--forest); color: #fff; padding: .75rem 1.3rem; border-radius: 999px; text-decoration: none; }
.button:hover { background: var(--ink); color: #fff; }
.button-quiet { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.button-quiet:hover { background: var(--mist); color: var(--ink); }
.text-link { font-family: var(--sans); font-weight: 600; }

/* Hero: greyscale portrait in a circle, with the logo's dot grid beside it */
.hero { padding: clamp(3rem, 7vw, 6rem) 0; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gap); align-items: center; }
.hero h1 { max-width: 15em; }
.hero-portrait { position: relative; margin: 0; justify-self: end; width: min(100%, 22rem); }
.hero-portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--leaf); }
.hero-mark { position: absolute; left: -1.5rem; bottom: -.5rem; width: 6.5rem; height: 6.5rem; background: var(--paper); border-radius: 12px; padding: .7rem; }

/* Sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-tight { padding: 3rem 0; }
.section-flush { padding-top: 0; }
.section-top-flush { padding-top: 0; }
.section-mist { background: var(--mist); }
.section-title { font-size: 1.55rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--gap) * 1.5); }
.split-wide { grid-template-columns: 1.6fr 1fr; }
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; }

/* MERL letters */
.merl-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.merl-item { display: block; padding: 1.5rem 1.5rem 1.5rem 0; color: var(--ink); text-decoration: none; }
.merl-item + .merl-item { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.merl-item:hover h3 { color: var(--forest); text-decoration: underline; text-underline-offset: .18em; }
.merl-letter { display: block; font-family: var(--sans); font-weight: 700; font-size: clamp(4rem, 9vw, 7rem); line-height: .9; color: var(--leaf); margin-bottom: 1rem; }
.merl-item p { color: var(--muted); margin: 0; }

.topic-list { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: 1.15rem; font-weight: 500; }
.topic-list li { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.topic-list li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--stone); flex: none; }

/* Photos */
.photo-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-top: .5rem; }
.photo-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.gallery { list-style: none; padding: 0; margin: 0; columns: 3 18rem; column-gap: .9rem; }
.gallery li { break-inside: avoid; margin-bottom: .9rem; }
.gallery-item { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; border-radius: 4px; overflow: hidden; }
.gallery-item img { width: 100%; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20, 26, 22, .88); }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox-close { margin: .75rem auto 0; display: block; font-family: var(--sans); font-weight: 600; background: #fff; border: 0; border-radius: 999px; padding: .5rem 1.2rem; cursor: pointer; }

.clients { font-family: var(--sans); font-size: 1.3rem; line-height: 1.5; max-width: 52rem; }
.contact-card { background: var(--paper); padding: 2rem; border-radius: 6px; border-top: 4px solid var(--leaf); }
.section:not(.section-mist) .contact-card { background: var(--mist); }
.contact-line { font-family: var(--sans); font-size: 1.3rem; font-weight: 600; word-break: break-word; }
.article-teaser-title { font-size: 1.5rem; margin-bottom: .25rem; }
.article-teaser-title a { color: var(--ink); }

/* Services */
.service-list { display: grid; gap: 0; }
.service { display: grid; grid-template-columns: 9rem 1fr; gap: var(--gap); padding: 2.5rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.service:first-child { border-top: 2px solid var(--ink); }
.service .merl-letter { margin: 0; }
.service ul { padding-left: 1.2rem; margin: 0 0 1rem; max-width: 40em; }
.service li { margin-bottom: .3rem; }
.example { color: var(--muted); font-style: italic; max-width: 40em; }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.principles > div { border-top: 3px solid var(--leaf); padding-top: 1rem; }
.principles p { margin: 0; }

/* Expertise */
.expertise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem calc(var(--gap) * 1.5); }
.area { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.area h2 { font-size: 1.35rem; }
.projects { list-style: none; padding: 0; margin: 0; }
.projects li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.projects strong { font-family: var(--sans); font-weight: 600; }

/* About */
.facts h2 { font-size: 1.15rem; margin-top: .25rem; }
.facts h2 + * { margin-bottom: 2rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .5rem 0 .5rem 1.25rem; border-left: 2px solid var(--stone); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--stone); }
.timeline li:first-child::before { background: var(--leaf); }
.timeline span { display: block; font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--muted); }
.prose { max-width: 40em; }

/* Articles */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-top: 2px solid var(--ink); padding: 1.25rem 0; max-width: 44rem; }
.article-list h2 a { color: var(--ink); }
.article-list p { margin-bottom: .4rem; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.pub-year { font-family: var(--sans); font-weight: 600; color: var(--forest); }
.article-body { padding-bottom: 4rem; }
.article-body h2 { margin-top: 1.8em; font-size: 1.4rem; }
.article .page-head { padding-bottom: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #DCE3D8; padding: 2.5rem 0; font-family: var(--sans); }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-name { font-weight: 600; color: #fff; font-size: 1.1rem; margin-bottom: .25rem; }
.site-footer p { margin: 0 0 .25rem; }

/* Smaller screens */
@media (max-width: 900px) {
  .hero-inner, .split, .split-wide, .expertise { grid-template-columns: 1fr; }
  .hero-portrait { justify-self: start; width: min(70%, 16rem); order: -1; margin-left: 1.5rem; }
  .merl-grid { grid-template-columns: 1fr 1fr; }
  .merl-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .merl-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .principles { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .photo-strip img:nth-child(n+4) { display: none; }
}
@media (max-width: 560px) {
  .merl-grid, .principles { grid-template-columns: 1fr; }
  .merl-item, .merl-item + .merl-item { padding-left: 0; border-left: 0; }
  .merl-item + .merl-item { border-top: 1px solid var(--line); }
  .service { grid-template-columns: 1fr; gap: .5rem; }
  .service .merl-letter { font-size: 3.5rem; }
  .nav { gap: .25rem 1rem; font-size: .95rem; }
  .pubs li { grid-template-columns: 1fr; gap: 0; }
}
.about-portrait { width: 11rem; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 2rem; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--leaf); }
