/*
 * Responsive-only remediation layer.
 * Desktop is intentionally not targeted: all declarations below are scoped to
 * tablet and mobile breakpoints discovered during the public-site smoke run.
 */

.site-mobile-menu-toggle {
	display: none;
}

@media (max-width: 1279px) {
	.site-header {
		gap: 12px;
	}

	.site-header .brand {
		width: 112px;
		height: 44px;
		padding-inline: 0;
	}

	.site-mobile-menu-toggle {
		position: relative;
		display: block;
		width: 42px;
		height: 42px;
		flex: 0 0 42px;
		padding: 0;
		border: 1px solid #3a3157;
		border-radius: 8px;
		background: linear-gradient(145deg, #17152d, #0f0f20);
		color: #f1f5f9;
		cursor: pointer;
		transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
	}

	.site-mobile-menu-toggle > span:not(.screen-reader-text) {
		position: absolute;
		top: 50%;
		left: 50%;
		display: block;
		width: 18px;
		height: 2px;
		border-radius: 2px;
		background: currentColor;
		transition: transform .2s ease, opacity .2s ease;
	}

	.site-mobile-menu-toggle > span:nth-child(2) {
		transform: translate(-50%, -7px);
	}

	.site-mobile-menu-toggle > span:nth-child(3) {
		transform: translate(-50%, -50%);
	}

	.site-mobile-menu-toggle > span:nth-child(4) {
		transform: translate(-50%, 5px);
	}

	.site-header.is-menu-open .site-mobile-menu-toggle > span:nth-child(2) {
		transform: translate(-50%, -50%) rotate(45deg);
	}

	.site-header.is-menu-open .site-mobile-menu-toggle > span:nth-child(3) {
		opacity: 0;
	}

	.site-header.is-menu-open .site-mobile-menu-toggle > span:nth-child(4) {
		transform: translate(-50%, -50%) rotate(-45deg);
	}

	.site-mobile-menu-toggle:hover,
	.site-mobile-menu-toggle:focus-visible,
	.site-header.is-menu-open .site-mobile-menu-toggle {
		border-color: #8d4bdd;
		background: #1b1530;
		box-shadow: 0 0 0 3px rgba(141, 75, 221, .15);
	}

	.site-header .main-nav {
		position: absolute;
		top: calc(100% + 8px);
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100dvh - 76px);
		overflow: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 10px;
		border: 1px solid #39275d;
		border-radius: 14px;
		background: linear-gradient(180deg, #141329 0%, #0f0e20 100%);
		box-shadow: 0 24px 54px rgba(0, 0, 0, .48), 0 0 30px rgba(118, 56, 187, .08);
		overscroll-behavior: contain;
		overflow-anchor: none;
		scrollbar-color: #5e398f transparent;
		white-space: normal;
	}

	.site-header.is-menu-open .main-nav {
		display: flex;
	}

	.site-header .main-nav > .nav-link,
	.site-header .main-nav > .menu-item > .nav-link,
	.site-header .main-nav .nav-heading {
		display: flex;
		min-height: 44px;
		align-items: center;
		padding: 12px;
		font-size: 14px;
		font-weight: 600;
		line-height: 20px;
		white-space: normal;
	}

	.site-header .main-nav > .nav-link::after,
	.site-header .main-nav > .menu-item > .nav-link::after {
		display: none;
	}

	.site-header .main-nav > .nav-link,
	.site-header .main-nav > .menu-item {
		border-bottom: 1px solid rgba(148, 163, 184, .1);
	}

	.site-header .main-nav > .nav-link:last-child,
	.site-header .main-nav > .menu-item:last-child {
		border-bottom: 0;
	}

	.site-header .main-nav > .menu-item {
		width: 100%;
	}

	.site-header .main-nav > .menu-item > .nav-link {
		justify-content: space-between;
	}

	.site-header .main-nav > .menu-item > .nav-link b {
		flex: 0 0 8px;
		transition: transform .2s ease;
	}

	.site-header .main-nav > .has-dropdown.is-open > .nav-link {
		position: sticky;
		top: 0;
		z-index: 3;
		border-radius: 8px;
		background: #18152f;
		box-shadow: 0 -12px 0 #141329, 0 8px 18px rgba(7, 7, 18, .32);
		color: #fff;
	}

	.site-header .main-nav > .has-dropdown.is-open > .nav-link b {
		margin-bottom: 0;
		transform: rotate(225deg);
	}

	.site-header .main-nav .dropdown-menu,
	.site-header .main-nav .mega-menu {
		position: static;
		display: none;
		min-width: 0;
		max-width: none;
		max-height: none;
		overflow: visible;
		margin: 0 6px 10px;
		padding: 8px;
		padding-top: calc(8px + var(--mobile-dropdown-clearance, 0px));
		border: 1px solid rgba(168, 72, 255, .16);
		border-radius: 10px;
		background: rgba(7, 7, 18, .52);
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		scrollbar-gutter: auto;
	}

	.site-header .main-nav > .has-dropdown.is-open > .dropdown-menu {
		display: block;
	}

	.site-header .mega-list__group + .mega-list__group {
		margin-top: 4px;
		padding-top: 8px;
	}

	.site-header .mega-list__heading {
		padding-inline: 10px;
		color: #a98be1;
		font-size: 10px;
		letter-spacing: .08em;
	}

	.site-header .mega-list__group-items .nav-link,
	.site-header .mega-list__standalone .nav-link {
		min-height: 40px;
		padding: 10px 42px 10px 10px;
		font-size: 13px;
		line-height: 19px;
	}

	.site-header .mega-list__group-items .nav-link:hover,
	.site-header .mega-list__group-items .nav-link:focus-visible,
	.site-header .mega-list__standalone .nav-link:hover,
	.site-header .mega-list__standalone .nav-link:focus-visible {
		background: #251a42;
		color: #fff;
	}

	.site-header .header-cta {
		min-height: 42px;
		margin-left: 0;
		padding: 9px 12px;
		font-size: 12px;
		line-height: 18px;
	}

	.sub-nav {
		height: auto;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.sub-nav > .shell {
		width: max-content;
		min-width: 100%;
		padding-inline: 20px;
	}

}

@media (max-width: 1279px) {
	body.has-open-mobile-navigation {
		overflow: hidden;
	}
}

/*
 * Mid-size tablets need the same structural collapse as phones before the
 * fixed desktop artwork and CTA spacing become wider than the content grid.
 */
@media (max-width: 1100px) {
	.approach,
	.ne1-approach {
		height: auto;
		align-items: flex-start;
		flex-direction: column;
		gap: 48px;
		padding-block: 80px;
	}

	.approach-copy,
	.approach .approach-copy {
		width: 100%;
		max-width: 580px;
	}

	.process-visual,
	.approach .process-visual {
		width: min(560px, 100%);
		height: auto;
		max-width: 100%;
		flex-basis: auto;
		aspect-ratio: 1;
	}

	.ne1-cta .contact-card,
	.ne1-lead-form-cta .contact-card,
	.ne1-home-contact__card,
	.contact-section .contact-card {
		height: auto;
		min-height: 0;
		align-items: flex-start;
		flex-direction: column;
		gap: 32px;
		padding: 48px;
	}

	.contact-card > * {
		min-width: 0;
		max-width: 100%;
	}

	.ne1-cta .contact-card > div,
	.ne1-lead-form-cta .contact-card > div,
	.ne1-lead-form-cta .contact-card > form,
	.ne1-home-contact__card > div,
	.ne1-home-contact__card > form,
	.contact-section .contact-card > div,
	.contact-section .contact-card > form,
	.contact-section .contact-card p {
		width: 100%;
	}

	.ne1-capabilities article a,
	.ne1-content-grid .service-grid article > a,
	.ne1-feature-grid-callout__callout a,
	.ne1-case-study-showcase__heading > a {
		display: inline-flex;
		min-height: 44px;
		align-items: center;
	}

	.footer-top {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 42px 36px;
	}

	.footer-about {
		grid-column: 1 / -1;
	}

	.footer-about p {
		width: auto;
		max-width: 560px;
	}
}

@media (max-width: 1100px) {
	.ne1-home-hero {
		min-height: 0;
	}

	.ne1-home-hero .hero-content {
		height: auto;
		align-items: flex-start;
		flex-direction: column;
		gap: 40px;
		padding-block: 72px;
	}

	.ne1-home-hero .hero-copy {
		width: 100%;
		max-width: 580px;
	}

	.ne1-home-hero .hero-content > .analytics-card {
		width: min(560px, 100%);
		height: auto;
		max-width: 100%;
		flex: 0 0 auto;
		aspect-ratio: 770 / 690;
		background-position: center;
		background-size: contain;
	}
}

@media (max-width: 700px) {
	.ne1-process-steps ol > li:not(:last-child)::before,
	.ne1-process-steps ol > li:not(:last-child)::after {
		display: none;
	}

	.site-header.shell {
		width: calc(100% - 40px);
	}

	.contact-section .shell,
	.trusted > .shell {
		width: calc(100% - 40px);
	}

	.hero {
		min-height: 0;
	}

	.hero-content,
	.approach,
	.why-inner {
		height: auto;
		flex-direction: column;
		align-items: flex-start;
	}

	.hero-content,
	.approach {
		gap: 32px;
		padding-block: 56px;
	}

	.hero-copy,
	.ne1-home-hero__copy,
	.approach-copy,
	.approach .approach-copy {
		width: 100%;
		max-width: 580px;
	}

	.analytics-card,
	.process-visual,
	.approach .process-visual {
		width: 100%;
		height: auto;
		max-width: 100%;
		flex-basis: auto;
	}

	.ne1-home-hero .hero-content > .analytics-card {
		aspect-ratio: 770 / 690;
		background-position: center;
		background-size: contain;
	}

	.process-visual,
	.approach .process-visual {
		aspect-ratio: 1;
	}

	.hero-actions,
	.ne1-home-hero__actions {
		flex-wrap: wrap;
		gap: 12px;
	}

	.contact-card,
	.ne1-home-contact__card,
	.ne1-cta .contact-card,
	.ne1-lead-form-cta .contact-card,
	.contact-section .contact-card {
		height: auto;
		align-items: flex-start;
		flex-direction: column;
		gap: 30px;
		padding: 40px 28px;
	}

	.contact-card p,
	.contact-card form,
	.ne1-home-contact p,
	.ne1-home-contact form {
		width: 100%;
	}

	.office-list a {
		overflow-wrap: anywhere;
	}

	.trusted {
		padding-block: 56px;
	}

	.trusted p {
		margin-bottom: 24px;
		text-align: left;
	}

	.trusted .trusted-track {
		display: flex;
		overflow-x: auto;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 12px;
		margin-inline: -20px;
		padding: 2px 20px 14px;
		scroll-padding-inline: 20px;
		scroll-snap-type: x mandatory;
		overscroll-behavior-inline: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.trusted .trusted-track::-webkit-scrollbar {
		display: none;
	}

	.trusted .trusted-track:focus-visible {
		outline: 2px solid #7c3aed;
		outline-offset: 4px;
	}

	.trusted .trusted-track strong {
		min-height: 76px;
		flex: 0 0 min(310px, calc(100vw - 72px));
		justify-content: center;
		padding: 16px 20px;
		border: 1px solid #e2e8f0;
		border-radius: 14px;
		background: #fff;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	footer {
		padding-top: 56px;
	}

	.footer-top {
		grid-template-columns: 1fr 1fr;
		gap: 38px 28px;
		padding-bottom: 52px;
	}

	.footer-about {
		grid-column: 1 / -1;
	}

	.footer-about p {
		width: auto;
		max-width: 360px;
		margin-top: 22px;
	}

	.footer-bottom {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.footer-bottom nav ul {
		flex-wrap: wrap;
		gap: 14px 22px;
	}

	.footer-top > div:not(:first-child) a,
	.footer-bottom a {
		display: inline-flex;
		min-height: 40px;
		align-items: center;
	}

	.footer-top h3 {
		margin-bottom: 12px;
	}

	.footer-top > div:not(:first-child) a {
		margin-block: 0;
	}

	.footer-top > div:not(:first-child) li + li {
		margin-top: 4px;
	}
}

@media (max-width: 480px) {
	.site-header .brand {
		width: 96px;
	}

	.site-header .header-cta {
		gap: 0;
		padding: 9px 11px;
		font-size: 0;
	}

	.site-header .header-cta::after {
		content: 'Start';
		font-size: 12px;
		line-height: 18px;
	}

	.site-header .header-cta img {
		display: none;
	}

	.hero-actions .button,
	.ne1-home-hero__actions .ne1-button {
		width: 100%;
	}

	.hero h1,
	.ne1-home-hero h1,
	.ne1-hero-breadcrumbs h1,
	.ne1-hero-breadcrumbs--light h1 {
		font-size: 40px;
	}

	.ne1-cta h2 {
		font-size: 34px;
	}

	.ne1-cta .button,
	.ne1-lead-form-cta .button {
		width: 100%;
	}

	.footer-top {
		grid-template-columns: 1fr;
	}

	.footer-about {
		grid-column: auto;
	}
}
