/* ==========================================================================
   bockinstead.com: v2 prototype
   Visual system carried over from Mark's resume:
   cobalt blue, near-black ink, lavender panels, tab labels on a blue rule.
   ========================================================================== */

:root {
  --blue: #060eea;          /* resume cobalt */
  --blue-dark: #0409b0;
  --lav: #e5e6f5;           /* resume panel lavender */
  --lav-deep: #d4d6ef;
  --ink: #0c0c0c;
  --gray: #57585d;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --head: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--head);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--blue); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.logo {
  font-family: var(--head); font-weight: 900; font-size: 1.25rem;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo em { color: var(--blue); font-style: italic; }
.nav { display: flex; gap: clamp(12px, 3vw, 30px); align-items: center; }
.nav a {
  font-family: var(--head); font-weight: 700; font-size: 0.98rem;
  color: var(--ink); text-decoration: none;
}
.nav a:hover { color: var(--blue); }
.nav .btn { padding: 9px 16px; font-size: 0.95rem; }
@media (max-width: 700px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--head); font-weight: 800; font-size: 1.02rem;
  padding: 14px 24px; border-radius: 999px; white-space: nowrap;
  background: var(--blue); color: var(--white) !important; text-decoration: none;
  border: 2px solid var(--blue);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--blue) !important; }
.btn.ghost:hover { background: var(--lav); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Tab label (from the resume) ---------- */
.tab-head { display: flex; border-bottom: 5px solid var(--blue); margin-bottom: 36px; }
.tab {
  background: var(--blue); color: var(--white);
  font-family: var(--head); font-weight: 800; font-size: 0.95rem; line-height: 1.2;
  padding: 8px 20px 5px; border-radius: 12px 12px 0 0;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(8px, 2vw, 24px) 0 clamp(56px, 8vw, 96px); }
.hero-panel { background: var(--lav); border-radius: var(--radius-lg); padding: clamp(32px, 6vw, 72px); }
.hero .lede:last-of-type { margin-bottom: 0; }
.hero .actions { margin: 40px 0; }
.hero .proof { margin: 0; }
.hero .proof div { background: var(--white); }
.hero .eyebrow {
  font-family: var(--head); font-weight: 700; color: var(--gray);
  font-size: 1.05rem; margin-bottom: 18px;
}
.hero .eyebrow .say { font-style: italic; }
.hero h1 { max-width: 13ch; }
.hero h1 .hl { color: var(--blue); font-style: italic; }
.hero .lede { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 40em; color: #26272b; }

/* ---------- Proof strip ---------- */
.proof {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 0 0 clamp(64px, 9vw, 110px);
}
.proof div { background: var(--lav); border-radius: var(--radius); padding: 22px 24px; }
.proof strong {
  display: block; font-family: var(--head); font-weight: 900; color: var(--blue);
  font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 6px;
}
.proof span { font-size: 1rem; color: #2b2c31; }
@media (max-width: 820px) { .proof { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding-bottom: clamp(64px, 9vw, 110px); }
.section-intro { max-width: 40em; color: var(--gray); margin-bottom: 32px; }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work-grid .feature { grid-column: 1 / -1; }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: var(--lav); border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.card:hover { transform: translateY(-3px); color: var(--ink); }
.card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--lav-deep); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card.feature .thumb { aspect-ratio: 16 / 7.5; }
.card .body { padding: 22px 26px 26px; }
.card .tags {
  font-family: var(--head); font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); margin-bottom: 8px;
}
.card h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: 6px; }
.card p { margin: 0; color: #34353a; font-size: 1.02rem; }
.card .more { display: inline-block; margin-top: 14px; font-family: var(--head); font-weight: 800; color: var(--blue); }
.card.soon { opacity: 0.9; }
.card.soon .more { color: var(--gray); }

/* placeholder art for cards without images yet */
.placeholder-art {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(6,14,234,.14) 0 18%, transparent 19%),
    radial-gradient(circle at 78% 70%, rgba(6,14,234,.10) 0 24%, transparent 25%),
    var(--lav-deep);
  font-family: var(--head); font-weight: 900; font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--blue); letter-spacing: -0.02em;
}

/* ---------- How I work ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.principles > div { padding-top: 0; }
.principles .num { font-family: var(--head); font-weight: 900; color: var(--blue); font-size: 0.95rem; }
.principles p { color: #34353a; font-size: 1.05rem; }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.about img { border-radius: var(--radius-lg); aspect-ratio: 1; object-fit: cover; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about img { max-width: 260px; } }

/* ---------- Contact ---------- */
.contact {
  background: var(--blue); color: var(--white);
  border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px);
}
.contact h2 { color: var(--white); }
.contact p { font-size: 1.2rem; max-width: 34em; }
.contact .btn { background: var(--white); color: var(--blue) !important; border-color: var(--white); }
.contact .btn:hover { background: var(--lav); border-color: var(--lav); }
.contact .btn.ghost { background: transparent; color: var(--white) !important; border-color: var(--white); }
.contact .btn.ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Footer ---------- */
.site-footer { padding: 36px 0 48px; color: var(--gray); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.cs-hero { padding: clamp(40px, 7vw, 80px) 0 32px; }
.back { font-family: var(--head); font-weight: 700; text-decoration: none; font-size: 0.98rem; }
.cs-hero .tags {
  font-family: var(--head); font-weight: 700; font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--blue); margin: 28px 0 12px;
}
.cs-hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 16ch; }
.cs-hero .lede { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 38em; color: #26272b; }

.meta {
  display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 12px 40px;
  margin: 32px 0 0; padding: 20px 24px; background: var(--lav); border-radius: var(--radius);
}
.meta dt { font-family: var(--head); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.meta dd { margin: 2px 0 0; font-size: 1rem; }
@media (max-width: 900px) { .meta { grid-template-columns: repeat(2, 1fr); } }

.cs-image { margin: 40px 0 clamp(56px, 8vw, 96px); }
.cs-image img { border-radius: var(--radius-lg); width: 100%; }
.cs-image figcaption, .figure figcaption { font-size: 0.95rem; color: var(--gray); margin-top: 10px; }

.cs-block { display: grid; grid-template-columns: 240px 1fr; gap: clamp(20px, 5vw, 56px); margin-bottom: clamp(48px, 7vw, 80px); }
.cs-block > h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cs-block .text { max-width: 42em; }
@media (max-width: 820px) { .cs-block { grid-template-columns: 1fr; } }

.decision { margin-bottom: 48px; }
.decision .num { font-family: var(--head); font-weight: 900; color: var(--blue); font-size: 0.95rem; margin-bottom: 4px; }
.figure { margin: 22px 0 0; }
.figure img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(12, 12, 60, 0.12); }

.pullquote {
  font-family: var(--head); font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.3; letter-spacing: -0.01em;
  border-left: 5px solid var(--blue); padding: 4px 0 4px 22px; margin: 28px 0;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 28px; }
.stats div { background: var(--lav); border-radius: var(--radius); padding: 18px 20px; }
.stats strong { display: block; font-family: var(--head); font-weight: 900; font-size: 1.8rem; color: var(--blue); line-height: 1.1; }
.stats span { font-size: 0.98rem; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

.lesson { background: var(--lav); border-radius: var(--radius-lg); padding: 26px 30px; }
.lesson h3 { margin-bottom: 8px; }
.lesson p:last-child { margin-bottom: 0; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 24px rgba(12, 12, 60, 0.10); }
.gallery a:hover { box-shadow: 0 12px 30px rgba(6, 14, 234, 0.2); }
.gallery .cover { grid-row: span 2; }
.gallery .cover img { height: 100%; object-fit: cover; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } .gallery .cover { grid-row: auto; } }

.next {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 5px solid var(--blue); padding-top: 28px; margin-top: clamp(56px, 8vw, 96px);
}
.next .label { font-family: var(--head); font-weight: 700; color: var(--gray); font-size: .95rem; }
.next h3 { margin: 4px 0 0; }

.tab-head h2.tab { font-size: 0.95rem; margin: 0; letter-spacing: 0; font-weight: 800; }

.figure.portrait img { max-width: min(620px, 100%); }
.cs-block > * { min-width: 0; }

/* Diagrams and multi-image grids (case studies) */
.diagram { margin: 22px 0 0; background: var(--lav); border-radius: var(--radius); padding: clamp(14px, 3vw, 28px); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 0.9rem; color: var(--gray); margin-top: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
.grid-2 img { border-radius: 10px; box-shadow: 0 8px 22px rgba(12, 12, 60, 0.10); }
.grid-2 a { display: block; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* Embedded video (Video & Voice case study) */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--lav-deep); border-radius: var(--radius-lg); overflow: hidden; }
.figure.video { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(12, 12, 60, 0.12); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.decision h3 { margin-bottom: 8px; }

/* Framed card preview (white slides that would blend into the page) */
.card .thumb.framed { padding: clamp(14px, 2.4vw, 24px); background: var(--lav-deep); }
.card .thumb.framed img { border-radius: 8px; object-fit: contain; }

/* Essay page */
.essay h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.8em; }
.essay p { max-width: 36em; }

/* Previous (left) / next (right) project links */
.next .to-next { margin-left: auto; text-align: right; }

/* Self-hosted video in a case study */
.figure.video-file video { width: 100%; display: block; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(12, 12, 60, 0.12); background: var(--lav-deep); }

/* Map pin on the Chicago quick fact */
.proof strong .pin { width: 0.82em; height: 0.82em; fill: currentColor; margin-right: 0.2em; vertical-align: -0.05em; }
