/* ==========================================================================
   Luke Besant, consultant site
   Design direction: editorial with monospace accents
   Type: Fraunces (display serif) · Inter (body) · JetBrains Mono (accents)
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --paper:      #f6f4ee;   /* warm off-white */
  --paper-2:    #efece3;   /* slightly deeper panel */
  --ink:        #1b1a16;   /* near-black */
  --muted:      #6b6860;   /* secondary text */
  --line:       #ddd9cd;   /* hairlines */
  --accent:     #b5431e;   /* rust — used sparingly */
  --accent-ink: #8f3417;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 62ch;                 /* readable line length */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1120px;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Layout helpers ---------------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }
.narrow { max-width: 46rem; }

/* Monospace section marker: // 01 · label */
.marker {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.marker .n { color: var(--muted); }

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 1.6rem + 4vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); }
p  { max-width: var(--measure); }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); color: #37342c; }
strong { font-weight: 650; }
em { font-style: italic; }

/* ---- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-block: 1rem;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.brand b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.brand .mark { font-family: var(--mono); color: var(--accent); font-weight: 500; margin-right: 0.15em; }
.brand span { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-family: var(--mono); font-size: 0.82rem; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--accent); }
.nav a.cta { color: var(--ink); }

/* Burger toggle (hidden on desktop) */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 9px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ---- Buttons ----------------------------------------------------------- */
.btns { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.btn {
  font-family: var(--mono); font-size: 0.85rem;
  text-decoration: none; padding: 0.75rem 1.35rem;
  border: 1px solid var(--ink); border-radius: 2px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Hero -------------------------------------------------------------- */
.hero { padding-block: clamp(4rem, 10vw, 8rem); }
.hero .kicker { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 1.5rem; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 1.75rem; }

/* ---- Method (five moves) ---------------------------------------------- */
.moves { display: grid; gap: 0; margin-top: 2.5rem; }
.move { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.25rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.move:last-child { border-bottom: 1px solid var(--line); }
.move .num { font-family: var(--mono); color: var(--accent); font-size: 0.95rem; padding-top: 0.35rem; }
.move h3 { margin-bottom: 0.35rem; }
.move p { color: #45423a; }

/* ---- Case study previews (condensed) ---------------------------------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); margin-top: 2.5rem; border: 1px solid var(--line); }
.cases .case:last-child:nth-child(odd) { grid-column: 1 / -1; }
.case {
  background: var(--paper); padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: background .15s;
}
.case:hover { background: var(--paper-2); }
.case-head { display: flex; align-items: center; gap: 0.85rem; }
.case .logo { width: 50px; height: 50px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 7px; display: flex; align-items: center; justify-content: center; }
.case .logo img { width: 100%; height: 100%; object-fit: contain; }
.case .co { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.case .sector { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.3rem; }
.case .move-line { margin-top: 1rem; color: #45423a; font-size: 0.98rem; }
.case .metric { margin-top: 1.25rem; font-family: var(--serif); font-size: 1.05rem; color: var(--accent-ink); font-weight: 600; }
.case .more { margin-top: auto; padding-top: 1.25rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.case:hover .more { color: var(--accent); }
.cases-foot { margin-top: 1.5rem; font-family: var(--mono); font-size: 0.85rem; }
.cases-foot a { color: var(--accent); }

/* ---- Prose blocks ------------------------------------------------------ */
.prose p + p { margin-top: 1.15rem; }
.prose .lead + p { margin-top: 1.5rem; }

/* ---- Testimonials ------------------------------------------------------ */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2rem; }
.quote blockquote { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); line-height: 1.25; font-style: italic; }
.quote cite { display: block; margin-top: 1rem; font-family: var(--mono); font-size: 0.8rem; font-style: normal; color: var(--muted); }

/* ---- Beyond the work --------------------------------------------------- */
.beyond { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.beyond .item h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.beyond .item p { font-size: 0.95rem; color: #45423a; }
.beyond .item p + p { margin-top: 0.75rem; }
.beyond .item .tag { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; }
.beyond .item a { color: var(--accent); text-decoration: none; }
.beyond .item a:hover { text-decoration: underline; }
.beyond .links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.85rem; font-family: var(--mono); font-size: 0.78rem; }
.beyond .links a { display: inline-flex; align-items: center; gap: 0.35rem; }
.beyond .proj-list { list-style: none; padding: 0; margin: 0.35rem 0 0; }
.beyond .proj-list li { padding: 0.65rem 0; border-top: 1px solid var(--line); font-size: 0.93rem; color: #45423a; line-height: 1.5; }
.beyond .proj-list li:first-child { border-top: none; padding-top: 0; }
.beyond-intro { margin-top: 1rem; max-width: 46rem; color: #37342c; }

/* ---- Want / result list (how I got here) ------------------------------ */
.want-list { list-style: none; padding: 0; margin: 1.75rem 0; max-width: 40rem; }
.want-list li { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.want-list li:first-child { padding-top: 0; border-top: none; }
.want-list .want { display: block; color: var(--muted); font-size: 0.98rem; }
.want-list .did { display: flex; gap: 0.55rem; margin-top: 0.4rem; color: var(--ink); font-weight: 500; }
.want-list .did::before { content: "\2192"; color: var(--accent); font-weight: 400; flex: none; }

/* ---- Gallery (how I got here) ----------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.gallery figure { margin: 0; }
.gallery .frame { aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery figure:hover img { transform: scale(1.045); }
.gallery figcaption { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.55rem; letter-spacing: 0.02em; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; } }

/* ---- Contact form ----------------------------------------------------- */
.contact-form { margin-top: 2rem; max-width: 34rem; }
.contact-form .field { margin-bottom: 1.1rem; }
.contact-form label { display: block; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.4rem; }
.contact-form input, .contact-form textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #fffdf8; border: 1px solid var(--line); border-radius: 3px;
  padding: 0.7rem 0.85rem; transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181,67,30,0.12);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form button { margin-top: 0.25rem; cursor: pointer; }
.contact-form .form-status { margin-top: 1rem; font-size: 0.95rem; min-height: 1.2em; }
.contact-form .form-status.ok { color: var(--accent-ink); }
.contact-form .form-status.err { color: #a3301a; }
.contact-alt { margin-top: 1.5rem; font-size: 0.95rem; color: var(--muted); }
.contact-alt a { color: var(--accent); text-decoration: none; }

/* ---- Mobile burger nav ------------------------------------------------ */
@media (max-width: 720px) {
  .nav-toggle { display: flex; order: 2; }
  .site-header .wrap { flex-wrap: wrap; align-items: center; }
  .nav {
    display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch;
    gap: 0; margin-top: 0.5rem; border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 0.15rem; width: 100%; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav a:last-child { border-bottom: none; }
  .nav .li-link { padding-top: 1rem; }
  .nav .li-link img { width: 20px; height: 20px; }
}

/* ---- Contact / footer -------------------------------------------------- */
.contact h2 { max-width: 18ch; }
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .cases, .quotes, .beyond { grid-template-columns: 1fr; }
  .nav { gap: 1rem; }
  .brand span { display: none; }
}
@media (max-width: 480px) {
  .move { grid-template-columns: 2.5rem 1fr; gap: 0.85rem; }
}

/* ---- Motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ==========================================================================
   Additions: hero polaroid · LinkedIn · testimonials · blog
   ========================================================================== */

/* ---- Header LinkedIn icon --------------------------------------------- */
.nav .li-link { display: inline-flex; align-items: center; }
.nav .li-link img { width: 18px; height: 18px; opacity: 0.72; transition: opacity .15s; }
.nav .li-link:hover img { opacity: 1; }

/* ---- Hero with polaroid ----------------------------------------------- */
.hero .hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero .hero-copy { min-width: 0; }

.polaroid {
  background: #fffdf8;
  padding: 0.75rem 0.75rem 0;
  border: 1px solid #e7e3d7;
  box-shadow: 0 18px 40px -18px rgba(27,26,22,0.45), 0 2px 6px rgba(27,26,22,0.08);
  transform: rotate(2.2deg);
  transition: transform .25s ease;
  max-width: 340px;
  margin-inline: auto;
}
.polaroid:hover { transform: rotate(0deg); }
.polaroid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: var(--paper-2); }
.polaroid .caption {
  font-family: "Caveat", cursive;
  font-size: 1.9rem;
  line-height: 1;
  text-align: center;
  color: #23221c;
  padding: 0.85rem 0 1.15rem;
}

/* ---- Testimonials: circular LinkedIn-style photos --------------------- */
.quote .attr { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.25rem; }
.quote .attr img.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex: none; border: 1px solid var(--line);
}
.quote cite { margin-top: 0; }
.quote .attr .who { display: flex; flex-direction: column; }
.quote .attr .who cite { color: var(--ink); font-style: normal; font-weight: 500; }
.quote .attr .who .role { display: block; font-family: var(--mono); font-size: 0.7rem; line-height: 1.5; color: var(--muted); margin-top: 0.25rem; max-width: 44ch; }
.quote .attr .li-badge { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.4rem; }
.quote .attr .li-badge img { width: 14px; height: 14px; }
.quote .attr .li-badge span { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }

/* ---- Subscribe button (LinkedIn) -------------------------------------- */
.btn-li { display: inline-flex; align-items: center; gap: 0.55rem; }
.btn-li img { width: 16px; height: 16px; }
.btn-primary.btn-li img { filter: invert(1) brightness(2); }

/* ==========================================================================
   Blog / The Data Pit
   ========================================================================== */

/* ---- Blog index hero -------------------------------------------------- */
.blog-hero { padding-block: clamp(3rem, 7vw, 5.5rem); }
.blog-hero .lead { margin-top: 1.25rem; }
.blog-hero .btns { margin-top: 1.75rem; }

/* ---- Featured special card -------------------------------------------- */
.special {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  border: 1px solid var(--ink); margin-top: 1rem; text-decoration: none; color: inherit;
  background: var(--ink); color: var(--paper);
  overflow: hidden;
}
.special .special-body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.special .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #e0a83c; }
.special h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); color: var(--paper); margin-top: 0.75rem; }
.special p { color: #cfccc2; margin-top: 0.9rem; font-size: 0.98rem; }
.special .more { font-family: var(--mono); font-size: 0.8rem; color: #e0a83c; margin-top: 1.25rem; }
.special .special-img { background: #111; }
.special .special-img img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }

/* ---- Post list -------------------------------------------------------- */
.postlist { margin-top: 1rem; border-top: 1px solid var(--line); }
.post-card {
  display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; align-items: center;
}
.post-card:hover .p-title { color: var(--accent); }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .p-meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.post-card .p-title { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); font-weight: 600; margin-top: 0.5rem; line-height: 1.15; transition: color .15s; }
.post-card .p-sub { color: #45423a; margin-top: 0.5rem; font-size: 0.96rem; }

/* ---- Article (single post) -------------------------------------------- */
.article { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.article .eyebrow { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.article h1 { max-width: 20ch; margin-top: 1rem; }
.article .sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); color: var(--muted); margin-top: 1rem; max-width: 32ch; line-height: 1.25; }
.article .byline { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-top: 1.5rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.article .hero-img { margin-top: 2rem; border: 1px solid var(--line); }
.article .hero-img img { width: 100%; display: block; }

.article-body { margin-top: 2.5rem; }
.article-body > * { max-width: 40rem; }
.article-body p { margin-top: 1.15rem; }
.article-body h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); margin-top: 2.5rem; }
.article-body h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.article-body ul, .article-body ol { margin-top: 1.15rem; padding-left: 1.25rem; }
.article-body li { margin-top: 0.45rem; }
.article-body li::marker { color: var(--accent); }
.article-body strong { font-weight: 650; }
.article-body .pull {
  border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 1.25rem; margin: 2rem 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.25; color: #2c2b25; border-radius: 0;
}
.article-body figure { margin: 2rem 0; }
.article-body figure img { width: 100%; border: 1px solid var(--line); display: block; }
.article-body figcaption { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 0.5rem; }
.article-body .cmg-note { background: var(--paper-2); border: 1px solid var(--line); padding: 1.5rem; margin-top: 2.5rem; font-size: 0.98rem; }
.article-body .cmg-note p { margin-top: 0.75rem; }
.article-body .cmg-note p:first-child { margin-top: 0; }

/* ---- Post footer / subscribe CTA -------------------------------------- */
.post-cta { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2.5rem; }
.post-cta h3 { font-size: 1.4rem; }
.post-cta p { color: var(--muted); margin-top: 0.6rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; font-family: var(--mono); font-size: 0.82rem; }
.post-nav a { color: var(--accent); text-decoration: none; }

/* ---- Responsive: blog + hero ----------------------------------------- */
@media (max-width: 820px) {
  .hero .hero-grid { grid-template-columns: 1fr; }
  .polaroid { margin: 2.5rem auto 0; transform: rotate(-1.5deg); }
  .special { grid-template-columns: 1fr; }
  .special .special-img { order: -1; }
  .post-card { grid-template-columns: 1fr; }
  .post-card .thumb { max-width: 320px; }
}

