/* Charlie Douglas portfolio. One stylesheet for every page. */
:root {
  --bg: #eeede9;
  --bg-alt: #e4e3de;
  --ink: #15171c;
  --ink-2: #3c3f47;
  --ink-3: #4a4d55;
  --muted: #5f626a;
  --soft: #8b8d93;
  --line: #dddcd7;
  --line-2: #d3d2cc;
  --on-dark: #c4c6cc;
  --on-dark-2: #d6d7db;
  --pad: 32px;
  --head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--ink-3); }
:focus-visible { outline: 3px solid #2a62f0; outline-offset: 3px; border-radius: 4px; }
p, h1, h2, h3, ul, ol { margin: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; color: #fff; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.brand small { font-size: 12px; color: var(--muted); }
.brand strong { font-family: var(--head); font-weight: 800; font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a { text-decoration: none; padding: 12px 0; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.menu { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 999px; }
.btn:hover { color: #fff; background: #2c2f36; }
.btn-sm { min-height: 44px; padding: 0 22px; font-size: 14px; }
.nav-links .btn { padding: 0 22px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #e9e9ec; color: var(--ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 600; font-size: 15px; text-decoration: none; }
.link-arrow svg { flex: none; }

/* Type */
.h-display { font-family: var(--head); font-weight: 800; font-size: clamp(40px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -0.035em; max-width: 1100px; }
.h-page { font-family: var(--head); font-weight: 800; font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.03em; max-width: 1000px; }
.h-creative { font-size: clamp(40px, 5.8vw, 72px); letter-spacing: -0.035em; }
.h-section { font-family: var(--head); font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.02em; }
.h-block { font-family: var(--head); font-weight: 800; font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.02em; line-height: 1.15; }
.soft { color: var(--soft); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 700px; }
.body { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.pull { font-family: var(--head); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; font-weight: 700; }
.list { padding-left: 22px; font-size: 18px; line-height: 1.8; color: var(--ink-2); }
.note { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Home */
.hero { padding-top: 96px; padding-bottom: 88px; }
.hero-side { margin-top: 56px; display: flex; justify-content: flex-end; }
.hero-side > div { flex: 0 1 460px; }
.hero-side p { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.brands { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.brands .wrap { padding-top: 48px; padding-bottom: 48px; }
.brands-list { margin-top: 24px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 16px 44px; font-family: var(--head); font-weight: 700; font-size: clamp(18px, 2vw, 22px); color: var(--ink-3); }
.brands .note { margin-top: 28px; font-size: 14px; }

.about { padding-top: 96px; padding-bottom: 112px; border-top: 1px solid var(--line); }
.about .h-section { max-width: 900px; }
.cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.about .cols { margin-top: 36px; }
.about .cols p { flex: 1 1 460px; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.about .cols p:last-child { flex-basis: 360px; }
.about strong { color: var(--ink); }
.stats { margin-top: 64px; display: flex; flex-wrap: wrap; gap: 32px; }
.stat { flex: 1 1 220px; border-top: 2px solid var(--ink); padding-top: 20px; }
.stat b { display: block; font-family: var(--head); font-size: clamp(44px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-3); }

.work { padding-bottom: 112px; }
.cards { margin-top: 40px; display: flex; flex-direction: column; gap: 32px; }
.card { display: flex; align-items: stretch; min-height: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.card:hover { color: var(--ink); border-color: #c9c8c2; box-shadow: 0 10px 30px rgba(21,23,28,.08); }
.card-body { flex: 0 0 40%; padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.card-body .eyebrow { color: var(--muted); }
.card h3 { margin-top: 14px; font-family: var(--head); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; color: var(--ink); }
.card p.meta { margin-top: 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.card-cta { margin-top: 28px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.card-cta svg { transition: transform .2s ease; }
.card:hover .card-cta svg { transform: translateX(4px); }
.card-media { flex: 1 1 60%; min-width: 0; position: relative; background: #f2f2f2; border-left: 1px solid var(--line); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.work .link-arrow { margin-top: 32px; font-size: 16px; }

.bring { background: var(--bg-alt); }
.bring .wrap { padding-top: 104px; padding-bottom: 104px; }
.bring-grid { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 48px 40px; }
.bring-grid > div { flex: 1 1 320px; }
.bring-grid .num { font-size: 14px; font-weight: 600; color: #6b6e75; }
.bring-grid h3 { margin-top: 10px; font-family: var(--head); font-size: 21px; font-weight: 700; }
.bring-grid p:last-child { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

.contact { background: var(--ink); color: #fff; }
.contact .wrap { padding-top: 112px; padding-bottom: 112px; }
.contact h2 { max-width: 800px; font-family: var(--head); font-size: clamp(36px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.contact p { margin-top: 20px; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--on-dark); }
.contact .actions { margin-top: 36px; }

.site-footer { background: var(--ink); color: #9a9ca3; border-top: 1px solid #2c2f36; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.site-footer a { color: var(--on-dark); display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
.site-footer p { display: flex; align-items: center; }

/* Case study */
.cs-head { padding-top: 64px; padding-bottom: 48px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.cs-head .eyebrow { margin-top: 40px; }
.cs-head h1 { margin-top: 16px; }
.cs-head .lede { margin-top: 28px; }
.facts { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 24px 40px; }
.facts > div { flex: 1 1 200px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 16px; font-weight: 600; }

.hero-img { width: 100%; height: clamp(260px, 44vw, 600px); object-fit: cover; object-position: center top; border-radius: 20px; background: #fff; }
.frame { background: #fff; border-radius: 20px; padding: 40px; }
.frame-blue { background: #2a62f0; border-radius: 20px; padding: 56px 48px 0; display: flex; justify-content: center; }
.frame-blue img { width: 100%; max-width: 900px; }
.frame-center img { margin: 0 auto; width: 100%; max-width: 480px; }
.pair { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.pair > .frame { padding: 32px; flex: 1 1 360px; }
.pair > .frame.wide { flex-basis: 520px; }

.sec { padding-top: 96px; }
.sec-first { padding-top: 104px; }
.sec-tight { padding-top: 48px; }
.split { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.split > h2 { flex: 1 1 280px; }
.split > .content { flex: 2 1 560px; min-width: 0; }
.content .pull { margin-top: 32px; }
.content .list { margin-top: 20px; }
.content ol.list { margin-top: 24px; }
.content .note { margin-top: 28px; }
.split > .list { flex: 2 1 560px; min-width: 0; }

.results { background: var(--ink); color: #fff; border-radius: 20px; padding: 56px 48px; }
.results-grid { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 32px; }
.results-grid > div { flex: 1 1 180px; }
.results-grid b { display: block; font-family: var(--head); font-size: clamp(40px, 4.6vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.results-grid b.word { font-size: 26px; letter-spacing: 0; }
.results-grid span { display: block; margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--on-dark); }
.results .foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid #2c2f36; font-size: 16px; line-height: 1.5; color: var(--on-dark); }

.next { padding-top: 112px; padding-bottom: 112px; }
.next a { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px; border-radius: 20px; background: var(--bg-alt); text-decoration: none; }
.next a:hover { background: #dcdbd5; color: var(--ink); }
.next small { display: block; font-size: 13px; color: var(--muted); }
.next strong { display: block; margin-top: 8px; font-family: var(--head); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; font-weight: 800; }
.next svg { flex: none; }

.ba { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.ba figure { margin: 0; flex: 1 1 420px; min-width: 0; }
.ba .frame { padding: 24px; }
.ba .frame img { width: 100%; aspect-ratio: 1800 / 1213; object-fit: cover; object-position: center top; }
.ba-label { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: #dcdbd5; color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.ba-slides .frame img { aspect-ratio: 16 / 9; }
.ba-sd .frame img { aspect-ratio: 548 / 440; object-position: left top; }
.ba-ui .frame img { aspect-ratio: 1312 / 1081; }
.ba-tall .frame img { aspect-ratio: 1312 / 1500; }
.ba + .ba { margin-top: 48px; }
.ba-note { margin-top: 16px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 520px; }
.ba-label.ba-after { background: var(--ink); color: #fff; }

/* Creative work */
.cw-head { padding-top: 88px; padding-bottom: 64px; }
.cw-head .lede { margin-top: 28px; max-width: 620px; }
.cw-grid { padding-bottom: 112px; display: flex; flex-wrap: wrap; gap: 56px 32px; }
.cw-grid article { flex: 1 1 480px; min-width: 0; }
.cw-grid img { width: 100%; height: clamp(220px, 28vw, 360px); object-fit: cover; border-radius: 16px; background: #1a1a1a; }
.cw-grid .eyebrow { margin-top: 20px; }
.cw-grid h2 { margin-top: 8px; font-family: var(--head); font-size: 26px; font-weight: 800; }
.cw-grid p.d { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.cw-grid p.r { margin-top: 10px; font-size: 14px; color: var(--muted); }
.cw-more { padding-bottom: 112px; }
.cw-more.next { padding-top: 0; }

/* Tablet */
@media (max-width: 960px) {
  .card-body { flex-basis: 44%; padding: 32px 28px; }
  .card { min-height: 380px; }
  .nav-links { gap: 20px; }
  .hero { padding-top: 72px; padding-bottom: 72px; }
  .about, .contact .wrap, .bring .wrap { padding-top: 88px; padding-bottom: 88px; }
  .about { padding-top: 88px; padding-bottom: 88px; }
  .sec { padding-top: 80px; }
  .next { padding-top: 88px; padding-bottom: 88px; }
}

/* Phone: collapse the nav into a menu */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  html { scroll-padding-top: 76px; }
  .nav { padding-top: 12px; padding-bottom: 12px; }
  .nav-links { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; font-weight: 600; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] summary { background: var(--ink); color: #fff; border-color: var(--ink); }
  .menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 40px)); background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.14); display: flex; flex-direction: column; }
  .menu-panel a { text-decoration: none; padding: 14px 16px; border-radius: 10px; font-size: 16px; }
  .menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--bg); }
  .menu-panel .btn { margin-top: 6px; color: #fff; }

  .hero { padding-top: 48px; padding-bottom: 56px; }
  .hero-side { margin-top: 32px; justify-content: flex-start; }
  .brands .wrap { padding-top: 36px; padding-bottom: 36px; }
  .brands-list { gap: 10px 24px; }
  .about { padding-top: 72px; padding-bottom: 72px; }
  .cols, .split { gap: 20px; }
  .about .cols p, .about .cols p:last-child { flex-basis: 100%; }
  .stats { margin-top: 44px; gap: 24px; }
  .stat { flex-basis: 100%; }
  .card { flex-direction: column-reverse; min-height: 0; border-radius: 16px; }
  .card-media { flex: none; aspect-ratio: 16 / 10; border-left: 0; border-bottom: 1px solid var(--line); }
  .card-body { padding: 24px; }
  .card-cta { margin-top: 20px; }
  .bring .wrap, .contact .wrap { padding-top: 72px; padding-bottom: 72px; }
  .bring-grid { gap: 36px; }
  .bring-grid > div { flex-basis: 100%; }

  .cs-head { padding-top: 32px; padding-bottom: 36px; }
  .cs-head .eyebrow { margin-top: 24px; }
  .lede, .body, .list { font-size: 17px; }
  .facts { margin-top: 36px; gap: 18px 24px; }
  .facts > div { flex-basis: calc(50% - 12px); }
  .hero-img { border-radius: 16px; }
  .frame { padding: 16px; border-radius: 16px; }
  .pair { gap: 20px; }
  .ba { gap: 24px; margin-top: 28px; }
  .ba figure { flex-basis: 100%; }
  .ba .frame { padding: 12px; }
  .pair > .frame, .pair > .frame.wide { flex-basis: 100%; padding: 16px; }
  .frame-blue { padding: 28px 16px 0; border-radius: 16px; }
  .sec { padding-top: 64px; }
  .sec-first { padding-top: 64px; }
  .sec-tight { padding-top: 32px; }
  .split > h2, .split > .content, .split > .list { flex-basis: 100%; }
  .results { padding: 36px 24px; border-radius: 16px; }
  .results-grid { margin-top: 28px; gap: 24px; }
  .results-grid > div { flex-basis: 100%; }
  .next { padding-top: 72px; padding-bottom: 72px; }
  .next a { padding: 24px; border-radius: 16px; }
  .cw-head { padding-top: 48px; padding-bottom: 40px; }
  .cw-grid { gap: 44px; padding-bottom: 72px; }
  .cw-grid article { flex-basis: 100%; }
  .cw-more { padding-bottom: 72px; }
}

@media (max-width: 380px) {
  .facts > div { flex-basis: 100%; }
}

@media print {
  .site-header { position: static; }
  .menu, .skip { display: none; }
  .card { break-inside: avoid; }
}
