/* benmaddoxlxd.com — shared styles for every page */

:root {
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #12202B;
  --body: #33414E;
  --muted: #4B5865;
  --line: #C9CFCC;
  --accent: #2A66A8;
  --dark: #12202B;
  --dark-text: #F4F5F2;
  --dark-muted: #AEB8C1;
  --dark-accent: #8EC7E6;
  --dark-line: #3A4A58;
  --radius: 4px;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 40px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, ol, ul, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: var(--ink); text-underline-offset: 5px; }
a:hover { color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; background: var(--ink); color: var(--dark-text);
  border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--dark-text); }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
.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;
}
.mono { font-family: var(--mono); font-size: 13px; color: var(--muted); line-height: 1.5; }
.eyebrow { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.lede { font-size: 20px; line-height: 1.55; color: var(--body); max-width: 640px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  font-weight: 600; font-size: 17px; text-decoration: none;
  background: var(--ink); color: var(--dark-text);
}
.btn:hover { background: #000; color: var(--dark-text); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); }
.btn svg, .arrow-link svg { flex: none; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 0; font-weight: 600; font-size: 16px;
}
.link-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.text-link { padding: 12px 0; font-weight: 600; font-size: 17px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 12px 16px;
  align-items: center; justify-content: space-between;
  padding-block: 18px;
}
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -0.3px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a { padding: 12px 14px; font-size: 16px; font-weight: 500; text-decoration: none; }
.nav a[aria-current="page"] {
  font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px;
}
.nav .nav-cta {
  margin-left: 8px; padding: 12px 18px; font-weight: 600;
  background: var(--ink); color: var(--dark-text); border-radius: var(--radius);
}
.nav .nav-cta:hover { background: #000; color: var(--dark-text); }

/* Home hero */
.hero .wrap {
  display: flex; flex-wrap: wrap; gap: 56px 64px; align-items: flex-end;
  padding-block: 104px 88px;
}
.hero-copy { flex: 1 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero h1 {
  font-weight: 600; font-size: clamp(42px, 5.6vw, 80px);
  line-height: 1.02; letter-spacing: -0.03em; max-width: 900px;
}
.hero-photo { flex: 0 1 300px; min-width: 220px; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: #8EC7E6; }
.hero-photo figcaption { margin-top: 12px; }

/* At-a-glance strip */
.glance { background: var(--surface); border-block: 1px solid var(--line); }
.glance .wrap { display: flex; flex-wrap: wrap; }
.glance-item { flex: 1 1 240px; min-width: 0; padding: 32px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.glance-item:first-child { flex: 2 1 340px; padding-left: 0; border-left: 0; }
.glance-value { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.3; }
.glance-value--big { font-size: 34px; letter-spacing: -1px; line-height: 1; }

/* Section heads */
.section { padding-block: 112px; }
.section-head {
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  align-items: baseline; justify-content: space-between; padding-bottom: 40px;
}
.section-head h2, .h2 { font-weight: 600; font-size: clamp(36px, 4vw, 48px); letter-spacing: -1.4px; line-height: 1.08; }

/* Case-study rows (home) */
.case-row {
  border-top: 1px solid var(--ink); padding: 48px 0 64px;
  display: flex; flex-wrap: wrap; gap: 40px 48px;
}
.case-row:last-of-type { border-bottom: 1px solid var(--ink); }
.case-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.case-copy h3 { font-weight: 600; font-size: 38px; letter-spacing: -1px; line-height: 1.05; }
.case-copy h3 a { text-decoration: none; }
.case-copy h3 a:hover { text-decoration: underline; }
.case-copy p { color: var(--body); }
.case-copy strong { color: var(--ink); }
.spec { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.spec > div { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.spec > div:last-child { padding-bottom: 0; border-bottom: 0; }
.spec dt { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.spec dd { font-size: 16px; line-height: 1.45; }
.case-media { flex: 1 1 440px; min-width: 0; }
.case-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.center-row { display: flex; justify-content: center; padding-top: 32px; }

/* Dark process band */
.process { background: var(--dark); color: var(--dark-text); }
.process .section-head p { font-size: 19px; line-height: 1.55; max-width: 560px; color: var(--dark-muted); }
.steps { display: flex; flex-wrap: wrap; gap: 40px 32px; }
.step { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: #fff; }
.step .mono { margin-top: 8px; color: var(--dark-accent); }
.step h3 { font-weight: 600; font-size: 22px; letter-spacing: -0.4px; line-height: 1.25; }
.step p { font-size: 16px; line-height: 1.55; color: var(--dark-muted); }

/* About teaser (home) */
.about-teaser .wrap { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: center; }
.about-teaser-head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.about-teaser-body { flex: 2 1 560px; min-width: 0; display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; }
.about-teaser-body img { flex: none; width: 144px; height: 144px; object-fit: cover; border-radius: var(--radius); }
.about-teaser-body div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.about-teaser-body p { font-size: 19px; color: var(--body); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact .wrap {
  display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-end; justify-content: space-between;
  padding-block: 120px;
}
.contact-copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact h2 { font-weight: 600; font-size: clamp(44px, 6vw, 88px); letter-spacing: -0.03em; line-height: 1; }
.contact-copy p { font-size: 19px; line-height: 1.55; color: var(--body); max-width: 560px; }
.email-link { align-self: flex-start; padding: 6px 0; font-family: var(--mono); font-size: 18px; }
.contact .link-row { gap: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-block: 24px; font-family: var(--mono); font-size: 13px; color: var(--muted);
}

/* Page title block (work, about, case studies) */
.page-head .wrap { padding-block: 88px 48px; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 { font-weight: 600; font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.035em; }
.page-head .dek { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.45; color: var(--body); max-width: 780px; letter-spacing: -0.2px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); padding: 6px 0; }

/* Work index */
.filters { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: 500 15px var(--sans); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--dark-text); }
.work-row {
  display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center;
  padding: 32px 0; border-top: 1px solid var(--ink); text-decoration: none;
}
.work-row:hover .work-title { text-decoration: underline; }
.work-row[hidden] { display: none; }
.work-thumb { flex: 0 0 220px; width: 220px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.work-main { flex: 2 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.work-title { font-size: 30px; font-weight: 600; letter-spacing: -0.8px; line-height: 1.1; }
.work-main p:last-child { font-size: 16px; line-height: 1.55; color: var(--body); }
.work-meta { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.work-meta div { display: flex; gap: 12px; align-items: baseline; }
.work-meta dt { flex: 0 0 64px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.work-meta dd { font-size: 15px; line-height: 1.45; }
.work-list-end { border-top: 1px solid var(--ink); }

/* Apps & tools (work page) */
.apps { border-top: 1px solid var(--line); }
.app-grid { display: flex; flex-wrap: wrap; gap: 32px; }
.app-card {
  flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
/* Frame for the drawn app mockups (css/linktiles-mock.css, css/slidescout-mock.css). */
.app-mock { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
@media (max-width: 760px) {
  .app-mock { aspect-ratio: auto; padding: 28px 16px; background: var(--bg); }
}
.app-body { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.app-body h3 { font-weight: 600; font-size: 30px; letter-spacing: -0.8px; line-height: 1.1; }
.app-body > p:not(.eyebrow):not(.mono) { font-size: 16px; line-height: 1.55; color: var(--body); }
.app-features { display: flex; flex-direction: column; gap: 6px; }
.app-features li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; color: var(--body); }
.app-features li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1px; background: var(--ink); }
.app-body .link-row { margin-top: auto; padding-top: 8px; }
.app-body .work-meta dt { flex-basis: 88px; }

/* Case study page */
.facts { background: var(--surface); border-block: 1px solid var(--line); }
.facts dl { display: flex; flex-wrap: wrap; }
.facts dl > div { flex: 1 1 240px; min-width: 0; padding: 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.facts dl > div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.facts dd { font-size: 17px; font-weight: 500; line-height: 1.45; }
.cover { padding-top: 56px; }
.cover img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: #EEF1F0; }
.summary .wrap { display: flex; flex-wrap: wrap; gap: 40px 48px; padding-block: 64px 96px; }
.summary-item { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--ink); padding-top: 22px; }
.summary-item h2 { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--accent); }
.summary-item p { font-size: 21px; font-weight: 500; line-height: 1.45; letter-spacing: -0.3px; }

.cs-body { border-top: 1px solid var(--line); }
.cs-body > .wrap { display: flex; flex-wrap: wrap; gap: 40px 96px; align-items: flex-start; padding-block: 88px 104px; }
.toc { flex: 0 1 230px; min-width: 190px; display: flex; flex-direction: column; }
.toc .mono { margin-bottom: 12px; }
.toc a {
  display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--body); text-decoration: none;
}
.toc a:last-child { border-bottom: 1px solid var(--line); }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc a span { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.article { flex: 999 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 80px; }
.article section { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.article .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.article h2 { font-weight: 600; font-size: 34px; letter-spacing: -1px; line-height: 1.15; }
.article p { font-size: 18px; line-height: 1.7; color: var(--body); }
.fig { margin-top: 10px; }
.fig img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.fig--narrow img { max-width: 400px; }
.fig figcaption, .fig-pair figcaption, .iterations p.mono { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.fig-pair { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 10px; }
.fig-pair figure { flex: 1 1 280px; min-width: 0; }
.fig-pair img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.fig-pair--contain img { aspect-ratio: 16 / 9; object-fit: contain; padding: 16px; }
.fig-pair--tall img { max-height: 560px; object-fit: contain; }
.iterations { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 10px; }
.iterations li { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.iterations img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.iterations .label { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.iterations p:last-child { font-size: 15px; line-height: 1.5; }
.callout {
  margin-top: 6px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline;
}
.callout .mono { color: var(--accent); }
.callout p:last-child { flex: 1 1 360px; min-width: 0; font-size: 16px; line-height: 1.6; }

.next-case { background: var(--dark); color: var(--dark-text); }
.next-case a {
  display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: center;
  padding-block: 96px; color: var(--dark-text); text-decoration: none;
}
.next-case-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.next-case-copy .mono { color: var(--dark-accent); }
.next-case-title { font-size: clamp(40px, 4.4vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -2px; }
.next-case-copy p:not(.mono):not(.next-case-title) { font-size: 18px; color: var(--dark-muted); }
.next-case-copy span { display: inline-flex; align-items: center; gap: 8px; padding-top: 6px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.next-case img { flex: 1 1 420px; min-width: 0; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }

/* About page */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.prose p { font-size: 19px; line-height: 1.65; color: var(--body); }
.split { display: flex; flex-wrap: wrap; gap: 40px 80px; }
.split > :first-child { flex: 1 1 280px; min-width: 0; }
.split > :last-child { flex: 2 1 560px; min-width: 0; }
.timeline { display: flex; flex-direction: column; }
.timeline li { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { flex: 0 0 140px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.timeline .what { flex: 1 1 360px; min-width: 0; }
.timeline .what strong { display: block; font-size: 19px; }
.timeline .what span { color: var(--body); }
.photo-pair { display: flex; flex-wrap: wrap; gap: 24px; }
.photo-pair figure { flex: 1 1 260px; min-width: 0; }
.photo-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.photo-pair figcaption { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 15px; }

/* Small screens */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .hero .wrap { padding-block: 64px 56px; }
  .section, .contact .wrap { padding-block: 80px; }
  .page-head .wrap { padding-block: 56px 32px; }
  .glance-item, .facts dl > div { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .glance-item:first-child, .facts dl > div:first-child { border-top: 0; }
  .nav a { padding: 10px; }
  .nav .nav-cta { margin-left: 4px; }
  .work-thumb { flex-basis: 100%; width: 100%; }
  .case-copy h3 { font-size: 32px; }
}
