/*
Theme Name: Inquire Engineering
Theme URI: https://inqeng.com
Author: Inquire Engineering
Description: A precise, editorial block theme for engineering and technical consulting firms. Expert-level credibility: strong typographic hierarchy, hairline rules, deep blue and signal yellow. Full Site Editing — every section is editable in the WordPress editor.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.5.14
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inquire-engineering
Tags: business, portfolio, blog, full-site-editing, block-patterns, custom-colors, custom-logo, editor-style, one-column, two-columns, wide-blocks
*/

/* Block themes get their styling from theme.json. These are the few things it can't express. */

body { -webkit-font-smoothing: antialiased; }

.wp-site-blocks a:focus-visible,
.wp-site-blocks button:focus-visible { outline: 2px solid #F7BD21; outline-offset: 3px; }

/* Hairline grid used behind the hero */
.ie-grid-bg { position: relative; }
.ie-grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#D9DCE4 1px, transparent 1px), linear-gradient(90deg, #D9DCE4 1px, transparent 1px);
  background-size: 72px 72px; opacity: .4;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 78%);
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}
.ie-grid-bg > * { position: relative; }

/* Eyebrow label */
.ie-eyebrow { font-size: .8rem !important; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 0 !important; }

/* Hairline card grid (1px gap over a line-colored backdrop) */
.ie-hairline { background: #D9DCE4; border: 1px solid #D9DCE4; gap: 1px !important; }
.ie-hairline > .wp-block-column,
.ie-hairline > .wp-block-group { background: #fff; }

/* Vertical rule between spec-strip items */
.ie-specstrip > .wp-block-column { border-right: 1px solid rgba(255,255,255,.16); padding-right: 28px; }
.ie-specstrip > .wp-block-column:last-child { border-right: none; }

/* ---- Home hero ---- */
.ie-hero { background: linear-gradient(180deg,#F4F5F7 0%,#E9EBF1 100%); border-bottom: 1px solid #D9DCE4; padding: 104px 0 92px; position: relative; }
.ie-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#D9DCE4 1px, transparent 1px), linear-gradient(90deg, #D9DCE4 1px, transparent 1px);
  background-size: 72px 72px; opacity: .4;
  -webkit-mask-image: linear-gradient(180deg,#000,transparent 78%);
  mask-image: linear-gradient(180deg,#000,transparent 78%);
}
.ie-hero > * { position: relative; }
.ie-hero__inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 72px; align-items: end; }
.ie-hero__kicker { display: inline-block; }
.ie-hero__title { font-size: clamp(2.4rem,4.4vw,3.65rem) !important; line-height: 1.05; letter-spacing: -.025em; margin: 28px 0 26px !important; }
.ie-hero__lede { font-size: 1.2rem; color: #5B6172; max-width: 600px; margin: 0 0 38px !important; }
.ie-hero__media { margin: 0; }
.ie-hero__media img { width: 100%; height: 400px; object-fit: cover; object-position: center 45%; }
.ie-btn-ghost .wp-block-button__link { background: transparent !important; color: #0B0F1A !important; border: 1px solid #0B0F1A !important; }
.ie-btn-ghost .wp-block-button__link:hover { border-color: #11359D !important; color: #11359D !important; }
@media (max-width: 900px) {
  .ie-hero { padding: 64px 0 56px; }
  .ie-hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .ie-hero__media img { height: 260px; }
}

/* Hero image: bundled default until the client swaps in their own shot.
   The cover block's own url attribute wins as soon as one is chosen in the editor. */
.ie-hero-img { position: relative; }
.ie-hero-img .wp-block-cover { min-height: 400px; }
.ie-hero-img .wp-block-cover:not(.has-custom-content-position) .wp-block-cover__background {
  background-image: url("assets/hero.jpg");
  background-size: cover;
  background-position: center 45%;
}
.ie-hero-img .wp-block-cover:has(img.wp-block-cover__image-background) .wp-block-cover__background { background-image: none; }
.ie-hero-img img { height: 400px; object-fit: cover; object-position: center 45%; width: 100%; }

/* ---- Page furniture (layout lives here, not in block attributes) ---- */
.ie-page-head { background: #fff; border-bottom: 1px solid #D9DCE4; padding: 80px 0 68px; }
.ie-page-title { font-size: clamp(2.1rem, 3.6vw, 3rem) !important; letter-spacing: -.025em; line-height: 1.08; margin: 16px 0 20px !important; max-width: 840px; }
.ie-lede { font-size: 1.16rem; color: #5B6172; max-width: 640px; margin: 0 !important; }
.ie-eyebrow--accent { color: #F7BD21 !important; }

.ie-section { padding: 24px 0 80px; }
.ie-section--white { background: #fff; padding: 80px 0; }
.ie-section--ruled { border-top: 1px solid #D9DCE4; }

/* Services */
.ie-svc-block { display: grid; grid-template-columns: 320px 1fr; gap: 64px; padding: 56px 0; border-bottom: 1px solid #D9DCE4; }
.ie-svc-block__h { font-size: 1.52rem !important; margin: 0 0 12px !important; }
.ie-svc-block__intro { color: #5B6172; font-size: 1rem; margin: 0 0 26px !important; }
.ie-svc-media { margin: 0; }
.ie-svc-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #0B0F1A; }
.ie-svc-block__items { display: flex; flex-direction: column; }
.ie-svc-item { display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: start; padding: 22px 0; border-bottom: 1px solid #E4E7EE; }
.ie-svc-item__h { font-size: 1.12rem !important; margin: 0 0 7px !important; }
.ie-svc-item__p { color: #5B6172; font-size: 1rem; margin: 0 !important; }
.ie-svc-item__meta { font-size: .72rem; color: #8A90A0; line-height: 1.7; margin: 3px 0 0 !important; }

/* The Firm */
.ie-member { display: grid; grid-template-columns: 260px 1fr 280px; gap: 44px; background: #fff; border: 1px solid #D9DCE4; padding: 40px; margin-bottom: 1px; }
.ie-member__photo { margin: 0; }
.ie-member__photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #0B0F1A; }
.ie-member__name { font-size: 1.5rem !important; margin: 0 0 4px !important; }
.ie-member__body .ie-eyebrow { margin-bottom: 18px !important; }
.ie-member__bio { color: #3A4052; margin: 0 0 14px !important; }
.ie-member__bio2 { color: #5B6172; font-size: .94rem; margin: 0 !important; }
.ie-member__creds { border-left: 1px solid #E4E7EE; padding-left: 28px; }
.ie-cred__k { font-size: .64rem !important; letter-spacing: .12em; text-transform: uppercase; color: #8A90A0; margin: 0 0 3px !important; }
.ie-cred__v { font-size: .9rem; line-height: 1.4; margin: 0 0 16px !important; }

.ie-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; }
.ie-principles { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.ie-principle { border-top: 2px solid #F7BD21; padding-top: 18px; }
.ie-principle__h { font-size: 1.08rem !important; margin: 0 0 8px !important; }
.ie-principle__p { color: #5B6172; font-size: .94rem; margin: 0 !important; }

/* Contact */
.ie-contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: start; }
.ie-contact__info .ie-eyebrow { margin: 0 0 7px !important; }
.ie-contact__v { font-size: 1.08rem; line-height: 1.5; margin: 0 0 30px !important; }
.ie-note { background: #fff; border: 1px solid #D9DCE4; border-left: 2px solid #F7BD21; padding: 18px; font-size: .88rem; color: #5B6172; }
.ie-note p { margin: 0; font-size: .88rem; }
.ie-formcard { background: #fff; border: 1px solid #D9DCE4; padding: 44px; }

@media (max-width: 900px) {
  .ie-svc-block, .ie-svc-item, .ie-member, .ie-split, .ie-principles, .ie-contact { grid-template-columns: 1fr; gap: 28px; }
  .ie-svc-media img { max-width: 340px; }
  .ie-member__creds { border-left: 0; border-top: 1px solid #E4E7EE; padding-left: 0; padding-top: 24px; }
  .ie-member__photo img { max-width: 220px; }
}

/* Coming soon holding page */
.ie-coming-soon { padding: 80px 40px; text-align: center; }
.ie-coming-soon .wp-block-cover__inner-container { max-width: 720px; }
.ie-coming-soon__rule { width: 60px; height: 3px; border: 0; opacity: 1; }
.ie-coming-soon a { color: #fff; text-decoration: none; }
.ie-coming-soon a:hover { color: #F7BD21; }

/* Post cards */
.ie-postcard { background: #fff; padding: 32px; min-height: 230px; display: flex; flex-direction: column; gap: 14px; }
.ie-postcard:hover { background: #FBFBFD; }

/* Service rows */
.ie-rule-top { border-top: 2px solid #F7BD21; padding-top: 18px; }
.ie-rule-bottom { border-bottom: 1px solid #E4E7EE; padding-bottom: 22px; }

/* Service-block photos: never larger than the copy they sit beside once columns stack */
@media (max-width: 781px) {
  .ie-service-media img,
  .ie-service-media .wp-block-image { max-width: 340px; }
}

@media (max-width: 781px) {
  .ie-specstrip > .wp-block-column { border-right: none; border-top: 1px solid rgba(255,255,255,.16); padding-top: 20px; }
  .ie-hero-img img,
  .ie-hero-img .wp-block-cover { height: 260px; min-height: 260px; }
}

/* ---- Header ---- */
.ie-header .wp-block-site-logo img { height: auto; }
.ie-header .wp-block-navigation-item > a { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.ie-header .wp-block-navigation-item.current-menu-item > a,
.ie-header .wp-block-navigation-item.current_page_item > a,
.ie-header .wp-block-navigation-item.current-menu-ancestor > a { border-bottom-color: #F7BD21; color: #0B0F1A; }

/* ---- Insights ---- */
/* The post template is a <ul>; the white card must fill its <li> or the
   backdrop shows through as a gray band under short cards. */
.ie-hairline > li { background: #fff; display: flex; }
.ie-hairline > li > .ie-postcard { width: 100%; }

.ie-cats, .wp-block-categories-list { list-style: none; margin: 0 0 28px !important; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ie-cats li a, .wp-block-categories-list li a { display: inline-block; background: #fff; border: 1px solid #D9DCE4; padding: 6px 14px; font-size: .82rem; color: #0B0F1A; }
.ie-cats li a:hover, .wp-block-categories-list li a:hover { border-color: #11359D; color: #11359D; }

/* ---- Footer ---- */
.ie-footer-contact { overflow-wrap: normal; word-break: keep-all; }

/* ---- Contact form ---- */
.ie-form .grunion-field-wrap { margin-bottom: 18px; }
.ie-form label, .ie-form .grunion-field-label { font-size: .78rem !important; letter-spacing: .12em; text-transform: uppercase; color: #5B6172; font-weight: 500 !important; }
.ie-form input[type="text"], .ie-form input[type="email"], .ie-form input[type="tel"],
.ie-form select, .ie-form textarea {
  width: 100%; border: 1px solid #D9DCE4; border-radius: 2px; background: #fff;
  padding: 12px 14px; font-family: inherit; font-size: 1rem; color: #0B0F1A;
}
.ie-form input:focus, .ie-form select:focus, .ie-form textarea:focus { border-color: #11359D; outline: none; }
.ie-form textarea { min-height: 130px; }

/* Footer social icons (empty until the company pages exist) */
.ie-social { margin-bottom: 0 !important; }
.ie-social .wp-social-link { padding: 0; }
.ie-social .wp-social-link a { padding: 0; }
.ie-social svg { width: 22px; height: 22px; }
.ie-social .wp-social-link:hover { transform: none; opacity: 1; }
.ie-social .wp-social-link:hover svg { fill: #F7BD21; }

/* ---- One rail for the whole site --------------------------------------
   Root padding is off in theme.json; every section's content row carries
   .ie-rail instead, so the header, hero and every page body share an edge. */
.wp-site-blocks .ie-rail { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 40px; box-sizing: border-box; }
@media (max-width: 640px) { .wp-site-blocks .ie-rail { padding-inline: 24px; } }

/* Page headers wear the same drafting grid as the home hero, full width */
.ie-page-head { background: linear-gradient(180deg,#F4F5F7 0%,#E9EBF1 100%); border-bottom: 1px solid #D9DCE4; padding: 84px 0 72px; position: relative; overflow: hidden; }
.ie-page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#D9DCE4 1px, transparent 1px), linear-gradient(90deg, #D9DCE4 1px, transparent 1px);
  background-size: 72px 72px; opacity: .4;
  -webkit-mask-image: linear-gradient(180deg,#000,transparent 82%);
  mask-image: linear-gradient(180deg,#000,transparent 82%);
}
.ie-page-head > * { position: relative; }

/* ---- Insights ---- */
.ie-chiprow { align-items: center; }
.ie-chip { margin: 0 !important; }
.ie-chip a, .ie-cats li a { display: inline-block; background: #fff; border: 1px solid #D9DCE4; padding: 8px 16px; font-size: .84rem; font-weight: 500; color: #0B0F1A; }
.ie-chip a:hover, .ie-cats li a:hover { border-color: #11359D; color: #11359D; }
.ie-chip--active > a, li.ie-chip--active > a { background: #11359D !important; border-color: #11359D !important; color: #fff !important; }
.ie-chip--active > a:hover, li.ie-chip--active > a:hover { background: #0A2470 !important; border-color: #0A2470 !important; }

.ie-featlist { list-style: none; margin: 0; padding: 0; }
.ie-feature { background: #0B0F1A; color: #fff; padding: 56px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; overflow: hidden; }
.ie-feature > * { min-width: 0; }
.ie-feature__meta { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #F7BD21; }
.ie-feature__meta p, .ie-feature__meta .wp-block-post-date, .ie-feature__meta .wp-block-post-terms { margin: 0; font-size: .7rem; color: #F7BD21; }
.ie-feature__meta a { color: #F7BD21; }
.ie-feature__title { font-size: 2rem !important; line-height: 1.15; margin: 16px 0 14px !important; }
.ie-feature__title a { color: #fff; }
.ie-feature__title a:hover { color: #F7BD21; }
.ie-feature__x { color: #B4BAC8; font-size: 1.02rem; margin: 0 0 20px !important; max-width: 560px; }
.ie-feature__more a { color: #F7BD21; font-size: .88rem; font-weight: 600; }
.ie-feature__media { margin: 0; }
@media (max-width: 900px) { .ie-feature { grid-template-columns: 1fr; gap: 32px; padding: 36px; } .ie-feature__title { font-size: 1.5rem !important; } }

.ie-postcard__meta { font-size: .7rem; letter-spacing: .06em; color: #8A90A0; }
.ie-postcard__meta p, .ie-postcard__meta .wp-block-post-date, .ie-postcard__meta .wp-block-post-terms { margin: 0; font-size: .7rem; color: #8A90A0; }
.ie-postcard__meta a { color: #8A90A0; }
.ie-postcard__title { font-size: 1.2rem !important; line-height: 1.32; margin: 0 !important; }
.ie-postcard__x { color: #5B6172; font-size: .97rem; margin: 0 !important; }
.ie-postcard__more { margin: auto 0 0 !important; }
.ie-postcard__more a { font-size: .85rem; font-weight: 600; color: #11359D; }

/* Compact form: Jetpack lays the 50% fields out side by side */
.ie-form .wp-block-jetpack-field-name, .ie-form .wp-block-jetpack-field-text,
.ie-form .wp-block-jetpack-field-email, .ie-form .wp-block-jetpack-field-select { margin-bottom: 0; }
.ie-form ::placeholder { color: #9BA1B0; }

/* ---- Rail, belt and braces -------------------------------------------
   Also catches sections whose markup predates .ie-rail (e.g. a template
   the Site Editor saved before this version). */
.wp-site-blocks .ie-header > .wp-block-group,
.wp-site-blocks .ie-hero > .wp-block-group,
.wp-site-blocks .ie-page-head > .wp-block-group,
.wp-site-blocks .ie-section > .wp-block-group,
.wp-site-blocks .ie-section > .wp-block-columns,
.wp-site-blocks .ie-section > .wp-block-query,
.wp-site-blocks .ie-footer > .wp-block-columns,
.wp-site-blocks .ie-footer > .wp-block-group {
  width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 40px; box-sizing: border-box;
}
@media (max-width: 640px) {
  .wp-site-blocks .ie-header > .wp-block-group,
  .wp-site-blocks .ie-hero > .wp-block-group,
  .wp-site-blocks .ie-page-head > .wp-block-group,
  .wp-site-blocks .ie-section > .wp-block-group,
  .wp-site-blocks .ie-section > .wp-block-columns,
  .wp-site-blocks .ie-section > .wp-block-query { padding-inline: 24px; }
}
.ie-page-head, .ie-section, .ie-hero, .ie-header { width: 100%; }

/* Category chips share one baseline */
.ie-chiprow { align-items: center; row-gap: 10px; }
.ie-chiprow > * { margin: 0 !important; }
.ie-cats { list-style: none; margin: 0 !important; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ie-chip a, .ie-cats li a { display: block; line-height: 1.25; padding: 9px 16px; }

/* Card grid: rules on the cells, so a short last row leaves no gray ghost */
.ie-hairline { background: transparent !important; border: 0 !important; border-top: 1px solid #D9DCE4 !important; border-left: 1px solid #D9DCE4 !important; gap: 0 !important; }
.ie-hairline > li,
.ie-hairline > .wp-block-column,
.ie-hairline > .wp-block-group { background: #fff; border-right: 1px solid #D9DCE4; border-bottom: 1px solid #D9DCE4; }
.ie-hairline > li { display: flex; }

/* ---- Sticky header ---- */
.wp-site-blocks > header,
header.wp-block-template-part {
  position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 60;
}
.ie-header {
  background: rgba(244,245,247,0.93) !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ---- Insights search ---- */
.ie-chiprow { justify-content: space-between; }
.ie-chips { gap: 10px; }
.ie-chip a, .ie-cats li a { white-space: nowrap; }
.ie-search { position: relative; width: 100%; max-width: 320px; margin: 0 !important; }
.ie-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: #8A90A0; stroke-width: 2; pointer-events: none; }
.ie-search input {
  width: 100%; box-sizing: border-box; padding: 10px 14px 10px 38px;
  border: 1px solid #D9DCE4; border-radius: 2px; background: #fff;
  font-family: inherit; font-size: .86rem; color: #0B0F1A;
}
.ie-search input:focus { outline: none; border-color: #11359D; }
.ie-search input::-webkit-search-cancel-button { cursor: pointer; }
.ie-noresults { display: none; color: #5B6172; font-size: .95rem; margin: 0 0 28px; }
@media (max-width: 782px) { .ie-search { max-width: none; } }

/* Hero kicker keeps its accent rule */
.ie-hero__kicker::before {
  content: ""; display: inline-block; width: 28px; height: 2px;
  background: #F7BD21; margin-right: 14px; vertical-align: middle; position: relative; top: -1px;
}
/* Hero body sits on the same rail as everything else */
.ie-hero__inner { max-width: 1440px; margin-inline: auto; padding-inline: 40px; box-sizing: border-box; }
@media (max-width: 640px) { .ie-hero__inner { padding-inline: 24px; } }

/* Service rows: two columns now that the meta column is gone */
.ie-svc-item { grid-template-columns: 1fr; }
@media (max-width: 900px) { .ie-svc-item { grid-template-columns: 1fr; } }

/* Form placeholders stay clearly secondary */
.ie-form ::placeholder { color: #9BA1B0 !important; opacity: 1; }
.ie-form select:invalid, .ie-form select option[value=""] { color: #9BA1B0; }

/* Column card grids keep the single-backdrop treatment (they always fill the row);
   the post grid keeps per-cell rules, which is what stops ghost cells there. */
.wp-block-columns.ie-hairline { background: transparent !important; border: 0 !important; gap: 0 !important; }
.wp-block-columns.ie-hairline > .wp-block-column { background: #fff; border: 1px solid #D9DCE4 !important; }
.wp-block-columns.ie-hairline > .wp-block-column + .wp-block-column { margin-left: -1px; }
.wp-block-columns.ie-hairline + .wp-block-columns.ie-hairline { margin-top: -1px !important; }

/* Home insight cards carry a thumbnail */
.ie-postcard__thumb { margin: 0 0 4px !important; }

/* ---- Footer social ---- */
.ie-social { gap: 12px !important; }
.ie-social .wp-social-link { background: #1E2432 !important; border-radius: 4px; width: 38px; height: 38px; }
.ie-social .wp-social-link a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0; }
.ie-social .wp-social-link svg { width: 19px; height: 19px; fill: #fff; }
.ie-social .wp-social-link:hover { background: #F7BD21 !important; transform: none; }
.ie-social .wp-social-link:hover svg { fill: #0B0F1A; }

/* ---- Share this post ---- */
.ie-share {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  max-width: 720px; margin: 56px 0 0; padding: 24px 0 0; border-top: 1px solid #E4E7EE;
}
.ie-share__label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #0B0F1A; }
.ie-share__btns { display: flex; align-items: center; gap: 8px; }
.ie-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid #D9DCE4; border-radius: 3px;
  background: #fff; color: #5B6172; cursor: pointer; padding: 0;
}
.ie-share__btn svg { width: 17px; height: 17px; fill: currentColor; }
.ie-share__btn:hover { background: #11359D; border-color: #11359D; color: #fff; }
.ie-share__done { font-size: .8rem; color: #5B6172; }


/* ================= v2.4.0 — Clay's review ================= */

/* Practice stats (two now, and the caption reads at arm's length) */
.ie-stats { max-width: 560px; }
.ie-stat__k { font-size: .95rem !important; margin: 0 !important; line-height: 1.4; }

/* Home service cards: titles are links to the services page, styled as text */
.wp-block-columns.ie-hairline h3 a { color: inherit; text-decoration: none; }
.wp-block-columns.ie-hairline h3 a:hover { color: #11359D; }

/* Scope note — the "no physical testing" line */
.ie-scope-note {
  font-size: .84rem; line-height: 1.55; color: #8A90A0;
  border-top: 1px solid var(--wp--preset--color--line);
  padding-top: 14px; margin: 18px 0 0 !important;
}

/* Form intro line */
.ie-formcard__note { font-size: .95rem !important; }

/* Footer practice column: links, not a plain list */
.ie-footer-practice a { color: #B4BAC8; }
.ie-footer-practice a:hover { color: #F7BD21; }

/* ================= v2.4.0 — mobile pass ================= */

/* Sticky header: shorter bar, real tap targets */
@media (max-width: 900px) {
  .ie-header .ie-rail { padding-top: 12px !important; padding-bottom: 12px !important; }
  .ie-header .wp-block-site-logo img { width: 132px !important; }
  .ie-header .wp-block-button__link { padding: 12px 18px !important; font-size: .85rem !important; }
  .ie-header .wp-block-navigation__responsive-container-open,
  .ie-header .wp-block-navigation__responsive-container-close {
    min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a {
    padding-block: 10px; font-size: 1.15rem;
  }
}
@media (max-width: 600px) {
  /* The CTA duplicates the nav on a phone; the hamburger already has Contact */
  .ie-header .wp-block-buttons { display: none; }
}

/* Hero: headline tuned for a phone, image no longer letterboxed */
@media (max-width: 782px) {
  .ie-hero { padding: 48px 0 44px; }
  .ie-hero__title { font-size: clamp(2rem, 8.4vw, 2.6rem) !important; margin: 20px 0 18px !important; }
  .ie-hero__lede { font-size: 1.08rem; margin-bottom: 28px !important; }
  .ie-hero__kicker { font-size: .74rem !important; line-height: 1.5; }
  .ie-hero__kicker::before { width: 20px; margin-right: 10px; }
  .ie-hero__media img { height: 230px; }
  .ie-hero .wp-block-buttons { gap: 10px; }
  .ie-hero .wp-block-button { flex: 1 1 auto; }
  .ie-hero .wp-block-button__link { display: block; text-align: center; padding: 14px 20px !important; }
}

/* Page title sections: the drafting grid was eating half a phone screen */
@media (max-width: 782px) {
  .ie-page-head { padding: 44px 0 38px; }
  .ie-page-title { font-size: clamp(1.85rem, 7.4vw, 2.3rem) !important; margin: 12px 0 14px !important; }
  .ie-lede { font-size: 1.06rem; }
  .ie-section { padding: 20px 0 52px; }
  .ie-page-head::before, .ie-hero::before { background-size: 48px 48px; }
}

/* Blue spec strip: stacked pairs, not four squeezed columns */
@media (max-width: 782px) {
  .ie-specstrip { gap: 0 !important; }
  .ie-specstrip > .wp-block-column {
    border-right: none; border-top: 1px solid rgba(255,255,255,.16);
    padding: 16px 0 0; margin-top: 16px;
  }
  .ie-specstrip > .wp-block-column:first-child { border-top: none; padding-top: 0; margin-top: 0; }
}

/* Service blocks and cards */
@media (max-width: 782px) {
  .ie-svc-block { padding: 36px 0; gap: 22px; }
  .ie-svc-media img { max-width: 100%; }
  .ie-svc-item { padding: 18px 0; }
  .wp-block-columns.ie-hairline > .wp-block-column { padding: 28px 22px !important; }
  .wp-block-columns.ie-hairline > .wp-block-column + .wp-block-column { margin-left: 0; margin-top: -1px; }
  .wp-block-columns.ie-hairline + .wp-block-columns.ie-hairline { margin-top: -1px !important; }
  .ie-stats { max-width: none; }
}

/* Insights: chips and search usable one-handed */
@media (max-width: 782px) {
  .ie-chiprow { flex-direction: column; align-items: stretch !important; gap: 16px; }
  .ie-search { max-width: none; order: -1; }
  .ie-search input { padding: 13px 14px 13px 38px; font-size: .95rem; }
  .ie-chip a, .ie-cats li a { padding: 11px 16px; font-size: .88rem; }
  .ie-chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ie-chips::-webkit-scrollbar { display: none; }
  .ie-feature { padding: 28px 22px; gap: 24px; }
  .ie-postcard { padding: 24px 22px; min-height: 0; }
}

/* Contact: the form card was tighter than the fields inside it */
@media (max-width: 782px) {
  .ie-contact { gap: 36px; }
  .ie-formcard { padding: 26px 20px; }
  .ie-form .wp-block-jetpack-field-name, .ie-form .wp-block-jetpack-field-text,
  .ie-form .wp-block-jetpack-field-email, .ie-form .wp-block-jetpack-field-select,
  .ie-form .wp-block-jetpack-field-telephone { margin-bottom: 16px; }
  .ie-form input, .ie-form select, .ie-form textarea { font-size: 1rem; padding: 13px 14px; }
  .ie-form button { width: 100%; padding-block: 15px !important; }
}

/* Footer: stack cleanly instead of four narrow columns */
@media (max-width: 782px) {
  .ie-footer-contact, .ie-footer-practice { line-height: 1.85 !important; }
  .ie-social .wp-social-link { width: 44px !important; height: 44px !important; }
  .ie-share { margin-top: 40px; }
}

/* Footer services list + anchor offset for the sticky header */
ul.ie-footer-practice { list-style: none; margin: 0 !important; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem !important; }
ul.ie-footer-practice li { margin: 0; line-height: 1.35; }
ul.ie-footer-practice a { display: inline-block; }
.ie-svc-block { scroll-margin-top: 110px; }
@media (max-width: 782px) { .ie-svc-block { scroll-margin-top: 84px; } }

/* Footer contact: white email for contrast on the deep navy */
.ie-footer-contact a { color: #fff !important; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.28); }
.ie-footer-contact a:hover { color: var(--wp--preset--color--accent) !important; border-bottom-color: var(--wp--preset--color--accent); }

/* Post body rhythm */
.ie-postbody > p, .entry-content > p { font-size: 1.05rem; line-height: 1.72; color: #2A2F3D; margin: 0 0 22px; text-wrap: pretty; }
.ie-postbody h2, .entry-content h2 { font-size: 1.55rem; letter-spacing: -.015em; margin: 44px 0 14px; }
.ie-postbody h3, .entry-content h3 { font-size: 1.14rem; margin: 32px 0 10px; }
.ie-postbody ul, .entry-content ul { margin: 0 0 24px; padding-left: 22px; }
.ie-postbody li, .entry-content li { font-size: 1.02rem; line-height: 1.65; color: #2A2F3D; margin-bottom: 10px; }
.ie-postbody blockquote, .entry-content blockquote {
  margin: 32px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--wp--preset--color--accent);
}
.ie-postbody blockquote p, .entry-content blockquote p {
  font-size: 1.22rem; line-height: 1.5; color: #11359D; font-weight: 500; margin: 0;
}
.ie-figure { margin: 34px 0 !important; }
.ie-figure img { width: 100%; display: block; background: #f4f5f8; }
.ie-figure figcaption, .wp-element-caption {
  font-size: .82rem; line-height: 1.5; color: #8A90A0; margin-top: 10px; text-align: left;
}
@media (max-width: 782px) {
  .ie-postbody h2, .entry-content h2 { font-size: 1.36rem; margin-top: 34px; }
  .ie-postbody blockquote p, .entry-content blockquote p { font-size: 1.08rem; }
}

/* ---- v2.5.2 fixes ---- */

/* Hero buttons: the outline style sat 2px shorter than the filled one because
   its border was added outside the same padding box. */
.ie-hero .wp-block-button__link { padding: 14px 28px !important; line-height: 1.25; box-sizing: border-box; }
.ie-btn-ghost .wp-block-button__link { padding: 13px 27px !important; }

/* core/read-more puts the class on the <a> itself, so ".ie-feature__more a"
   never matched. On the dark feature card the link was rendering brand blue. */
a.ie-feature__more { color: #fff !important; font-size: .88rem; font-weight: 600; text-decoration: none; }
a.ie-feature__more:hover { color: #F7BD21 !important; }
a.ie-postcard__more { font-size: .85rem; font-weight: 600; color: #11359D !important; text-decoration: none; }
a.ie-postcard__more:hover { color: #0A2470 !important; }

/* Featured image on a single post. Never cropped (the renders carry a logo in
   the corner) and never wider than the body measure, so a wide window cannot
   push it out past the text. Both bounds sit on the image itself, so it scales
   to fit without distortion whatever the upload's proportions. */
.wp-block-post-featured-image:not([class*="ie-"]) { max-width: 720px; margin-left: 0; margin-right: 0; }
.wp-block-post-featured-image:not([class*="ie-"]) img, .ie-postmedia img {
  display: block; width: auto; max-width: min(100%, 720px); height: auto; max-height: 520px;
  background: #f4f5f8;
}

/* Card thumbnails are cropped to a fixed band so a row of cards lines up no
   matter what proportions the uploads have. Stated after (and more specifically
   than) the single-post rule above, which otherwise let them size naturally. */
.ie-postcard__thumb.wp-block-post-featured-image,
.ie-feature__media.wp-block-post-featured-image { max-width: none; width: 100%; margin: 0; }
.ie-postcard__thumb.wp-block-post-featured-image a,
.ie-feature__media.wp-block-post-featured-image a { display: block; line-height: 0; }
.ie-postcard__thumb.wp-block-post-featured-image img,
.ie-feature__media.wp-block-post-featured-image img {
  display: block; width: 100%; max-width: none; height: auto; max-height: none;
  object-fit: cover; background: #0B0F1A;
}
.ie-postcard__thumb.wp-block-post-featured-image img { aspect-ratio: 16/9; }
.ie-feature__media.wp-block-post-featured-image img { aspect-ratio: 4/3; }

/* Any image or quote placed in post content picks up the house style — no
   class needed in the editor. */
.entry-content figure.wp-block-image, .ie-postbody figure.wp-block-image { margin: 34px 0 !important; }
.entry-content figure.wp-block-image img, .ie-postbody figure.wp-block-image img {
  width: 100%; height: auto; display: block; background: #f4f5f8;
}
.entry-content figcaption, .ie-postbody figcaption {
  font-size: .82rem; line-height: 1.5; color: #8A90A0; margin-top: 10px; text-align: left;
}


/* ------------------------------------------------------------------
   Header navigation — self-contained overlay behavior.

   The core navigation block relies on wp-block-navigation's own
   stylesheet to hide the hamburger on desktop and to hide the overlay
   when it is closed. If that stylesheet is deferred or stripped (CSS
   optimisation plugins do this), the hamburger, the close button and
   the menu items all render at once, stacked over the page. These
   rules make the theme correct on its own, whatever else loads.
   Overlay breakpoint is 900px, not core's 600px, so tablets get it too.
   ------------------------------------------------------------------ */

/* Desktop: no toggles at all, the menu is a plain inline row. */
.ie-header .wp-block-navigation__responsive-container-open,
.ie-header .wp-block-navigation__responsive-container-close { display: none !important; }

.ie-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
  position: static; display: block; width: auto; height: auto;
  background-color: transparent !important; padding: 0; overflow: visible;
}
.ie-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content {
  display: flex; flex-direction: row; align-items: center; gap: 34px;
}
.ie-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
  flex-direction: row; align-items: center;
}

@media (max-width: 900px) {
  /* Hamburger returns, closed overlay is fully removed from the page. */
  .ie-header .wp-block-navigation__responsive-container-open {
    display: flex !important; min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center; background: transparent; border: 0;
  }
  .ie-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }

  /* Open menu is a panel in the header's own flow: it pushes the page down
     rather than covering it, and never scrolls — it is three links.
     nav-toggle.js moves the panel to the end of .ie-header on open so it can
     span the full width, and puts it back on close. */
  .ie-header .wp-block-navigation__responsive-container.is-menu-open {
    display: block !important; position: static !important; inset: auto !important;
    width: 100%; max-width: none; height: auto; min-height: 0;
    padding: 0 !important; overflow: visible; z-index: auto;
    background-color: transparent !important; color: #0B0F1A !important;
    border-top: 1px solid #D9DCE4;
  }
  /* The burger itself closes the panel, so the X inside it is redundant. */
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
    display: none !important;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: block; width: 100%; margin: 0; padding: 2px 24px 10px;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; width: 100%; margin: 0; padding: 0; list-style: none;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a {
    display: block; width: 100%; padding: 13px 0 !important; font-size: 1.05rem;
    border-bottom: 1px solid #D9DCE4 !important;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child > a {
    border-bottom: 0 !important;
  }
  .ie-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.current-menu-item > a {
    color: #11359D;
  }
}


/* ================= v2.5.4 — contact page credentials ================= */

.ie-contact__intro { max-width: 34em; margin: 0 0 30px; font-size: 1.02rem; line-height: 1.6; color: #3A4052; }
.ie-contact__cred  { max-width: 34em; margin: 0 0 30px; font-size: 0.95rem; line-height: 1.55; color: #3A4052; }

/* NAFEMS badge sits beside its explanation, matched to the height of the note
   (three lines) and well subordinate to the 170px header logo. */
.ie-affil { display: flex; align-items: flex-start; gap: 18px; margin: 0 0 34px; }
/* line-height:0 on the figure and its link: the badge img is display:block
   inside an inline <a>, which otherwise leaves an empty line box above it and
   drops the badge ~23px below the first line of the note. */
.ie-affil__badge { display: block; flex: 0 0 auto; align-self: flex-start; margin: 0 !important; line-height: 0; font-size: 0; }
.ie-affil > *, .ie-affil__note { margin-block-start: 0 !important; }
img.ie-affil__badge, .ie-affil__badge img { display: block; width: 76px; height: auto; }
.ie-affil__note { margin: 0; font-size: 0.9rem; line-height: 1.55; color: #5B6172; }

/* Email and office address, now at the foot of the column */
.ie-contact__meta { padding-top: 26px; border-top: 1px solid #D9DCE4; }

@media (max-width: 900px) {
  .ie-contact__intro, .ie-contact__cred { max-width: none; }
  .ie-affil { gap: 14px; margin-bottom: 28px; }
}


/* ================= v2.5.9 — article measure alignment ================= */

/* The post body is a constrained 720px layout, which core centers inside the
   column. The featured image sits outside that layout and is flush left, so
   past 720px of column width the two drifted apart. Left-align the body's own
   children instead of centering them, and both share one left edge at every
   width. Explicitly aligned blocks keep their own behavior. */
.wp-block-post-content > *:not(.alignfull):not(.alignwide):not(.alignright):not(.aligncenter):not(.alignleft) {
  margin-left: 0 !important;
  margin-right: auto !important;
}
