/* marknoble.co.uk
   Palette: chalk (page), slate (text), heather (links, buttons, header bands), gorse (accent).
   Fonts: system stacks only. Nothing is downloaded, so no third-party requests. */

:root {
  --chalk: #F2F4F3;
  --slate: #1E2B33;
  --slate-2: #43525B;
  --stone: #C9D0CD;
  --heather: #5A3D74;
  --heather-deep: #44295B;
  --gorse: #E8B923;
  --on-dark: #D3DBD8;
  --tint: #EAE6EF;
  --tint-line: #CFC6DA;
  --error: #9B1C1C;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --page: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--slate);
  font: 1.125rem/1.6 var(--sans);
}

::selection { background: var(--gorse); color: var(--slate); }

img, svg { max-width: 100%; height: auto; }

a { color: var(--heather); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--heather-deep); }

:focus-visible { outline: 3px solid var(--heather); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }

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

/* Headings */
h1, h2, h3 { font-family: var(--serif); color: var(--slate); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.5rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 1em; }

/* Header */
.site-header { background: #fff; border-top: 4px solid var(--gorse); border-bottom: 1px solid var(--stone); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--slate); line-height: 1.2; }
.brand:hover { color: var(--slate); }
.brand-mark { display: block; width: 2.75rem; height: 2.75rem; flex: none; }
.brand-text { display: grid; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; }
.brand-role { font-size: 0.9rem; color: var(--slate-2); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.1rem; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 0.5rem 0; color: var(--slate); text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--stone); color: var(--slate); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--heather); font-weight: 600; }

/* Hero (home) and page intro */
.hero { background: var(--heather-deep); color: var(--on-dark); padding-block: clamp(1.75rem, 4.5vw, 3.25rem); }
.hero h1 { color: #fff; max-width: 15em; font-size: clamp(2.4rem, 1.4rem + 4vw, 4rem); }
.hero .lede { color: var(--on-dark); }
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-photo { margin: 0; order: -1; }
.hero-photo img { display: block; width: 7.5rem; height: 7.5rem; object-fit: cover; border-radius: 50%; border: 4px solid var(--gorse); }
.lede { max-width: 40rem; font-size: 1.25rem; line-height: 1.55; margin: 1.1rem 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-block; background: var(--heather); color: #fff; font-weight: 600;
  padding: 0.85rem 1.5rem; border-radius: 3px; text-decoration: none;
}
.btn:hover { background: var(--heather-deep); color: #fff; }
.hero .btn, .closing .btn { background: var(--gorse); color: var(--slate); }
.hero .btn:hover, .closing .btn:hover { background: #fff; color: var(--slate); }
.hero a:not(.btn) { color: #fff; text-decoration-color: var(--gorse); }
.hero a:not(.btn):hover { color: #fff; text-decoration-color: #fff; }
.hero :focus-visible, .page-intro :focus-visible { outline-color: var(--gorse); }

.page-intro { background: var(--heather-deep); color: var(--on-dark); padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.page-intro h1 { color: #fff; }
.page-intro .lede { color: var(--on-dark); margin-top: 1rem; }
.page-intro a { color: #fff; text-decoration-color: var(--gorse); }
.page-intro a:hover { color: #fff; text-decoration-color: #fff; }
.page-intro .small, .page-intro .article-meta { color: var(--on-dark); }

/* Sections */
.section { padding-block: clamp(1.5rem, 3.5vw, 2.5rem); border-top: 1px solid var(--stone); }
.section > .wrap > h2 { margin-bottom: 1.1rem; }
.section-link { margin: 1.1rem 0 0; font-weight: 600; }
.hero + .section, .page-intro + .section, .page-intro + .service, .section--tint { border-top: 0; }
.page-intro + .wrap > .case:first-child, .page-intro + .wrap > .posts > .post:first-child { border-top: 0; }
.section--tint { background: var(--tint); }
.section--tint + .section { border-top: 0; }
.section--tint .rows li, .section--tint .rows li:last-child, .section--tint .steps li, .section--tint .steps li:last-child { border-color: var(--tint-line); }
.section--tint .rows h3 a { text-decoration-color: var(--tint-line); }

/* Three situations (home) */
.situations { display: grid; gap: 1.5rem; }
.situation { border-top: 1px solid var(--stone); padding-top: 0.9rem; }
.situation h3 { margin-bottom: 0.4rem; }
.situation p { margin: 0; }

/* Short service list (home) and service sections */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; gap: 0.25rem 2rem; padding-block: 0.9rem; border-top: 1px solid var(--stone); }
.rows li:last-child { border-bottom: 1px solid var(--stone); }
.rows h3 a { color: var(--slate); text-decoration-color: var(--stone); }
.rows h3 a:hover { color: var(--heather-deep); text-decoration-color: var(--heather); }
.rows p { margin: 0; max-width: 40rem; }

/* Case rows (portfolio, home) */
.case { display: grid; gap: 0.5rem 3rem; padding-block: 1.4rem; border-top: 1px solid var(--stone); }
.case-meta p { margin: 0; line-height: 1.4; }
.case-org { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.case-sub { font-size: 0.95rem; color: var(--slate-2); margin-top: 0.2rem !important; }
.case-body h2, .case-body h3 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.75rem); line-height: 1.2; }
.case-body dl { margin: 0.75rem 0 0; max-width: 40rem; }
.case-body dt { font-weight: 700; font-size: 0.95rem; color: var(--heather); margin-bottom: 0.15rem; }
.case-body dd { margin: 0; }
.case-body dl > div { margin-bottom: 0.8rem; }
.case-body dl > div:last-child { margin-bottom: 0; }
.case-note { font-size: 0.95rem; color: var(--slate-2); margin: 0.75rem 0 0; max-width: 40rem; }

/* Services detail */
.service { display: grid; gap: 0.5rem 3rem; padding-block: 1.5rem; border-top: 1px solid var(--stone); }
.service h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); }
.service .intro { font-size: 1.2rem; margin: 0 0 0.75rem; max-width: 38rem; }
.service dl { margin: 0; max-width: 38rem; }
.service dt { font-weight: 700; font-size: 0.95rem; color: var(--heather); margin-bottom: 0.15rem; }
.service dd { margin: 0; }
.service dl > div { margin-bottom: 0.9rem; }
.service dl > div:last-child { margin-bottom: 0; }

/* Steps (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; max-width: 42rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem; padding-block: 0.7rem; border-top: 1px solid var(--stone); }
.steps li:last-child { border-bottom: 1px solid var(--stone); }
.steps li::before { content: counter(step); font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: var(--heather); }
.steps strong { display: block; }

/* Quotes */
.quotes { display: grid; gap: 1.5rem 3rem; }
blockquote { margin: 0; border-left: 4px solid var(--gorse); padding-left: 1.1rem; }
blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); line-height: 1.4; margin: 0 0 0.75rem; }
blockquote footer { font-size: 0.95rem; color: var(--slate-2); line-height: 1.45; }
blockquote footer strong { color: var(--slate); }

/* Timeline (about) */
.timeline { margin: 0; max-width: 46rem; }
.timeline div { display: grid; gap: 0.1rem 2rem; padding-block: 0.6rem; border-top: 1px solid var(--stone); }
.timeline div:last-child { border-bottom: 1px solid var(--stone); }
.timeline dt { font-weight: 700; color: var(--slate-2); }
.timeline dd { margin: 0; }

.prose p { max-width: 38rem; }
.prose ul { max-width: 38rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* Closing band: the one bold moment on the site */
.closing { background: var(--heather-deep); color: var(--on-dark); padding-block: clamp(2rem, 5vw, 3.25rem); }
.closing h2 { color: #fff; max-width: 18em; }
.closing p { max-width: 36rem; margin: 0.9rem 0 0; }
.big-email {
  display: inline-block; margin-top: 1.1rem;
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 0.9rem + 3.8vw, 3.6rem); line-height: 1.15;
  color: #fff; text-decoration: underline; text-decoration-color: var(--gorse);
  text-decoration-thickness: 0.12em; text-underline-offset: 0.16em; overflow-wrap: anywhere;
}
.big-email:hover { color: #fff; text-decoration-color: #fff; }
.closing :focus-visible, .site-footer :focus-visible { outline-color: var(--gorse); }

/* Footer */
.site-footer { background: var(--slate); color: var(--on-dark); border-top: 1px solid #3A4953; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.1rem 1.4rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; }

/* Contact details */
.details { margin: 0; max-width: 34rem; }
.details div { display: grid; gap: 0.1rem 2rem; padding-block: 0.6rem; border-top: 1px solid var(--stone); }
.details div:last-child { border-bottom: 1px solid var(--stone); }
.details dt { font-weight: 700; color: var(--slate-2); }
.details dd { margin: 0; }
.small { font-size: 0.95rem; color: var(--slate-2); max-width: 38rem; }
.small--spaced { margin-top: 1rem; }
.closing--email { padding-block: clamp(1.5rem, 4vw, 2.5rem); }

/* Contact form */
.form { max-width: 36rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field .opt { font-weight: 400; color: var(--slate-2); }
.hint { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--slate-2); }
.field input, .field textarea {
  display: block; width: 100%; font: inherit; color: var(--slate); background: #fff;
  border: 2px solid #6B7B84; border-radius: 3px; padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 11rem; line-height: 1.5; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--heather); }
.field [aria-invalid="true"] { border-color: var(--error); }
button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { max-width: 36rem; margin-bottom: 1.25rem; padding: 1rem 1.25rem; background: #fff; border-left: 4px solid var(--error); }
.form-errors p { margin: 0 0 0.4rem; font-weight: 700; color: var(--error); }
.form-errors ul { margin: 0; padding-left: 1.25rem; }

/* Blog list */
.posts { list-style: none; margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); padding: 0; }
.post { display: grid; gap: 0.35rem 3rem; padding-block: 1.25rem; border-top: 1px solid var(--stone); }
.post:last-child { border-bottom: 1px solid var(--stone); }
.post-meta { margin: 0; font-size: 0.95rem; color: var(--slate-2); }
.post h2 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.75rem); line-height: 1.2; margin-bottom: 0.4rem; }
.post h2 a { color: var(--slate); text-decoration-color: var(--stone); }
.post h2 a:hover { color: var(--heather-deep); text-decoration-color: var(--heather); }
.post p { max-width: 40rem; }
.post div p { margin: 0; }

/* Article */
.article-head { padding-bottom: clamp(1rem, 2vw, 1.5rem); }
.article-head h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); max-width: 18em; }
.article-head .small { margin: 1rem 0 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0 0 0.9rem; font-size: 0.95rem; color: var(--slate-2); }
.article-body { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); font-size: 1.15rem; line-height: 1.65; overflow-wrap: break-word; }
.article-body > * { max-width: 40rem; }
.article-body h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin: 2rem 0 0.7rem; }
.article-body h3 { margin: 1.5rem 0 0.5rem; }
.article-body h4 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.article-body > :first-child { margin-top: 0; }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 0 0 1.25em; }
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote { border-left: 4px solid var(--gorse); padding-left: 1.25rem; margin: 1.25rem 0; }
.article-body blockquote p { font-family: var(--sans); font-style: normal; font-size: inherit; line-height: inherit; margin: 0 0 1em; }
.article-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: #E3E8E6; padding: 0.1em 0.3em; border-radius: 3px; }
.article-body pre { background: var(--slate); color: var(--on-dark); padding: 1rem 1.25rem; overflow-x: auto; border-radius: 3px; line-height: 1.5; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body hr { border: 0; border-top: 1px solid var(--stone); margin: 1.75rem 0; }
.article-body img { display: block; margin: 1.5rem 0; }
.article-end { margin-top: 1.75rem; font-weight: 600; }

.quote-long { max-width: 42rem; }
.quote-long p { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); line-height: 1.6; }

/* Wider screens */
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 15rem; column-gap: 3rem; }
  .hero-photo { order: 0; }
  .hero-photo img { width: 100%; height: auto; aspect-ratio: 1; }
  .situations { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .rows li { grid-template-columns: 17rem 1fr; align-items: baseline; }
  .case { grid-template-columns: 15rem 1fr; }
  .service { grid-template-columns: 15rem 1fr; }
  .hero-grid--small { grid-template-columns: minmax(0, 1fr) 11rem; }
  .post { grid-template-columns: 15rem 1fr; }
  .site-nav ul { gap: 0 1.5rem; }
  .timeline div, .details div { grid-template-columns: 11rem 1fr; }
}

@media (min-width: 64rem) {
  .quotes { grid-template-columns: repeat(3, 1fr); }
}
