/* =========================================================
   WordPress-only styles (dynamic templates + editor content)
   ========================================================= */

/* ---------- Prose: post / page / case study content ---------- */
.prose { color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 20px; }
.prose h2 { font: 500 clamp(28px, 3vw, 40px)/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink); margin-top: 56px; text-wrap: balance; }
.prose h3 { font: 600 21px/1.3 var(--f-text); color: var(--ink); margin-top: 36px; }
.prose h4, .prose h5, .prose h6 { font: 600 18px/1.35 var(--f-text); color: var(--ink); margin-top: 28px; }
.prose a:not(.btn) { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--grape); }
.prose a.btn { text-decoration: none; }
.prose a.btn--primary, .prose a.btn--sprinkle { color: #fff; }
.prose strong, .prose b { color: var(--ink); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: 10px; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 32px; list-style: none; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 6px; border-radius: 999px; background: var(--sprinkle); transform: rotate(-20deg); }
.prose ol { counter-reset: sd; }
.prose ol > li { position: relative; padding-left: 44px; list-style: none; counter-increment: sd; }
.prose ol > li::before { content: counter(sd, decimal-leading-zero); position: absolute; left: 0; top: 3px; font: 500 12px/1 var(--f-mono); padding: 6px 7px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); }
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; border-radius: 24px; }
.prose figure { margin: 40px 0; }
.prose figcaption, .prose .wp-element-caption { font: 400 13px/1.4 var(--f-mono); color: var(--mute); margin-top: 10px; text-align: center; }
.prose blockquote, .prose .wp-block-pullquote { margin: 44px 0; padding: 32px 36px; background: var(--blush); border-radius: 28px; font: 500 clamp(24px, 2.6vw, 34px)/1.2 var(--f-display); letter-spacing: -.02em; color: var(--ink); border: 0; }
.prose blockquote p { margin: 0; }
.prose blockquote cite { display: block; margin-top: 14px; font: 500 13px/1.4 var(--f-mono); font-style: normal; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 600; }
.prose code { font: 400 .9em var(--f-mono); background: var(--fill); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--ink); color: #fff; padding: 20px; border-radius: 20px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose .alignwide { max-width: 1100px; width: calc(100vw - 2 * var(--pad)); margin-left: 50%; transform: translateX(-50%); }
.prose .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); border-radius: 0; }
.prose .wp-block-image img { width: 100%; }
.prose .wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.prose .wp-block-button__link { display: inline-flex; padding: 14px 24px; border-radius: 999px; background: var(--ink); color: #fff !important; text-decoration: none; }
.prose .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; }
.article__body.prose { max-width: 900px; }

/* ---------- Photo covers on cards / articles ---------- */
.post__cover--photo { padding: 0; }
.post__cover--photo img { width: 100% !important; height: 100%; object-fit: cover; transform: none !important; }
.post > a:hover .post__cover--photo img { transform: scale(1.04) !important; }
.article__cover .post__cover--photo { aspect-ratio: 21 / 9; }
.post__meta a.tag:hover { background: var(--volt) !important; }

/* ---------- Archive helpers ---------- */
.chips a.chip { display: inline-flex; align-items: center; }
.insights__head--top { margin-top: 0; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.pager .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--fill); font-weight: 500; }
.pager .page-numbers.current { background: var(--ink); color: #fff; }
.pager a.page-numbers:hover { background: var(--volt); }

/* ---------- Work archive: image tiles in case rows ---------- */
.case__img { display: block; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: var(--fill); }
.case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case__img:hover img { transform: scale(1.05); }
.case__copy .btn { margin-top: 8px; }

/* ---------- Single case study ---------- */
.cs__head { padding-bottom: 48px; }
.cs__back { margin-bottom: 28px; display: inline-flex; }
.cs__brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cs__brand .case__logo { height: 40px; }
.cs__tagline { max-width: 22ch; padding-bottom: 14px; }
.cs__hero-media { margin-bottom: 24px; }
.cs__wide { border-radius: 36px; overflow: hidden; background: var(--bg, var(--fill)); aspect-ratio: 16 / 9; }
.cs__wide video, .cs__wide img { width: 100%; height: 100%; object-fit: cover; }
.cs__reels { background: var(--bg); border-radius: 36px; padding: clamp(20px, 4vw, 56px); }
.cs__reels .reel:nth-child(2) { margin-top: 0; }
.cs__body { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); padding-block: 72px; align-items: start; }
.cs__side { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.cs__side .label { margin: 8px 0 0; }
.cs__content { max-width: 720px; }
.cs__content > :first-child { margin-top: 0; }
.cs__gallery { columns: 2 320px; column-gap: 16px; padding-bottom: 32px; }
.cs__gallery figure { margin: 0 0 16px; break-inside: avoid; border-radius: 28px; overflow: hidden; background: var(--fill); }
.cs__gallery img { width: 100%; height: auto; display: block; }
.cs__next { padding-bottom: 32px; }
.cs__next-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(28px, 5vw, 64px); border-radius: 36px; background: var(--bg); transition: transform .3s var(--ease); }
.cs__next-card:hover { transform: translateY(-4px); }
.cs__next-card .label { margin: 0; }
.cs__next-name { font: 500 clamp(44px, 7vw, 110px)/.95 var(--f-display); letter-spacing: -.03em; }
.cs__next-tag { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 40ch; }
.cs__next-card .btn__dot { position: absolute; right: clamp(24px, 4vw, 56px); top: 50%; translate: 0 -50%; width: 72px; height: 72px; background: var(--ink); color: #fff; font-size: 26px; }
.cs__next-card:hover .btn__dot { transform: rotate(-45deg); background: var(--volt); color: var(--ink); }

/* ---------- 404 ---------- */
.nf__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-height: 60vh; justify-content: center; }
.nf__inner .label { margin: 0; }
.nf__mark { width: 120px; animation: spin 14s linear infinite; }

/* ---------- Admin bar offset ---------- */
.admin-bar .nav { top: calc(16px + 32px); }
@media (max-width: 782px) { .admin-bar .nav { top: calc(16px + 46px); } }

@media (max-width: 1100px) {
  .cs__body { grid-template-columns: 1fr; }
  .cs__side { position: static; }
}
@media (max-width: 560px) {
  .cs__next-card .btn__dot { position: static; translate: none; width: 56px; height: 56px; }
  .prose { font-size: 17px; }
}

.reel--cs-wide { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 36px; transform: none !important; cursor: pointer; }
.reel--cs-wide::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 50%; width: 104px; height: 104px; translate: -50% -50%; border-radius: 50%; background: var(--volt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l10-6z' fill='%23111014'/%3E%3C/svg%3E") center / 36px no-repeat; transition: transform .35s var(--ease); }
.reel--cs-wide:hover::before { transform: scale(1.08); }

/* Job post header: keep the apply button compact */
.job-post .article__head .btn { align-self: flex-start; }

/* ---------- Work archive: all-projects grid ---------- */
.wcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wcard > a { display: flex; flex-direction: column; height: 100%; border-radius: 24px; overflow: hidden; background: var(--sugar); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.wcard > a:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -36px rgba(17,16,20,.45); }
.wcard__cover { position: relative; aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.wcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.wcard > a:hover .wcard__cover img { transform: scale(1.05); }
.wcard__play { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--volt); font-size: 12px; }
.wcard__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.wcard__name { font: 500 22px/1.15 var(--f-display); letter-spacing: -.02em; }
.wcard .mono { text-transform: none; letter-spacing: 0; }
.wcard.is-hidden { display: none; }

/* ---------- Case stats ---------- */
.case__stats { display: flex; gap: 20px; flex-wrap: wrap; }
.case__stats li { display: flex; flex-direction: column; }
.case__stats b { font: 500 28px/1 var(--f-display); letter-spacing: -.02em; }
.case__stats span { font-size: 13px; color: var(--ink-2); }
.cs__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.cs__stats li { background: var(--bg); border-radius: 24px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.cs__stats b { font: 500 clamp(32px, 3.4vw, 52px)/1 var(--f-display); letter-spacing: -.03em; }
.cs__stats span { color: var(--ink-2); font-size: 15px; }
.cs__meta { font-weight: 500; margin-top: -8px; }

/* ---------- Footer legal ---------- */
.foot__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__legal a:hover { color: var(--volt); }

@media (max-width: 1100px) { .wcards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .wcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wcards { gap: 10px; } .wcard__name { font-size: 18px; } .wcard__body { padding: 12px 14px 16px; } }

/* ---------- Case study: no write-up, colour swatches ---------- */
.cs__body--solo { grid-template-columns: 1fr; }
.cs__body--solo .cs__side { position: static; max-width: 720px; }
.prose .swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 28px 0; }
.prose .swatches li { padding: 0 !important; list-style: none; border-radius: 20px; overflow: hidden; background: var(--sugar); }
.prose .swatches li::before { content: ""; position: static !important; display: block; width: 100% !important; height: 96px !important; border-radius: 0 !important; transform: none !important; background: var(--c) !important; }
.prose .swatches b { display: block; padding: 12px 14px 0; font: 500 17px/1.2 var(--f-display); }
.prose .swatches span { display: block; padding: 2px 14px 14px; font: 400 12px/1.4 var(--f-mono); color: var(--mute); }
