/* Logan Graves: Route B, "The numbers lead".
   Palette from his PDF (concrete + navy ink #1B2E4B) and his headshot (burgundy tie).
   Green for % changes is the green his PDF uses, darkened for contrast. */
:root {
  --concrete: #e6e4e0;
  --concrete-2: #dcd9d3;
  --paper: #ffffff;
  --ink: #1b2e4b;          /* his PDF's navy: figures, heads, text */
  --ink-soft: #4a5566;     /* secondary text, 6.1:1 on concrete */
  --rule: rgba(27, 46, 75, 0.22);
  --accent: #7a1e2b;       /* burgundy: CTA, section numerals, active nav */
  --accent-hover: #5f1520;
  --up: #2f6a00;           /* % change, 5.3:1 on concrete */

  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --measure: 36rem;
  --r-sm: 2px; --r-md: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--concrete); color: var(--ink);
  font: 400 1rem/1.6 var(--body); overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 var(--s4); }
h1, h2, h3 { margin: 0; font-weight: 400; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); font-weight: 600; }
.skip:focus { top: var(--s2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Spaced caps, echoing his letter-spaced PDF labels */
.caps { font: 600 0.75rem/1.4 var(--body); letter-spacing: 0.2em; text-transform: uppercase; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border-radius: var(--r-sm);
  background: var(--accent); color: var(--paper); text-decoration: none;
  font: 600 1rem/1 var(--body); letter-spacing: 0.01em;
  transition: background-color 150ms ease;
}
.btn:hover { background: var(--accent-hover); }
.btn--sm { min-height: 40px; padding: 0 var(--s4); font-size: 0.875rem; }
.link-arrow { font-weight: 600; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.link-arrow:hover { text-decoration-thickness: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(230, 228, 224, 0.94); backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; flex-shrink: 0; }
.brand img { width: auto; height: 34px; }
.brand span { font: 400 1.15rem/1 var(--display); letter-spacing: 0.04em; }
.nav { margin-left: auto; }
.nav ol { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font: 500 0.8125rem/1 var(--body); white-space: nowrap; padding: var(--s2) 0; display: inline-block; }
.nav a .num { color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: 0.2em; }
.nav a:hover, .nav a[aria-current="true"] { text-decoration: underline; text-underline-offset: 0.4em; }
.nav a[aria-current="true"] .num { color: var(--accent); font-weight: 700; }
@media (max-width: 1080px) {
  html { scroll-padding-top: 7.5rem; }
  .site-header .wrap { flex-wrap: wrap; gap: 0 var(--s4); }
  .site-header .btn { margin-left: auto; }
  .nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--rule); }
  .nav::-webkit-scrollbar { display: none; }
  .nav ol { padding: var(--s1) var(--gutter); gap: var(--s5); }
  .nav a { padding: var(--s3) 0; }
}
@media (max-width: 599px) {
  .nav { display: none; }
  html { scroll-padding-top: 5rem; }
}

/* Hero */
.hero { padding: var(--s7) 0 var(--s6); }
.hero-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; align-items: end; }
.hero-figure {
  font: 400 clamp(8.5rem, 40vw, 24rem)/0.82 var(--display);
  letter-spacing: -0.01em; margin-left: -0.04em;
}
.hero-label { margin-top: var(--s4); font-size: 0.9rem; letter-spacing: 0.32em; }
.hero-qual { color: var(--ink-soft); font-size: 0.875rem; margin: var(--s1) 0 0; }
.hero h1 { font: 400 clamp(2.25rem, 6vw, 3.5rem)/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; margin-top: var(--s7); }
.hero-line { font: 600 clamp(1.25rem, 2.4vw, 1.6rem)/1.3 var(--body); max-width: 30ch; margin: var(--s4) 0 var(--s3); letter-spacing: -0.01em; }
.hero-sub { color: var(--ink-soft); font-weight: 500; margin-bottom: var(--s3); }
.hero-support { max-width: var(--measure); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); margin-top: var(--s5); }
.hero-photo { width: min(100%, 22rem); }
.hero-photo img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 20%; width: 100%; border-radius: var(--r-sm); filter: saturate(0.95); }
.tagline { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: var(--s3) 0; margin-top: var(--s7); text-align: center; letter-spacing: 0.35em; font-size: 0.7rem; }
@media (min-width: 900px) {
  .hero { padding-top: var(--s8); }
  .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); column-gap: var(--s8); }
  .hero-photo { justify-self: end; }
}

/* Sections */
.section { padding: var(--s9) 0; border-top: 1px solid var(--rule); }
.section--paper { background: var(--concrete-2); }
.sec-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s3); }
.sec-num { font: 600 0.9rem/1 var(--body); color: var(--accent); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.sec-head h2 { font: 400 clamp(2.5rem, 7vw, 4.75rem)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.sec-intro { color: var(--ink-soft); max-width: var(--measure); margin-bottom: var(--s7); font-size: 1.0625rem; }

/* (01) Numbers: one stat per band */
.bands { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ink); }
.band { display: grid; grid-template-columns: 1fr; gap: var(--s2) var(--s6); align-items: center; padding: var(--s5) 0; border-top: 1px solid var(--ink); }
.band-fig { font: 400 clamp(4.5rem, 17vw, 9.5rem)/0.9 var(--display); letter-spacing: -0.005em; }
.band-fig--text { font-size: clamp(3.5rem, 12vw, 7rem); }
.band-label { font-size: 0.9rem; letter-spacing: 0.25em; margin: 0; }
.band-small { color: var(--ink-soft); margin: var(--s1) 0 0; font-size: 0.9375rem; }
@media (min-width: 760px) {
  .band { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* (02) Case studies */
.case { padding: var(--s7) 0; border-top: 1px solid var(--ink); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case-top { display: flex; justify-content: space-between; gap: var(--s5); align-items: flex-start; }
.tag { display: inline-block; font-size: 0.6875rem; padding: var(--s1) var(--s2); border: 1px solid var(--ink); border-radius: var(--r-sm); margin-bottom: var(--s4); }
.case-title { color: var(--ink-soft); margin: 0 0 var(--s2); font-weight: 600; }
.case-fig { font: 400 clamp(3.75rem, 13vw, 8rem)/0.92 var(--display); text-transform: uppercase; }
.case-client { margin: var(--s3) 0 0; font-size: 1rem; }
.case-client strong { font-weight: 700; }
.case-client .meta { color: var(--ink-soft); }
.case-logo { width: auto; height: 64px; max-width: 140px; object-fit: contain; flex-shrink: 0; background: var(--paper); border-radius: var(--r-md); padding: 6px; }
.case-logo--dark { background: var(--ink); padding: 10px; }
@media (max-width: 599px) { .case-logo { height: 48px; max-width: 96px; } }
.gwh { display: grid; gap: var(--s5); margin: var(--s6) 0; grid-template-columns: 1fr; }
.gwh h4 { margin: 0 0 var(--s2); color: var(--ink); }
.gwh p { margin: 0; max-width: var(--measure); }
@media (min-width: 900px) { .gwh { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); } }
.role { margin: 0 0 var(--s5); color: var(--ink-soft); }
.role .caps { color: var(--ink); margin-right: var(--s2); }

/* Supporting stats: thin table */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.stats > div { padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--rule); }
.stats dt { order: 2; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.35; }
.stats dd { margin: 0 0 var(--s1); font: 400 clamp(1.9rem, 5vw, 2.6rem)/1 var(--display); }
.stats > div { display: flex; flex-direction: column; }
@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.chg { color: var(--up); font-weight: 600; white-space: nowrap; }
.foot { font-size: 0.8125rem; color: var(--ink-soft); margin: var(--s3) 0 0; }
.note { max-width: var(--measure); margin-top: var(--s5); }

/* Two-campaign table (Bonfire) */
.ctable { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: 0.9375rem; }
.ctable th, .ctable td { text-align: left; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ctable thead th { font: 600 0.6875rem/1.3 var(--body); letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); }
.ctable td.n { font: 400 1.6rem/1 var(--display); }
@media (max-width: 759px) {
  .ctable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ctable, .ctable tbody, .ctable tr, .ctable th, .ctable td { display: block; width: 100%; }
  .ctable tr { border-top: 1px solid var(--ink); padding: var(--s3) 0 var(--s4); }
  .ctable th[scope="row"] { border: 0; font-weight: 700; padding-bottom: 0; }
  .ctable td { display: flex; justify-content: space-between; gap: var(--s4); border: 0; padding: var(--s1) 0; }
  .ctable td::before { content: attr(data-label); font: 500 0.8125rem/1.5 var(--body); color: var(--ink-soft); }
  .ctable td.n { font-size: 1.35rem; }
}

/* Swipe rows (post screenshots, gallery) */
.swipe {
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: var(--s4);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: var(--s2) var(--gutter) var(--s4); margin: var(--s5) calc(-1 * var(--gutter)) 0;
  scroll-padding: 0 var(--gutter); list-style: none;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.swipe li, .swipe figure { scroll-snap-align: start; margin: 0; }
.swipe img { height: clamp(300px, 48vh, 440px); width: auto; max-width: none; border-radius: var(--r-md); background: var(--paper); box-shadow: 0 1px 0 var(--rule); }
.swipe figcaption { font-size: 0.8125rem; color: var(--ink-soft); margin-top: var(--s2); max-width: 28ch; }
.swipe-hint { font-size: 0.8125rem; color: var(--ink-soft); margin: var(--s4) 0 0; }

/* More work: collapsed cards */
.more-head { font: 400 clamp(1.75rem, 4vw, 2.5rem)/1 var(--display); text-transform: uppercase; margin: var(--s8) 0 var(--s5); }
.more { border-top: 1px solid var(--ink); }
.more:last-of-type { border-bottom: 1px solid var(--ink); }
.more summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s4); padding: var(--s5) 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary .case-fig { font-size: clamp(2.5rem, 8vw, 4.5rem); }
.more summary .case-client { margin-top: var(--s2); }
.more .plus { width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font: 400 1.5rem/1 var(--body); transition: transform 200ms ease; }
.more[open] .plus { transform: rotate(45deg); }
.more summary:hover .plus { background: var(--ink); color: var(--concrete); }
.more-body { padding-bottom: var(--s7); }
.more-body .gwh { margin-top: 0; }

/* (03) Insight */
.insight { display: grid; gap: var(--s6); padding: var(--s7) 0; border-top: 1px solid var(--ink); }
.insight:first-of-type { border-top: 0; padding-top: 0; }
.insight h3 { font: 400 clamp(1.75rem, 4vw, 2.5rem)/1 var(--display); text-transform: uppercase; margin-bottom: var(--s5); }
.steps { margin: 0; }
.steps > div { display: grid; grid-template-columns: 1fr; gap: var(--s1); padding: var(--s4) 0; border-top: 1px solid var(--rule); }
.steps dt { color: var(--ink); }
.steps dd { margin: 0; max-width: var(--measure); }
.insight img { width: min(100%, 22rem); border-radius: var(--r-md); background: var(--paper); }
@media (min-width: 900px) {
  .insight { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s8); align-items: start; }
  .steps > div { grid-template-columns: 9rem 1fr; }
  .insight img { justify-self: end; }
}

/* (04) Gallery */
.gal-group { margin-top: var(--s6); }
.gal-group h3 { margin-bottom: 0; }
.gal-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); list-style: none; margin: var(--s4) 0 0; padding: 0; max-width: 56rem; }
.gal-pair figure { margin: 0; }
.gal-pair img { width: 100%; border-radius: var(--r-md); background: var(--paper); }
.gal-pair figcaption { font-size: 0.8125rem; color: var(--ink-soft); margin-top: var(--s2); }
.gal-pair figcaption .caps { display: block; color: var(--ink); font-size: 0.6875rem; margin-bottom: var(--s1); }
@media (min-width: 900px) { .gal-pair { gap: var(--s6); } }

/* (05) Testimonials */
.quotes { display: grid; gap: var(--s7); grid-template-columns: 1fr; margin-top: var(--s7); }
.quote { margin: 0; border-top: 1px solid var(--ink); padding-top: var(--s5); }
.quote blockquote { margin: 0; }
.quote p { font-size: 1.0625rem; line-height: 1.55; }
.quote--lead p { font: 500 clamp(1.25rem, 2.6vw, 1.625rem)/1.4 var(--body); letter-spacing: -0.01em; max-width: 40ch; }
.quote figcaption { font-weight: 700; margin-top: var(--s3); }
.quote figcaption span { font-weight: 400; color: var(--ink-soft); }
.q-mark { font: 400 4.5rem/0.6 var(--display); color: var(--accent); display: block; height: 2.25rem; }
@media (min-width: 900px) {
  .quotes { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s6); }
  .quote--lead { grid-column: 1 / span 8; }
  .quote--2 { grid-column: 1 / span 6; }
  .quote--3 { grid-column: 7 / span 6; }
}
.more-quotes { margin-top: var(--s7); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.more-quotes summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: var(--s4) 0; min-height: 48px; }
.more-quotes summary::-webkit-details-marker { display: none; }
.more-quotes[open] .plus { transform: rotate(45deg); }
.more-quotes .plus { width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; transition: transform 200ms ease; }
.qgrid { display: grid; gap: var(--s6); padding: var(--s5) 0 var(--s7); grid-template-columns: 1fr; }
@media (min-width: 760px) { .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qgrid .quote { border-top-color: var(--rule); }
.qgrid .quote p { font-size: 1rem; }

/* (06) About */
.about { display: grid; gap: var(--s7); grid-template-columns: 1fr; margin-top: var(--s7); }
.about h3 { font: 400 1.6rem/1.1 var(--display); text-transform: uppercase; margin-bottom: var(--s3); }
.about-block + .about-block { margin-top: var(--s6); }
.about-block p { max-width: var(--measure); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: var(--s5) 0 0; }
.chips li { border: 1px solid var(--ink); border-radius: 999px; padding: var(--s1) var(--s3); font-size: 0.875rem; font-weight: 500; }
.about-mark { width: 9rem; opacity: 0.95; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s9); } .about-mark { justify-self: end; width: 12rem; } }

/* (07) Contact: the dark close */
.contact { background: var(--ink); color: var(--concrete); border-top: 0; }
.contact .sec-num { color: #e6a3ad; }
.contact h2 { color: var(--paper); }
.contact-line { font: 600 clamp(1.5rem, 3.6vw, 2.5rem)/1.2 var(--body); letter-spacing: -0.015em; max-width: 24ch; color: var(--paper); margin: var(--s6) 0 var(--s5); }
.contact-sub { max-width: var(--measure); font-size: 1.125rem; color: #cfd6e0; }
.contact .btn { background: var(--paper); color: var(--ink); margin-top: var(--s4); }
.contact .btn:hover { background: var(--concrete); }
.contact-mail { display: block; margin-top: var(--s5); font-weight: 600; color: var(--paper); text-underline-offset: 0.25em; word-break: break-all; }

/* Footer */
.site-footer { background: var(--ink); color: #b9c2cf; padding: var(--s7) 0 var(--s6); border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.875rem; }
.site-footer .wrap { display: grid; gap: var(--s3); }
.site-footer .f-name { color: var(--paper); }
.site-footer .f-credit { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-footer .f-credit:hover { color: var(--paper); }
.f-tile { display: inline-flex; align-self: start; justify-self: start; background: var(--concrete); padding: 10px 12px; border-radius: var(--r-sm); margin-bottom: var(--s3); }
.site-footer .f-tile img { height: 40px; width: auto; }

/* Motion: one-time reveal, only when the user allows motion and JS runs */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 400ms ease-out, transform 400ms ease-out; }
  .js .reveal.in { opacity: 1; transform: none; }
}
.count { font-variant-numeric: tabular-nums; display: inline-block; }
