/*
Theme Name: Cleverhog
Theme URI: https://cleverhog.com
Author: Cleverhog
Author URI: https://cleverhog.com
Description: The Cleverhog agency site. Clean, editorial layout: serif headlines, thin rules, captioned photos. Manage "Proud Posts" and "Clients" from the admin; service page copy lives in inc/services.php.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: cleverhog
*/

@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #1b1917;
  --muted: #6a645d;
  --paper: #faf8f4;
  --tint: #f1ede5;
  --rule: #d8d2c7;
  --accent: #c93a86; /* brand pink, deepened so it reads on paper */
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --header: 76px;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(16px, .5vw + 14px, 18px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, fieldset, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
input, textarea, button { border-radius: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(3.2rem, 9.2vw, 8.8rem); line-height: .94; }
h2 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
h3 { font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.1; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { top: 12px; }

.kicker { font-family: var(--sans); font-weight: 600; font-size: .72rem; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.numeral { font-family: var(--serif); font-style: italic; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1; color: var(--accent); }

/* Buttons and links: flat, square, no gradients */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: .76rem; line-height: 1; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 19px 28px 17px; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.text-link { font-weight: 600; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding-bottom: 5px; border-bottom: 1px solid currentColor; transition: color .2s ease; }
.text-link::after { content: " →"; letter-spacing: 0; }
.text-link[target="_blank"]::after { content: " ↗"; }
.text-link:hover { color: var(--accent); }

/* Photos sit in "plates": a fixed frame the image fills */
.plate { overflow: hidden; background: var(--tint); aspect-ratio: 4 / 3; }
.plate img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
a:hover .plate img { transform: scale(1.03); }
.plate-wide { aspect-ratio: auto; background: none; overflow: visible; }
.plate-wide img { aspect-ratio: 21 / 9; height: auto; }
.plate-wide figcaption { margin-top: 12px; font-size: .82rem; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.05rem; }
.plate-empty { display: grid; place-items: center; }
.plate-empty::after { content: ""; width: 34%; aspect-ratio: 1200 / 453; background: url("assets/img/main-logo-black.png") center / contain no-repeat; opacity: .18; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header); }
.brand img { width: 148px; }
.site-nav { display: flex; align-items: center; gap: clamp(24px, 3.4vw, 48px); }
.nav-link { font: inherit; font-weight: 600; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 8px 0; cursor: pointer; }
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--accent); }
button.nav-link::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
button.nav-link[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -1px; }
.nav-toggle { display: none; }

.services-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-block: 1px solid var(--rule); box-shadow: 0 30px 40px -30px rgba(27, 25, 23, .25); }
.services-menu.open { display: block; }
html:not(.js) .nav-services:hover .services-menu, html:not(.js) .nav-services:focus-within .services-menu { display: block; }
.services-menu ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); padding-block: 20px 28px; }
.services-menu a { display: grid; gap: 2px; padding: 18px 0; text-decoration: none; border-bottom: 1px solid var(--rule); }
.services-menu strong { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; transition: color .2s ease; }
.services-menu span { font-size: .88rem; color: var(--muted); }
.services-menu a:hover strong, .services-menu a[aria-current="page"] strong { color: var(--accent); font-style: italic; }

/* Masthead */
.masthead { padding-top: clamp(48px, 7vw, 104px); }
.masthead h1 { margin-top: 22px; max-width: 11.5em; }
.masthead-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 64px; margin-top: clamp(32px, 4vw, 56px); padding-top: 28px; border-top: 1px solid var(--ink); }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.3rem); line-height: 1.55; max-width: 34em; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; }
.masthead .plate-wide { margin-top: clamp(40px, 5vw, 72px); }
.masthead-page h1 { font-size: clamp(2.9rem, 7.4vw, 7rem); max-width: 12.5em; }

/* Sections */
.section { padding-block: clamp(72px, 9vw, 144px); }
.section-rule > .wrap { border-top: 1px solid var(--ink); padding-top: clamp(40px, 5vw, 72px); }
.section-rule { padding-top: 0; }
.section-tint { background: var(--tint); }
.section-slim { padding-block: clamp(48px, 6vw, 88px); }
.section-head { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px 40px; align-items: baseline; margin-bottom: clamp(44px, 6vw, 88px); }
.section-head h2 { max-width: 14em; }
.section-intro { grid-column: 2; margin-top: 8px; font-size: 1.1em; color: var(--muted); max-width: 32em; }
.section-more { margin-top: clamp(40px, 5vw, 64px); }

/* Trusted by: client logos in one flat ink tone */
.trusted { padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(40px, 5vw, 72px); }
.trusted .wrap { display: grid; gap: 40px; }
/* Two rows on half-width tracks: each logo spans two, and with an odd count the bottom row
   starts one track in so it sits centred under the longer top row (see ch_logo_strip). */
.logos { display: grid; grid-template-columns: repeat(calc(var(--cols, 7) * 2), minmax(0, 1fr)); align-items: center; justify-items: start; gap: 64px clamp(28px, 3.6vw, 56px); }
.logos li { grid-row: var(--r); grid-column: var(--c) / span 2; }
.logos img { height: auto; max-width: 100%; filter: brightness(0); opacity: .62; transition: opacity .2s ease; }
.logos li:hover img { opacity: 1; }
.coming-soon .trusted { padding-block: clamp(56px, 7vw, 104px); }
@media (max-width: 1000px) {
  .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px clamp(40px, 5.4vw, 72px); }
  .logos li { grid-row: auto; grid-column: auto; }
}
@media (max-width: 620px) {
  .logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: start; gap: 40px 36px; }
  .logos li { width: 100%; min-width: 0; }
  .logos img { max-width: 100%; height: auto; }
}

/* Services as stories */
.stories { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 44px); }
.story a { display: grid; gap: 10px; text-decoration: none; }
.story .plate { margin-bottom: 12px; }
.story h3 { transition: color .2s ease; }
.story a:hover h3 { color: var(--accent); }
.story p:not(.kicker) { color: var(--muted); font-size: .98rem; }

/* Three per row; with seven services, the first row takes four so no tile sits alone */
.stories > li { grid-column: span 4; }
.stories:has(> li:nth-child(7):last-child) > li:nth-child(-n+4) { grid-column: span 3; }
@media (max-width: 1000px) { .stories > li, .stories:has(> li:nth-child(7):last-child) > li:nth-child(-n+4) { grid-column: span 6; } .stories > li:nth-child(7):last-child { grid-column: span 12; } }
@media (max-width: 620px) { .stories > li, .stories > li:nth-child(7):last-child, .stories:has(> li:nth-child(7):last-child) > li:nth-child(-n+4) { grid-column: span 12; } }

/* Work */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; margin-bottom: clamp(56px, 7vw, 104px); }
.feature .plate { aspect-ratio: 5 / 4; }
.feature-copy { display: grid; gap: 20px; }
.feature-copy h3 { font-size: clamp(3rem, 6vw, 5.4rem); line-height: .95; }
.feature-text { display: grid; gap: 1em; max-width: 30em; }
.feature-text p:first-child::first-letter { font-family: var(--serif); font-size: 3.6em; line-height: .8; float: left; padding: .08em .1em 0 0; color: var(--accent); }

.clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 44px); }
.client { display: grid; gap: 10px; align-content: start; justify-items: start; }
.client .plate { width: 100%; margin-bottom: 12px; }
.client p:not(.kicker) { color: var(--muted); font-size: .98rem; }
.client .text-link { margin-top: 8px; text-transform: none; letter-spacing: .02em; font-size: .88rem; }

/* Posts we're proud of */
.post-filters { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 40px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.chip { font: inherit; font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; padding: 6px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted); }
.chip:hover { color: var(--ink); }
.chip.is-on { color: var(--ink); border-bottom-color: var(--ink); }

.posts-wall { columns: 3; column-gap: clamp(24px, 3vw, 44px); }
.post { break-inside: avoid; margin-bottom: clamp(36px, 4vw, 56px); }
.post[hidden] { display: none; }
.post-media { position: relative; background: var(--tint); }
.post-media img, .post-media video { display: block; width: 100%; height: auto; }
.post-media video { object-fit: cover; background: var(--tint); }
.post-badge { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-size: .8rem; padding-left: 3px; }
.post-body { padding-top: 16px; display: grid; gap: 8px; justify-items: start; }
.post-meta { font-weight: 600; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.post-body h3 { font-size: 1.6rem; }
.post-body > p:not(.post-meta) { font-size: .95rem; color: var(--muted); }
.post-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.post-counts li { position: relative; display: flex; align-items: center; gap: 6px; }
.post-counts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.post-counts .count-likes svg { fill: var(--accent); stroke: var(--accent); }
.post-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); width: 100%; }
.post-stats li { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: grid; }
.post-stats strong { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: 0; text-transform: none; color: var(--ink); }
.post .text-link { margin-top: 6px; }

.posts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.posts-row .post { margin: 0; }
.posts-row .post-media { aspect-ratio: 4 / 5; overflow: hidden; }
.posts-row .post-media img, .posts-row .post-media video { height: 100%; object-fit: cover; object-position: top; }
.posts-row .post-media video { aspect-ratio: auto !important; object-position: center; }

/* Sound button on every reel */
.post-media img.post-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; transition: opacity .3s; }
.post-media.is-playing .post-poster, .post-media.has-controls .post-poster { opacity: 0; }
.post-sound { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; background: rgba(27, 25, 23, .72); color: #fff; }
.post-sound[hidden] { display: none; }
.post-sound:hover { background: var(--ink); }
.post-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.post-sound svg path:first-child { fill: currentColor; }
.post-sound .sound-on, .post-sound[aria-pressed="true"] .sound-off { display: none; }
.post-sound[aria-pressed="true"] .sound-on { display: inline; }
.post-sound[aria-pressed="true"] { background: var(--accent); }

/* Reels showcase: a swipeable row of vertical videos */
.hero-reels { margin-top: clamp(40px, 5vw, 72px); }
.hero-reels-note { margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); }
.reel-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 20px; }
.reel-nav button { width: 46px; height: 46px; font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; background: none; color: var(--ink); border: 1px solid var(--ink); transition: background-color .2s ease, color .2s ease; }
.reel-nav button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.reel-nav button:disabled { opacity: .25; cursor: default; }
.posts-reels { --gap: clamp(16px, 2vw, 28px); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.posts-reels::-webkit-scrollbar { display: none; }
.posts-reels .post { flex: 0 0 calc((100% - var(--gap) * 3) / 4); margin: 0; scroll-snap-align: start; }
.js .posts-reels .reveal { opacity: 1; transform: none; }
.posts-reels .post-media { aspect-ratio: 9 / 16; overflow: hidden; }
.posts-reels .post-media video, .posts-reels .post-media img { height: 100%; object-fit: cover; aspect-ratio: auto !important; }
.posts-reels .post-body h3 { font-size: 1.4rem; }
.posts-reels .post-body > p:not(.post-meta) { font-size: .9rem; }
@media (max-width: 1000px) { .posts-reels .post { flex-basis: calc((100% - var(--gap) * 2) / 3); } }
@media (max-width: 620px) {
  /* One reel at a time, with a sliver of the next as a hint to swipe */
  .posts-reels { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); gap: 12px; }
  .posts-reels .post { flex-basis: 86%; scroll-snap-align: center; scroll-snap-stop: always; }
  .reel-nav { display: none; }
}

/* How we work */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.steps li { border-top: 1px solid var(--ink); padding-top: 20px; display: grid; gap: 10px; align-content: start; }
.steps p { color: var(--muted); font-size: .98rem; }

/* Service pages */
.included { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); }
.included li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 16px; align-items: baseline; padding: 28px 0 32px; border-top: 1px solid var(--rule); }
.included li:nth-child(-n+2) { border-top-color: var(--ink); }
.included .numeral { grid-row: span 2; }
.included p { color: var(--muted); }

.faq-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.faq-wrap .section-head { display: block; margin-bottom: 0; }
.faq-wrap .section-head h2 { margin-top: 16px; }
.faq { border-bottom: 1px solid var(--rule); }
.faq:first-child { border-top: 1px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.2; padding: 22px 48px 22px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.5rem; font-weight: 300; color: var(--accent); }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding: 0 48px 26px 0; max-width: 40em; }

.cta { text-align: center; }
.cta h2 { font-size: clamp(2.8rem, 7vw, 6rem); margin-top: 18px; }
.cta p:not(.kicker):not(.masthead-actions) { margin: 22px auto 0; max-width: 28em; color: var(--muted); font-size: 1.1em; }
.cta .masthead-actions { justify-content: center; margin-top: 36px; }

.also { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 18px; }
.also li:not(:last-child)::after { content: "/"; margin-inline: clamp(12px, 1.6vw, 24px); font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 3rem); color: var(--rule); }
.also a { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.2; text-decoration: none; }
.also a:hover { font-style: italic; color: var(--accent); }

/* Contact */
.contact { border-top: 1px solid var(--ink); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.contact-copy h2 { margin-top: 18px; }
.contact-estimate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.contact-copy > p:not(.kicker) { margin-top: 24px; font-size: 1.1em; color: var(--muted); max-width: 26em; }
.contact-list { margin-top: 40px; border-top: 1px solid var(--rule); }
.contact-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.contact-list a { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent); font-style: italic; }

.contact-form { display: grid; gap: 28px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.field { display: grid; gap: 4px; }
.field label, .field legend { font-weight: 600; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field legend { margin-bottom: 14px; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input:not([type="checkbox"]), .field textarea { font: inherit; font-size: 1.05rem; color: inherit; width: 100%; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; -webkit-appearance: none; appearance: none; }
.field textarea { resize: vertical; }
.field input:not([type="checkbox"]):focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; font-weight: 400; font-size: .92rem; letter-spacing: 0; text-transform: none; color: var(--ink); }
.chips input { position: absolute; opacity: 0; }
.chips span { display: block; padding: 8px 14px 6px; border: 1px solid var(--rule); transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-msg { padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--tint); }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); padding-block: clamp(48px, 6vw, 80px) 28px; font-size: .95rem; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer-brand img { width: 150px; }
.footer-brand p { margin-top: 16px; color: var(--muted); }
.site-footer .kicker { margin-bottom: 14px; }
.site-footer nav a, .footer-inner > div:last-child a { display: block; text-decoration: none; padding: 3px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-meta { margin-top: clamp(40px, 5vw, 72px); padding-top: 20px; position: relative; font-size: .8rem; color: var(--muted); }
.footer-meta::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; border-top: 1px solid var(--rule); }

/* Coming soon page */
.coming-soon .site-header { position: static; }
.coming-soon .soon { padding-bottom: clamp(72px, 9vw, 136px); }
.coming-soon .contact-list { margin-top: 0; }
.coming-soon .site-footer { padding-top: 0; }
.coming-soon .footer-meta { margin-top: 0; }
.coming-soon .footer-meta::before { display: none; }

/* Case study pages */
.case-head .kicker a { text-decoration: none; }
.case-head .kicker a:hover { color: var(--accent); }
.case-facts { display: grid; gap: 14px; margin: 0; min-width: 260px; }
.case-facts div { display: grid; gap: 2px; }
.case-facts dd { margin: 0; }
.case-hero { margin-top: clamp(40px, 5vw, 72px); }
.case-hero-panel { background: #3fb075; aspect-ratio: 21 / 9; display: grid; place-items: center; }
.case-hero-panel img { width: min(38%, 420px); }
.case-hero-photo { aspect-ratio: 21 / 9; overflow: hidden; background: #151e32; }
.case-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.case-swatches-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-swatches-3 li { aspect-ratio: 2 / 1; }
.case-type { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: clamp(48px, 6vw, 80px); }
.case-type > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.case-type-sample { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1.1; margin: 6px 0 10px; }
.muted { color: var(--muted); }
.case-pages-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.case-compare figure { margin: 0; }
.case-compare-box { aspect-ratio: 4 / 3; background: #fff; outline: 1px solid var(--rule); outline-offset: -1px; display: grid; place-items: center; }
.case-compare-box img { width: 56%; }
.case-compare-old { background: #231f20; outline: 0; }
.case-compare-old img { width: 62%; }
.case-compare figcaption { margin-top: 14px; display: grid; gap: 2px; color: var(--muted); }
.case-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.case-logos div { aspect-ratio: 3 / 2; display: grid; place-items: center; }
.case-logos img { width: 50%; }
.case-logos img.case-mark { width: 40%; }
.case-logos .kicker { margin-top: 10px; }
.case-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); }
.case-swatches li { aspect-ratio: 1; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.case-swatches li:last-child { outline: 1px solid var(--rule); outline-offset: -1px; }
.case-swatches strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.case-swatches span { font-size: .78rem; letter-spacing: .08em; }
.case-guide { background: var(--ink); color: var(--paper); }
.case-guide .section-intro { color: rgba(250, 248, 244, .72); }
.case-guide .kicker { color: rgba(250, 248, 244, .6); }
.case-guide h2 em { color: #e56aa8; }
.case-pages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.case-pages img { width: 100%; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); }
.case-pages .kicker { margin-top: 12px; }
.case-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.case-social img { width: 100%; }
.case-social-tall { grid-row: span 2; }
@media (max-width: 1000px) {
  .case-pages, .case-pages-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .case-compare, .case-logos, .case-type { grid-template-columns: 1fr; }
  .case-hero-photo { aspect-ratio: 4 / 3; }
  .case-social { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-social-tall { grid-row: auto; }
  .case-hero-panel { aspect-ratio: 4 / 3; }
  .case-hero-panel img { width: 60%; }
}

/* Images straight after a numbered list need room to breathe */
.included + .case-apps, .included + .case-compare, .included + .plate-wide, .included + .case-social, .included + .case-logos, .included + .case-pages { margin-top: clamp(48px, 6vw, 88px); }
.case-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px); }
.case-app { margin: 0; }
.case-app-wide { grid-column: 1 / -1; }
.case-app .plate { aspect-ratio: 4 / 3; }
.case-app-wide .plate { aspect-ratio: 16 / 9; }
.case-app figcaption { margin-top: 12px; display: grid; gap: 2px; color: var(--muted); }
@media (max-width: 620px) { .case-apps { grid-template-columns: 1fr; } .case-app-wide .plate { aspect-ratio: 4 / 3; } }

/* Phone mockup: a CSS frame around an app screenshot (the one place corners are rounded) */
.device { --w: 240px; width: var(--w); flex: 0 0 auto; aspect-ratio: 1320 / 2868; padding: calc(var(--w) * .035); background: #151413; border-radius: calc(var(--w) * .16); box-shadow: 0 0 0 1px #3a3734 inset, 0 30px 60px -24px rgba(27, 25, 23, .45); position: relative; }
.device::after { content: ""; position: absolute; top: calc(var(--w) * .055); left: 50%; width: 30%; height: calc(var(--w) * .075); transform: translateX(-50%); background: #151413; border-radius: 99px; }
.device-screen { width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--w) * .13); background: #f2e9e2; }
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* Laptop mockup: proportions of a 13-14" notebook seen straight on (16:10 screen, thin bezels, slim base) */
.laptop { width: 100%; }
.laptop-lid { position: relative; margin: 0 6%; padding: 2.4% 2.4% 3%; background: #1d1c1b; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 1px #4a4744 inset; }
.laptop-lid::before { content: ""; position: absolute; top: 1%; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #3a3a3a; }
.laptop-screen { aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-radius: 3px; }
.laptop-screen img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.laptop-base { position: relative; padding-top: 2.6%; background: linear-gradient(#e2dfdb 0%, #c9c5c0 55%, #a9a5a0 100%); border-radius: 2px 2px 40% 40% / 2px 2px 100% 100%; box-shadow: 0 18px 30px -18px rgba(27, 25, 23, .55); }
.laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 38%; transform: translateX(-50%); background: #b3afaa; border-radius: 0 0 6px 6px; }
a:hover .laptop-screen img { transform: scale(1.02); }

.app-hero-panel.web-hero-panel { align-items: center; height: auto; padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 7vw, 104px); background: #f1ede5; }
.app-hero-panel.web-hero-panel .laptop { width: min(76%, 880px); }

.sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(56px, 7vw, 104px) clamp(32px, 5vw, 80px); }
.site { display: grid; gap: 10px; justify-items: start; }
.site > a:first-child { display: block; width: 100%; margin-bottom: 18px; }
.sites > .site:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - clamp(16px, 2.5vw, 40px)); justify-self: center; }
.site p:not(.kicker) { color: var(--muted); max-width: 32em; }
.site .text-link { text-transform: none; letter-spacing: .02em; font-size: .88rem; }
@media (max-width: 760px) { .sites { grid-template-columns: 1fr; } .sites > .site:last-child:nth-child(odd) { width: auto; } .app-hero-panel.web-hero-panel .laptop { width: 86%; } }

.app-hero { margin-top: clamp(40px, 5vw, 72px); }
.feed-hero { margin-top: clamp(40px, 5vw, 72px); }
.feed-hero-panel { list-style: none; margin: 0; background: #f1ede5; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); padding: clamp(48px, 7vw, 104px) clamp(20px, 4vw, 64px); }
.feed-hero-panel li { aspect-ratio: 1; display: grid; place-items: center; padding: 18%; background: var(--paper); box-shadow: 0 18px 40px -26px rgba(27, 25, 23, .4); }
.feed-hero-panel li:nth-child(even) { transform: translateY(clamp(16px, 2.4vw, 36px)); }
.feed-hero-panel img { display: block; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: brightness(0); opacity: .85; }
.feed-hero figcaption { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); }
@media (max-width: 760px) {
  .feed-hero-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 40px 20px; }
  .feed-hero-panel li { aspect-ratio: 3 / 2; min-height: 0; padding: 0 14%; }
  .feed-hero-panel img { max-height: 50px; width: auto !important; max-width: 100%; }
  .feed-hero-panel li:nth-child(even) { transform: none; }
  .feed-hero-panel li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }
}
.app-hero-panel { background: #f2e9e2; display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3vw, 48px); padding: clamp(40px, 6vw, 88px) 20px 0; overflow: hidden; height: clamp(360px, 46vw, 620px); }
.app-hero-panel .device-main { --w: clamp(190px, 21vw, 300px); margin-bottom: calc(var(--w) * -.55); }
.app-hero-panel .device-side { --w: clamp(150px, 17vw, 250px); margin-bottom: calc(var(--w) * -.95); }
.app-hero figcaption { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); }

.app-case { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.app-case-copy { display: grid; gap: 18px; justify-items: start; }
.app-case-logo { width: 150px; }
.app-case-copy > p:not(.kicker):not(.masthead-actions) { color: var(--muted); }
.app-case-points { display: grid; gap: 8px; }
.app-case-points li { padding-left: 20px; position: relative; }
.app-case-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; border-top: 1px solid var(--accent); }
.app-screens { display: flex; gap: clamp(14px, 1.8vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 28px; scrollbar-width: none; }
.app-screens::-webkit-scrollbar { display: none; }
.app-screens li { scroll-snap-align: start; display: grid; gap: 12px; justify-items: center; }
.app-screens .device { --w: clamp(170px, 15vw, 220px); }
@media (max-width: 1000px) { .app-case { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .app-hero-panel .device-side { display: none; }
  .app-hero-panel { height: 440px; }
  .app-hero-panel .device-main { --w: 220px; margin-bottom: -150px; }
  .app-screens { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .app-screens .device { --w: 200px; }
}

/* Branding page: case study showcase */
.brandcase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(28px, 5vw, 72px); align-items: center; }
.brandcase + .brandcase { margin-top: clamp(64px, 8vw, 120px); padding-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--rule); }
.brandcase-main { display: block; }
.brandcase-panel { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: #151e32; }
.brandcase-panel img { width: 42%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.brandcase-panel { position: relative; }
.brandcase-panel img.brandcase-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brandcase-main:hover img { transform: scale(1.03); }
.brandcase-copy { display: grid; gap: 14px; justify-items: start; }
.brandcase-copy h3 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; }
.brandcase-copy h3 a { text-decoration: none; }
.brandcase-copy h3 a:hover { color: var(--accent); }
.brandcase-copy p:not(.kicker) { color: var(--muted); max-width: 30em; }
.brandcase-parts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.brandcase-parts .plate { aspect-ratio: 4 / 3; }
.brandcase-parts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brandcase-parts .kicker { margin-top: 10px; }
@media (max-width: 1000px) { .brandcase { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .brandcase-parts { grid-template-columns: 1fr 1fr; } .brandcase-parts li:last-child { display: none; } }

/* Instant website estimate */
.estimate { padding-top: clamp(40px, 5vw, 72px); }
.est-msg { margin-bottom: 32px; }
.est { max-width: 1040px; }
.est-progress { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: clamp(36px, 5vw, 56px); padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.est-progress li { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.est-progress span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--rule); font-family: var(--serif); font-size: 1rem; font-style: italic; letter-spacing: 0; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.est-progress li.is-current { color: var(--ink); }
.est-progress li.is-current span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.est-progress li.is-done span { border-color: var(--accent); color: var(--accent); }
.est-step { display: grid; gap: 24px; }
.est-step[hidden] { display: none; }
.est-step legend { padding: 0; margin-bottom: 8px; }
.est-step legend h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.js .est-step h2 em { opacity: 1; transform: none; }
.est-nav [hidden] { display: none !important; }
.est-step legend { margin-bottom: 18px; }
.est-q { font-weight: 600; margin-top: 8px; }
.est-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.est-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.est-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.est-tiles[hidden], .est-tile[hidden], .est-care > div[hidden] { display: none; }
.est-tile { position: relative; cursor: pointer; }
.est-tile input { position: absolute; opacity: 0; }
.est-tile-body { height: 100%; display: grid; gap: 6px; align-content: start; padding: 20px 20px 18px; border: 1px solid var(--rule); background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.est-tile-body strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.15; }
.est-tile-body small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.est-price { font-style: normal; font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: auto; padding-top: 6px; }
.est-tile:hover .est-tile-body { border-color: var(--ink); }
.est-tile input:checked + .est-tile-body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--tint); }
.est-tile input:checked + .est-tile-body::after { content: "✓"; position: absolute; top: 14px; right: 16px; font-weight: 600; }
.est-tile input:focus-visible + .est-tile-body { outline: 2px solid var(--ink); outline-offset: 3px; }
.est-care > div { display: grid; gap: 4px; padding: 20px; background: var(--tint); }
.est-care strong { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.est-care small { color: var(--muted); }
.est .cf-turnstile { margin-top: 24px; }
.est-nav { display: flex; align-items: center; gap: 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); }
.est-nav .est-next { margin-left: auto; }
.est-nav .est-restart { margin-left: auto; }
.est-nav button.text-link { background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font-family: inherit; color: var(--ink); }
.est-back::after, .est-restart::after { content: none !important; }
.est-back::before { content: "← "; }
.est-error { color: var(--accent); font-weight: 600; }
.est-result { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.est-result legend { grid-column: 1 / -1; }
.est-big { font-family: var(--serif); font-size: clamp(4rem, 10vw, 7.5rem); line-height: .95; letter-spacing: -.02em; margin-top: 10px; }
.est-sub { color: var(--muted); font-size: 1.05rem; margin-top: 10px; max-width: 32em; }
.est-lines { margin-top: 28px; border-top: 1px solid var(--ink); }
.est-lines li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.est-lines strong { font-weight: 600; white-space: nowrap; }
.est-note { margin-top: 18px; font-size: .88rem; color: var(--muted); }
.est-send { display: grid; gap: 20px; padding: clamp(24px, 3vw, 36px); background: var(--tint); }
.est-send h3 { font-size: 1.8rem; }
.est-send .btn { justify-self: start; }
@media (max-width: 860px) {
  .est-tiles-3, .est-tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .est-result { grid-template-columns: 1fr; }
  .est-progress li:not(.is-current) { font-size: 0; gap: 0; }
}
@media (max-width: 560px) {
  .est-tiles, .est-tiles-3, .est-tiles-4 { grid-template-columns: 1fr; }
  .est-nav .btn { flex: 1; }
}

/* Ordinary pages */
.page-title { padding-block: clamp(56px, 8vw, 112px) 0; }
.page-title h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
.prose { max-width: calc(720px + var(--gutter) * 2); }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; list-style: revert; }
.prose a { text-underline-offset: 4px; }
.prose a:hover { color: var(--accent); }

/* Headline accent words arrive a beat after their headline; the homepage one then cycles through its words */
.js h1 em, .js h2 em { display: inline-block; opacity: 0; transform: translateY(.22em); transition: opacity .6s ease .35s, transform .6s cubic-bezier(.2, .7, .2, 1) .35s; }
.js .lit em { opacity: 1; transform: none; }
.js .lit em.rotate { white-space: nowrap; transition: opacity .32s ease, transform .32s ease, width .7s cubic-bezier(.65, 0, .35, 1); }
.js .lit em.rotate.swap { opacity: 0; transform: translateY(-.22em); }
.js .masthead .plate-wide img { animation: settle 1.1s cubic-bezier(.2, .7, .2, 1) .15s both; }
@keyframes settle { from { opacity: 0; transform: translateY(24px); } }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .section-head { grid-template-columns: 1fr; }
  .section-intro { grid-column: 1; }
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posts-wall { columns: 2; }
  .posts-row, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .contact-inner, .faq-wrap { grid-template-columns: 1fr; }
  .masthead-foot { grid-template-columns: 1fr; }
  .plate-wide img { aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; font: inherit; font-weight: 600; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: none; border: 0; padding: 12px 0; cursor: pointer; }
  .nav-toggle[aria-expanded="true"] { color: var(--accent); }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - var(--header)); overflow-y: auto; background: var(--paper); border-bottom: 1px solid var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 32px; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: flex; }
  button.nav-link { display: none; }
  .services-menu, .services-menu.open { display: block; position: static; border: 0; box-shadow: none; }
  .services-menu ul { grid-template-columns: 1fr; padding: 0; }
  .services-menu ul.wrap { padding-inline: 0; }
  .services-menu a { padding: 14px 0; }
  .services-menu span { display: none; }
  a.nav-link { padding: 20px 0 0; }
}
@media (max-width: 620px) {
  .clients, .posts-row, .steps, .field-row, .included, .footer-inner { grid-template-columns: 1fr; }
  .included li:nth-child(2) { border-top-color: var(--rule); }
  .posts-wall { columns: 1; }
  .plate-wide img { aspect-ratio: 4 / 3; }
  .masthead-actions .btn, .contact-form .btn { flex: 1 1 100%; justify-self: stretch; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .plate img, .btn { transition: none; }
  .js h1 em, .js h2 em { opacity: 1; transform: none; transition: none; }
  .js .masthead .plate-wide img { animation: none; }
}
