/* ==========================================================================
   INITME: WORDPRESS ADDITIONS
   Only what WordPress needs on top of the original design: admin bar offset,
   link-based filters/pagination, Contact Form 7 skin, search/404, single pages.
   ========================================================================== */

/* Admin bar: header is position:fixed */
.admin-bar .site-header { top: 32px; }
.admin-bar .menu-overlay { padding-top: calc(var(--header-h) + 56px); }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Custom logo (Appearance → Customize → Site Identity): fixed display height, any upload size */
.logo { align-items: center; }
.logo__img { height: 44px; width: auto; max-width: none; display: block; transition: height var(--dur-base) var(--ease-editorial); }
.site-header.is-scrolled .logo__img { height: 38px; }
@media (max-width: 640px) { .logo__img, .site-header.is-scrolled .logo__img { height: 34px; } }
/* Black logo → white while the full-screen menu (black) is open. Works for transparent logos. */
body.menu-open .logo__img { filter: brightness(0) invert(1); }

/* ---------- Services mega menu (desktop) ---------- */
.site-header .header-inner, .site-header nav, .nav-list { height: 100%; }
.nav-list > li { display: flex; align-items: center; height: 100%; }
.nav-list > li.has-mega { gap: 2px; }
.mega-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: inherit; }
.mega-toggle svg { width: 10px; height: 6px; transition: transform var(--dur-base) var(--ease-editorial); }
.has-mega.is-open .mega-toggle svg { transform: rotate(180deg); }
.site-header:has(.has-mega.is-open), .site-header:has(.has-mega:hover) { background: var(--white); border-bottom-color: var(--light-gray); }
.mega { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); color: var(--black); border-top: 1px solid var(--light-gray); border-bottom: 1px solid var(--black); padding-block: var(--space-7) var(--space-6);
  visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-editorial), transform var(--dur-base) var(--ease-editorial), visibility 0s linear var(--dur-base); }
.has-mega:hover > .mega, .has-mega.is-open > .mega { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
.mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7) var(--grid-gap); }
.mega__col { display: grid; gap: var(--space-4); align-content: start; border-top: 1px solid var(--black); padding-top: var(--space-4); }
.mega__title { display: flex; align-items: baseline; gap: var(--space-3); font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 1.8vw, 28px); letter-spacing: -.04em; line-height: 1; text-transform: uppercase; }
.mega__title .num { color: var(--text-muted); font-size: 12px; letter-spacing: .02em; }
.mega__title:hover, .mega__title:focus-visible { color: var(--accent-orange); }
.mega__col ul { display: grid; gap: 6px; }
.mega__col li a { font-size: 14px; color: var(--text-muted); background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size var(--dur-base) var(--ease-editorial), color var(--dur-fast); padding-bottom: 1px; }
.mega__col li a:hover, .mega__col li a:focus-visible { color: var(--black); background-size: 100% 1px; }
.mega__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--light-gray); font-size: 14px; }
.mega__foot .muted a { color: var(--black); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1280px) { .mega__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .mega__title { font-size: 20px; } }
@media (max-width: 1024px) { .mega, .mega-toggle { display: none; } }

/* Menu rendered by wp_nav_menu(): CTA item */
.nav-list .menu-item > a.btn { display: inline-flex; }

/* Filters rendered as links (progressively enhanced by work.js) */
a.filter-btn.is-active, a.filter-btn[aria-current="true"] { background: var(--black); color: var(--white); }

/* Pagination rendered as links */
.pagination a, .pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 1px solid var(--black); border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; padding-inline: 14px; transition: background var(--dur-base), color var(--dur-base); }
.pagination a:hover { background: var(--light-gray); }
.pagination span.current, .pagination span[aria-current="page"] { background: var(--black); color: var(--white); }
.pagination span.is-disabled { opacity: .35; cursor: not-allowed; }
.pagination span.dots { border-color: transparent; }

/* Blog search form (works without JS) */
.search button[type="submit"] { display: none; }
.search input[type="search"]::-webkit-search-cancel-button { appearance: none; }
.toolbar .search { margin-left: auto; }

/* Single service uses H1 where the services page used H2 */
.svc-detail__head h1 { font-family: var(--font-display); font-weight: 650; font-size: clamp(48px, 6.4vw, 104px); line-height: .9; letter-spacing: -.05em; text-transform: uppercase; }
.svc-detail__more { margin-top: var(--space-5); }
.svc-detail__visual .media > img { position: absolute; inset: 0; }
.crumbs-bar { padding-top: calc(var(--header-h) + clamp(24px, 3vw, 48px)); }
.crumbs-bar .crumbs { display: flex; flex-wrap: wrap; gap: var(--space-3); color: var(--text-muted); }
.crumbs-bar .crumbs a:hover { color: var(--black); }
.svc-detail.is-single { border-top: 0; padding-top: clamp(32px, 4vw, 64px); }
.svc-intro .h2 { text-transform: uppercase; }
.svc-intro .prose { display: grid; gap: var(--space-5); max-width: 34em; }
.svc-intro .tag-list { margin-top: var(--space-6); }

/* Case study page */
.case-hero .display { font-size: clamp(56px, 8vw, 132px); }
.case-grid { margin-top: clamp(40px, 5vw, 72px); display: grid; gap: clamp(32px, 4vw, 56px); }
.case-grid .panel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-panel-tpl { display: none; }

/* Related-work and related-insight sections on service pages */
.related-head { margin-bottom: clamp(32px, 4vw, 56px); }

/* Generic WordPress content */
.prose-article .alignwide, .prose-article .alignfull { max-width: 100%; }
.prose-article img { height: auto; }
.prose-article figure.wp-block-image, .prose-article .wp-caption { max-width: 100%; }
.prose-article .wp-element-caption, .prose-article .wp-caption-text { font-size: 13px; color: var(--text-muted); margin-top: var(--space-3); }
.prose-article hr { border: 0; border-top: 1px solid var(--black); }
.prose-article table { width: 100%; border-collapse: collapse; font-size: .9em; }
.prose-article th, .prose-article td { border-bottom: 1px solid var(--light-gray); padding: 10px 8px; text-align: left; }
.prose-article blockquote:not(.pull) { font-family: var(--font-display); font-weight: 600; font-size: 1.4em; line-height: 1.1; letter-spacing: -.03em; border-left: 3px solid var(--accent-orange); padding-left: var(--space-5); }
.prose-article .placeholder-note { font-size: 12px; }
.prose-article h2:first-child { margin-top: 0; }
.page-prose { grid-column: 1 / span 8; font-size: 17px; }

/* Search results / 404 */
.result-type { background: var(--black); color: var(--white); padding: 4px 10px; border-radius: var(--radius-pill); }
.not-found__code { font-size: clamp(120px, 24vw, 420px); line-height: .8; }
@media (max-width: 360px) { .svc-detail__head h1, .svc-detail__head h2 { font-size: 40px; } }
.not-found__links { margin-top: var(--space-7); }
.not-found .btn-row { margin-top: var(--space-6); }

/* ---------- Contact Form 7 skin (matches the original .form) ---------- */
.wpcf7 { width: 100%; }
.wpcf7 form.wpcf7-form { display: grid; gap: var(--space-6); margin: 0; }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 .form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--grid-gap); }
.wpcf7 .field { display: grid; gap: var(--space-2); }
.wpcf7 .field label { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.wpcf7 .field label .req { color: var(--accent-orange); }
.wpcf7 .field input[type="text"], .wpcf7 .field input[type="email"], .wpcf7 .field input[type="tel"], .wpcf7 .field input[type="url"], .wpcf7 .field select, .wpcf7 .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--black); border-radius: 0; background-color: transparent; padding: 10px 0; font-size: 18px; outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast); appearance: none; -webkit-appearance: none; box-shadow: none; }
.wpcf7 .field select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 28px; }
.wpcf7 .field textarea { resize: vertical; min-height: 140px; height: 140px; }
.wpcf7 .field input:focus, .wpcf7 .field select:focus, .wpcf7 .field textarea:focus { border-bottom-color: var(--accent-blue); box-shadow: 0 1px 0 var(--accent-blue); }
.wpcf7 .wpcf7-not-valid { border-bottom-color: #c2260c !important; }
.wpcf7 .wpcf7-not-valid-tip { display: block; color: #c2260c; font-size: 13px; margin-top: var(--space-2); }
.wpcf7 .form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.wpcf7 .btn--cf7 { position: relative; padding: 0; gap: 0; }
.wpcf7 .btn--cf7 input[type="submit"] { all: unset; box-sizing: border-box; cursor: pointer; padding: 14px 0 14px 24px; font: inherit; font-size: 13px; font-weight: 500; line-height: 1; text-transform: uppercase; letter-spacing: .06em; }
.wpcf7 .btn--cf7 .arrow { padding: 14px 24px 14px var(--space-3); pointer-events: none; }
.wpcf7 .btn--cf7 .wpcf7-spinner { position: absolute; right: 12px; top: 50%; margin: -12px 0 0; background-color: var(--white); }
.wpcf7 .btn--cf7:focus-within { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.wpcf7 .btn--cf7 input[type="submit"]:focus-visible { outline: none; }
.wpcf7 form.submitting .btn--cf7 { opacity: .6; cursor: progress; }
.wpcf7 .wpcf7-spinner { margin: 0 0 0 var(--space-3); }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: var(--space-4); border: 1px solid var(--black); font-size: 14px; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--black); background: var(--accent-yellow); font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border-color: #c2260c; color: #c2260c; }
.wpcf7 .screen-reader-response { position: absolute; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; }
.form-note { color: var(--text-muted); font-size: 12px; max-width: 28em; }
@media (max-width: 768px) { .wpcf7 .form__row, .case-grid .panel__grid { grid-template-columns: 1fr; } }

/* Contact Form 7 consent checkbox */
.wpcf7 .field--consent { font-size: 14px; color: var(--text-muted); }
.wpcf7 .field--consent label { display: flex; align-items: flex-start; gap: var(--space-3); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.wpcf7 .field--consent input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--black); }
.wpcf7 .field--consent a { text-decoration: underline; text-underline-offset: 3px; color: var(--black); }
.wpcf7 .field--consent .wpcf7-list-item { margin: 0; }
