@import "tokens.css";
@import "base.css";
@import "grid.css";

/* Light/dark section variants (reference uses these throughout) */
.section { padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
.section--dark { background: var(--color-dark); color: var(--color-white); }
.section--accent { background: var(--color-accent); color: var(--color-white); }

/* Header — black bar; left primary nav with hover dropdowns + right secondary nav */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-ink); color: var(--color-white); }
.site-footer { background: var(--color-dark); color: var(--color-white); }
/* Header bar runs wider than the page container (isecinc container-xxl pl-0 feel):
   smaller side padding pushes the logo/primary nav further left and the secondary
   nav further right. */
.site-header__inner { display: flex; align-items: stretch; gap: 0; min-height: 84px; max-width: none; padding-inline: clamp(.85rem, .4rem + .9vw, 1.5rem); }
.site-header__logo { display: flex; align-items: center; font-weight: var(--fw-bold); font-size: 1.25rem; letter-spacing: .02em; color: var(--color-white); white-space: nowrap; }
.site-header a { color: var(--color-white); }
.site-nav { display: flex; align-items: stretch; }
.site-nav--primary { margin-left: clamp(.25rem, .1rem + .6vw, 1rem); margin-right: auto; }
/* top-level menus */
.site-header .menu { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.site-header .menu > li { position: relative; display: flex; align-items: center; }
.site-header .menu > li > a { display: flex; align-items: center; padding: 0 .85rem; font-weight: var(--fw-medium); line-height: 1.2; }
.site-header .menu > li > a:hover, .site-header .menu > li:focus-within > a { color: var(--color-accent); }
.menu--primary { font-size: 1rem; }
.menu--secondary { font-size: .8125rem; }
.menu--secondary > li > a { padding: 0 .6rem; }
/* parent caret */
.site-header .menu-item-has-children > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.12em) rotate(45deg); transition: transform .2s ease; }
.site-header .menu-item-has-children:hover > a::after { transform: translateY(.05em) rotate(-135deg); }
/* hover dropdown sub-menus */
.site-header .sub-menu { list-style: none; margin: 0; padding: .5rem 0; position: absolute; top: 100%; left: 0; min-width: 240px; background: #111; box-shadow: 0 18px 44px rgba(0,0,0,.4); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 60; }
.menu--secondary .sub-menu { left: auto; right: 0; }
.site-header .menu-item-has-children:hover > .sub-menu, .site-header .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-header .sub-menu li { display: block; }
.site-header .sub-menu a { display: block; padding: .55rem 1.25rem; font-size: .9rem; font-weight: var(--fw-regular); white-space: nowrap; }
.site-header .sub-menu a:hover { color: var(--color-accent); background: rgba(255,255,255,.05); }
/* =====================================================================
   Mega-menu — exact isecinc replica.
   Full-width #000 panel; content contained to the site container width
   (full-bleed-bg / contained-content padding trick); intro column + link
   groups (Expertise) or "Filter By" tabs (Projects). Body 18px / 1.6.
   ===================================================================== */
.site-header .menu > li.mega { position: static; }
.site-header .menu > li.mega > .sub-menu {
	left: 0; right: 0; width: 100%; min-width: 0;
	background: #000; color: #fff;
	font-size: 1.125rem; line-height: 1.6;
	box-shadow: 0 26px 46px rgba(0,0,0,.5);
	display: flex; flex-wrap: wrap; align-items: flex-start;
	gap: clamp(1.5rem, 1rem + 2vw, 3.5rem);
	padding: clamp(2.75rem, 2rem + 2vw, 3.25rem) max(var(--gutter), calc((100% - var(--container-max)) / 2)) clamp(3rem, 2rem + 2vw, 3.75rem);
}
.site-header .menu > li.mega > .sub-menu > li { flex: 1 1 0; min-width: 180px; }

/* Intro column: large blurb (.text-28) + white .btn--light CTA with text-slide */
.site-header .menu > li.mega .mega-intro { flex: 1.2 1 0; max-width: 380px; padding-right: clamp(0px, 1vw, 1.5rem); }
.mega-intro__text { margin: 0 0 1.75rem; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.6rem); line-height: 1.3; color: #fff; }
.site-header .menu > li.mega .mega-intro__cta {
	position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
	height: 48px; width: auto; padding: 0 32px; overflow: hidden;
	background: #fff; color: var(--color-ink); border: 1px solid transparent; border-radius: 0;
	font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; line-height: 1; white-space: nowrap;
	transition: background .3s ease, color .3s ease;
}
.site-header .menu > li.mega .mega-intro__cta:hover,
.site-header .menu > li.mega .mega-intro__cta:focus-visible { background: var(--color-accent); color: #fff; }
.site-header .menu > li.mega .mega-intro__cta::after { display: none; }
.mega-intro__cta-icon { width: 18px; height: 18px; margin-right: 10px; transform: translateY(-1px); flex: none; }
.mega-intro__cta .btn__text { position: relative; display: block; }
.mega-intro__cta .btn__text > span { display: block; transition: transform .4s ease, visibility .4s; }
.mega-intro__cta .btn__text > span + span { position: absolute; left: 0; top: 0; transform: translateY(50px); visibility: hidden; }
.site-header .menu > li.mega .mega-intro__cta:hover .btn__text > span:first-child,
.site-header .menu > li.mega .mega-intro__cta:focus-visible .btn__text > span:first-child { transform: translateY(-50px); visibility: hidden; }
.site-header .menu > li.mega .mega-intro__cta:hover .btn__text > span + span,
.site-header .menu > li.mega .mega-intro__cta:focus-visible .btn__text > span + span { transform: translateY(0); visibility: visible; }

/* Link-group columns (Expertise: Solutions / Market Sectors) */
/* heading = isecinc .pre-headline.color-primary.text-14 (exclude the intro column's CTA) */
.site-header .menu > li.mega > .sub-menu > li:not(.mega-intro) > a {
	display: block; padding: 0; margin: 0 0 1.1rem;
	font-size: .875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; color: var(--color-accent);
	border: 0; white-space: normal;
}
.site-header .menu > li.mega > .sub-menu > li:not(.mega-intro) > a::after { display: none; }
.site-header .menu > li.mega > .sub-menu > li:not(.mega-intro) > a:hover { color: var(--color-accent); background: none; }

/* nested link list. Stays hidden with the closed panel (no pointer capture) until hover/focus. */
.site-header .menu > li.mega .sub-menu .sub-menu { position: static; transform: none; box-shadow: none; min-width: 0; padding: 0; background: transparent; }
.site-header .menu > li.mega:hover .sub-menu .sub-menu,
.site-header .menu > li.mega:focus-within .sub-menu .sub-menu { opacity: 1; visibility: visible; }
.site-header .menu > li.mega .sub-menu .sub-menu li { margin-bottom: 6px; }
/* Expertise link = isecinc .header__megamenu-link + .links--stroke--hover (growing orange underline) */
.site-header .menu > li.mega .sub-menu .sub-menu a {
	display: inline-block; padding: 2px 0; font-size: 1.0625rem; font-weight: 400; white-space: normal; color: #fff;
	background-image: linear-gradient(transparent calc(100% - 1px), var(--color-accent) 1px);
	background-repeat: no-repeat; background-position: left bottom; background-size: 0% 100%;
	transition: background-size .3s ease, color .2s ease;
}
.site-header .menu > li.mega .sub-menu .sub-menu a:hover { color: #fff; background-size: 100% 100%; }

/* =====================================================================
   Tabbed mega (Projects) — "Filter By" tabs + gray rounded content box
   ===================================================================== */
.site-header .menu > li.mega--tabs .mega-tabs { flex: 2.3 1 0; min-width: 0; }
.mega-tabs__head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; }
.mega-tabs__label { margin: 0; font-size: .875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; color: var(--color-accent); }
.mega-tabs__nav { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.mega-tabs__tab {
	position: relative; background: none; border: 0; padding: 0; cursor: pointer;
	font-family: inherit; font-size: .9375rem; font-weight: 400; color: #fff; transition: opacity .2s ease;
}
.mega-tabs__tab:hover:not([aria-selected="true"]) { opacity: .6; }
/* active tab: caret pointing down into the gray box */
.mega-tabs__tab::before {
	content: ""; position: absolute; left: 50%; top: calc(100% + 13px); transform: translateX(-50%);
	border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 11px solid #39393b;
	opacity: 0; transition: opacity .2s ease;
}
.mega-tabs__tab[aria-selected="true"]::before { opacity: 1; }
.mega-tabs__panels { margin-top: 26px; }
/* gray content box = isecinc .project-tab-content */
.mega-tabs__panel { padding: 26px 40px 34px; border-radius: 6px; background: #39393b; }
.mega-tabs__panel .sub-menu { columns: 2; column-gap: 56px; margin: 0; }
.mega-tabs__panel .sub-menu li { position: relative; margin: 0; padding: 13px 0 13px 44px; border-bottom: 1px solid hsla(0,0%,100%,.2); break-inside: avoid; }
.mega-tabs__panel .sub-menu li::before {
	content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 10px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath fill='%23EB4D00' d='M14.014 9.09 17.5 5.649H0v-1.3h17.5L14.014.909l.92-.909L20 5l-5.066 5Z'/%3E%3C/svg%3E") no-repeat center/contain;
}
/* tab links: plain white (the gray box + arrow is the treatment, no underline-grow) */
.site-header .menu > li.mega--tabs .mega-tabs__panel .sub-menu a { display: inline-block; padding: 0; font-size: 1rem; background-image: none; color: #fff; }
.site-header .menu > li.mega--tabs .mega-tabs__panel .sub-menu a:hover { color: var(--color-accent); background-size: 0 0; }

/* Footer — brand + 3 link columns (isecinc style), then a bottom legal bar */
.site-footer { background: var(--color-dark); color: var(--color-white); }
.site-footer a { color: var(--color-white); }
.site-footer__top {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: clamp(1.5rem, 1rem + 2vw, 3.5rem);
	padding-block: clamp(2.75rem, 2rem + 2.5vw, 4.5rem);
}
.site-footer__brand-name { display: inline-block; font-weight: var(--fw-bold); font-size: 1.5rem; letter-spacing: .02em; }
.site-footer__tagline { margin: .75rem 0 1.25rem; max-width: 28ch; opacity: .7; font-size: .95rem; line-height: 1.5; }
.site-footer__contact { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .9rem; line-height: 1.55; opacity: .75; }
.site-footer__contact li + li { margin-top: .35rem; }
.site-footer__contact a:hover { color: var(--color-accent); opacity: 1; }
.site-footer__social { display: flex; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.site-footer__social a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.site-footer__heading { margin: 0 0 1rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: var(--fw-semibold); color: var(--color-accent); }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li + li { margin-top: .5rem; }
.site-footer__links a { font-size: .92rem; opacity: .85; transition: opacity .2s ease, color .2s ease; }
.site-footer__links a:hover { opacity: 1; color: var(--color-accent); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; }
.site-footer__copy { margin: 0; opacity: .65; font-size: .85rem; }
.site-footer__legal-menu { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer__legal-menu a { font-size: .85rem; opacity: .75; }
.site-footer__legal-menu a:hover { opacity: 1; color: var(--color-accent); }
@media (max-width: 991px) {
	.site-footer__top { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.site-footer__top { grid-template-columns: 1fr; }
}

/* Single (CPT/post) fallback layout */
.single-entry__header { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem); }
.single-entry__title { font-size: var(--fs-h1); font-weight: var(--fw-bold); max-width: 18ch; }
.single-entry__media { aspect-ratio: 16 / 9; overflow: hidden; }
.single-entry__media img { width: 100%; height: 100%; object-fit: cover; }
.single-entry__content { max-width: 800px; }
.single-entry__content > * + * { margin-top: 1.25rem; }

/* Archive (CPT/taxonomy listing) */
.archive-header { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem); }
.archive-header__title { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
.archive-grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
.archive-card__link { display: block; color: inherit; }
.archive-card__media { display: block; position: relative; padding-bottom: 68.75%; overflow: hidden; background: var(--color-dark); }
.archive-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.archive-card__link:hover .archive-card__media img { transform: scale(1.05); }
.archive-card__body { display: block; padding: 1rem 0; }
.archive-card__title { display: block; font-size: var(--fs-h3); font-weight: var(--fw-semibold); transition: color .3s ease; }
.archive-card__link:hover .archive-card__title { color: var(--color-accent); }
.archive-card__excerpt { display: block; margin-top: .5rem; opacity: .8; }
.archive-pagination { margin-top: 3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.archive-pagination .page-numbers { padding: .5rem .85rem; border: 1px solid rgba(29,29,27,.2); }
.archive-pagination .page-numbers.current { background: var(--color-accent); color: var(--color-white); border-color: var(--color-accent); }
@media (min-width: 600px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .archive-grid { grid-template-columns: repeat(3, 1fr); } }

/* Hamburger toggle — hidden on desktop */
.menu-toggle { display: none; align-self: center; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; z-index: 60; }
.menu-toggle__bar { display: block; width: 100%; height: 2px; background: var(--color-white); transition: transform .3s ease, opacity .3s ease; }
body.menu-open .menu-toggle__bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .menu-toggle__bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
/* Off-canvas panel (dark) */
.menu-panel { position: fixed; inset: 0; z-index: 55; background: var(--color-ink); color: var(--color-white); visibility: hidden; opacity: 0; overflow-y: auto; transition: opacity .3s ease, visibility .3s ease; }
body.menu-open .menu-panel { visibility: visible; opacity: 1; }
.menu-panel__wrap { padding-block: 6rem 3rem; opacity: 0; transform: translateY(-20px); transition: opacity .3s ease .15s, transform .3s ease .15s; }
body.menu-open .menu-panel__wrap { opacity: 1; transform: none; }
.menu-panel__nav + .menu-panel__nav { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); }
.menu-panel__menu { list-style: none; margin: 0; padding: 0; }
.menu-panel__menu > li { position: relative; }
.menu-panel__menu a { display: block; padding: .5rem 0; color: var(--color-white); font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
.menu-panel__menu a:hover { color: var(--color-accent); }
.menu-panel__menu--secondary a { font-size: 1.15rem; font-weight: var(--fw-medium); }
/* mobile submenus: collapsed; JS injects a +/- toggle */
.menu-panel__menu .sub-menu { list-style: none; margin: 0 0 .5rem; padding: 0 0 0 1rem; display: none; }
.menu-panel__menu .menu-item--open > .sub-menu { display: block; }
.menu-panel__menu .sub-menu a { font-size: 1.05rem; font-weight: var(--fw-regular); opacity: .85; }
.menu-panel__submenu-toggle { position: absolute; top: 0; right: 0; width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--color-white); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: transform .2s ease; }
.menu-panel__menu .menu-item--open > .menu-panel__submenu-toggle { transform: rotate(45deg); }
@media (max-width: 991px) {
	.site-nav--primary, .site-nav--secondary { display: none; }
	.menu-toggle { display: flex; }
}
@media (min-width: 992px) {
	.menu-panel { display: none; }
}

/* Projects filter bar */
.project-filter { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.project-filter__field { display: block; }
.project-filter__select { font: inherit; font-weight: var(--fw-medium); padding: .65rem 2.25rem .65rem .9rem; border: 1px solid rgba(29,29,27,.25); background: var(--color-white); border-radius: 0; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231d1d1b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
.project-filter__select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.project-filter__submit { padding: .65rem 1.25rem; background: var(--color-accent); color: var(--color-white); border: 0; font-weight: var(--fw-semibold); cursor: pointer; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Single project (specialized CPT single) */
.single-project__hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem); }
.single-project__title { font-size: var(--fs-h1); font-weight: var(--fw-bold); max-width: 18ch; }
.single-project__media { aspect-ratio: 16 / 9; overflow: hidden; }
.single-project__media img { width: 100%; height: 100%; object-fit: cover; }
.single-project__layout { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
.single-project__meta { display: grid; gap: 1.25rem; align-content: start; }
.single-project__meta-item { border-top: 1px solid rgba(29,29,27,.15); padding-top: .75rem; }
.single-project__meta-label { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: var(--fw-semibold); color: var(--color-accent); }
.single-project__meta-val { display: block; margin-top: .25rem; }
@media (min-width: 900px) { .single-project__layout { grid-template-columns: 7fr 3fr; } }

/* Single leadership bio (specialized CPT single) */
.single-bio__layout { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3rem); }
.single-bio__photo { position: relative; padding-bottom: 120%; overflow: hidden; background: var(--color-dark); }
.single-bio__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.single-bio__name { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
.single-bio__role { color: var(--color-accent); font-weight: var(--fw-semibold); margin-top: .25rem; }
.single-bio__content { margin-top: 1.5rem; }
.single-bio__content > * + * { margin-top: 1rem; }
@media (min-width: 768px) { .single-bio__layout { grid-template-columns: 2fr 5fr; align-items: start; } }
